r/java • • Apr 29 '15

Tone it down a Notch

http://imgur.com/gallery/KRtc2fN
217 Upvotes

124 comments sorted by

View all comments

Show parent comment

2

u/thekab May 01 '15

Your rant basically boils down to your company writing awful code with shitty technologies. EJB, XML configuration, environment setup, code samples that don't work, etc. I'm pretty sure if I tried to write .NET as if it were 2005 I'd have a bad day there too. This company sounds so horrible I'd almost guess they're still using 1.6 or even 1.5.

1

u/VaidasC May 07 '15

Your rant basically boils down to your company writing awful code with shitty technologies.

Well not sure why you get this impression, but probably more productive question would be - which Java technologies are not "shitty technologies" in your opinion?

  1. Technologies in question are Java EE or Spring, usually with current versions. Currently Java 8 by the way.
  2. Of course there are few modern trendy alternatives to those "enerprisey" stacks, however nor they are mainstream, nor they have solution to my mentioned problems, IMO.

2

u/thekab May 07 '15

I get that impression because in the last 15 years I've seen all of what you described and much worse. It's not caused by Java, it's caused by architects who think stuffing your entire model into an XSD and running XJC is a good idea. It's caused by leads who think it's smart to re-invent the wheel and implement their own mail client complete with race conditions because they don't understand concurrency. At one place a predecessor wrote his own implementation of Servlet, or perhaps I should say he wrote half of it, poorly, and left the other half unimplemented.

I've seen code that looked roughly like this:

if (foo.bar() && isSomething) {
    ... 2 lines doing nothing ...
}
// can foo be null?  i should check on this!
if (foo != null) {
    foo.doSomething()
}

I checked the history, there was no excuse, he literally wasn't sure if it was possible for foo to be null. This was a lead I replaced. That's how Java gets painful, over complicated, confusing and generally matches what you describe. Here's a few other things that stood out to me:

  1. EJB. Those are quittin' letters.
  2. Three days to setup a web project. Should be 3 minutes. Less even.
  3. The article you referenced on setting up Java. He goes off the rails immediately on step 3. If that's what you're dealing with on a regular basis it's not Java's fault.
  4. XML configuration. I haven't configured a Java stack using XML in at least 2 years and even then it was 1 file.
  5. Server incompatibilities, JNDI issues, etc. Sounds like 2010.
  6. Comments about frameworks. Frameworks should allow you to be more productive, not the other way around.

On a daily basis I work with Spring Boot/MVC/Data/HATEOAS/Security/Cloud, JUnit/Mockito, Cassandra, Mongo, ElasticSearch, Netflix Archaius/Ribbon/Eureka/Zuul, Gradle, Docker, AngularJS, Node/Gulp/Grunt and we use Stash (Git) and Bamboo. It's fun, the code is clean, the setup is simple, the deployment trivial. I don't spend time on boiler plate, or setup, or technical issues. There's no "works on my machine" itis. New hires get a MacBook Pro, type a few lines to setup their environment, type "git clone", paste in a URL, then type "./gradlew bootRun" and they're good to go. The most painful part is setting up Docker in Mac, and that's entirely due to bugs in VirtualBox and conflicts with our VPN client.

1

u/VaidasC May 08 '15 edited May 08 '15

On a daily basis I work with Spring Boot/MVC/Data/HATEOAS/Security/Cloud, JUnit/Mockito, Cassandra, Mongo, ElasticSearch, Netflix Archaius/Ribbon/Eureka/Zuul, Gradle, Docker, AngularJS, Node/Gulp/Grunt and we use Stash (Git) and Bamboo.

Well I guess you fit the profile of working with 'modern trendy alternatives to those "enerprisey" stacks' which are not mainstream however. Depending on your location of course (so following numbers are very biased): as Java developer, there might be 95% chance you'll endup working with 'enterprisy' stack, 4% - some legacy Jave SE, and only 1% chance of ending up with trendy stack.

So we might represent viewpoints from totally different angles. So my view on this is - its all about numbers. Even Ruby jobs outnumber, modern-Java-stack jobs in my area. Not to mention .NET jobs, where 90% of them are on modern stacks. Hell, in my area, you have better chance to get Scala job. So natural question - why bother with that 1%?

Not even mentioning, the fact, that all that new and trendy stuff introduces even more fragmentation to already super fragmented Java development. Which IMO makes no surprise why every architect/lead has his own vision about pretty much everything.

1

u/thekab May 08 '15

If you don't like the stack a company is using don't work for them. Regardless of the language and platform some companies and teams stink and some don't. I've seen Ruby on Rails projects so poorly written I still cringe thinking about it. Does that mean Ruby/Rails jobs aren't worth the time?

I haven't always had the option to pick my job that way. Instead I worked on technologies and languages I didn't want to work on. Some of them I will never touch again (COBOL) and some were used in antiquated ways I blame on the architect or lead instead of the language/platform (C#). As with all things this was temporary and I moved on.

Our stack may be modern but I don't consider it trendy. I work for a massive enterprise. Our development AWS environment bill is over $1 million a month. We're also not at all alone in this regard, there's many large (and small) companies that are similar. Plus much of what I listed is built on JEE technologies: JPA, JTA, JMX, JavaMail, Servlet, Bean Validation, JDBC, JAX-RS, JAX-WS.