Word for the Day

By Shamus Posted Friday Aug 18, 2006

Filed under: Random 2 comments

Pixy Teaches us a new word today. Or two words. A phrase, really. I guess. Anyway:

We were forced to do stuff like that because we were working with huge databases and impossible time constraints, and simply could not afford to take the databases offline to make the changes we really needed, so we had to stick data wherever it would fit.

(There’s a good name for this sort of activity: deficit programming. I hate deficit programming.)

That one is going right into my personal lexicon. It is directly related to what I have going on these days.

Deficit progrmming is particularly dangerous because it’s easy to get away with it in short term. The project manager can get the job done in less time, and move the coder onto other things. A one-week project gets done in three days. It feels like getting something for free. Once he sees this in action, he’s going to want to do it again. And again. Pretty soon he’ll just assume this is how things should normally be done.

Except all that slapdash code is a ticking timebomb. Since it wasn’t finished, polished, and tested, there are all sorts of problems that can spring up down the road. Those other two days of work needed to be done. If he throws the thing into use and forgets about it, it will chug along until something goes wrong. Then, because of an undiscovered bug or missing safety check, the thing will go down. Then some of the other crap software, similarly constructed, may fail as well. Pretty soon you’re dealing with catastrophic failures arising from what should have been a minor hiccup. Those two days of cut corners will take five days to fix, which will eat into the schedule of some other project, thus creating the need for more deficit programming.

The injustice about this sort of thing is that it is often the coder who gets blamed*. Nobody will remember that he delivered a week-long project in two or three days, but they will remember that he’s the one who wrote it, and the project leader will feel no shame at all in demanding that the coder come in on the weekend and clean up the damage that resulted from the project he was never allowed to finish.

* I’m lucky: My current bosses are actually pretty reasonable about this sort of thing.

I was whining about my current project yesterday. It has suffered from quite a bit of deficit programming, and I’m only now starting to recover. In fact, this morning I have a choice: Do I begin work on the next phase of the project (which is already past due) or put airbags and antilock brakes on the stuff I’ve already written? I’m not complaining: at least I’m to the point where I have a choice!

What to do, what to do…

 


 

Good to be the King?

By Shamus Posted Friday Aug 18, 2006

Filed under: Random 29 comments

The phrase “It’s good to be the king” has always struck me as odd, because the idea of being a king is not appealing to me at all. I know the phrase is supposed to mean, “getting your way all the time is good”, but honestly I would never want to be a king, particularly during their heyday when kings really did get their way at all times.

Let’s compare two people and figure out who lives a better, longer, more comfortable and productive life: A poor modern American or a King in the middle ages. By “poor” I don’t mean someone who’s destitute, I’m just talking about someone stuck in a low-middle class life at a dead-end job or jobs. I’m sure I’m not the first to point this out, but I still find the comparison fun:

Continue reading ⟩⟩ “Good to be the King?”

 


 

Informless

By Shamus Posted Thursday Aug 17, 2006

Filed under: Programming 16 comments

Zork

James Lileks tries out Inform, a software tool that lets you make interactive fiction, or “text-based adventure games”, in the gamer’s vernacular. Inform is said to be “based on natural language”, which caused me to raise an eyebrow, Spock-like, the moment I read it. Interactive fiction is still a game. The player does things, and the game world is altered in some way. They continue to alter the game world until the story reaches its conclusion. This sort of thing requires some sort of branching logic. If the player goes left, they end up in the library. Right, and they go to the observatory. Go down into the basement and get eaten by a grue. Whatever. There is no way around this: You need some sort of logic to govern this, and that means you need a programming language. This “based on natural English” stuff sounds like Inform is making promises it can’t keep, that the would-be author can program without learning a programming language.

James gave it a try. He wrote a short introductory paragraph and told Inform to do its thing. Here is how things went for him:

You've awakened in a dark hole. You cannot tell what smells worse - you or the pit you're in. The floor is hard, but you can see the sky; it's either twilight or dawn. You've no idea.

