« first day (1040 days earlier)      last day (2776 days later) » 

12:00 PM
@Seth How far in are you?
 
@Cerbrus unless the data is a string containing 100 double quotes, because the escaping required in json, but not in xml
 
@Ferrybig Let's not go into edge cases. That's a debate we'll both lose.
 
@MadaraUchiha Well, ~1 1/2 years of daily programming with it :)
Long road ahead.
 
@Seth That's not what I meant
 
i want to learn js and node js
 
12:01 PM
@Cerbrus true that
 
How good is your abstract thinking? OO? Design patterns?
Do you feel confident that if I give you a problem, you'd be able to model an effective Object Graph around it?
 
@MadaraUchiha I'd say decent. I suck at self-reflecting though.
 
@Seth One of the most important things I've learned when learning other languages is that OO is just one of many ways to abstract problems
 
@Seth paradox
 
And even within OO, there are many ways to do OO (see, JavaScript's prototypal, or Common Lisp's CLOS)
 
12:03 PM
@MadaraUchiha Yes. I think I do :) I usually take on problems either way though, regardless of how I feel about them. I'll most likely learn something from working on them anyway, wether I solve them or not.
 
And learning about more ways to abstract problems (inheritance, composition, polymorphism, functional, closure, higher order functions) helps you get a wider perspective of the one you're currently interested in
 
@MadaraUchiha I still have a lot to learn c:
 
@Seth We all do
 
@MadaraUchiha what is higher order functions?
 
@ColdFire A function that accepts a function as a parameter, a function that returns another function as result, or both.
JavaScript's [].map() is a higher order function
 
12:05 PM
I'm reading a lot about programming & also program a lot, but digesting everything new can take a while :P
 
It accepts a mapping function as argument, and returns a new array
 
@MadaraUchiha does java have any higher order function?
 
Do you guys have functors in JS?
 
@ColdFire Yes, the new Streams API in Java 8 uses them extensively.
@NathanOliver We don't call them functors
But functions act as functors
@ColdFire Here's an example for a higher order function in Java:
 
So you have stateful functions?
 
12:06 PM
@MadaraUchiha aah need to learn java 8 then :)
 
@NathanOliver We have closure, so yes.
 
@NathanOliver what is functors?
 
@ColdFire An object that acts like a function. Allows you to add state to a function.
 
