« first day (1636 days earlier)      last day (3319 days later) » 

2:00 PM
> Primary closes tomorrow.
 
yeah
 
fge
Preliminaries, not primaries
 
1 min ago, by Unihedro
@fge no
 
It's at least confusing to many early Java developers and people versed in the theory of a List implementation; plus, exposing a method that works in some implementations and doesn't in others, especially in a standard container class, is poor design.
It's one of my pet peeves about Java.
 
fge
2:01 PM
@ShotgunNinja that was the choice of the designers of the Collection API ;) And it is all documented
 
3 mins ago, by Unihedro
@fge Why did you clear my PSA?
 
fge
Also, between theory and practice, well... You know who wins
 
True on both counts. Doesn't mean I have to like it ;P
 
start step
in java world
 
Find the javadocs. Read the javadocs. Profit.
 
2:03 PM
also, ugh, I'm stuck waiting on a code review by another developer.
 
fge
@ShotgunNinja consider it this way; had the Collection API not given the choice in the matter and stuck to the CS theory, there would be no possibility of having immutable collections
And, frankly, that would suck
 
@fge Do you not understand simple questions or fail to justify simple actions?
 
fge
@Unihedro well, you were the one complaining about STN ratio, right?
 
Oh, I understand why they did it, and I'm glad they did for that purpose. I just wished they designed it better, or made it so it implemented a Mutable interface or something.
 
fge
@ShotgunNinja yeah, but then the API would probably have been a monster to use$
 
2:05 PM
@fge Is this an insult or a serious answer?
 
fge
@Unihedro a serious answer
 
Also true. I dunno, I've seen a couple different designs of container classes (Java, C#, C++, Source Engine, Boost, etc), and I've never really had a problem using any of them, but it's kind of a bad design IMHO
 
BTW, what's PSA?
 
Public Service Announcement?
 
!!urban PSA
 
2:06 PM
@Unihedro psa Publice Service Announcement. Rarely used as an acronym.
 
Rarely
 
@Mr.777 You have a problem with my rarity? :p
 
@Unihedro No, I highlited the word, so that I don't feel as I know nothing ;)
 
yupp @Unihedro
 
room topic changed to Java: Holy cow, it's Java! Not Android, which is totally different altogether. [java] [javabeans] [java-ee] [javafx] [javax] [jsp] [servlets] [swing]
 
2:08 PM
can I express yet again how much I hate [jsp]
 
No.
 

Java Sucks!

JavaScript Sucks!
^ Hate belongs in there.
 
@Unihedro LOL
 
2:09 PM
I think fge leads anyway by the count of expressing hate towards File
 
^^^
I'll try to rant less so I don't take fge's record :)
 
java is morning tea
day start with tea
 
Or coffee.
!!tea or coffee
 
@Unihedro tea
 
yupp
 
2:10 PM
Eh, I'm out of tea though.
 
hmm
 
what we think we are you are popular...
 
inb4 microsoft version of Java (which, spoiler alert: sucks)
 
return  Arrays.<Type>asList(resultSet.toArray(new Type[0]));
 
2:13 PM
@Vogel612 Why zero?
resultSet.size()
 
^ WHAT THE HECK IS WRONG ???
@Unihedro too long
 
Wait, is Type generic?
 
no it isn't
 
@Vogel612 too much garbage
 
but if it were it'd still be irrelevant
 
2:15 PM
Arrays.<Type>asList ... That generic parameter in there bugs me
 
becuse it's better that than having the construct return me a List<Object> because whatever
 
ResultSet is rawtyped?
 
no it isn't
=javadoc Set#toArray
 
that <Type> does not belong there
 
Which one do you mean? (type the number)
1. java.util.Set#toArray()
2. java.util.Set#toArray(Object[])
 
2:19 PM
@kiheru it does...
List<String> emptyList = ImmutableList.<String>of();
 
1
 
oh, interesting. I have used asList() always without
 
@kiheru and it usually works...
 
If it's not supplied, it will be inferred.
 
fge
@Unihedro not with Java 8; starting with this version the type can be inferred
Not with previous versions, unfortunately
 
2:22 PM
but not when you have something like I have here, which is running through a toArray before actually doing stuff.. I may possibly be able to remove it now, but eh..
 
Why toArray instead of a clone?
 