Not exactly interactive fiction style, I know, but it's been a while. I asked the game to process what I'd written, and it came up with the following error messages. It's like remarks on a freshman comp paper from a brilliant grad student who completely fried his brain with acid:

Problem. You wrote 'You've awakened in a dark hole' : but I can't find a verb here that I know how to deal with, so I am ignoring this sentence altogether.

Problem. You wrote 'You can't tell what smells worse - you or the pit you're in' : again, I can't find a verb here that I know how to deal with.

Problem. The sentence 'The floor is hard, but you can see the sky' appears to say two things are the same - I am reading 'floor' and 'hard' as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that 'the chalk is the cheese'. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance 'Dairy Products School is a lighted room' says that something called Dairy Products School exists and that it is a 'room', which is a kind I know about, combined with a property called 'lighted' which I also know about.

[...]

Problems occurring in translation prevented the game from being properly created. (Correct the source text to remove these problems and click on Go once again.)

Noted, pal. Delete from drive.

I don’t blame him for being irritated. I gave inform a try myself. It turns out you can’t just throw down some prose and expect a computer to intuit what to do with it. You have to define things as a “room” (which is any place, room-like or not, such as ‘Jail Cell’ or ‘Baseball Field’), an “item” (something that can be picked up) a “door” (something that connects two rooms) or a “container” (something which may contain items, which may or may not be openable and may or may not be locked). There are these distinct types of things. You define them and describe them in certain ways. If you fail to describe things the way Inform expects, it will fail and will not be able to turn your text into a game.

Programmers will instantly recognize this process: It’s called compiling. It’s the process that takes your computer code and turns it into an executable. If you do not follow the rules of the programming language you’re using, the compile will fail and the compiler will give you an error message instead of making a game. This is exactly what happened to James.

So Inform is sort of trying to pretend that it is not using a programming language. This “based on natural English” is misleading at best, sophistry at worst. It is using a programming language, but since it is “based on natural English” the rules of the language are murky and the compiler is easy to confuse. Consider:

The key to the computer room is an item. It is on the table. It can be taken. It unlocks the steel door. The description is “a small brass key with well-worn teeth”.

This is how you have to write. Whether or not this is “natural English” is arguable. I’ve never met anyone who talks this way. A human can parse this easily, but the compiler is going to go nuts. It’s going to see “computer room is an item” and think the computer room is an item on a table. It may see “It is on the table. It can be taken.” and think the table can be taken. Should the period at the end of the last sentence go inside or outside of the quotes? Correct grammer says inside, but since that text is echoed back to the player- often in another contex – you don’t really want a full stop there. Trying to write things so as to totally disambiguate your meaning is very hard, and even when done properly the compiler can still get confused. The compiler can misunderstand just about anything. I’m sure once you get the hang of it you’ll eventually intuit what will work and what won’t, but note that in the end it is the author programmer doing the intuiting, not the compiler. The rules must be learned via trial and error.

Let’s compare this to a language I’m going to make up right now:

+declare item:"computer room key"
    takeable=true
    unlocks="steel door"
    location="table"
    shortname="key"
    description="a small brass key with well-worn teeth"

This is what programmers are used to: symbols, assigning properties to variables, indentation. I submit that even for a non-programmer the above is no less readble than what you would need to write for Inform. Yes, it seems cryptic and daunting, but the system has clear rules that can be clearly defined for the programmer and understood. Inform has rules as well, but they are obscured and mysterious. Like a blind man describing an elephant, you must feel around and probe the thing many times until you begin to get a sense of how it is really shaped.

