Do you know where your variables are? | |
PerlMonks |
Re: What if you are not a genius?by Dominus (Parson) |
on Jun 12, 2001 at 10:20 UTC ( [id://87732]=note: print w/replies, xml ) | Need Help?? |
Says nysus:
I'm just wondering how other "regular" folk, like me, find ways to compete with this kind of talent.I wouldn't worry about it too much. Most of these 'boy genius' types are a little too clever for their own good or anyone else's; they spend a lot of effort doing things the 'clever' way instead of the right way. Here's a nice example of this that someone showed me today: A guy showed up on IRC asking some question about the following C code he had written: (*(((*chan).cmode)+i)).type. The first thing my friend wanted to know was why this guy hadn't written chan->cmode[i].type, which is completely equivalent and three times easier to read. The boy genius replied that his version compiled faster. (!!!!) A similar anecdote: Ken Thompson (co-author of Unix) once said that one of themost important technical reasons for the success of Unix is that they never did anything in a clever way if they could possibly avoid it. For example, when they needed to search a data structure, they used a linear search. Never a binary search; never a tree search. All the geniuses out there are shaking their heads an bemoaning the missed opportunity to use a clever O(log n) algorithm instead, but Thompson was clever in a different way, because he realized that the linear search is simple, robust, easy to write, and easy to maintain; meanwhile all but the very smartest of the geniuses have forgotten about the proportionality constant in the O. Anyway, my point is that it's not all that hard to write good code, and if you do, other non-genius folks like you and me will be able to understand it. A few of the genius types will write great code, but most of them will write a load of crap that only a genius could understand. This is of limited value, since genius maintenance programmers are in short supply. Edsger Dijkstra says that clever tricks are the bane of programming, and I think he's right. It takes an unusually clever person to know when to stop being clever. Most clever types I know are obsessed with showing off, and don't know when or how to stop.
--
In Section
Meditations
|
|