Hacker News new | ask | show | jobs
by leftnode 5533 days ago
If you've ever dealt with code that Gets Things Done but is not Smart, you'll know why it's in the title. There are a million ways to skin a cat with programming, and you can pick a stupid(er) way or a smart(er) way. I'd much rather work with the person(s) who pick the smart(er) way.

The "perfect code" part of your comment above implies smartness. Dumb people don't write "perfect code".

3 comments

That reminds me I once came along code written like this:

  function MakePrintable(nr as Int) 
  {
    Str as string
    if nr=1 then Str="1"
    if nr=2 then Str="2"
    if nr=3 then Str="3"
    ...
    if nr=27 then Str="27"
    if nr=28 then Str="28"
    if nr=29 then Str="29"
    return Str
  }
This code worked in the program it was used in (it Got Things Done), but in a dumb way (lazy? ignorant?).

I admit this is a rather extreme example, but it provokes the universal feeling when you look at gravely suboptimal code: "What did the programmer think when he wrote this? Didn't he know that ...., it's so obvious!"

Buffer Overflow Exploit Prevention?
Smart people don't write perfect code either (this is obviously relative to program size and complexity), no one does :-(
Sure, you're right. I'm sorry if I implied smart people write perfect code, they don't either, but I'll prefer their code.
I guess it depends on your definition of "done". If something is sorta slapped together in a way that is hard to read/debug or non-performant, to me that's not "done". So perhaps it's a matter of semantics.