Refactoring

Avoiding unnecessary null checks

The most common reason for writing null checks is that you run into a null pointer exception. The second most common reason is that you happened to think about it at some certain case. The problem is that you are not probably handling null in every single method call. This means that there are potential bugs lurking everywhere. Null pointer exceptions are bad. Would it not be better if you did not have to check for nulls at all?

How to prevent legacy code from emerging

Every software developer has faced the situation. You have been assigned a task to add or change a feature. You know nothing about the particular feature but it does not sound too complex.