Wednesday, January 26, 2005

C++ Templates

I don't like C++ templates for most things. Lots of people write about how cool C++ templates are and the neat things they can do. However every time I run into some template code somebody has written I get confused. I'm not smart enough to understand C++ templates. Templates fail "Tod's #1 Programming Philosophy":
 
    The simplest code is the best code.
 
Our Mac porting team took a function we had and made it a templated function. It originally took a void pointer to a packet and copied it to a queue. Now it takes a templated type instead. The old non-templated function would have taken less than 5 seconds for any programmer to understand. I looked at the new templated code with one of our smartest programmers and after 10 minutes gave up trying to figure out all the intricacies of what the function was doing.
 
Yesterday I was modifying some templated class so that it inlined better. This function showed up in VTune and I was surprised that it wasn't auto inlined. While working on this I got a 30+ line compiler error message about an error in my code. I enlisted the help of one of our other brilliant programmers to work through it with me. It took us about a 30 minutes to figure out what exactly was going on.
 
These two examples are pretty typical of my experiences with C++ templates. In theory land C++ templates are really elegant solutions for abstract algorithms. However, most of the time I see C++ templates they have created an overly-complicated solution. That's goes against my programming philosophy.
 

Thursday, January 20, 2005


Banana Slug.

This picture was posted with Picasa2 and Hello. Wow, that's the worst user interface I've used in a long time. I think I was chatting with the BloggerBot and shared a photo with him. Now, I've never actually met BloggerBot, but I'm sure he's a nice guy even though he doesn't have must to say.

I wonder if there's a non-DFU way of using blogger to host my images...

Blizzard North Job Opening

Blizzard North is looking for a Game Programmer:

http://www.blizzard.com/jobopp/bn-game-programmer.shtml

We're looking for an programmer with game industry experience. We'll also look at someone fresh out of college that has had good internships and made some armature games for fun.

If you know me, I can submit the resume for you. Otherwise send it to the address on the website.

Wednesday, January 19, 2005

iPod My BMW

The iPod I got for my BMW wasn't working very well. It had a bunch of really annoying habits:
  • It would randomly crash while playing a song, go to FM, and refuse to go back to the iPod. I had to pull the iPod cable out to reset the thing.
  • About 15% of the time I started my car the iPod wouldn't play at all until I reset it.
  • It would revert back to FM after my car was off for over about 10 hours. It's amazing how annoying that was. Every time I got in the car I'd have to futz with the radio to get my iPod to play from the beginning of a play list that I've hear a million times. Even more futzing to get it play randomly.
  • Every time I turned the car off, it forgot about the random setting.
Well, I down loaded the iPod Software 2.2 about six weeks ago. That fixed most of my problems. All except the forgetting about random, but I can live with that. I spent a while on the web and a few other people had the same problem as me, and since nobody posted a solution I though I would.
 
Having lots of music in your car without lugging CDs around is really nice.

Monday, January 17, 2005

Why Write?

Joel tells me that I should have been taking writing courses all through college. I actually went out of my way to slip through college without taking courses that required writing.

Recently in my job I've been watching the process of game design. Having good ideas is important, but that's the easy part. Selling your ideas to the rest of the company is the hard part. So it turns out that being a good writer (and speaker) is a more important job skill more than being a logic thinker. The best logical thinker I work with is getting really frustrated because he just can't sell people on his great ideas. And if you don't sell people, your ideas don't happen.

Well I'm a programmer that dabbles in game design. I'm also a really crappy writer. So I'm taking Joel's advise and trying to write more... notice this blog. I wonder if anyone will ever read this? I wrote a little on Nav Meshes a little while back, but it doesn't look like many people read it. So maybe I'll get my hit rate up if I mention that I work as a game programmer at Blizzard North. "I'm working on an unanounced title." (Boy, I've been saying that for too long!) I did a bunch of testing for World Of Warcraft, but wasn't a programmer on that.

Hmm... Blogger doesn't seem to have a spell checker. This could be challanging.