Never Stop Learning

Friday, August 21, 2009 by Matt Warman

I am finishing up with my client in Cincinnati. I am trying to clean up code from the vendor, when an interesting error occurred. That’s when I decided to poke around and look at some place for better coding practices. As any Java software development person knows, "Effective Java" is about the best book there is on Java. It’s a must have book. On The web, I have found this site that has some great coding practices. Technology, and specifically Java, is a fast moving animal. What was valid 5 years ago, may not apply, or even exist, now. Searching the Internet is great for information, but you have to be careful too. I try to avoid any article written before 2006, unless it directly applies to the subject matter. Take string concatenation for example, common wisdom says to not use the "+" for concatenation. Use a StringBuilder object. If you are on 1.4.2, you don’t have that object, you have StringBuffer. Well performance wise, which works best, and what kind of performance hit do you get? The only real way to tell is to write your own test class, and call JavaP. JavaP allows you to see the byte code operations. Sometimes you may have only a few operations which would be unnoticed by your users. If repeated often enough though, you could have a real performance problem.
I have noticed that many application development people, and really all people, find a fact that they have read, and use it in their daily job. Facts, like technology change, and the best way to know is to prove it yourself. I have come to write little test classes to work out code I haven’t done before. That way I can understand just what is going on before I introduce it into my application. I have been applying that same concept to accepted performance practices. Profiling applications is also a great way to "see" what your code is doing. The best thing for application development members to do is never assume anyting works as planned, and never stop learning.

Comments for Never Stop Learning

Leave a comment





Captcha