Confessions of a terrible programmer

  • Thread starter Steven D'Aprano
  • Start date
C

Chris Angelico

Pardon me, but I completely don't get this article. Let me in on what
is supposed to be the joke please!

It's a "ha-ha only serious" article. The point is: You can't write
good code by being a good programmer. You MUST [1] acknowledge that
you write buggy code, and then code accordingly.

Sometimes you'll write bugs that result in egg on the face. I fixed
one this week that had been lying around for ages; if the user
provided a particular (and unusual, though not malformed) set of
input, and the program was running in the first hour after midnight
UTC on a Thursday, it would go into an infinite loop, because I'd
missed decrementing something. More often - especially if you do
things like the author there does - you'll have a program that bombs
really fast on startup, or at least bombs noisily when something goes
wrong. Those bugs are easy to find and, often, easy to fix. Those bugs
we can deal with.

The other point to note is that it takes a competent debugger to
figure out problems, and that's in many ways a more important skill
than writing code. Taking another example from this week at work: My
boss was tinkering with our AJAX system, using his Linux development
box and one of our Linux test servers. He clicks a button in either
Google Chrome or Iceweasel (Debian's old build of Firefox), the server
does stuff, and stuff happens promptly. He crosses over to his Windows
XP laptop to try the same button in IE8 (the oldest and stupidest
browser we support), and there's a 20-second lag before the server
does its stuff. But adding logging showed that the AJAX call was
taking less than a second, so it couldn't be that. Turned out the
request was given a job time based on the client's clock, which was 20
seconds ahead of the server, so the job got delayed by those 20
seconds. Would you, when debugging an AJAX+PHP system, think to check
if clocks are synchronized? Only if you know how to debug. Good
programmers can, and can pinpoint problems without looking at a single
line of code.

Claiming you'll write perfect code is arrogance beyond measure.
Acknowledging that there'll be bugs and building systems to cope with
(and remove) them is the critical humility for programmers.

[1] http://www.ietf.org/rfc/rfc2119.txt

ChrisA
 
S

Skip Montanaro

Pardon me, but I completely don't get this article. Let me in on what
is supposed to be the joke please!

I don't really think there's a joke. I think the author is saying in a
somewhat sly way is that often, the difference between a terrible
programmer and a great programmer is the discipline applied to the
task, and intelligent use of the tools at hand. Catch as many errors
as you can as early as possible (before other people see your original
stabs at a solution) and when your code is set loose in the wild you
will seem like a great programmer. Little do your colleagues know that
your tools protect them from your terrible programming.

Skip
 
S

Steven D'Aprano

programmer.html

Pardon me, but I completely don't get this article. Let me in on what
is supposed to be the joke please!


It isn't intended as a joke. The article is serious, but it wraps its
serious message in a bit of mild humour: here is a guy who calls himself
a terrible programmer, but his projects are always completed on time and
on budget, while "good" programmers' projects are late, over-budget and
buggy.

The irony is that those who think of themselves as "good programmers" end
up writing worse code than those who think of themselves as "terrible
programmers", because the self-aware terrible programmers use all the
tools in the programmer toolbox to improve their code and the others
don't.

The author of that blog piece is too polite to say so, but I suspect that
there's a certain amount of Dunning-Kruger Effect going on...

http://en.wikipedia.org/wiki/Dunning–Kruger_effect

but I digress.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top