Image by Alexas_Fotos from Pixabay

Everyone writes perfect code, right. We all take our time without worry of deadlines and external pressures to create elegant code so well constructed it should be considered art.

Right…

Well the real world is hardly as forgiving. Everyone takes shortcuts and has to choose between the okay, the good, and just get it done. We make sacrifices and bad practices seep in. Some of these shortcuts have a devious way of repeating themselves. We call these anti-patterns or code smell.

These pieces of code make us cringe and feel sick to our stomach. We curse the screen and swear to get revenge against the idiot that commit it.

Who did this garbage:

git blame pom.xml ...

efenglu

… oh wait. Let’s just ignore that for now. I’m sure the developer was just having a hard day.

We’ve all been there. Just like any bad habit we need to first identify the habit and correct the behavior.

This is a list of bad programming practices I’ve seen (and done) and hope to never repeat. Hopefully, by identifying the behavior we can address it early on and avoid costly refactoring later.