« first day (1558 days earlier)      last day (3366 days later) » 

fge
5:03 PM
(and as a bonus I have just noticed that I can check exception behaviour as well!
 
Hello friends
:)
 
fge
hesitates; France/Slovenia in less than 1 hour
I want France to win and be world champion again!
 
@fge :O
 
Adz
@fge which sport?
 
@Adz i guess football
 
fge
5:14 PM
@Adz handball
From 2009 to 2014, France has won 6 of the 7 major titles, including the olympic games twice
Make that 2008 to 2014
Last year, European championship in Denmark, against Denmark in the final: 41-32
 
Adz
ooo
not too keen on sports. I used to play soccer but I really can't be bothered any more lol
 
what is meant by "batch failing" in apache storm?
is there anything like a bolt being executed in storm topology and other bolt not being executed due to any reason?
belonging to the same topology?
 
Is this valid Java code?
public enum BusinessLogic {
   STAGE_ONE(true, false, false),
   STAGE_TWO(true, true, false),
   STAGE_THREE(false, false, true);

  private final Boolean canStartProcessing;
  private final Boolean canDoStuff;
  private final Boolean canFinish;

  private BusinessLogic(Boolean canStartProcessing, Boolean canDoStuff, Boolean canFinish){
     ... usual simple constructor
  }
  ... getters
}
How do those STAGE_n "methods" work?
 
fge
@RobertHarvey sure is valid
And those are not methods but enum values
 
Are they tuples?
 
fge
5:21 PM
And enums are just public static final instances of enum classes
Therefore they can have methods, arguments, constructors etc
The expressions after the parens are the constructor arguments
And they can even implement interfaces
 
The only part I'm confused about are the STAGE_n whatevers.
 
fge
Well, they are what I just said
 
Are those bitmaps?
 
fge
No
Again, they are enum values
 
@fge is there any room for apache storm?
 
fge
5:23 PM
And, again, just view them as public static final instances of the BusinessLogic enum class
 
OK, but... So STAGE_ONE's value is true, false, false?
 
fge
@JavaTechnical no idea, I don't use anything Apache in fact, not anymore
@RobertHarvey no
I also said that earlier
They are just the constructor's arguments
Enums are classes like any other
They just have a peculiar syntax
 
@fge did you solve the NoSuchMethodError?
grappa?
 
fge
@JavaTechnical no, since I cannot even reproduce it
 
I changed even the environment, using Eclipse LUNA.
 
5:24 PM
@fge Now we're getting somewhere. Because that doesn't look like any class I've ever seen.
So when you interrogate the enum for its value, it calls whichever constructor matches?
 
@fge I have tried even without using Maven dependencies, by manually using jar files in the project in eclipse.
but didn't work still.
 
fge
No, the call to the constructor will already have happened
They are just equivalent to public static final instances, therefore they are instantiated when the class is loaded
 
@fge does Java version matter?
I am using 1.7
 
@fge Then why the STAGE_N things? Is that some form of pattern matching to the constructor?
 
