Extroskeleton

By Shamus Posted Wednesday Aug 9, 2006

Filed under: Nerd Culture 9 comments

There are lots of little memes floating around (is it okay to call them mini-memes?) that are collections of various short-answer personal questions. Inqueries into such erudite subjects such as, “what flavor of ice cream is the sexiest?” or “which Beatles song would you choose to have played at your funeral?”. Such queries are usually posed because of the fun in coming up with an answer, not (I’m assuming) because of any genuine curiosity on the part of the asker. MySpace is a hotbed of such things, where users fire numbered salvos of questions at one another as a cheap approximation of conversing. Not that this thing is a rarity outside of MySpace: You can find these question lists all over Blogistan, as it were.

Continue reading ⟩⟩ “Extroskeleton”

 


 

The Procedural World, Part 2

By Shamus Posted Tuesday Aug 8, 2006

Filed under: Programming 22 comments

In my previous post I mentioned the way .kkrieger uses procedural objects, instead of using pre-fab objects built by an artist.

I guess I should warn you that I have a passion for this subject.

A few years ago I made a program that made procedural trees. I got tired of the fact that all of the trees in our software looked identical. (Because they were all copies of the exact same object.) So I came up with some code that would let you plug in some numbers and it would spit out a tree object. By adjusting the numbers that controlled the distance between the ground and the lowest branch, the length and thickness of the banches, how much they sagged, how crooked they were, how tall the tree was overall, and what textures to use, you could come up with all sorts of different trees. You then just change the random number seed to come up with more trees of the same type. So, you could design an “oak”, and then generate an unlimited number of unique oak trees. On top of this the program could make the trees smoothly grow from sprout to full-size, although I never got around to adding seasonal changes.

It was a cool little project, but in the end I found out other people aren’t nearly as excited about these sorts of ideas as I am. Sadly, it ended up as a novelty that was never put into use. Sigh.

Continue reading ⟩⟩ “The Procedural World, Part 2”

 


 

Tutorials

By Shamus Posted Tuesday Aug 8, 2006

Filed under: Rants 6 comments

A coding rant follows. It’s not for everyone. Or anyone. I’m just venting.

Last week:

I need a library to compress zip files. (By library I mean a .lib or .dll, I didn’t need a PROGRAM to zip files. I’m writing the program, and zipping files is a very small but very crucial aspect of what this program needs to do.) I need it quick. Money no object. (I’m not the one paying for it.) A quick Google search reveals that there are many, many out there. What hampers my search the most is that nearly all of them are documented by absolute stooges. To wit: When you write an example program demonstrating how to do such-and-such, you make that example as clean, uncluttered, as simple, and as short as possible. You do not make a production-grade program with dialog boxes and some convoluted MFC interface, a splash screen, an about box, or anything else that is not directly related to the task at hand.

I see this all the time and I can’t imagine what sort of imbecile would go to so much trouble to make something so useless. Several of the “example” programs I reviewed were many pages of C++ code, usually spread out over several modules and employing various elaborate class interfaces, and somewhere in what soup were the half-dozen lines of code that interested me and would show me what I needed to know.

Incompetence

Imagine if you had a tutorial for how to hammer a nail:

  1. Lengthy description of how to obtain the blueprint for a house
  2. Directions for how to select and prepare the building site.
  3. Long list of the tools needed. Somewhere in this list is buried the information about the hammer and how to use it.
  4. List of building materials. Somewhere in this list is a description of nails and how to hold them.
  5. Assemby instructions. Somewhere in here you might find instructions on how to arrange the two pieces of wood you’ll be nailing together.
  6. Instructions for adding a roof.

All of this comes in a hundred-page bound volume titled, “How to Drive Nails”.

This is one of the reasons I never bothered to learn DirectX. There was never a lesson on how to hook up with DirectX, start rendering, make ONE polygon, and then close DirectX. No, the tutorials were bloated, messy, and so confusingly written that I couldn’t tell which parts were DirectX calls and which were parts of the tutorial. Layers and layers of obfuscation were built up around function calls with confusingly similar (and painfully LONG) names.

Hmmmm. Am I supposed to call:
DirectXRenderTimeToDrawASinglePolygonPrettyPlease ()

or:
WowICouldReallyUseADirectXPolygonRightNow ()

No, both of those just turn around and call:
DxPolygonReadySetGoRender ()

Which in turn calls…
DxGimmieATriangle ()

But that’s just a container for… Um. Geeze. Forget this. I’m about ten levels deep and suffering from a personal stack overflow. I forget what I was even looking for when I started tracing through this mess.

(On the other hand, if you want to do a little rendering with OpenGL, NeHe is stellar. It starts with simple concepts (how to hammer a nail) and adds things one tutorial at a time, until you have everything you need to build a house. The tutorials are simple, as short as possible, and many are even cross-platform.)

So what happened with the zip library? I found one with a simple tutorial. The entire program would fit on one side of a single piece of paper. They also had the fastest, smallest external library out of all that I reviewed. I am of the opinion that all of these advantages are related. (The coders knew what they were doing.) As a bonus, the library as was also the cheapest. Amazing.

 


 

