Tuesday, May 06, 2008

JavaOne: More Effective Java

A lot of the value of Effective Java examples are to reduce the amount of thought when you have to go back and change the code you've just written. Sure code has to run, be efficient, and yes look elegant, etc. but in real world situations you really have to think about those that come along afterwards and work on your code. Its sort of moving from being a smart-ass when you code to being a mensch. This sort of selfless programming is hard but extremely worthwhile. Leaving tests behind is a good thing as well but leaving behind code which is easy to maintain is probably worth more than a whole suite of test cases. That means thinking about how a person would maintain or extend the code you just wrote. You have to put yourself in the shoes of the next guy. That's probably a very good coding habit to develop.

Second Edition of Effective Java is out. It's expanded to include more work on generics, concurrency, enums, etc. Buy it and learn how to be a Java mensch.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home