« first day (1669 days earlier)      last day (3286 days later) » 

2:00 PM
@Michael It's not.
Every single website on the web (save for .01%, maybe) has JavaScript.
 
I meant the part about it evolving faster than Java and C#
 
Add that to the ever growing nodejs/iojs ecosystem (with more package downloads in a year than both Java's maven repo downloads and C#'s combined)
@Michael w00t?
 
Node.js is not Javascript
 
@Michael Users of Node.js are users of JavaScript by definition.
Are you kidding me? I think ECMAScript evolved more in the past 2-3 years than Java has since it began
 
@MadaraUchiha that's comparing Windows Users to Mozilla Firefox users
 
2:01 PM
"Javascript" runs in the web browser.
 
@Vogel612 No, it is not.
 
Node.js is essentially its own platform
 
@Michael No.
 
If you use Node.js, you write JavaScript
@Michael Again, no, it is not.
 
...that happens to use the Javascript language
 
2:02 PM
JavaScript runs in a JavaScript engine.
 
@Michael Node.js runs V8, which is the same engine that runs in Chrome.
 
Just because a web browser comes with a JavaScript engine doesn't make the general case true.
 
It's like comparing JVM that runs in one environment the JVM that runs in another.
 
"Javascript" -- meaning the engine that runs in the web browser -- does not evolve any faster than Java or C#
 
2:03 PM
"Javascript" -- meaning server-side Javascript aka Node.js -- is arguably evolving faster.
 
@Michael I'm talking about ECMAScript, as a standard/spec
 
@MadaraUchiha ya.. what are you guys at now... 6?
 
Disregarding the different runtimes that implement said spec
@Vogel612 Approaching 6, but the changes between 5 and 6 are more drastic than the ones between Java 6 and 8.
 
Java isn't that old yet
 
And there's 7, 8 and 9 already in the horizon
Also, as for runtimes
Chrome is now version 42/43 depending if you got the update yet or not
Firefox is like 38
 
2:05 PM
I love heated discussions like these.
 
Both are much much younger than Java.
 
which is maybe because every damn little change requires you to push a major update of the runtime... gg
Chrome and Firefox aren't javascript
 
@Vogel612 No, but they are (or rather, they hold) the JavaScript "runtime"
 
See, this is what we needed in the Java room months ago
 
Which is basically what's get updated each version, because the UI of the browser rarely changes at all.
 
2:07 PM
Honestly, I like C# better than Java, and I enjoy playing with Javascript/ECMAScript but it's rough actually getting stuff done with it.
I work as a Java web developer on a Struts/JSP stack.
 
well, oracle's java is at version 8_u45
 
Unfortunately, I'm still stuck on Java 6.
 
while the versioning policy is different than the one for JS (and related engines) that's quite a lot of updates there
 
@ShotgunNinja Isn't that end-of-life?
 
2:08 PM
@ShotgunNinja well.. me 2
 
@ShotgunNinja I prefer C# over Java too
 
@Michael since 2 years ago, actually.
 
@Michael Struts 1 is EOL, and I think Java 6 is close
 
even 7 EOL'd in April
 
@Vogel612 lol, wow...
 
2:08 PM
@Vogel612 Yes, but the one big difference is that migrating from ES5 to ES6 is, by definition, not a pain.
 
@ShotgunNinja Yet your company is still using them... o.O
 
@MadaraUchiha yea right totally...
 
Whereas migrating from 6 to 7, or, god forbid from 6 to 8, is a huge pain in the ass for any respectable sized application.
 
that's incorrect
 
@Vogel612 Yeah, right. Totally.
 
2:09 PM
what's a pain to migrate is all the version dependent crap around it
 
Yeah, because 85% of our applications are written in Struts 1, we can't leave it yet
 
@MadaraUchiha How hard can it be? It's not like Java 6 code won't run on a Java 8 VM.
 
things like struts, tomcat and all the related crap
 
@Vogel612 Every single ES6 feature is building on top of ES5. Everything is brand new
 
The code is backwards compatable.
 
2:09 PM
No behaviors changed at all.
Even libraries written in ES5 or even ES3 are always upwards compatible with ES6.
 
We have code written for Java 5 that would break if we switched to Java 8.
This is why I want to work somewhere else.
 
@ShotgunNinja Really? Can you give an example? I'm curious to see how this could happen.
 
Speaking from experience, we're now in the process of moving from 6 to 8. We're at it for about 6 months now
You can imagine it's not "painless"
 
@Michael Non-generic Lists with different object types
 
Mostly breaking unit tests
 
2:11 PM
@ShotgunNinja But use of generics is optional.
 
