This post on "coding horror" is a great example of this phenomenon, or more specifically, the comments are a great example. At least half of the comments are from people who are debating which of these two lines of code are better:
if (s == String.Empty)
if (s == "")
Here's my answer: It's not important!
It's easy to get dragged into these debates because we all have opinions (and the one form really is better!), and of course the more time is spent talking about the issue the more important it seems.
Here's my trick for killing these stupid debates: Let's list all the issues and problems that we are facing right now. Now, where does this issue rank on that list? Is it in the top 10? The top 100? The top 1000? Are we spending more time talking about this one minor issue than we are spending working on any of our top ten issues? (You don't necessarily have to make the list -- just suggest that it exists and then guess where on the list the issue appears)
Sometimes that works. Sometimes it brings a little perspective.
And yes, this misallocation of time (aka "worrying about dumb stuff") is probably a top 10 productivity killer.
Update: Here's a good link (via news.yc) which offers one explanation for why people often spend the most time on the least important issues:
Parkinson shows how you can go in to the board of directors and get approval for building a multi-million or even billion dollar atomic power plant, but if you want to build a bike shed you will be tangled up in endless discussions.
Parkinson explains that this is because an atomic plant is so vast, so expensive and so complicated that people cannot grasp it, and rather than try, they fall back on the assumption that somebody else checked all the details before it got this far. Richard P. Feynmann gives a couple of interesting, and very much to the point, examples relating to Los Alamos in his books.
A bike shed on the other hand. Anyone can build one of those over a weekend, and still have time to watch the game on TV. So no matter how well prepared, no matter how reasonable you are with your proposal, somebody will seize the chance to show that he is doing his job, that he is paying attention, that he is *here*.
Update Two: Wasting time is fine, and even inane discussions of the best way to compare empty strings can be interesting. My real point is this: if we are actually trying to get something done, then we need to kill this stuff, or it will kill productivity. If, on the other hand, we're ok being in time-wasting-mode, then silly debates are probably harmless enough. I picked on the blog comments above not because there is anything wrong with them per-se (what are blogs for, if not inane debate?), but because it reminded me a lot of the silly debates that I've seen on work mailing lists (where they do cause harm).
Yes, people actually do have time do discuss all this stuff, and they enjoy it. For example, a lot of topics in comp.lang.c++.moderated address similar topics. I have to admit, sometimes it's hard to resist...:)
I just finished reading "The Art of Learning" by Josh Waitzkin (he is the subject matter of "Searching for Bobby Fischer") -- a great book. In it, Josh talks about (page 35) Young Chess players caught in this trap: these Young Chess players start to memorize countless chess openings -- which leads them to "instant success". But then, they don't study the middlegame or the endgame as much. So they lack any real depth.
I'm building a small app for the Facebook platform. Even thought I love Lisp and Python, the official clients are in Java & PHP: so I choose PHP. Didn't want to fight the system. And after playing with PHP5, it isn't all that bad!!! ;-)
I very often weed out the things that don't matter with this simple statement:
"Will I care in 6 months?"
As Hamming asked:
What are the important problems of your field?, and;
What important problems are you working on?, and then finally;
If what you are doing is not important, and if you don't think it is going to lead to something important, why are you at Bell Labs working on it?
I strongly suspect that very few of the people debating String.Empty feel it is the most important problem in their field.
So why are they working on it?
well, most of the comments at news.YC and other 'non-technical' newsgroups debate things that "dont really matter";
However, it's the process of debating the silly stuff that creates social friction, so that our gears may slough off grit, interlock and start working together. Now THAT's important!
You should use "string.Empty" as the lowercase form of string correctly implies it's a primitive
Whoever invented string.Empty obviously had too much time on their hands since there was already a widely used and universally understood literal "" that does the same thing. Now hundreds of man hours will be wasted on debating this topic worldwide.
I usually call up the person trying to create a big fuss over a trivial issue and try to reason with her/him. A lot of people who tend to use flaming language in a mail thread are receptive over the phone/in person conversation.
somebody will seize the chance to show that he is doing his job, that he is paying attention, that he is *here*.
Even though this may be true in some cases, IMHO this is usually not the case. Quite often engineers who feel/work passionately on a product bring up 'String.empty' kind of issues. Usually these are the kind of people who make things happen when its really important to move fast. It is extremely important that leads/management to not give the kind of perception as the above quoted statement.
Post a Comment