fge
@Vogel612 have you ever considered not trying to make it a one liner? :p
 
@fge everything complicated already happened
I have a Set<Type> results
and a return type of Collection<Type>
 
fge
Uh
A Set is a Collection, you know
Just return the Set
 
return new HashSet(set);
copy constructor ^
 
2:24 PM
but some jerkass out there thinks "Collection means it's definitely a List"
 
fge
Meh
 
and makes an unchecked cast
 
fge
return Collections.unmodifiableSet(set);
 
(I'd guesstimate in 90% of the cases)
 
@Vogel612 That's their problem
 
2:25 PM
@Unihedro but it's mine
because I gotta maintain it
 
You're taking over an old project?
 
work...
 
Well, same deal - change it back to collection, remove the casting and use it like a collection
 
@Unihedro It's like that seriously everywhere
 
The unmodifiable collections are nice way to blow up code that assumes too much :-)
 
2:26 PM
@kiheru Right :p
 
and since we're maybe probably migrating all the old stuff to a cool new architecture anyways
it's not worth the effort to fix ~100k warnings
 
well my deepest sympathies
anyway it looks like it should work
 
(including something like at least 40k unchecked casts and 50k rawtype-warnings
well it doesn't...
 
SMH
 
brrrr
 
2:27 PM
I'm getting Error 500 and the log is buried under waaaayyy too much carp
and takes ages to open, because it's so damn large
 
no unit testing?
 
I wish
 
carp? That sounds fishy
 
DIY MVC framework on servlet basis with 10k lines XML configuration
generally servlets
throw in jsp
and a DIY O/R Mapper
and some other DIY things
as well as ant, tomcat and multiple js-libraries with namespace conflicts...
and, well you know.
Oh did I mention that we're using SVN as VCS?
and that the encoding of the files in there is WINDOWS-1252?
 
fge
room topic changed to Java: Room dedicated to the Java programming language. And no, Android is not Java (does not use a bona fide JVM; runtime environment and base SDK differ; etc etc) [java] [javabeans] [java-ee] [javafx] [javax] [jsp] [servlets] [swing]
 
2:31 PM
@fge can you add JNI as well
 
fge
I'd rather javabeans be removed as a tag myself
 
@fge That's even worse than the last one.
 
oh lolz..
 
fge
@Unihedro that is your opinion
 
@fge No, it's a fact.
 
2:32 PM
can we please add ?
 
Too many tags anyway.
And servlets are like dead.
 
fge
@Unihedro again -- your opinion
 
@fge That's your opinion that the fact was my opinion.
This is a straw-man argument nonetheless.
 
@Unihedro spark uses them
 
google use sevlets wtf
 
2:34 PM
@deadlydragon00 Google runs on Sharepoint.
@Vogel612 true
Not a huge fan of Spark though.
edited tags
 
I like it
 
fge
room topic changed to Java: Room dedicated to the Java programming language. And no, Android is not Java (does not use a bona fide JVM; runtime environment and base SDK differ; etc etc) [java] [javafx] [jvm] [servlets] [swing]
 
I want to steal [my-code-is-compiling] from CR chat room. I'll add that. :P
edited tags
 
fge
Meh, there are too many tags anyway
 
Not like anyone would be looking for "jvm" when searching for a room to join, so no need in keeping them.
What's "bona fide"?
 
fge
2:41 PM
"true to the word", "genuine"
 
Really?
Why French?
 
fge
THat's not French
 
actually latin
 
fge
That's Latin
 
Even worse...
 
fge
2:43 PM
And also used in English
So no need to fret about that
Many Latin locutions are used in English
 
room description changed to: Room dedicated to the Java programming language. And no, Android is not Java (does not use the Java VM; runtime environment and base SDKs differ; et cetera)
 
ermagherd...
someone please tell me that this should work the way I think
 
inb4 it doesn't :D
 
fge
For instance, lingua franca, ad vitam aeternam, per se
 
Set<Type> deduplicator = new HashSet<Type>();
deduplicator.addAll(results);
results.clear();
results.addAll(deduplicator);
 
2:44 PM
@fge I know the last one!
But isn't it french?
 
nope..
 
fge
No it isn't
 
ad absurdum
 
@Unihedro I dont see any french?
 
=javadoc HashSet#HashSet
 
2:45 PM
Which one do you mean? (type the number)
1. java.util.HashSet#HashSet()
2. java.util.HashSet#HashSet(Collection)
3. java.util.HashSet#HashSet(int, float)
4. java.util.HashSet#HashSet(int)
 
2
 
@Unihedro HashSet(Collection c): Constructs a new set containing the elements in the specified collection. The HashMap is created with default load factor (0.75) and an initial capacity sufficient to contain the elements in the specified collection.
 
^ @Vog use copy constructor instead of .addAll
 
@Unihedro interestingly it still contains duplicate items
 
?!
 
2:46 PM
I could imagine that this may have to do with some moronically not implemented methods....
unnecessary stuff like... .hashCode or .equals...
 
-_-
likelihood of stupidity: very high
 
I mean... who needs them, right??
> adds the specified element e to this set if this set contains no element e2 such that (e==null ? e2==null : e.equals(e2))
 
When you run a method multiple times, and that method performs some calculations. some of these calculations are mathematical functions / calculations on constant numbers e.g Math.pow(2.1, (1.0 / 2.4)) etc.. Does java cache these results because its the same on every execution? or it just re-calculates everytime
 
fge
@Vogel612 if you have Guava you can use an Equivalence
 
@BenBeri If the result of a calculation is known at compile time it's interned
@fge I haven't
 
fge
2:53 PM
@BenBeri recalculated every time
 
also .equals is overridden (from what I see correctly to my requirements)
 
fge
Yes, but is .hashCode()?
 
no .hashCode isn't
 
fge
equals() without hashCode() is basically useless
 
interestingly that's irrelevant
 
2:54 PM
@BenBeri Java calculates constant expressions ((1.0 / 2.4)) in runtime load. Method calls are repeated.
 
Gosh, I love it when my company has the clout to yell at Google for making Chrome do what we want
 
because the HashSet by contract doesn't care about .hashCode when adding Elements
 
fge
fixed spelling mistake in topic
 
@Unihedro So basically at runtime load it calculates all constant expressions
 
fge
No it won't
But this kind of operation turns into native code quite quickly
That is, unless you have specified that the class or method is strictfp
 
2:56 PM
@fge "et caetra" is wrong.
 
fge
@Unihedro sorry but it isn't
 
et cetera (in English; /ɛtˈsɛtərə/; Latin pronunciation: [ɛt ˈkeːtɛra]) (rare: etceteros) (abbreviation: etc. or &c.) is a Latin expression that means "and other things", or "and so forth". It is taken directly from the Latin expression which literally means "and the rest (of such things)" and is a calque of the Greek "καὶ τὰ ἕτερα" (kai ta hetera: "and the other things"; the more usual Greek form is "καὶ τὰ λοιπά" kai ta loipa: "and the remainder"). Et means "and"; cētera means "the rest". == Spellings and usages == The one-word spelling "etcetera" is commonly used and is accepted as correct by...
 
fge
Check your Latin lessons :p
Well, Wikipedia happens to be wrong on that one
 
@fge Say that to yourself all you want. :P
 
fge
<-- has studied Latin
 
2:57 PM
room topic changed
 
fge
(although I wish I hadn't; it wasn't half as useful as Greek was)
 
cetera is ceterus, "everything else".
Adjective: caeterus m (feminine caetera, neuter caeterum); first/second declension
  1. Nonstandard spelling of ceterus.
That's less common and refers to a different thing altogether.
 
fge
OK, I stand corrected then
 
Yes!
feels proud
I can now rest in peace.
 
great!!!
 
3:00 PM
@BenBeri Yes - however, this is only specified in the VM specs, how it's implemented may vary. For example, a lazy JVM may choose to compute it at the last moment.
As long as it's not strictfp, that is.
 
fge
strictfp == "strict floating point", just for reference
It happens that fp (floating point) calculation is an extremely tricky subject
 
^^^
 
fge
For one, natively, CPU architectures differ on what precision they support internally
Note that IEEE 754, which is the bona fide (sic) standard for fp, does NOT specify what the base is
 
which kinda sucks
 
fge
So, in fact, this is valid: IEEE 754 base 10 32 bits
But nobody ever uses anything else than base 2 anyway
 
3:05 PM
Should I implement my own sorting algorithm (for efficiency) or use a long chain of stream?
 
fge
Now, CPUs nowadays have left 32bit fp calculations way behind; internally, all fp operations are done with at least 64bit fps or more (128, even 256, is common)
 
@fge Really?
 
fge
strictfp aims to put every architecture on equal levels; but this, in turn, means two things: 1. loss of precision, 2. slower (since basically nowadays, more often than not, CPUs do not have native means of doing fp calculations on IEEE 754 base 2 32bit values anymore)
@Unihedro yes, really
 
:O
 
fge
Out of all CPUs or SOCs available today on the market I doubt that you can find one which has native 32bit IEEE 754 support (OK, maybe in niche embedded markets there are)
Also, I have yet to see an example of any architecture supporting IEEE 754 with a base other than 2... I really wonder why they decided that this would be a good idea
(and then there's all that CUDA stuff going on)
 
3:23 PM
haha, talking about CUDA in a Java room?
 
@ShotgunNinja What do you want to hear about?
 
no, it's just coincidental. one of my classmates in college worked on some CUDA stuff at NVIDIA when he interned there.
and it's not something I'd expect to hear about on a board for this language.
 
!!should I learn Clojure again?
 
@Unihedro Definitely
 
I agree!
Not now though.
 
3:25 PM
what about Groovy?
 
meh..
don't bother.
 
Groovy in 2015? why?
Groovy is like Python.
 
I just recently had to dabble in it for Grails
I just got done rewriting a Grails app as a Struts app.
Highly not recommended.
My boss: "No one here knows how to build or troubleshoot Grails apps. Let's rewrite it in something I forced you all to learn because we don't have the time to rewrite all of our 15+ year old websites!"
 
fge
@Unihedro gradle...
 
@fge True. That's the only thing I'd use it for.
 
fge
3:29 PM
I love gradle, but its use of groovy somehow puts me off
Not to mention that gradle defines a DSL on top of that
The saving grace is that any legal Java code is also legal Groovy code, so...
 
fge
Still, it is infinitely better than maven
 
I wish we used a build/deploy automation tool
 
XML haha
 
nope, we copy up JSPs and JAR files and manually rename old ones
 
3:31 PM
Your team must score low on the Joel Test.
 
oh, cool
 
fge
@ShotgunNinja OK, but how are those packaged in the first place?
 
Ant scripts
Yeah, we're like a 4 or 5 on the Joel test
We barely even follow the 12-factor app guidelines for our sites.
 
@ShotgunNinja well at least it's build automation ;)
 
for the Joel test, we have 1, 2, 7, ~8, 10, 11, and ~12
 
fge
3:34 PM
    final Consumer<CountDownLatch> consumer = Throwing.consumer(CountDownLatch::await)
        .orDoNothing();
Bwaahahaa
 
wut?
 
fge
throwing-lambdas rocks
 
Yes it does
 
I wish we had lambdas
a bunch of our code doesn't even support generics
the best we can depend on for sure is 1.5
 
fge
@ShotgunNinja you're kidding, right?
1.5 in 2015?
 
3:38 PM
No, 1.5 when the code was written in 2000
and did I mention we don't do CI here?
or regular refactoring?
 
fge
Had you said 1.6 I'd have only said "poor thing"; but 1.5, I am inclined to say "hey, get a grip"
 
That's surprisingly sad. :P
 
or any sort of reliable code maintenance other than "This is bothering me, let's fix it" or "This is not working, let's update it"
oh, and our repo is CVS running on an old Win2k beige box
 
@ShotgunNinja reminds me of my current workplace.
 
fge
Huuh
 
3:40 PM
it's a little better, but,....
 
fge
The ideal environment for developer sclerosis alright
 
Windows Two Fucking Thousand
 
regex are running over apache libraries
Central Utility Libs depend on 1.6 internal Oracle API
things like that.
 
but at least we can deploy in one command
 
3:41 PM
I mean, we use Apache Commons for a lot of our utility stuff...
and we at least have separate Dev and Prod with configurations stored in CVS
 
(given you have correctly set up a script to run ant with two arbitrary environment vars)
meh.. the project is spanning over .... 3 SVN repos or something
 
fge
had to work several years with CVS
 
but our deploy process is: Rename the files in the OldRoot directory, copy from Root to OldRoot, copy from workspace to Root.
yes, we do manual backups during deployment
 
automate it...
it's not like ant doesn't support that
 
The last guy who tried was fired
He "wasn't a good fit for the company"
 
3:43 PM
oh carp
 
mostly because he was focused on automating everything and using NetBeans instead of Eclipse
 
fge
@Vogel612 I wouldn't mind your swapping the 'r' and 'a' here
 
I really liked him. My boss didn't.
 
^ that's why, I tell you ;)
 
probably
my boss is an old DBA from the VB years
 
3:45 PM
@fge meh.. I got problems with strange stuff
 
!!urban carp
 
fge
Yeah, and he forgot about evolution
 
and that's not one of these, but...
 
@Unihedro [carp](http://carp.urbanup.com/3844390) A sex move derived from the shocker/barracuda:

Instead of two in the pink, one in the stink, you put two fingers in the anus (pinky and ring finger) and one in the vagina (index finger).

Named after the carp because it is a bottom-dweller.
 
I'm just glad not all of our sites run on WebSphere on AS400, holy crap
 
3:45 PM
^ wut markdown?
 
fge
eyes @CapricaSix
<-- is old, quite old, but hopes never to turn out like that
 
!!del
 
Our internal apps, like timesheets and our homebrew issue tracker, run as WebSphere apps on a crusty old IBM AS/400
 
@Vogel612 That didn't make much sense. Maybe you meant: tel
 
!!delete
 
3:46 PM
WebSphere 6.1, not even the newest version
 
@Vogel612 That didn't make much sense. Use the !!/help command to learn more.
 
oh come on, cap, you should be able to do at least that much...
 
whispers to self; at least now Vog might spell "crap" correctly
 
fge
@ShotgunNinja well, you know your reconversion alright -- CS archaeologist :p
 
Hey, at least I'm not writing COBOL.
I read a book on it once, though.
 
3:51 PM
Surprise quiz! Write a hello world program in COBOL. No googling. You have sixty seconds.
 
I said I read a book on it once.
ONCE.
 
K, you lost.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.
PROCEDURE DIVISION.
MAIN.
  DISPLAY 'Hello, world.'.
  STOP RUN.
 
well damn
 
My aunt is a software engineering manager for an insurance company of some sort, and she knows two languages: SQL (whatever dialect they use), and COBOL.
and even then she lets "the nerds" do the COBOL programming.
that's basically the only reason a book on COBOL ever wandered into my hands in the first place.
Also, boy do I love deploying a shared jar to all sites
 
4:03 PM
...
 
shiiiittt Scala IDE needs always bundle org.eclipse.jdt.core [3.10.0,4.0.0)' but it could not be found
-_-
make me angry
 
I have to keep a goddamn list of websites, manually back it up and copy it out on all of them via FTP, and wait for them to bounce via remote shell
 
do you have an idea how to change the version of jdt ?
 
fge
@ShotgunNinja write a book -- that will be a sad story but an edifying one
Of course do that after you have secured another job :p
~sonarqube--
 
~??
 
4:16 PM
~true
 
!!> ~??
 
@Vogel612 "SyntaxError: expected expression, got '?'"
 
fge
@Vogel612 forget it; a habit
This is how you address javabot on FreeNode
 
hmm... still wondering why...
 
fge
Why what?
 
4:21 PM
How why what?
 
fge
Nevermind
 
why ~sonarqube--
 
fge
Well, I was referring to SonarQube the company
They do have a dev mailing list but it's not helpful in the slightest
 
fge
Not only is their API underdocumented (and that's a euphemism), but all they are capable of telling you when you ask detailed questions on the dev mailing list (which I do regularly) is "go see the examples", which of course are not documented either
2
In short: documentation is as good as nonexisting
For my current work, I spent less time parsing the language (which is challenging by itself) than figuring out what was needed to implement a language plugin
That should be the reverse
(and then again the reason I spent so "little" on parsing the language proper is entirely due to grappa; sslr didn't help)
 
4:33 PM
gotta go now
keep up with the good work!
@fge You're awesome :D
 
http://www.commitstrip.com/en/2015/04/16/gta-v-on-pc-finally-here/
CommitStrip - Blog relating the daily life of web agencies developers
GTA V on PC finally here!
CommitStrip
1429202252
 
^^ True
 
fge
@Unihedro no I'm not
 

« first day (1636 days earlier)      last day (3319 days later) »