fge
Just as if you typed `public final class BusinessLogic { public static final STAGE_ONE = new BusinessLogic(foo, bar, baz); }
Err
public static final BusinessLogic STAGE_ONE = new BusinessLogic(foo, bar, baz);
 
5:26 PM
@fge could you develop a maven project of TestGrammar and put it in github, so that I can clone it?
 
fge
@RobertHarvey no, they are what are classically called "enum values"
@JavaTechnical sorry, I use gradle
@RobertHarvey this is pretty much the gist of it
 
@fge ok, could you atleast give me a gradle version of it?
@fge I would want to test with gradle instead of maven.
and see if it works
 
@fge Alright. So it looks like you would say BusinessLogic myEnum = BusinessLogic.STAGE_ONE;
 
fge
@RobertHarvey exactly
 
Got it. Thanks.
 
fge
5:29 PM
They do have a few other tricks up their sleeve as well
For instance it is guaranteed that for an enum, if E1.equals(E2) then E1 == E2
Similarly, they implement Comparable from the outset
 
Too bad they didn't do that with strings. [ducks]
 
fge
Eh? String does implement Comparable :p
 
Don't you have to use Equals() for it to work properly, though?
 
fge
No you don't, not with enums
 
But with strings.
 
fge
5:31 PM
Yes you have to
 
(Sorry about the casing. I'm a C# guy, so the casing in Java makes my head explode).
 
@RobertHarvey dw it's the same the other way round
 
fge
That is reference equality (==) vs state equality (.equals())
 
aka. saved in the same place vs. semantically the same
 
Right. In C#, they made strings use case equality for ==.
 
5:32 PM
which would work in java if you'd be ignorant enough to intern them all
 
fge
Hmm, does C# have operator overloading?
 
yes
 
fge
@Vogel612 let's no go there
 
yes it's not a nice place there ; )
 
5:34 PM
Hi all I'm using the following code to create a sql string:
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT ");
        sql.append("WSN");
        sql.append(", County");
        sql.append(", DatumCode");
        sql.append(", FieldName");
        sql.append(", FMatTD");
        sql.append(", HistOper");
        sql.append(", LeaseName");
        sql.append(", LeaseNbr");
        sql.append(", Operator");
        sql.append(", ProdFM");
        sql.append(", Remarks");
        sql.append(", State");
        sql.append(", SymCode");
 
@fge App developers don't really use operator overloading in C#. Only Microsoft uses it.
Though it's nice for things like complex numbers.
 
On the profiler it seems like it is taking long to append each substring, just curious if there's a way to make this faster.
The string isn't supposed to change... I mean it only depends on a where clause, that is the part that can change.
 
@Flethuseo Your worry is the concat time? I think you're looking at the wrong thing.
The concat time is going to be the least of your problems.
You're already performing the concatenation in the fastest possible way.
 
Hmm ok
What if I don't concatenate at all
for the first part
 
fge
What about you used, uh, jooq?
 
5:36 PM
Like for those appends I just do a sql.append("blah blah blah") all in one
and only do append when I have something else
 
Why are you worried about the speed of the concatenation? The SQL call is going to take orders of magnitude longer than that.
 
8 mins ago, by JavaTechnical
@fge ok, could you atleast give me a gradle version of it?
 
The profiler seems to tell me that 6.4% of the time is being spent on that
it calls it 20,529 times
 
fge
@JavaTechnical sorry but that won't be now
After all I have decided
I'm gonna watch the match!
 
@Flethuseo Then you're apparently not also profiling the time it takes to round-trip the SQL. This is micro-optimization; see "Premature Optimization" for further information.
 
5:38 PM
@fge ok, atleast the gradle dependency file?
 
@JavaTechnical use darn google
 
fge
@Flethuseo all the more that the JIT only starts to perform optimizations after 10k executions of a same code block
 
or rather, read the manual. It's all there
 
@fge ok
 
fge
@JavaTechnical ALL my projects except 1 use gradle, just look at the files and adapt them
It's pretty easy
 
5:39 PM
ok
 
fge
But your maven project works from scratch for me, which is why I suspect your problem is elsewhere
Try using IDEA instead of Eclipse for instance :p
 
ok, i'll download it now
 
@fge meh.. eclipse integration on maven isn't that bad
 
fge
@Vogel612 yeah, but ecj is crap
And that's being unfair to crap
At least you can shove crap away
 
lol ;)
 
fge
5:41 PM
OK, match in 20 mn, see you!
 
@RobertHarvey The time taken to do the round-trip is 46.8% of the time. I can't really do much about that one with what I have.
@RobertHarvey: in what is this reference to "Premature Optimization", what resource are you referring to
 
The depths of the internet
 
kya
:(
 
Ok, I get what you mean,s o you're saying it's negligible
 
^^ that
 
5:45 PM
Hmm ok, maybe it is what it is
 
6:06 PM
@fge I tried using IDEA. But same error.
I got there.
 
Their are several threads on the stackoverflow forum with people that want to obtain their default gateway / interface in Java, but they dont state why. Anyone who can think of a situation where you want to obtain your default gateway / interface? Cant think of one myself. stackoverflow.com/questions/5945288/get-default-gatway-in-java
 
@Flethuseo To put it another way, if 6.4 percent of the computing time is being spent on the string concatenations, that means that 93.6 percent of the computing time is being spent somewhere else.
 
hey guys, if you have time take a look at this question stackoverflow.com/questions/28176242/…
thanks!!
 
6:27 PM
@user986437 Is it correctly understood you want to set null values in your DB table, if no other value exist to be set?
 
I'm very much familiar with C# and .NET in general.
My next job will be developing Java applications instead of .NET, do you have a good book recommendation?
@SecondRikudo, Any advice?
 
@gdoron I hate Java almost as much as I hate .NET, so you won't get help from me (not because I'm evil, but because I don't know :D)
 
:)
 
yada yada PHP people
but don't ask me... I haven't read a single book on Java...
 
@SecondRikudo, Java is not my favorite language too, but... knowing only .NET has its price and risk
 
6:37 PM
@Vogel612 I find JS the most fun to write.
Especially now with ES6
PHP is meh
Java is GAHHHHHHH
 
please don't get me started on the wickedness of JS.
 
C# is decent, but doesn't run on anything but Winpoop, so eh
@Vogel612 Oh, please do get started.
 
You do know that Microsoft are writing CLR for Linux and Mac as we speak, right?
BTW, if you hate Java so much, aren't you in the wrong room...?
And I love writing js code, but it still sucks.
 
@gdoron Yup, @BenjaminGruenbaum already gave me the lecture
But until that happens
 
:)
 
6:41 PM
@gdoron Our server side is Java
So occationally I can't avoid touching it
I try to avoid it as much as possible though, I take on frontend mostly.
@gdoron How so?
 
Do you know why js was the choice for Node.js?
 
@gdoron I don't that sentence not make sense.
 
http://www.commitstrip.com/en/2015/01/28/looks-can-be-deceiving/
CommitStrip - Blog relating the daily life of web agencies developers
Looks can be deceiving
CommitStrip
1422470313
 
"The creator of Node.js originally had the goal of creating Web sites with push capabilities such as those seen in Gmail. After trying solutions in several other programming languages, he chose JavaScript because of the lack of an existing I/O API. This allowed him to define a convention of asynchronous, event-driven I/O."

So basically, it says, he looked for the weakest language and js was that one
right, fixed
 
@gdoron Hardly.
He took the language that was lacking in one field, and improved it
That doesn't change the fact that JS is fun to write and as powerful as any other
 
6:45 PM
Yeah... I love js don't get me wrong, but comparing it to C#, give me a break
Well, I have league of legends to play... :)
 
@gdoron I haven't learned C#, so I can't argue there.
@gdoron Let me save you the trouble
NOOB NOOB! REPORT! I REKT UR MOM!! REPORT REPORT!! NOOB ASH!! GO AWAY NOOB!!!!!!!11
There, that should satisfy your LoL needs for the moment ;)
 
@SecondRikudo LOL,
That's quite accurate.
 
I know, I got to Gold rank before I had enough of it all.
 
You forgot, no I mid you go top
 
Right
Silly of me
 
6:49 PM
I played once with a stupid teen, every time I came for ganking, "Ashe(not sure the champion) go bot or report.
He just stopped playing and started to fight in the chat.
 
@Vogel612 Provoking on purpose, I'll start ridiculous and claim that anything you (Java) can do, I can do better (JS) :P
 
Well it's on.
 
... File I/O
 
See you.
 
useful number processing
equality checks
proper contracts and Typesafety
 
6:50 PM
@Vogel612 LOL, really?
@Vogel612 LOL really?
@Vogel612 ===
@Vogel612 Compiler is not an excuse for programmer discipline.
 
"programmer discipline" does not exist
 
@Vogel612 False.
 
floating point arithmetics ins not anywhere near sensible for number processing
 
Fact is, I mail myself any exception in my code (JS), you know why?
 
neither is storing all numbers as floats
 
6:52 PM
Because I can afford it, I got like 2 exceptions last year
Discipline exists, if you try hard enough.
@Vogel612 Agreed.
Anything else?
 
proper scoping of variables
 
Oh hey @Second fancy meeting you here
 
@Vogel612 JS's scoping is better than Java's I'd argue.
Especially today with let.
@Gemtastic o/
 
@SecondRikudo ?? expand please?
 
@Vogel612 ES6's let gives you block scope, like C's and like Java's.
 
6:54 PM
okay so you upgraded there ;)
 
In case you didn't like functional scope
Which, honestly, I find more helpful
But that's probably just my opinion
I like to declare all of my variables at the top of the function, always.
So I don't really care much for functional vs block scoping.
Anything else? :)
 
just the quirky equality and the problems with writing properly encapsulated OOP.
 
@Vogel612 Again, ===
@Vogel612 And what do you mean by that?
 
what's private stays private, but not in js
 
@Vogel612 Sure it does.
 
6:58 PM
you can go into anything
 

« first day (1558 days earlier)      last day (3366 days later) »