But in the end I think the goal of Inform – which I am guessing is to bring the power of programming to non-programmers – is a noble endeavor which is fundamentally flawed. Certainly there are brilliant people out there who have great ideas for interactive fiction but lack the ability to bring them to life. Putting the power of coding in their hands would be a boon to fans of IF. Currently IF is dominated by various horror and science fiction stories, with the occasional mystery thrown in for good measure. I’m betting this is because these are the sorts of things that programmers enjoy. If non-programmers had a way of realizing their vision, we might end up seeing IF romance novels, coming-of-age stories, character-driven historical fiction, and other things that just don’t naturally come from the minds of coders. As nice as this would be, I don’t think it can be done this way.

Inform tried to allow programming without the use of a programming language, and what they built is programming with a confusing language that has nebulous rules.

UPDATE: I should add: It doesn’t do what users hope it will do, but Inform is nonetheless a very admirable and fascinating project.

 


 

I hope I’m not Frodo

By Shamus Posted Thursday Aug 17, 2006

Filed under: Random 12 comments

Projects vary in attitude and tempo. Some are fierce battles against the usual spectres: Tight deadlines, insidious bugs, creative ennui, and capricious hardware. These projects form a series of challenges wherein I can, at the end, sprint across the finish line, weary arms upraised in triumph. Bruised but not beaten, tired but defiant in the face of adversity. When this happens I usually visualize myself stepping over the bodies of these metaphorical foes, dispatched with cold efficency borne of raw skill. The end of the project is the moment where I don my Neo sunglasses, turn to the camera and say something cool and catchphasey.

This is not the sort of project I’m on right now. No, my current project lends itself to a different sort of metaphor:


FRODO: The slopes of mount doom! Alas, I am so tired.

SAM: We're fresh out of coffeee too, sir.

FRODO: No matter sam. It doesn't matter. We're here at last. Mount doom. It's been a long road to get here. We got here without knowing the way, without a guide, on a shoestring budget.

SAM: No mistake that, Mister Frodo. I fancy most of the people who sent us don't even know what we've been through or what it took to get here. Imagine them putting just the two of us on a job this size!

FRODO: You are right Sam. But soon we can rest. Let us be rid of this burden, once and for all. Let us cast the ring into the fire and be done with it.

SAM: You said it, sir.

FRODO: Fine. Hand me the ring, Sam.

SAM: ... Sir?

FRODO: The ring, Sam. Give it here, that I may cast...

SAM: Yes, sir. It's just that... Bringing the ring was your job.

FRODO: You don't have the ring?

SAM: No sir.

FRODO: You fat imbicile. You mean we've been striving all these weeks and months, away from our families, pulling all-nighters, for nothing!?!

SAM: Surely not nothing, Mister Frodo...

FRODO: Don't you understand? We're salary. We don't get overtime! What have you done?!?

SAM: Begging your pardon sir. But my job was to get you here. Your job was the ring. I did my job.

FRODO: You stubby backstabber! Your job was to help me deliver the ring, not just follow me around being polite and useless!

SAM: Sorry Frodo. I filled my part of the spec, and a bit of yours I'll wager.

FRODO: Fat lot of good it did me, or anyone else, since we don't have the f#@!ing ring!

SAM: No sense getting upset now. You'll have to go back for it.

FRODO: Well I hope you're not planning on doing anything for the rest of the summer! You're coming with me!

SAM: Oh no. Here he comes.

FRODO: Who?

SAURON, THE DARK LORD OF THE RING: Do you two have any idea how late you are? You were supposed to deliver weeks ago.

FRODO & SAM: *gulp*

SAURON: Do you have any idea what the daily operating costs are for The War Of The Ring? It's huge. We are facing an incredible burn rate, here. My budget is hosed, and you two stroll in here almost a month late?

FRODO & SAM: This is very frightening!

SAURON: (sigh) So be it. Late is late. These things happen. Let's put this behind us and move on. Just hand over the ring...

FRODO & SAM: (pointing at each other) It's his fault!

Yes, I know this site has been rubbish lately. A quick scan through the past few weeks reveals lots of “random thoughts” and an alarming number of “rants”, but very little in the way of actual Anime, Video Games, and Geek Culture. The latter items I consider to be the core and purpose of this site, but my recent lifestyle changes have left little time for pursuing that sort of thing.

