Aah. Smug mode. [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Sat 2006-05-13 17:40
Aah. Smug mode.

A few weeks ago I decided that after taking a break from free software writing in November, I seemed to have recovered sufficient energy (and was going sufficiently stir-crazy) to have a go at doing something non-critical in a relaxed sort of way. Therefore, I started work on a general physics engine for Breakout games (since there are three different Breakout-style games I've been wanting to write for ages, and I thought it'd be obviously sensible to share as much code as possible between them).

Today I sat at the computer for four solid hours, writing a startlingly large amount of worryingly complex code to make this physics engine handle bouncing the ball off the sharp corners of bricks (as opposed to bouncing off brick sides, which I did last month and which is much easier). When I began testing it, there were a couple of really trivial segfault-grade bugs such as using completely the wrong variable as an array index, and I feared that if I couldn't even get that right then there was surely no hope of all the complicated maths being even nearly right. So I was expecting to spend at least another four hours debugging it.

But in fact, after I fixed those few tiny teething troubles and got the new code to actually run, the whole of the rest of it turned out to work perfectly. First time! (Well, there was one actual maths bug it took me a while to track down, but it turned out to be from my last coding session, not from today.)

It's at times like this I begin to think that perhaps I haven't completely lost it.

LinkReply
[identity profile] cartesiandaemon.livejournal.comSat 2006-05-13 20:00
w00t. There's something amusing in the concept of maths bugs. I don't know why, because it's an inevitable layer of software to have bugs in, between design and algorith, but it just makes me smile[1]. Maybe it's the idea that godel's incompleteness theorem is just an unfortunate wart God could fix with a recompile, or the idea of a little beetle with long antenae failing to differentiate something :)


[1] Typo: slime
Link Reply to this | Thread
[identity profile] deliberateblank.livejournal.comSat 2006-05-13 23:04
GIT is clearly a deliberate nerf put in to stop mathematicians from being overpowered though.
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]