New Year’s Resolutions for the Java Developer
blog.jelastic.com
New Year’s Resolutions for the Java Developer
1–10 of 18 posts
Re: New Year’s Resolutions for the Java Developer
#2Why? Because learning new programming paradigms is beneficial whether you stick with them or not. And Scala is easier for a Java developer to start with than Lisp or Haskell or Z or anything so foreign.
It is simple to get into because you can start basically like "java without semicolons", and IntelliJ community edition has excellent Scala support.
Re: New Year’s Resolutions for the Java Developer
#3Writing code using annotations? Dynamic languages on top of the JVM like Scala? ;)
Re: New Year’s Resolutions for the Java Developer
#4Re: New Year’s Resolutions for the Java Developer
#5I completely agree here. If you're not getting value out of the abstractions, don't introduce them.
However, abstractions in general and OO design does solve many issues that arose from procedural programming. The trick is to recognize the problems, and focus your design around those.
Re: New Year’s Resolutions for the Java Developer
#6Re: New Year’s Resolutions for the Java Developer
#7Learn YAGNI. Tattoo it on your friggen foreheads. Run lean... No, you DONT need to build a framework to complete your project!
Stop abstracting god dang everything. Interfaces and composition are GOOD, use them. Inheritance and generalization use SPARINGLY, or not at all! Before you create an abstraction, are you CERTAIN sometime in the future you will swap the impl out or are you more likely to throw away the code? Think about that.
Instead of Spring, consider CDI on TomEE. Dependency injection is GOOD, but you don't need to friggen inject everything in the mothafriggen world. Since CDI has a smaller feature set than Spring, you will be forced to not be as stupid. -Said a recovering spring-a-holic
Here's a slight disagreement with the article:
JPA is fine, but Hibernate is bad, slow, and it's made by Gavin King, the man who has a terminal case of 'wasn't invented here' syndrom. Use EclipseLink and stick JPA2, and pull in Redis/Mongo where appropriate.
Re: New Year’s Resolutions for the Java Developer
#8I would add "stop using SOAP" to this list. Its 2013!
In my last project, I was asked to send a file, that was uploaded by users onto our servers, as a SOAP message over TIBCO where another application read the SOAP message and put the file into a folder where it was processed by a nightly batch job. On the plus side , the managers and executives responsible for the design were all well connected charming people with PMP certification.
Re: New Year’s Resolutions for the Java Developer
#9As a Scala developer I'm obviously biased, but I would add "try out scala" to this list. Why? Because learning new programming paradigms is beneficial whether you stick with them or not. And Scala is easier for a Java developer to start with than Lisp or Haskell or Z or anything so foreign. It is simple to get into because you can start basically like "java without semicolons", and IntelliJ community edition has exce…
I'm a little hesitant to call Scala "Java without the semicolons". Going too implicit too soon might cause things to go horribly wrong while climbing the learning curve. Besides that, it might scare my colleagues if I was ever to bring that kind of code to work.
Re: New Year’s Resolutions for the Java Developer
#10In my experience, you can be more productive in Java than in any other language, because it has by the best tools and libraries. However, don't use reflection, don't use cloning, avoid automatic (de)serialization, don't doc needlessly, don't separate interface and implementation when you don't have to, use refactoring and code generation, don't feel bad about code duplication.
Most of all, always consider that coding is cheap. Changing a constant? Easy, not hard. Changing interfaces? Easy, not hard. Introducing an alternative implementation? Easy, not hard. Changing names? Easy, not hard. Adding new types? Easy, not hard. You don't need to think about easy things in advance, think about the problem instead.