Thursday, December 18, 2003

Deal With It

Okay, computer time: For those who Don't Know: Writing in an essentially procedural language like C, your programs are basically structured like a list of instructions to the computer ("Do this, then do this, then do this," etc.). To break up the monotony, you're allowed to create "functions" that encapsulate blocks of frequently accessed code so that they can be run with a single command (e.g., "f(x)", where x is a parameter that presumably affects the behavior of the block of code represented by f). Conditional statements like "if (...)" aside, however, the execution of C code proceeds more or less the same regardless of whether you structure your program "functionally" or just do everything as an extended laundry list of tasks. Since function-structure is a just tool to help humans understand the flow of execution in a program, it's often difficult to decide how best to . For example, if you've got a complicated task to accomplish, like establishing a connection to a remote socket, is it best to write several re-usable functions that accomplish more general aspects of the task, or is it better to keep the number of functions small and write a large function that just sets everything up in one shot? I tend to lean towards the former, 'cuz I'm kind of an object-oriented kind of guy -- you build tiny specific tools and then link them into larger, general tools -- but what if you used a different metric to measure optimal "functionalization" of source code? I've often wondered what it would look like if some source I'd written were optimized, say, to be as compact as possible, so that any repeating block of two or more statements would be abstracted into a single function call. (As I mentioned above, that wouldn't imply a run-time optimization, and might even do some harm, since calling a function involves some overhead in terms of pushing arguments onto the internal stack.) Anyway, this is probably something that people have written papers about -- and that hence Mike Bell already has down pat -- but you know... grist for the mill.

So I saw Lord of the Rings: Rise of the Triad with the peeps and creeps yesterday. It was great! Ten dollars well spent, I think.

You know, if I were Strom Thurmand's illegitimate daughter, I wouldn't wait to show up until he was dead. Man, nothing would have been sweeter than ruining the reputation of that rotten old hypocrite. I like how everyone likes to talk about how much they respect the "service" he's done for the country. A senate full of bigotry-apologists -- truly disgusting; another notch in the old shame-belt for this repulsive country.

I was digging around in a box over in the Q.A. area of the office (also known, no joke, as the "Golf" area -- as many of you have suspected, my job bears a striking resemblance to Club Med), and I found a sound card for my Windows machine, so now I can listen to other peoples' music shares. Not surprisingly, they are mostly full of Belle & Sebastian MP3s; this place is hopping with metrosexuals. O MSN, not since eugenics has there been so effective a tool for simplifying the structure of our society.

Loath as I am to recommend a "web-comic," whatever that may be, the early episodes of Elf-Only Inn are kind of funny.

OpenRPG's server code is now able to process the messages required for a login from the routines in libopenrpg_client -- which don't quite exist yet. That should be easy, though. I still have to make it possible to register a new account on a server. I still have to fucking sketch out a design for how I'm going to handle playing a goddamn game with this thing. My latest anxiety: How to represent complex distance relationships of "Objects" to each other in terms of perceptibility? Like, maybe certain conditions have to be true on one object for it to be able to perceive another object? Do objects have absolute properties, or only properties relative to each other? Do I want to incorporate a scripting language like Lua to manipulate objects? Everyone else seems to be doing it...

I wrote this post at work, but I don't have anything else to say now that I'm home.

No comments: