JS Ext

Wednesday, May 28, 2014

Why Don't People Use Java Generics

My company tends to be behind in technology.  Java 5 was released in 2004, but my company didn't start using it until 2008.  That means we have been using Java 5 for six years now.  You would think the developers would be using generics.  You would be surprised.

I feel like some developers don't want to learn new technology.  They learn one thing and they want to stick with it.  That is the only reason why after six years, people are still writing Java code without using generics.  It is either that or they LOVE casting.  We don't disable Java warnings, so Eclipse will tell them right away that they are doing something wrong.  We use various static code analysis tools that give them reports about problems.  You can lead a developer to water, but you can't make them use Java generics.

I find this frustrating because I hated Java prior to Java 5.  I couldn't stand the endless casting that needed to happen.  Code that is written like that feels dirty.  I feel like you need to constantly handle ClassCastExceptions.  The weird thing is I feel like Java code with generics is faster to write.  This is a scenario where spending a little time learning how to become a better developer is a good return on investment.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.