@ShotgunNinja Rawtypes are wrong end of story case closed.
 
@Unihedron Welcome back to 2003 when the code was written.
 
Yes, you'll get lots of compiler warnings, but the code will still compile and run.
 
:(
I feel you
 
There's also some libraries we use that won't work in 8
 
2:12 PM
@ShotgunNinja I don't think @Uni was even born then.
 
lol
 
Like, if I'm still working for this company in a year, shoot me.
 
@Michael Negative
 
@ShotgunNinja At least you have job security xD
 
Our repository is a Win2k beige box running CVS
@Michael It's not worth this bullshit
 
2:13 PM
Well, look on the bright side. At least you have a repository.
 
@Michael my point is, for almost all cases, it's not painless to upgrade Java versions.
 
Yeah I switched from java 6 to 8 recently, and it took quite a while as well..
 
I'd kill for CI, or even a bug tracker...
 
Whereas in JavaScript, it's exactly the other way around, it's a pain to support old shit in addition to modern stuff.
 
2:14 PM
Part of the issue there was updating all libraries on top of the version upgrade
 
This makes less people support old shit, and thus the whole thing moves forward
 
@ShotgunNinja What build tool do you use?
 
@Michael did I ever mention the 10k warnings in our project?
 
If my company's main product was software, we'd have been dead in the water years ago.
 
@Vogel612 lol
 
2:14 PM
@Michael Ant scripts and FTP
 
@ShotgunNinja Ick.
 
Ant scripts and SVN..
not much better.
 
> implying build and deployment are one-step procedures
deploying a shared jar is ridiculously costly.
 
well... moar ant configuration
 
Now don't get me wrong, I don't mind breakage between major versions
That's how things are
But don't claim to be all-powerful-all-remembering language with perfect backwards compat, where in fact it's not.
 
2:16 PM
On each site we have to deploy to, we manually rename the backup copy of the file, copy the live one into its place, and copy the new file out to production.
Say we have 10 sites to deploy to, that's 10 manual renames, and 20 copy operations.
Then we have to wait for both webfarms to bounce manually.
 
2
Q: Custom Validation Annotation introduces ConcurrentModificationException

Vogel612I was tasked with creating an Annotation for Custom Validation. This was due to some problems with handling database constraint violations nicely. What I did in response to this was relatively simple. I created a class-level CustomConstraint specifically for the one domain-class that required it....

^ code in answer likely to break when changing java-versions
 
There's no unit testing after that point, either, so we have to run our own tests if we wrote them, and hope that it hasn't broken anything else.
 
@ShotgunNinja Sounds like someone needs to automate that. wink wink
 
Alright, I'm stumped. @fge NEED HALPZ WIZ YER THROWING LAMBDAS
 
@Michael I'm working on it. I finally got a guy in my corner on this, and I've written a test system for us.
 
2:18 PM
@MadaraUchiha the language is backwards compat, the stuff around it isn't
 
I'd have just resorted to straight up JUnit tests, if we didn't have a bunch of stuff to set up for them.
 
@Vogel612 vOv
Not an excuse.
 
so I built my own test mantle which sets up loading configuration files, initializing a logger, connecting to our database, and starting up Selenium
 
@MadaraUchiha meh.
 
@ShotgunNinja Why can't you use unit tests?
 
2:19 PM
don't make baseless accusations
 
@Vogel612 Like I said, ES6 is, by definition, perfectly compatible with ES5 and ES3
 
@ShotgunNinja Ah, spagetti code.
 
@Michael We can, but I wanted to automate database setup first.
 
This means that any and all libraries running ES5 or ES3 will work in an ES6 environment
 
AND JAVA 8 IS BY DEFINITION PERFECTLY COMPATIBLE WITH JAVA 4
 
2:20 PM
That includes tests, builds, runtime, everything.
 
WTF MAN
 
so I can build a user or an order in the DB and tear it down afterwards.
 
@Vogel612 BUT FOR SOME REASON LIBRARIES ARE NOT
 
@ShotgunNinja Oh, yeah, nice
 
So what's causing the difference?
 
2:20 PM
well now why could that be, hmm??
 
I thought it was perfectly compatible
 
stupid use of internal api
 
@ShotgunNinja Would mockito help you at all?
 
Yeah, we do a ton of stuff with our database, and most of my testing involves user setup.
 
idiotic build settings
 
2:21 PM
@Vogel612 Great! so not 100% compatible
There are behavior changes
 
LIBRARY != LANGUAGE
and INTERNAL API != LANGUAGE
 
@Vogel612 Library uses language like any other application.
 
no it doesn't
 
@Vogel612 And I'll say again, one of the major selling points of ES6 was that there are no internal API changes.
Only new things got added. Nothing changed.
 
It's basically that many libraries acccess stuff in the internals of prototype (or whatever) that are not part of the language
 
2:22 PM
That includes internal implementation detail and apis
 
and then rely on it's behavior
 
@Michael Not really. I'm doing more integration tests; those are where we lack coverage. My code self-tests when possible, and I ensure path coverage through my underlying manager and DAO classes.
 
@Vogel612 The mere fact that it exists, means that the Java ecosystem allows for it...
One way or another...
That breaks the perfect compatibility record, because there are breaking changes internally
 
We have a bunch of people working on mostly behavioral changes throughout a few shared libraries, and there are a lot of exception cases on each site that need to be tested.
 
@MadaraUchiha do you understand what internally means???
 
2:23 PM
@Vogel612 It's not internal if it's exposed to libraries man...
There's defined behavior in Java 6 that's defined differently in Java 8.
 
NO
 
@ShotgunNinja Ah.
 
there's defined, but not guaranteed to be unchanged behavior in Java 6
and if you rely on it, it may change UNDER YOUR ASS.
 
@Michael We just pushed out a major change to one of our sites, to get it from a pay-per-item model to a subscription model.
 
@Vogel612 lol
 
2:24 PM
and then things BREAK
 
@Vogel612 I don't think you understand the notion of perfect backwards compatibility then.
 
that change drastically affected our order process, user registration, and shopping cart.
 
that's why relying on internal API automatically generates compiler warnings
 
@ShotgunNinja I guess upgrading to Java 8 is the last thing on your minds.
 
there is perfect backwards compatibility for a well-defined set of instructions commonly known as the java language
 
2:25 PM
@Michael Exactly! I fucking wish we had the time, but we have powerful driving business requirements that our CEO needs us to get done.
 
this includes all classes under java.lang, javax.* and similar
 
@Vogel612 But that doesn't help me if 90% of applications use (or use libraries that use) behavior outside those "well-defined set of instructions"
 
As much as it'd be nice to take a year and refactor our aging systems, we don't have the time.
 
That stinks.
 
@MadaraUchiha but that's a library problem and not a language problem
 
2:26 PM
@Vogel612 sigh
 
There's no documentation of how everything is supposed to work, no requirements, no docs of custom corner-cases and user stories, nothing.
 
Sounds like fun. ;)
 
