Archive for August, 2004

Programming sucks

Tuesday, August 31st, 2004

It would be nice if there was an easy way to do this:

XXXX
doSomething();
YYYY

Where XXXX and YYYY define a block, such as a for loop or try/catch, in such a way that you could reuse the block for other methods, and it is done in the scope of the method where you use it. As far as I know, the closest you can get is:

void wrapper(Command c)
{
XXXXX
c.doSomething();
YYYYY
}

Where c is some anonymous class. It gets less convenient when doSomething() needs to set variables. I’m sure there’s some crazy functional language that does what I want. Perhaps this is what aspects are all about, whatever the heck they are. (Or one could always use cpp <evil grin>).

Radio

Tuesday, August 31st, 2004

My personal corollary to Zawinski’s Law: every radio station expands until Phil Collins is contained within their format.

I heard a little of the evil Mr C. on 94.7 “The Arrow” the other day. It was a sad, sad moment. In other news, thanks to strange atmospheric anomalies, I’ve been listening to some Roanoake station lately instead of HFS. It was quite disturbing to have Loveline periodically interrupted by some song about dancing with Jesus and, horror of horrors, the world’s worst, most annoying song ever written: Dirty Dancing’s “I’ve Had the Time of my Life.”

Books

Sunday, August 29th, 2004

I dropped a Benjamin at Borders this afternoon. What the hell has happened to books that they now cost so much? Is paper a lot more expensive these days? The cheapest one I picked up was a paperback at $14. Oh, but it’s a “trade” (i.e. slightly taller) paperback, so of course it’s worth twice as much.

Anyway, I picked up a book by Rudy Rucker called Infinity and the Mind. A few reviews at Amazon draw parallels with GEB, which is entirely unsurprising given the subject matter. But, despite my rather masochistic love affair with that ten pounds of wordplay, I really picked this one up solely on the basis of Rucker’s guest blog on boingboing. If you haven’t read it, go here and then go here. Funny how reading a real writer’s blog can make one feel so inadequate.

Another book was Genetic Programming: An Introduction. Whenever I enter the computer section of a bookstore (quite rare these days), I’m still surprised at how much chaff there is. Unless you are looking for a book such as XP Patterns for Game Programming in .NET in 30 Days. Not to take away from eXtR3m3 programming, or Tricks of the 3D Windows Direct 3D Game Engine BSP Gurus — those have their places (on someone else’s bookshelf) — but I’ve always found the hard computer science books a lot more worthwhile, and they seem to be buried in this mass of pulp churned out by everyone who has a copy of Word and the will to convert last year’s Java book into this year’s C# version 2.0 book.

(Sorry Rudy.)

So who knows, this GP book may be a complete waste of time but at least GP is something new and different that I will never use. Can’t be worse than that damn RUP book I bought.

Agua

Friday, August 27th, 2004

Ever notice how bottled water increasingly apes Evian by having these long, involved histories of how the water came to be? Today I bought “Esker,” which I believe is French for “otter pee.” It was a buck at Rite Aid. Here is how they introduce their drink (my suggestions in italics):

In a remote corner of the Canadian North, deep below 5,000 acres of virgin forest, in a land that time forgot, the Ice Age created a rare geological formation called an esker, Nature’s perfect purifier. Oh by the way, Nature killed most of the life on the planet while creating this perfect purifier for you. Bottled at the source, this pristine water comes to you exactly as Nature intended: untouched by man because we trained caribou to bottle it, Esker(tm), Water like no other(tm) except insofar as it is still the combination of two hydrogen atoms and an oxygen atom.

Can’t you just picture Nigel Tufnel intoning this as a small glacier drops from the ceiling?

Looking for the real criminals…

Thursday, August 26th, 2004

This is too funny. Trying to rip off Valve? Busted!

Jaxx recap

Thursday, August 26th, 2004