@ColdFire Say I want to take a collection, and filter only values that match a certain criteria (for simplicity's sake, only values that has a certain value.getName()
How would you do that?
 
12:08 PM
filter
or for loop
 
@cricket_007 an incredible three upvotes
 
@ColdFire It would probably look something like this:
 
@tripleee yeah, strange. Could also be opinion based
 
public static <T extends IHasName> void filter(Collection<T> coll, String name) {
  for (T item : coll) {
    if (item.getName().equals(name)) { coll.remove(item); }
  }
}
I don't know if that's exactly valid Java, but you get the point
What's wrong with this?
 
@MadaraUchiha its valid java, but unless you use a copyonwritearraylist, its going to give a concurrentmodificationexception
 
12:11 PM
I don't think that's valid. You've modified a collection while iterating
 
^ Yup :p
 
@MadaraUchiha too much code for a simple filter i guess
 
@cricket_007 Why is that not valid?
 
<mushroom_cloud />
 
Probably not a very good idea, but invalid?
 
12:11 PM
^ what they said. </java newb>
 
@cricket_007 concurrentmodificationexception
 
o/ morning everyone
 
Hiya first
 
Sam
Hiya
 
Okay, so that's one problem
 
12:12 PM
Hiya second
 
Another one is that I think it's too specific
 
How are you guys today?
 
What if I want to filter by a different field?
 
use iterator while deleting elements
 
Monday wuhuuu
 
12:12 PM
Yes. Filter should return a Boolean?
 
Good.
 
@MadaraUchiha You can create an Iterator & use that to remove objects from the collection while iterating over it I believe.
 
@MadaraUchiha Then you gotta define a different function.
Oooh, I think I know where this is going :D
 
@Cerbrus Right, which is kinda sad, since I might have 50 of those
How about this
 
@Seth right ^^
 
12:13 PM
Predicates
 
@MadaraUchiha what about generic and interface
you could get it done in one method
 
@MadaraUchiha Why remove it? :o
 
unless it is too complex to be done in one case
 
public static <T> Collection<T> filter(Collection<T> coll, Predicate<T> predicate) {
  Collection<T> result = new ArrayList<>();
  for (T item : coll) {
    if (predicate.test(item)) { result.add(item); }
  }
  return result;
}
 
Yay :D
 
12:14 PM
Now you use it like this:
 
is predicate a java 8 thingy?
 
@ColdFire Yup
 
Collection<IHasName> filteredItems = filter(items, item -> item.getName().equals(name));
 
yay thats ugly
 
12:15 PM
Why not just pass in an Expression<Func<T, bool>> predicate and do collection.Where(() => T.field == something) ?
 
This only illustrates the point, the real Java 8 code will look something like this:
List<IHasName> filteredItems = items.stream()
	.filter(item -> item.getName().equals(name))
	.collect(Collectors.toList());
But the idea here is now that I've treated a piece of behavior as data
I can pass the way I want the matching to be done
As opposed to what to match to, and have the static method define that for me
 
aah builder pattern to the rescue
 
Well no, I see the behaviour is the equals call in the filter()... Which you better send in with the predicate :p
IDK though if Java allows it
 
@kayess No, the behavior is predicate.test()
Which is different based on what predicate you pass in
In this case, I've passed item -> item.getName().equals(name)
 
i see need to learn this predicate
 
12:19 PM
But I may have well have passed item -> item.getName().contains("poop")
 
Yeah
 
This is another form of abstraction
 
Don't you have something LINQ-ish?
 
Filter is now a higher order function, because it accepts behavior as if it was data.
@kayess No. Java has no such thing
Another form of higher order function is this:
 
You're basically passing a callback to use to filter the array on.
 
12:21 PM
public static <T> Predicate<T> complement(Predicate<T> p) {
  return item -> !p.test(item);
}
This one is a bit more freaky
 
blargh, even more uglier with c# glasses :]
 
It accepts a predicate and returns another predicate, which is the complement of it.
 
I feel like we might as well be showing Scala code
 
hehe
 
Could be an extension method of Predicate<T>, but again unsure if that's something Java has...
 
12:22 PM
So if I now pass complement(item -> item.getName().equals(name)) it's as if I passed item -> !item.getName().equals(name)
@kayess There is, Predicate#negate() essentially does that
The problem is that whether or not a thing is a predicate is determined by the accepting method, not by the caller
item -> item.getName().equals(name) isn't a predicate until it's passed into something that accepts a predicate
So for example, I can do this:
public static <T> Collection<T> reject(Collection<T> coll, Predicate<T> predicate) {
  Collection<T> result = new ArrayList<>();
  for (T item : coll) {
    if (predicate.negate().test(item)) { result.add(item); }
  }
  return result;
}
 
Even if it's Predicate<T> instance = item -> item.getName().equals(name); ?
 
@kayess After that, I can do Predicate<T> notInstance = instance.negate()
But I can't do something like Predicate<T> instance = (item -> item.getName().equals(name)).negate()
It's not as fluid and nice as other already functional languages
 
Before going to sleep tonight I'm going to say prayers that I haven't got to touch Java in my whole life
 
But they're trying, I'll give them that.
My point being, this is another form of abstraction, abstraction via passing functionality into other functions
It has nothing to do with OO.
Learning these other forms of abstractions definitely makes one a better programmer
 
Still Functionally procedural, right
 
12:26 PM
@kayess Functional
@kayess In this particular case, yes.
 
Yep :]
 
I haven't done any of the fancy stuff
 
@kayess lol
many java dev here
 
