Does Your Project Smell?
One of my favorite concepts in programming is called code smells. The principle of code smell is that if something looks odd or bad on the surface, there’s a high likelihood there’s a larger underlying problem.
More simply put, if you see compromises and bad practice in small ways, there’s almost always larger compromise and bad practice on the important parts of your project.
How do you, as someone who may not be a developer, know if your project smells and perhaps more importantly, how do you prevent smells from creeping in?
Here’s a few simple things to look out for:
- Is the same work being done over and over again?
- Are you constantly fixing / working around the same bugs and issues?
- When your developers change something that seems like it should be small, does it take a long time?
- Do your developers have to make the same change in multiple spots of the application?
- A general “spidy sense” that something’s not right / you’re not getting the full story
There are a few ways to prevent smells from making their way into your project:
- If you have more than one developer on your team, make peer reviews a part of your regular process
- If you only have one developer or you’re using an outside firm, have a technical advisor or someone you trust regularly review the work product. Experienced developers will immediately spot bad patterns and provide counsel on how to address them
- Pay attention to that voice that’s telling you something’s not right and act on it
As the principle suggests, it is very important to sniff out and address code smell early in the project. Just as with a dead fish, the longer you let it go the more it will stink.