The Procedural World, Part 1

By Shamus Posted Monday Aug 7, 2006

Filed under: Programming 38 comments

Via Augury I found out about .kkrieger, a first-person shooter game which is only 97k in size. That means the entire game, sound effects, graphics, code, and everything, all within 97k. That is preposterously small, yet the game still looks quite good and at first glance it can pass for a cutting-edge shooter.

.kkrieger Screenshot

Continue reading ⟩⟩ “The Procedural World, Part 1”

 


 

McCulture

By Shamus Posted Monday Aug 7, 2006

Filed under: Random 5 comments

Saturday morning, McDonald’s. The same McDonald’s where I met my wife, in fact. I’m sitting with the family enjoying a very greasy and heart-impeding breakfast. The music this morning is a collection of expired pop music from the early 60’s. There’s some Beatles and maybe an Elvis in the mix. A doo-wop song floats by harmlessly. People have been hearing this stuff in grocery stores for years and have learned to tune it out. The music is only there to keep the place from being to dull and quiet. It’s just a low-level murmur of notes so that people can talk without their conversations overlapping with those going on at adjacent tables.

Then LA Woman by The Doors comes on. The music doesn’t really fit on a sunny August morning in western PA, but it does not cause a scandal. The old timers – men who were middle-aged when the song was still on the charts – take no notice. None of the mothers present clamp their hands over the ears of their children. Nobody is shocked. There is nothing surprising about hearing something like this piped into the restaurant. I mean, it’s just oldies. Right?

Drive Through
Drive on through to the other side! Drive on through to the other side!

It’s a very strange thing. LA Woman came out the year I was born – 1971. The Doors were considered to be very edgy and subversive at the time, or so I’m told. The song certainly wouldn’t have been played in a McDonald’s back then. It still doesn’t really fit in the red and yellow plastic clown world of MickeyDees, but nothing short of circus music would suit the atmosphere of that place. Although the lyrics haven’t changed and the tune is the same, it has been rendered somehow “family friendly” simply by aging.

I also realized: Thirty years from now I’ll be sitting in a McDonald’s somewhere and nobody will be surprised when Marlyin Manson comes on.

 


 

Useless Stats by Hour

By Shamus Posted Sunday Aug 6, 2006

Filed under: Projects 3 comments

I’m fiddling around with my WordPress plugin and I added a feature to show posts sorted by what hour of the day they were posted, just because I wanted to see what that would look like. Of course, I already had an idea of what it would look like before I wrote it, and I was quite confused when what I made didn’t match my expectations. Geeks are funny that way.

I most often post either during lunch, or when I knock off work between 5pm and 6pm. So, what I expected to see was a mostly flat grid, with a spike in the noon hour, and then another spike at 5pm. What I got was…

Posts by Hour

This shows how many of the blog’s posts are published by hour of the day. This can be useful to see what time of day sees the most posting activity.

Midnight: 7

(1%)

1:00: 2

(0%)

2:00: 1

(0%)

3:00: 1

(0%)

4:00: 0

(0%)

5:00: 3

(0%)

6:00: 5

(1%)

7:00: 9

(2%)

8:00: 13

(2%)

9:00: 5

(1%)

10:00: 20

(4%)

11:00: 55

(12%)

Noon: 50

(11%)

13:00: 19

(4%)

14:00: 19

(4%)

15:00: 13

(2%)

16:00: 53

(12%)

17:00: 43

(9%)

18:00: 30

(6%)

19:00: 29

(6%)

20:00: 21

(4%)

21:00: 12

(2%)

22:00: 19

(4%)

23:00: 10

(2%)

Have I been taking long lunches? Quitting early? Why are half of my lunch posts at 11am and the other half at noon? I could understand if they were all shifted forwards or backwards in time, depending on what time zone the server is in but…

<forehead slap>

Daylight savings time. Obviously the server is not taking part in the great American temporal hallucination that is DST.

I work from home, and my wife homeschools our children, so DST doesn’t really affect our lives except to annoy me twice a year.

 


 

Mel Gibson’s RAGE?

By Shamus Posted Saturday Aug 5, 2006

Filed under: Pictures 3 comments

Just spotted this ad on Fox News:

Mel Gibson Stoned

First: I realize this story has been beaten into the ground. Days after the story was over and normal people had moved on they were still trying to milk it: “What do our readers think about what Mel’s therapist said about the Jewish reaction to the Catholic Statement responding to the press release from Gibson’s publicist on the police report of Mel’s original drunken tirade?”

But just what is going on there? Look at that picture. Mel’s Rage? In that picture he looks thoroughly baked, man. His body language suggests he’s describing the size of the bag of Cheetos he wants to eat right now. If they describe this photo as a rage then I can’t imagine what they would think of one taken while he was wide awake. Are photographs of Mel Gibson so rare that this is the best they could find to go with the “rage” headline? They couldn’t even get their hands on one of him mildly peeved?

My caption would be: “Mel Gibson mellows out using herbal remedy and could totally go for a huge pizza right now.”

Guess that’s why I’m not a journalist.