I don't like Java very much
It's a pragmatic language that caused more problems than solved
But they are trying to catch up (mostly with C#)
And they've done miracles with the ball of turd they had on their hands
So I'll give them the kudos for that.
 
12:28 PM
true
 
@MadaraUchiha C# is nice... Over the last 2 years I've been getting more and more into the back-end of our web app
 
@Cerbrus C# is a high powered laser cannon attached to a donkey.
When you detach the donkey, it no longer works well.
 
donkey?
 
@Cerbrus Windows.
 
Naturally
 
12:29 PM
Windows servers are cancer.
 
haha
 
C# is an amazing language, some of the features they have will only come to JavaScript in a few years
Promises, async/await, those are features modeled from C#
But the Windows dependency is the main reason I haven't touched it more than a couple of "hello world" examples
 
We're running windows servers, any way.
 
Sam
Uh, what about mono?
 
@Sam It's still not mature enough
 
12:31 PM
Not that I have to do any of the maintainance on'm. I can just write my code and make it run :D
 
Libraries don't work well with it, etc.
At least, last I checked.
 
Sam
True. It's still fairly usable though.
 
@MadaraUchiha heeh?, C# copied java .... it does not seem to me that it is the other way around..
 
@PetterFriberg Java is trying to catch up with C#
C# has plenty of features that Java doesn't have.
Some of the older parts are indeed taken from Java
But it's a completely and utterly different language.
The only thing that they have in common is that they're both based on classes.
 
meeh, C# did a brutal copy of java, introduce some new stuff, java is going it's own way...
 
12:33 PM
^
even both have totally different generic implemented
 
C# is closer to java then to c++, so they went the java way.. but I guess it is opinion based :D
completely different I do not really agree, if you know 1 you can easily program in the other (they are real that similar), maybe not top programmer, but you can do pretty much anything...
 
migrated to meta.stackoverflow.com
 
Sam
@PetterFriberg The frameworks are different.
 
meeh I'm not expert but I have done stuff both in c# and java.. I just need to remember to switch the method calls and upper case'em all :D. For me the main difference is that c# is windows...
and java do not have AutoResetEvent (I had to dev that my self in java :D)
 
Sam
Yeah, those are pretty nice to have
 
12:39 PM
Yeah I made that class in java, tell me if you ever need it :D
 
Sam
xD
 
haha what is that class?
 
it's nice and simple when you do asynch programming, you can wait for stuff... if not arrives you timeout nicely...
 
@PetterFriberg language seems like sphagetti code to me
3
 
I have a feeling that I could almost make a lib that change all calls so basically you could use same method names and almost same code (change imports) both in c#and java...
 
12:43 PM
nice you can do that
 
@ColdFire to me it seems like java :D
Check the example, that's as close you can come to java...
 
@PetterFriberg lol i mean speaking language not programming language
 
@ColdFire Ohh... That's why you said spaghetti code ... Oh boy >.<
 
switch using to import, lower case method names and use Console instead of System
 
Sam
@ColdFire rofl
 
12:46 PM
@PetterFriberg He made a joke about the italian language :D
 
ooh, good :D
 
@Seth not a joke well i didnt understood anything so spagetti
@PetterFriberg yeah i can see that :)
c# is pretty similar to java
i even recently ported a windows app to android
 
Then true the newest stuff is different but hey who needs that!
 
i was able to understand c# just be seeing it
 
Yeah you would have no problem to make a medium size program in C#, you just need to get used to that darn Visual Studio..
 
12:51 PM
yes visual studio sucks
Android Studio sucks
 
Sam
lol
 
i guess every IDE with studio in its name sucks
xcode doesnt have studio in its name it doesnt suck at least
same with eclipse
netbeans is an exception it is crap with or without studio
 
oooh no I love eclipse!!!, maybe because before I had JBuilder...
 
Sam
D'you hear that closey? He think's your birthplace sucks?
 
Closey = Java?
 
12:53 PM
@PetterFriberg yes that is what i said
 
Don't you be dissing my MSVS. I love the IDE, hate the compiler(well hate is kinda strong but I want a standard conforming compiler).
 
Sam
C#
And F#
 
@Sam visual studio?
 
Oh :P
 
Sam
@ColdFire Yes
 
12:53 PM
I've got to say, I hate C# capitalization
 
So it turns out that @Tunaki is a C# wannabe... afterall --------^
 
Sam
@AndrewL. pascal case?
 
me need to catch a flight cya all later
 
@kayess lol why?
 
@kayess I dare you to ping him with that... :D
 
Sam
12:54 PM
@PetterFriberg Have a safe flight o/
 
@Fish, the C# wannabe?
@Sam it really bothers me. Like: File.ReadAllBytes gives me shivers
 
@PetterFriberg cya!
 
lol
 
@ColdFire that it being said that java is a copy of c# :p in the end we could close it as a duplicate :D
 
Bye @Petter!
 
12:56 PM
@kayess it is the opposite
 
^^ C# == Java + Case
 
Sam
@AndrewL. Lol, I like it.
 
I absolutely hate it
 
hiya @Sam
 
Sam
Camel case just looks sloppy imo.
waits for impending war
 
12:57 PM
destroys sam to end the war
 
Is hungarian notation any better?
 
You mean CamelCaseJustLooksSloppy.imo?
 
@Sam camelCase is the best
 
Sam
hiyaMogs
 
goodToSeeYouToo
 
12:58 PM
pssht we have a sneaky @EdCottrell \o
 
Hey Do You Like Pascal Case? I Love Cleaning This Stuff Up From Posts Lol
 
Hey mogs :o
 
lGoodDayMogs = Hiya(Mogsdad);
 
Hey
 
Hello :D
 
12:59 PM
\o
 
Hey mogs
 
Also, don't interfaces have that annoying I in front of everything?
 
@AndrewL. It allows you to make distinction between ICanHaz and CanHaz
 
Plop Mogsdad!
 
1:00 PM
Heya @Kyll
 
@kayess eww
Plop Kyll!
 