We had the best band there last night, though we probably didn’t win due to lackluster draw (the carrot of seeing bald Bob notwithstanding). Band number one played a late and long set, ending in a version of ‘Won’t Get Fooled Again’ that was even longer than the 8+ minute one on Who’s Next. They were okay but there were a few times the lead singer was off key and the drums/band weren’t in sync. Number two band was a bunch of high school kids doing ska, which I hate in all forms. They’ve got a good start but there is definitely a long way to go for them to be cohesive. They brought random audience members on the stage to dance badly, and it looked like they and all of their (many) friends had a good time. The final band was probably the tightest of the other three, but they did some nu-metalish screaming vocals, which, if omitted, would have made them listenable. Anyway it’s not my bag. All of the other bands were much more energetic than us though.

As for our set, it went alright. The biggest snag was on Chalkdust, where I broke a string in the middle of a verse. I had enough time to switch guitars to the backup before any solos started, but we were close to wrecking the train. Also, the backup was Brandon’s guitar, which is a 7-string. The addition of another string is bewildering to someone like me who has only played a 7-string on one other occasion. I muddled through but definitely had some issues during the rest of the song. It’s time to buy a backup guitar.

There are some new pictures on the website.

I'm not just a member, I'm the president!

Sunday, August 22nd, 2004

I’ve decided to go a bit edgier for the Jaxx show. So I gave myself a haircut today.

Before:

After:

Yeah, I’m growing it back out.

mov ax, 13h; int 10h

Saturday, August 21st, 2004

Spurred on by that
Python hack, I’ve been getting back into graphics programming a little bit.
As it has been at least five years since I’ve dabbled, it’s interesting to
compare the way things were then and the way they are now. What a wonder
graphics accelerators (and Moore’s law) can be. Compare the first 3D
graphics hack I wrote, back in high school, which displayed a flat-shaded,
rotating icosahedron. It was written in assembly code using Mode X. You
had to tweak registers on the video card to write pixels. There was no
hardware clipping or Z-buffering or anything like that. People would
discuss endlessly on boards and newsgroups which line (DDA) or sorting
(radix) algorithms were fastest.

Five years ago, 3D accelerators were starting to appear. I got my 3dfx
card, the one with the monitor pass-through cable, in ’97 or so. I never
really tried programming for these – what little OpenGL support they had
was very spotty. Somewhere in here, I got more interested in doing
non-interactive graphics anyway. For example, there was the rigid body
simulator that 905 & I did in college
(watch the mpeg). By the
time I picked up a GeForce (which finally had a full OpenGL!), I was
doing much less coding for fun.

Today, even my laptop has a 3D accelerator in it. And computers are fast.
It’s a completely different dynamic. Go ahead, let GL do all the hard work!
The new rule is push as many triangles as possible to the card and forget
about fancy VSD or scanline algorithms.

So I’ve been messing around with the next logical step from midpoint displacement fractals: a terrain renderer.



Some things are still the same: I am reminded immediately how
frustrating pixel pushing can be when things don’t work right. The
typical bug manifests itself as an empty screen. One can go crazy meticulously
reviewing plane equations, matrix multiplications, and the like. (It doesn’t
help that I’ve forgotten a ton of linear algebra.) But with GL,
it’s a snap to do things like display the view volume with a different
camera to ferret out those pesky off-by-65536 bugs:






So, be proud, America, that you live in a land where transistors are
so plentiful!

PS I couldn’t figure out how to tie this in smoothly, but I
had to include this image for the obvious punchline:

That’s a lot of balls!

Things I've learned from my snack food

Friday, August 20th, 2004


Here is what reading the back of a bag of Combos (nacho cheese pretzel) told me:

  • Combos are the official cheese-filled snack of Nascar. They must’ve worked really hard to beat out the other cheese filled… wait, there are no other cheese filled snacks.
  • A bag of Combos has 1300 calories, 400 from fat. Until I read this, I was going to eat the whole thing.

Not dead yet

Tuesday, August 17th, 2004

Had a great time in Atlanta. The 905 and I hit Eats on Friday night. Jerk chicken with rice and beans and cornbread all for $5.50. Hell yeah. On Saturday we went guitar shopping, then I went to my cousin’s wedding. It was held in a huge only-in-the-South evangelical church/TV studio (Quiet, Lisa, everyone in the store is looking at you!). I took some pictures of the ensuing reception, but since I don’t have my mini-usb cable with me I’ll post them later.

SounDriver is playing at Jaxx on 8/25 at 7pm. This could be your last chance to see us in a really good venue!