Clean Code: Compiler Warnings

Sharing is Caring

It’s no secret that I work as a freelance software/web developer and often jump around between languages. I, continually, run into projects where the developers are ignoring warnings produced by the compiler which can lead to some very sloppy code along with some very interesting situations that occur as the code runs in production.

In my experience, warnings are almost always a bug in waiting especially warnings for assignment operators used in an if statement instead of the equality operator (very common in C variants.) Spend those extra few hours when you develop and try to ensure that you keep the compiler warnings to a minimum, so your code is clean and doesn’t appear to be sloppy.

Warnings also destroy your credibility as a developer, because they make your code look sloppy and suspect whenever a problem occurs. If you’re an employer, do your developers compile with warnings on and if they compile with warnings on do they take the time to resolve them?

Sharing is Caring

Brian is a software architect and technology leader living in Niagara Falls with 13+ years of development experience. He is passionate about automation, business process re-engineering, and building a better tomorrow.

Brian is a proud father of four: two boys, and two girls and has been happily married to Crystal for more than ten years. From time to time, Brian may post about his faith, his family, and definitely about technology.