Monthly Archives: October 2011

#20 Don't Document Deprecated Code

This should be obvious, but I worked with a team where several members thought it was important to document functions which were no longer considered part of the future of the product.

Posted in Uncategorized | Leave a comment

#19 Reduce Cognitive Load

Deeply nested IF statements can be hard for the brain to unwind and process correctly.  In many cases, the branch statements are selecting for a single, or a small set of conditions for which processing will be done, and outside … Continue reading

Posted in Coding | Tagged , | 1 Comment

#18 Don't use TAB Characters

An age-old debate that should not exist.  Tabs are evil.  It is an attractive idea, but poorly implemented, non standardized, unpredictable handling, and so this post enumerates the ways that their cost far outweighs their benefits.

Posted in Coding | Tagged , , | Leave a comment

#17 Program Logic Error

Not all exceptions are the same, and when writing a program, it is important to be mindful of whether the root cause of an exception is the programmer, or possibly environment or user data.  The latter type of exception can … Continue reading

Posted in Coding | Tagged , | 1 Comment

#16 Avoid Overloading Methods

One of the things that programmers learn with object oriented programming is that you can overload methods. That is, have the same method with differing parameters.  This can be convenient sometimes, but most of the time, it is an exceedingly … Continue reading

Posted in Coding | Tagged | Leave a comment

#15 Branch Handling with Fixes

This is really a management issue, not a coding issue. In short: when a bug is fixed on a branch, it should be at the same time (or immediately after) fixed in the trunk. The logic should be obvious, but … Continue reading

Posted in practice | Tagged | Leave a comment

#14 Never Catch and Continue

I ran across a body of code that is using a spectacularly evil coding pattern. This is not evil that presents itself as a devil with horns and pitchfork, but rather this is a wolf in sheep’s clothing. It is … Continue reading

Posted in Coding | Tagged | 2 Comments

#13 Always Replicate Fix to the Trunk

We try to avoid having multiple versions of a product under maintenance at a time, but every product shipped to real customers has to offer support of the version that the customer has.  This post offer guidance around handling of … Continue reading

Posted in practice | Tagged | Leave a comment

Working Around Java's SSL Limitations

The Java run-time environment (JVM) is able to support connections to other servers using SSL, but it has this very inconvenient behavior of refusing to connect to self-signed servers.  A self signed server has the public key necessary to ensure … Continue reading

Posted in Example Code | Tagged , , | 5 Comments

#12 context path and browser redirecting

What is the URL to the application? There is one, and that is the one that the user places into the browser in order to access the application. Unfortunately, along the way, the request will pass through many intermediate services … Continue reading

Posted in Coding | Tagged , , | Leave a comment