Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

First Java 8 Experience

DZone's Guide to

First Java 8 Experience

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

Like the rest of the world, I fell deeply in love with Slack. Why? Lot of reasons, but the main one is it provides a new means of really building the SDLC process around communication rather than tools. Which do you think is more common these days, the team of disorganized nitwits meandering around in the wilderness unable to execute despite a brilliant idea and much talent? or the team of hopped up agilists preening with every card event, congratulating themselves endlessly as they hurtle forward on a trip to nowhere? Of course it‘s the latter. I saw some would be philosopher doling out his agile advice. First totemic incantation: focus on the process, not the product. Great advice. What these people are really saying is ‘I don‘t know if what I am doing is ever going to amount to anything, so damn it, I‘m going to feel good about myself for having ticked off the tickets that were assigned to me.‘ There‘s a certain fascism to it: this sense that the horrible fear of chaos has spawned a great desire to clean up the world by installing good old fashioned Order.

We have been using YouTrack lately (having abandoned JIRA) and there was no Slack integration so I set about writing one, using Java 8. This too is a whole separate post, but I will pass over this for now, to get to the 8 experience, because there is something important to say about this, that ties into much of my bellyaching about Java, but about stack movements in general: it‘s not only that they end up proceeding at a glacial pace that makes a Stalin 5 year plan look like a nanosecond. No, it gets really special when, after the interminal entracte, the release ends up showing, even partially, like a Potemkin Village. Case in point.

So I found in the YouTrack API that to find out what had happened, I had to query an RSS URL. Yeah, that‘s super stupid, and yes, that‘s yet another post. I thought to myself ‘wow, ok, in general, stream processing gets ugly really fast, this should be fun to do this with Streams and Lambdas!‘ Now, I can look back on that shiny faced nube (my prior self) anticipating battle like the turkey about to get stuffed into the machine in that Sarah Palin video.

At first, my code was kind of looking pretty nice, but two things jumped out and caused a certain amount of cognitive dissonance:

  1. coming up with compact stream/lambda combinations is time-consuming and veers dangerously into oncoming traffic, making it seem vain and suicidal
  2. the XML stream tool that‘s part of the ludicrously vast Java API was, alas, still not using Java 8

Eventually, I ended up reverting my code and crawling back to 7 because you see, there really is no way to write good code in a language if the stuff you are having to use is not using that language. You get something that looks new and decent, then you have to go stick it onto the rear end of an ass, and the result is a deformed satyr. Furthermore, each time you do a new piece and get a moment of enjoyment, going back taints it. I remember when 5 dropped, pretty instantly, pre-5 code had the smell of death on it that made touching it almost unimaginable.

What is the proper reaction to this? Oh, of course, we waited 5 years for this release, but if you thought the whole set of APIs in the JDK would get ported (and arguably, the XML stream processing code is not even core), you are being ridiculous (you being me).

Or maybe just that as Grisby says in Lady from Shanghia ‘it‘s a bright, guilty world.‘ In other words, even under the glare of klieg lights, the dusty shadow of sin taints all, so give up the dream of purity.

Not sure I‘ve made up my mind, but I do know, hearing 8 promoted as ‘it was time for Java to have lambdas because all the cool kids are doing them,‘ rang in my ears making me think we have reached the Pyrrhic stage of late empire, where everything is just a gesture, a wiggling of the toe to prove that the giant has still beaten death…

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}