Archive of the former Yahoo!Groups mailing list: MOTM

previous by date index next by date
previous in topic topic list  

Subject: Re: [motm] Hamster music

From: Neil Bradley <nb@...>
Date: 2004-03-21

> a stack using ArrayList, but did his pushes and pops from the front of
> the list (which internally involves moving all the other elements), and
> when I asked him about the performance implications with a large list,
> he couldn't tell me why it was bad. What the hell did he do in those
> six years of education, and how did that qualify him for a degree?

Reminds me of a new hire we had at Intel back in 1997 or so. The resume
looked good - she had a masters in computer science from I believe CMU
(can't remember the details for 100% certain).

Anyway, one day she was working on fixing a bug and invited my coworker
over for a look to figure out why her code wasn't working right. Upon
seeing her code, he saw this:

for (i = 0; i < 4; i++)
{
switch (i)
{
case 0:
procedure1();
break;
case 1:
procedure2();
break;
case 2:
procedure3();
break;
case 3:
procedure4();
break;
default:
break;
}
}

Something like this is either incredibly brilliant or obscenely stupid. In
this case it was the latter - hands down. The conversation with my
coworker went like this:

Him: "What is this code supposed to do?"
Her: "It's supposed to call those procedures in order."
Him: "Why didn't you just call them and get rid of the switch/case/loop?"
Her: "I heard that compilers reorder instructions and thought it would be
called out of order and it would cause my program to not work."
Him: "Did this solve the problem?"
Her: "No...."

> A colleague of mine argues that one shouldn't have to understand the
> underlying implementation to program in a language, because a person
> doesn't have to know how an engine works to drive a car. These are the
> people that never change their oil. Their VCR's blink "12:00" all the
> time.

You should point out that it's a flawed analogy. Programming applications
is akin to building the car, not operating it. You should know enough
about the language to know the consequences (like knowing enough about
vehicles to know why it's a bad idea to ignore idiot lights and to let
your brakes grind). It does make me wretch when I hear Java programmers
tell me that "pointers are too hard to understand". Not everything SHOULD
be easy/simple for everyone.

> The most precious thing I could ever give my kids in life it would be a
> fundamental curiosity for how things work and a desire to learn. That
> is obviously more important than a degree from Stanford.

Amen, brother. ;-)

-->Neil

-------------------------------------------------------------------------------
Neil Bradley "Your mistletoe is no match for my T.O.W. missile!"
Synthcom Systems, Inc. - Santabot - Futurama
ICQ #29402898