Recent Posts

Avoiding unnecessary null checks

9 minute read

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 abo...

Misconceptions about code reuse

5 minute read

We all have been taught that reusable code is good. We all know why we should do it but there are some misconceptions about how to do it.

How to prevent legacy code from emerging

5 minute read

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...

Code comments

6 minute read

Code comments are a code smell. This statement might feel contrary to reason when you have been taught to always comment your code. Having comments might how...

Primitive obsession

6 minute read

Primitive obsession is a code smell. Primitive in this context refers to programming language primitive data types. Obsession refers to always using these da...

Switch statements

11 minute read

Switch statements are a code smell. Complex conditionals can be hard to read. The same pattern of switch statements might be repeating in several locations.

Long method

6 minute read

A long method is a code smell. It is a well known fact that the longer a method is, the harder it is to understand. Smaller methods might be harder to follow...

Long parameter list

5 minute read

Long parameter list in a method call is a code smell. It indicates that there might be something wrong with the implementation.