Developers are an egotistical bunch, and as such we tend to deal in fantastical absolutes. These range from language choice to design patterns to naming conventions, and it seems like everybody has their opinion. Fortunately, development is a team sport. One developer’s personal preferences probably won’t sync up with his team’s best practices. So, in the best interest of teams everywhere, I want to enumerate some awful (and sometimes comical) dogmatic beliefs that make development downright painful.
Horrible Dev Dogma #1: Language x is inferior
C++ and PHP (among others) seem to suffer scorn in many developer circles. For example, in Peter Seibel’s Coders At Work, development gurus such as Jamie Zawinski and Brendan Eich describe C++ as being somewhere between the awful “just an abomination” and the slightly more generous “stupid”. So, some of the most famous and most talented developers in the world denounce C++ as useless, yet C++ is one of the most popular programming languages on the market, especially for Windows applications. In fact, Google’s codebase is made up almost entirely of C++. Does this mean Google is an abomination?
Part of the sentiment stems from the language, and part from developers who use it. C++ is oversaturated with shakily implemented features that empower bad developers to do things the wrong way. Thus we have Linus Torvalds ranting about C++ as the wrong language for git and mocking devs who would suggest its use in the process. Many interpret this as an attack directly on C++, but it is really an attack on bad developers (or, more exactly, developers who think git should be written in C++). These gurus are so sick of seeing bad devs write bad solutions in a mediocre language that they finally denounce that language altogether.
Bad developers are language agnostic, as are good ones. Let’s stop denouncing languages just because bad devs use them incorrectly.
Horrible Dev Dogma #2: I always use x formatting/naming scheme and so should you
Refactoring is an important part of maintaining a healthy codebase, but personal conventions are not applicable to a team project. Is it really necessary to name every variable after a Disney character? Do you have to use spaces when everyone else on your team uses tabs? There is no good reason for this kind of stubbornness. Learn what your team does, and do the same.
Horrible Dev Dogma #3: Everyone should use TDD/CDD/x
This is pure insanity. Not everyone should use testing driven development. I repeat: testing driven development is not for everyone. Nor is comment-driven, agile, XP or any other software development method. There is no perfect development method, and all of these have their pros and cons.
Software development methods should make the developer’s life easier, not harder. Additionally, the development method should bow to the developer, not the other way around. TDD is painful for some and convenient for others.
Pete Sergeant at Write More Tests has an interesting take on TDD which I find particularly appealing. TDD answers some interesting questions about software development, and most importantly it makes development easier in some cases and for some developers. By no means is it the ultimate solution to all development problems.
The keys to a successful dev team are flexibility and consistency. There is no perfect end-all, be-all solution to software development, so let’s stop pretending that our own personal preferences will fit everybody else and start challenging dogmatic development.