Buddy Christ; from the film Dogma
dog•ma is a principle or set of principles laid down by an authority as incontrovertibly true.
As I was walking the dog yesterday (no pun, I swear), I was thinking about how a great deal of the #hotdrama in our industry lately stems from dogmatic thinking. It usually starts with someone saying “you should never use jQuery because it’s bloated” or “developers should always use BEM-style naming conventions”. I’ll admit, it’s very easy to slip into making a decision or best practice binary. I don’t think anyone is being deliberately malicious or arrogant, they are just trying to sell the technique they believe in, and sometimes that can cloud the message that they are originally intending.
I was trying to figure out why we slip into this way of thinking, and I think it comes back to the type of work we do. Coding is inherently binary because we are often writing things like “if this do this, otherwise do that.” So it’s perfectly natural to think this way when making decisions about our craft. This isn’t to say that code doesn’t have any creativity to it; it very much does.
Through other life experiences, I’ve come to find that black and white thinking is generally not good. There are always exceptions, outliers and unique situations.
I do recognize that this post may sound hypocritical because it may come across that all developers think dogmatically. That is not true and is not my intent, as I’m just bringing up a perception that has been on my mind lately. I’d love to hear what others think about this.
So lets keep this in mind when we look at another developers code or a peer writes a blogpost about a cool coding technique, let’s not be so quick to pass judgement. And if we see others slipping into this mindset, maybe give them a friendly reminder that there are always exceptions to the rule.