you have to keep the language separate from libraries
 
@Vogel612 No, I do not.
 
Yeah, this is why I'm looking for a new job.
 
2:27 PM
Libraries are written in Java
 
sure
 
Even if they use idiotic APIs that should not be used.
They use them
 
then use a better library
 
Sounds like there's a lot of stuff to do, doesn't sound too bad.
 
or write one that does the same without relying on internal api
 
2:27 PM
 
The Big One, the system that drives most of my company's earnings, which provides purchasing access for retailers of our flagship products, is pre-Struts.
 
Seriously, what you're saying not only isn't practical, I'm fairly sure it's not possible.
 
It's all JSP scriptlets.
 
Haha
 
@MadaraUchiha meh
 
2:28 PM
and the boss just announced that we're going to be refactoring it to Struts 1 in the upcoming months.
 
"isn't practical"
 
Haha, wow...
 
@Vogel612 And I'll say it one more time, because my point still hasn't come across. With ES6 all libraries that are written with an older standard, are upwards compatible.
 
which means we have to be code archaeologists and actually share our findings about this late-90's early-00's code body.
 
There are no breaking changes, no "internal APIs" that will break, nothing except for additions.
 
2:29 PM
@MadaraUchiha I get that... but it's completely beside the point
 
It's going to be a nightmare because we have slow tools and bad process that will definitely get in the way of this project.
We don't write unit tests, in general.
 
Stop blaming the libraries. You think JavaScript doesn't have libraries that are written like my excrement?
 
and there's no "internal API" because JS has significantly less API
 
Libraries that use non-standard APIs left by Microsoft in the 80s?
 
Sounds like a good time as ever to start. :P
 
2:30 PM
Libraries that perform evil satanic voodoo to make something a little easier
 
@Michael I wish we could switch to a better toolset before we do.
 
All of these will still work when the browser starts being able to parse ES6
 
and if the boss announces that these, too, are going into our shared JARs, I'm going to walk out.
 
@MadaraUchiha what do you think is the internal API in java?
hm?
 
@Vogel612 I'd imagine bytecode manipulation
 
2:31 PM
no
 
Please educate me then.
 
bytecode manipulation is JVM area
internal API is the dark vodoo magic libraries of JS
 