Maybe this doesn’t even bother most readers, but it’s really bugging me. I use this site as a way to discuss and share my various hobbies, which becomes tricky when I’m not practicing any of those said hobbies. The site is now a Nebraskan surfboard: Unable to put it to it’s proper use, I drag it out into the yard once in a while, teeter back and forth on it, making a very grand fool of myself.

Still, the new theme is nice, innit?

 


 

Adobe Acrobat

By Shamus Posted Tuesday Aug 15, 2006

Filed under: Rants 20 comments

How does one explain this?

Adobe Acrobat is running, even though I have no.PDF files open. Hey Adobe: There are clever little %mechanisims like “file associations” that allows Windows to open programs when they are needed. So why is Acrobat loitering here? It should close itself. An even more important question is this: Why is Acrobat eating up thirty-five megabytes of memory when it is not even in use? What is it doing with all of that memory? By contrast you can see that Paint Shop Pro – which is open and in use – is using less than a third of the memory that Acrobat is. I don’t know if this is arrogance or incompetence on the part of Adobe, but this is just shameful.

The awful thing is that programs can do this as a way of making themselves seem more efficient. How the game works is this: I have some no-talent hack programmers working for me making rotten software. It is sluggish and slow to start. I can get around this by having the program load when the system starts. Then my long loading time is just added to your boot-up time, thus masking my crime. When you open the program, it is already in memory and thus starts a little bit faster. So, I prop up my crappy software at the expense of making your entire system a little slower and less responsive. What if everyone did this?

(Yes, this stuff gets swapped out of memory after a while, but the whole point of buying lots of memory is so that the system can be fast and responsive and the user doesn’t have to put up with a bunch of disk-swapping. If this made any sense then people would just load everything into memory at start-up.)

This is really grotesque in the case of programs like Acrobat, which (in my case) gets used about once a month.

And while we’re at it:

How about NOT enabling something like this by default?

Crimey.

 


 

Full Metal Washpan

By Shamus Posted Monday Aug 14, 2006

Filed under: Anime 10 comments

Steven has a post about a cliche anime gag that involves a commonly recurring washpan that bonks characters on the head. I hope Steven will pardon me for poaching one of his screenshots. He is an example from Hanaukyo Maid Team La Verite, which I’ve never seen:

This caught my eye because I’ve never seen it before. When people talk about overused anime gags that I’ve never even seen once, it reminds of just how little anime I’ve seen!

A couple of hours after reading that I sat down and watched Full Metal Panic, Disc 4. Well! Lookie what we got here:


DONK!

There it is! Same color. Same Size. Different show. Same washpan. I’m glad I’d just read Steven’s post, so I knew this was a running gag and not random wierdness.

Kaname is bellyaching (again!) about the fact that instead of going to the beach they have come to an AS (giant robot) tournament. Then Kaname’s friend Mizuki points out how it is her own fault she’s here. She chose to come. The moment of realization hits her, and to drive the point home the joke washpan falls out of hammerspace and donks her on the head.


A second one! I didn’t see that coming!

Mizuki heaps shame onto crybaby Kaname, and the washpans continue to pile up. I like how it’s obvious that Kyouko (left) can see the washpans.


Okay, the joke is old.

Small wonder how the joke got worn out, really…

 


 

Veggie Tales

By Shamus Posted Monday Aug 14, 2006

Filed under: Pictures 7 comments

A long time ago I talked about the Veggie Tales song The Pirates Who Don’t Do Anything, which was covered by Reliant K and then turned into a Cowboy Bebop anime music video by some fans.

Now someone has uploaded the original video which started this whole mess. For those who are curious about what this Veggie Tales stuff is but don’t want to get caught looking in the kid’s video section, this is a good way to sneak a peek:

Continue reading ⟩⟩ “Veggie Tales”