Everyone always wants to say worthy things about the qualities that make a good programmer. But I occasionally think that "a sense of humour" isn't given enough credit.
In programming, you're constantly making mistakes, and being told you're wrong (by code reviewers, bug reporters, and the computer itself). If you let that get you down, you'll quickly find another career.
When I realise I've made a mistake, my reaction is often to find it amusing – smile a bit, maybe laugh out loud, share it with a friend if it's funny enough.
I can't remember how I got that attitude in the first place. Perhaps just luck. But I sometimes think it's the main reason I stuck with what would otherwise be a frustrating profession!
@simontatham I find it's a really useful habit, or talent perhaps, in playing games too. In person or on computers. If something goes absolutely disastrously horribly wrong I'm almost guaranteed to find it hilariously funny.
@lnr when I was at school, we had a guy come to give us a talk, and he started by saying "I'm going to teach you how to juggle". In fact he discussed the mechanics of juggling not at all – what he taught was a technique for transforming frustration into amusement during the initial phase of learning when you're doing nothing but drop the balls and pick them up again, on the theory that that's why most people give up before succeeding.
His suggestion was: every time you drop a ball, tell yourself a joke, and bend down to pick the ball up just as you get to the punchline, so that you learn to associate picking up balls from the floor with amusement.
(And then he went on from that starting point to apply the same ideas to exam revision, which was the main point of his talk.)
Sadly, I'd already learned to juggle when I heard this talk, so I couldn't test whether the idea worked!
@simontatham @lnr I remember one juggling teacher who started with "throw the ball up in the air and let it fall to the ground on purpose, several times. That way you won't always associate it with failure when it happens by mistake, which it will a lot."
@diffrentcolours @lnr I think the well-known 'Klutz' guide gives similar advice, but if I remember rightly, their rationale is different: you're going to be doing this a lot, so better get in some practice :-)