@ShotgunNinja Dang.
 
and you surely could keep them perfectly backwards compatible
but it would add shitloads of clutter
the point is, the internal API is the slave of the public API
 
But even the dark voodoo magic libraries of JS don't break when the browser upgrades to ES6, that's my point :)
Even the internal API was kept consistent
 
2:33 PM
let me carry on and you may understand
 
Please do.
 
the internal API is (in combination with the JVM) what is the whole runtime env for JS
the problem is the large difference in API functionality
e.g: does JS support Zip File-Systems out of the box?
no. but Java does, because it uses some internal API for it
you could use the internal API to DIY
but that'd be dumb and that's what the libraries that break, do
and if JS could do that, too, they'd probably use some internal dark vodoo magic library
and if you wanted to optimize it, by changing the behavior of that library...
 
@Vogel612 imagine if the internal API that allows you to support Zip FS would not change at all between Java 6 and Java 8
 
spending all your time with Struts 1 means 0 for you future career prospects.
 
@MadaraUchiha so far so good
 
2:38 PM
Instead, Java 8 would include a new API (and deprecate the older one with a compiler notice, and nothing more) with the optimizations that were included.
Yer done.
No breaking changes.
Future libraries use the new API, old ones use the old one and don't break.
That's ES6 basically.
 
but then again, that would include a huge amount of outdated binary code
that's not used anywhere in the public api anymore
 
@Vogel612 That's up to the compiler to optimize.
 
no it's not
 
If the compiler doesn't meet the old API anywhere, it doesn't need to be included in the compilation target.
 
because all that is packed into the jars you can find in your $JAVA_HOME/lib
@MadaraUchiha it doesn't work that way, and you know it
 
2:40 PM
@Vogel612 Who cares if my Java SDK weighs even 500MB more?
 
that's not the point, you know?
 
@ShotgunNinja Does your boss know you are unhappy about that?
 
@Vogel612 Why not???? Why do other languages manage to do what Java fail to do, despite bragging about how it's perfectly backwards compatible???
I don't care about the specifics
I have an application and I want to upgrade it to Java 8, 9/10 times I'd hit obstacles
Why??????
Why do I need to grab my shovel and start digging?
It's supposed to be painless! you (being Java/Oracle/whatever) promised me it would be painless!
That's one of your best selling points!
 
I would always just leave jobs without letting anyone know (or even knowing myself) why I didn't like working there.
 
"Oh, yeah, everything except every single library you'd ever use" doesn't cut it.
 
2:42 PM
@MadaraUchiha hahahaha
no
 
I've never held a software job for much more than a year.
 
@Michael Sounds like you should try out some sort of freelance work perhaps? lol
 
This is fascinating conversation, I arrived just in time to catch up
@Michael I was like that until I got here
 
@Kylar lol, oh?
 
Not always by choice
 
2:46 PM
It's like fge told me yesterday "It's all documented". Guys, get real, just because "it's documented" doesn't make it any less obscure.
And like I said, I'm not even raging about the breakage or the pain
 
I've never been fired or laid off. Always make the choice myself.
 
And there were times I technically was at the same company for longer, but due to group moves, acquisitions, etc, I was essentially doing a brand new job every 12-18 months
Then when I got here.. it changed. this week is 9 years.
 
I'm raging about how easily Java claims to be perfectly painless backwards compatible, where the pains grow exponentially with the number of libraries you have in your application.
 
@Kylar Congrats man!
 
Wow!
 
2:47 PM
@Kylar Nice! Grats :)
 
That's like a quarter of my life.... and I would never have thought I'd stay somewhere that long. Usually I got bored and left.
 
You're not being paid to say that, are you? xD
 
@MadaraUchiha I feel you on that one. Upgrading from 1.6 to 1.8 took me a few months once upgrading all of the libraries factored in..
 
AHAHA
No
 
Quick question, why does this chat room explicitly state that, in no uncertain terms, it is not for Android. Yet when a new Android question is posted, the java tag is recommended...
 
2:49 PM
@EdGeorge That's a fairly complicated question. Android was built on the JDK's APIs, but people who know Java don't automatically know Android - it's quite a beast of it's own
 
I agree
 
@EdGeorge In addition, there's supposed to be an Android room
 
It frustrates me too see java tags all over android specific questions
 
@EdGeorge "Yet when a new Android question is posted, the java tag is recommended..." The tag recommendation feature is useless
 
@EdGeorge I would say that the practice of tagging all android Q's with the "java" tag is outdated, and should probably be stopped, unless the question is applicable to both.
 
2:50 PM
And immaterial.
 
@Kylar again, I agree
 
