Definitions
- To follow a set of rules no matter what.
- The tendency to lay down principles as incontrovertibly true, without consideration of evidence or the opinions of others.
Personal Commentary
The essence of dogmatism is following the rules and judging others who don't follow the same rules.
My
experience has crossed various opinions over time. Most of my career
I've promoted and programmed with as much discipline and best coding
practices as I've been able to muster. My complaints were raised
against "hacks" who copy code and tweak it until it appears to work. As a
result of having to fix other people's code, DRY
is one of my favorite principles. The other extreme is of highly
structured, complexly architected, and impeccably styled code. The
problem is that both of these extremes are hard to maintain. The first
because it is poorly organized. The second because it is overly complex.
The first focuses on the problem (which is good), but is short sighted
and doesn't take into account that the code may last for years or even
decades. The second is so focused on the code itself, that the purpose
and problem being solved is lost.
Dogmatism
thrives when a person is either ignorant or lazy. Rules help the
ignorant navigate and function when the reasons behind the rules and
their subtle consequences are unknown. Rules are safe. Following rules
is a defense--covering yourself against accusation when things turn out
badly. Rules are easy, which is another reason people are dogmatic. It
requires less thinking. It's often faster, but complex problems and
interactions defy being defined by a set of rules.
The dogmatic programmer
Posted by Paul Buchheit
Do you believe that there is only one "right way" to do things? Do you
ignore evidence that other solutions may also work? Do you dismiss the
possibility that there are reasonable trade-offs to be made between the
"right way" and some other way?
When is it safe to bend the rules? Just ask yourself, "What's the worst that could happen?" If the worst case isn't too bad, then you're probably OK. Minor bad things will happen no matter what, so it's often better to put your energy into general problem recovery, rather than imagining that you can simply avoid all problems.
source: http://paulbuchheit.blogspot.com/2007/06/dogmatic-programmer-when-software.html
Forum Banter
"In my experience, most bad code is written by
dogmatic cargo cult programmers that are more interested in writing
code that adheres to their pet development philosophy or framework
instead of programming to solve a problem in the simplest way possible."
"My main problems have been with people who
insist on just churning out features in the most straightforward way
without doing any kind of upfront thinking. You end up with reams of
copy past coding, code duplication and so much code that it is very hard
to keep track of what is going on."
"But of course it is also a problem when
people turn every operation into a ceremony involving factories, command
objects and any design pattern you can think of."
"Part of that is that any 3 developers will have 4 different opinions on what is clear, elegant, and modular"
No comments:
Post a Comment