For several years now I’ve participated in the physics tutorial session at GDC (along with Jim Van Verth, Gino van den Bergen, Erin Catto, Brian ‘Squirrel’ Eiserloh, and Marq Singer). One section I’ve covered in some detail is robustness and within this area I’ve stressed (amongst other things) the importance of distinguishing between absolute and relative tolerances when performing comparisons of floating-point numbers.

I won’t go into details about why you would want to care about how your floating-point numbers are compared. (Detailed information can be found in part in my GDC presentation slides and in much more depth in my book.) Here I will assume you already know why you care, and I will just note that absolute and relative tolerances are tested as Read the rest of this entry »

A while ago a local developer (hi Rick) asked about what I thought was the best way of ordering draw calls for sending to the graphics chip. As the topic came up again in a discussion at work recently, I thought I’d share my thoughts about what I think is the best approach these days. Read the rest of this entry »

Since I’ve dissed patterns and OOP recently (and rightly so) I thought I’d be a little positive and recycle an email I sent a friend a while ago. This someone was curious about functional languages after I had mentioned them over dinner as he had no experience with them. I absolutely think that if all you have ever used is an imperative language (exemplified by C++, Java, C# and other similar crap) I highly recommend spending (at least) several days learning a functional language. You’ll be a better programmer for it. (And why not learn some logic programming too, while you’re at it.) Read the rest of this entry »

Some anonymous soul emailed me regarding my “Design patterns are from hell!” post, arguing that “somehow, knowing patterns exist is the same as knowing different data structures exist” and that “understanding the different ways for creating objects (hello creational patterns) is like understanding the implications of deciding to use a dequeue rather than an array or rather than a linked list.”

I was also bravely asked what I thought about these statements. Well, guess what, since one can never diss design patterns enough, this is what I think… Read the rest of this entry »

When did “rewrite” become “rewrite from scratch?!” In my 30 years of writing code, rewrite never meant rewriting from scratch — until the programming cults arrived on the scene at the beginning of the century, that is. Before them, “rewrite from scratch” meant — lo and behold — rewrite from scratch, and a plain “rewrite” meant what the cultists successfully have named “refactor.”

There are lots of things I think a good programmer should understand, and understand well. One, of course, is that OOP amounts to BSE for programmers. Another, and the topic of today, is that good programmers should know how to manipulate bits in their sleep. (No, not those bits!) Read the rest of this entry »

It’s SIGGRAPH 2008 time! That’s exciting to me, but not for the reason you think. I really couldn’t care much less for the conference itself. I mean, who needs to hear about yet another shadow mapping algorithm, when we know there will be another 10 presented in the next year, and 10 more in the year after that, ad nauseum. I’m not particularly thrilled about going to paper presentations when just about every paper is already on the net, neatly collected and categorized on Ke-Sen Huang’s amazing conference index page. All the cool people I like to hang out with go to GDC and not SIGGRAPH so there’s not much in terms of networking. And the classes at SIGGRAPH just put me to sleep with their academic droning, overall lack of excitement, and no understanding of who actually attends their lectures and what they want to hear. Ugh. Read the rest of this entry »