@Unihedron pretty much hit it on the head.
 
@fge (and maybe @Unihedron) in Throwing Lambdas, why do you explicitly don't handle RuntimeExceptions?
@Override
public Function<T, R> fallbackTo(final Function<T, R> fallback)
{
    return t -> {
        try {
            return doApply(t);
        } catch (Error | RuntimeException e) {
            throw e;
        } catch (Throwable ignored) {
            return fallback.apply(t);
        }
    };
}
 
I was just unsure if there was a SO rule I was missing
 
Rant aside, this problem has been pointed out in many cases. In fact, out of the five questions I've asked, 3 times the system recommended [r]
it doesn't even have anything to do with R, the programming language, just fyi
 
2:51 PM
Android uses the Java API (see the Supreme Court case)
Oracle wants Google to pay them for using the Java API.
 
@MadaraUchiha Because 1. they're unchecked, and 2. usually that indicates a runtime exception, not an implementation flaw such as when NPEs or Errors are thrown.
 
gud ev
 
Evening
 
@Unihedron I got a JsonMappingException from Jackson, it's the data's fault
 
/javadoc JsonMappingException
 
2:52 PM
@Unihedron com.fasterxml.jackson.databind.JsonMappingException: Checked exception used to signal fatal problems with mapping of content. (1/2)
 
I want to disqualify this publisher, but keep moving forward.
 
@MadaraUchiha That extends Throwable, and definitely isn't implemented as a RuntimeException
 
@Unihedron There's probably a catch-rethrow somewhere that converts it to a runtime exception then
I'll look for that
But it still got me by surprise
 
:(
I hate it when that happens
 
2:55 PM
@Unihedron sometimes you have to, to not leak abstraction
 
@Unihedron I inherited a bunch of code one time where the guy literally did this on every exception:
 
(This is one of the major downsides of checked exceptions)
 
} catch (Throwable t) { throw new RuntimeException(t);}
 
try {
    replacements = parseResults(parameters);
} catch (Exception e) {
    throw new RuntimeException(e);
}
 
LOL
 
2:55 PM
@Kylar aaaand this is why we can't have nice things
 
I was ready to strangle him
 
Yup, here it is.
 
sigh
 
He got 'side-promoted' to middle management of a useless group, so that's solid payback, in my opionion
/s/opionion/opinion/
 
2:57 PM
I prefer strangling him
 
I inherited code once (that a guy wrote his PhD off of) that had beautiful variable names such as: xxxxxyz. xxxxxxxyz, xxxxxyyz, xyzzzzzzzz, xxyzzzzzz ... There was a fundamental error in an algorithm because he mixed up "xxxxxyz" with "xxxxxxxyz"
Guess how long it took me to find that bug.. face palm
 
Long enough to buy a gun
 
Haha yeah. Especially in Canada. I could have taken a hunting/firearms course and got registered and bought a gun by the time I found it.
One of those bugs where you aren't even happy you found it. The disdain outweighed the relief.
 
ISIS is hiring this
 
@deadlydragon00 lol, sweet video. :D
 
3:01 PM
kgr8
 
:) tnx
 
I swear that sometimes I'm a huge idiot
 
Well you DID move from Canada -> USA
lol jk ;)
 
I copied a chunk of code and then spent an hour trying to figure out while gradle wouldn't find and import the right classes
because it wouldn't compile
Any guesses?
 
hmm. You left out the import ? lmao
 
3:05 PM
import?
 
Yep
/me shakes his head
 
/me quietly prays for Kylar to do it right the second time
 
Off the work. Bye Java!
*to
 
Bye bye!
 
@Unihedron What do you think of this solution
I don't want various checked exceptions in my signature, because it's an interface, and this exception is implementation specific
 
3:10 PM
14 mins ago, by Madara Uchiha
try {
    replacements = parseResults(parameters);
} catch (Exception e) {
    throw new RuntimeException(e);
}
this?
 
@Unihedron Yes
 
Nooooooooo
 
I thought it was a joke
 
So what about wrapping the exceptions thrown from that method with my own WhateverException extends Throwable and have the interface throws WhateverException?
 
It's better to declare a custom exception for your interface
Yes
 
3:10 PM
@MadaraUchiha Yes
 
It's decided then. Thanks
 
But have it extend Exception, unless you have an explicit need for it not to be
That's the custom
 
@Kylar kk
 
3:24 PM
Adding checked exceptions to the one method used everywhere == not fun
 
ikr
 
@Unihedron But it's OK, I feel like the signatures now describe the method (and propagated methods) a lot better.
 

« first day (1669 days earlier)      last day (3286 days later) »