@AndrewL. Yes? Does public class CanHaz : CanHaz make it any more clear?
Than say: public class CanHaz : ICanHaz
 
@kayess just don't name an interface like a class lol
 
Sam
@kayess Classes can't inherit themselves though?
 
Also it helps me on looking at constructors accepting Isomething and Isomethingelse
So I know the codebase is somewhat code-cleanish accepting the contracts only not the implementation...
 
1:04 PM
So Iterable<E> would become IIterable<E>?
 
IEnumerable you mean ?:p
 
Sam
^
We don't have Iterable
 
@AndrewL. what is the diff
 
Brainfart >.<
One has a stupid I
 
@Sam Does that make you Irritable?
5
 
1:06 PM
Just name the interface more general then implement with more specific names :)
 
in android also we dont use I before interface
 
@AndrewL. Wifes used to tell that to husbands at times :p
 
Sam
@NathanOliver xD
 
@NathanOliver rofl
 
Lmao @NathanOliver
 
1:07 PM
:)
1 rep unreged user, looks like a troll
afk
 
1:24 PM
Hmm, edited?
 
Probably
 
Does the introductory speaker here speaks Irish accent or ? I can't recognise it :) skillsmatter.com/skillscasts/…
 
@kayess I think he's just a more cockneyed Brit is all
 
@Machavity Thanks. I had to look up cockney
 
@kayess :(
 
1:38 PM
@Tunaki :)
 
morning!
 
Good morning
 
Bad morning
 
Irrelevant morning
:)
 
squirrel morning
 
1:44 PM
Cold Morning
 
Its not cold here
 
Java morning
 
Double morning
 
Hiya gunr
 
F# morning
hiya morning
 
1:45 PM
okay
 
@TylerH Huehue :)
 
@TylerH dokay
@Seth o_0
 
Good moaning
 
fail
 
We're looking to add to the RO team. Help us shape and moderate the room. Write up a nominations in a Github Gist and we'll add you to the list. Nominations close at the start of Monday, October 2nd 2016.
11
Same procedure as last time: You can express your desire for other people to run, but that person must write up the nomination post. You are encouraged to comment on other people's nominations. RO team discusses after nominations close.
 
1:51 PM
@gunr2171 How many Room owners are there atm? :o
 
@Seth 10
 
@Seth 10
 
@dorukayhan Ahh, thanks :]
 
@Seth We need one or others more to make coffee.
 
however, some of them are inactive
 
1:52 PM
@Tunaki I see :)
 
Sam
@Seth 7 of which are active.
 
@gunr2171 Yeah, I know :p
 
@Tunaki That and we need to be prime.
 
Definitely ^
 
the FAQ needs a table of contents so I don't need to open the developer console every time I want to link to a header
 
1:53 PM
@gunr2171 Tiny Giant is inactive?
 
@Tunaki @gunr2171 Where can I find the requirements? :)
@Tushar Not anymore.
The other three are though :o
 
@Tushar he was, he's came back recently, so I think we can un-inactive him
 
I am pretty inactive. My last message was only 2 minutes ago.
 
So we've 8 active ROs
 
mogsdad might be moved down
 
1:55 PM
:D
 
@gunr2171 He was here 15mins ago :o
 
@Seth Still here
 
@Seth hold a sec
 
@Tushar I mean he was actively writing 15mins ago c:
@gunr2171 Sure :)
 
d:
 
1:56 PM
I think I could be the perfect RO candidate... onebox trains all day long!
 
@Seth He's watching us. Silent Guardian.
 
@kayess Oh hell naw.
@Tushar Back in the old days we used to call those people "Stalker" ô.ô
:D
 
hehe
 
@Seth To nominate? No hard requirements, maybe 3k, enough messages and present in the room.
 
@Seth we don't have any "written on paper" requirements, but you will be competing against other candidates that decide to run. Just remember what we do in this room here and make your case why you would be a good person to help lead the room.
 
1:57 PM
@Seth Why? It depends (TM) ... on the daily dosis of coffee
 
@Tunaki what is active called then
 
@Tunaki Some hard requirements might be a good idea ;o
 
@Seth Closey even nominated one time and almost won had it not been for the great Sam.
 
@gunr2171 Sure thing, but I don't think that me going for this will be feasible. :p
 
Sam
@gunr2171 Unless only one person runs as candidate...
 
1:58 PM
;D
 
Sam
cough
 
morning
 
afk
 
Sam
Hiya
 
yo ryan
 
1:59 PM
@ryanyuyu Hiya
 
Hiya
 
How is life for everyone?
 

« first day (1040 days earlier)      last day (2776 days later) »