"That which is overdesigned, too highly specific, anticipates outcome; the anticipation of outcome guarantees, if not failure, the absence of grace."
-- William Gibson, All Tomorrow's Parties
March 1, 2004

Went up to BHL for the weekend, to hang out with Rik and Gloria. No jcap, so I guess you can't really call it a true #tildedot con.

Rik already did a write-up on it, but: Good times were had. Rik gave me a quick overview of Perl OO and namespace structure (which I vaguely recall, as I'm pretty sure I had a fever by that point) using SubEthaEdit, which is a neat little OS X app perfect for things like that.

I'll be doing a review of Passion shortly, but synopsis: "Bullshit. Utter bullshit."

1:27 PM | Life
March 7, 2004

I considered doing a real review, but hell, it's 0530 on a Sunday morning, I've been mostly asleep for the past two days (flu++), and I guess I just can't be fucked to care enough. Also, it's like super trendy or something.

However, a few things come to mind: Billy Corgan is the devil. The Devil has Mimi-Me-esque demons. Demonic midgets are pretty scary. I expect that demonic midgets would keep the God-fearing masses in line better than lakes of fire and whatnot.

Jesus's internals were apparently under much higher pressure than normal ape-descended hunams. The bit where the Roman soldier stabs his side with a spear to confirm the dude is off with the floaty bunnies unleashes what can only be described as a torrent of blood. It's like someone hooked a hose to Jesus's ass, then shoved the other end to some sort of elephant-ass-compressor device.

I find it hard to believe that anyone could take this movie seriously, but then... lots of people take the Bible itself seriously. So.

After the movie, Rik, Gloria and I went to dinner, where I overheard some woman talking about the movie.

During the evil shit that's happening to Jesus, he flashes back to when things sucked less. There's a bit where we flash back to where he trips on some stairs and falls, skinning his knee. Guy doesn't start crying or anything, just gets up. Mary, however, runs over to him "like he was on fire", bundles him up, conforts him, etc. This flashback happens during one of the many times Jesus trips and falls while carrying the cross through Judea.

(Dude fell like 30 times, each time the cross would shove his crown o' thorns deeper into his skull. I figure by the fourth time, the damn things are halfway to his mid-brain, which I suppose might explain why he kept falling down.)

Anyway, so this woman, her voice is all watery, and she's explaining this to some guy, and no doubt she grew up believing every word the Bible has to say, only she never bothered reading it or thinking about it, and she says, "It was so heart-breaking."

Mind-boggling, more like.

Bloody fucking stupid people.

Also, there's a bit near the beginning where it's revealed that Jesus invented normal-sized tables.

No lie.

5:41 AM | Movies

03:16 <bda> How's it going with that girl?
03:16 <kitten> What do you think I've been doing for the past three nights?
03:16 * bda pauses.
03:16 <kitten> ...that was unintentional.
03:17 <kitten> Shut up.

6:06 AM | irk

OSXvnc. Simple. Works. Been using it via VNCThing to control iTunes on lathe, the dual G4 at Factory (where I've been wasting time all night).

Be neat if there were a "disable screensaver" option, as Flurry sure does get angry when you're feeding it over VNC to a G3 400 Pismo with 8 megs of VRAM...

Beyond that: Simple. Works.

6:13 AM | Software

Got the DVD box set of the complete Firefly series last week. As I was useless to do anything but passively access media from Friday on (&incrFlu), I decided there were worse things to do than sit in bed and watch some canned television.

Finished it yesterday evening, can't quite recall when. Sometime during the viewing my fever broke, which is a definite selling point to anyone considering purchasing the set.

Going through the series again (in order) just fortified my opinion that it shouldn't have been cancelled. So many questions were left unanswered because Fox has all the taste of a rabid weasel licking acid paper.

However, with the feature film (Serenity) apparently go, we'll get to see a bit more. And, hopefully, the movie will do well and someone will go "Say, maybe you should make a series out of that, Joss."

6:33 AM | Television

Between watching Firefly and hocking up lungbabies, I sped through Chris Moriarty's Spin State. Got through it in most of a single sitting, in fact. Probably four or fives hours.

Pretty decent book, though it felt very amateurish in some spots. Many nifty ideas having to do with quantum teleportation and human memory. A lot of it is nothing new, though. Old-school pulp sci-fi ideas abound, but there are slivers are real originality and the borrowed stuff doesn't really detract from the story itself.

One of the things I liked most about it (and one of the things that is no doubt most problematic with it) is how Moriarty doesn't really define jargon or slang. It gives you a sense of how he's trying to make the book feel like something that's just happening, rather than abstracting the story and characters to simple objects that are being described. I'm sure this is a problem for people whose associative cognitive abilities are less than super, but I enjoy it. Scott Westerfeld is another author who does this sort of thing (req: Evolution's Darling).

The story follows Catherine Li, a UN Peacekeeper (in space) who fucks up during a raid, gets redirected to go play Space Marshall on a mine (which happens to be both her home planet and the only place in the universe where these magic crystals exist that allow for quantum-fu). Those bits of the book were very Outland. She then gets pulled into various conspiracies involving the UN security monkeys, the crystals, the AIs, and the miners.

You also have the now-passe fully-immersive VR experience (which felt very original in The Golden Age, but here was slightly confusing. Moriarty treats people who go online as if they're actually there. While this is interesting from a social perspective, it's mildly off-putting for the reader (admittedly this is the sort of thing I was just saying was neat with regards to jargon)), with the requisite wetware (and wetware hacking). There's also the community of mostly-free AIs trying to be more free (the switch-up here is that the AIs can slip into a human and use them as a proxy; makes for some happy fun sex scenes if nothing else).

In a lot of ways, this book reminded me of Richard Morgan's Altered Carbon, a kind of post-modern science fiction and post-cyberpunk book, which treats a lot of That Which Came Before as being read and known, and simply uses it as building blocks to tell their own stories. I can't really say this is a bad thing, but it does give the book a much more pulp feel.

All in all, however, Spin State is a relatively quick read with an entertaining (and at times thought-provoking) story. Recommended.

7:09 AM | Books
March 8, 2004

For those of you with enough cash to get a new PowerBook, and hate touchpads, MacMice.com brings you the AL mouse. Because, really, what's another 40 bucks?

Via Danelope.

4:45 AM | Linkwhore

I want this.

Also, keep in mind that the Invader Zim DVD set is out May 11th. So much yay.

Via binary.

1:23 PM | Linkwhore
March 10, 2004

Work on archivist proceeds, about as slowly as I expected, considering the amount of Normal Work that comes up during the course of a day. The CGI interface needs to be populated with forms but otherwise works well. Just need to get that whole data entry thing going on. Relatively certain I'm writing clean code.

The SQL schema is half-written and I've just finished compiling Postgres on my laptop (G3 400 Pismo). This should be amusing.

Object orientedness is lurve.

9:36 AM | Programming
March 11, 2004

Got home yesterday around 1645, read the Postfix book that had come in for a while (good book thus far), then fell asleep. Woke up around 0230, took a shower, fucked around with archivist for an hour or so, then headed out.

Philadelphia at 0500, with a clear sky, is just about perfect. The city's still asleep, but the subsystems, everything behind the wall, is gearing up. The lunch trucks are being pulled out and fueled, laden with food and coffee. The bread distributors are opening their gates, other low-level maintenance humans are in motion, while the majority of the populace is oblivious to their work.

Headed down to Factory, stopping at Sev to get some Gatorade, and it's a pretty decent way to start the day, I think.

There was a cabbie asleep in his car in front of the Sev. Thought that was a bit odd. Usually they crash out in the street in front of Factory, or on Broad St.

Trawled my daily sites, dug through the 100 or so overnight logcheck messages, deleted a bunch of spam. Typical routine.

Pretty soon I'll be off to work, taking the Broad line up to Locust like I did yesterday, then PATCO over to Jersey.

Speaking of yesterday morning's commute... there were these two high school kids on the Broad train. At first I thought they were script kiddies, talking about the Internet. They looked the part: young teenagers with messy hair and baggy clothes. Like skaters back home, but not quite.

I wasn't paying a whole lot of attention, as I was reading Driver's Just Another Empire (again), but it became pretty obvious they were some new form of newb. Not AOLers, I think, but something lower. Some sort of proto-newb.

It was more than a little disconcerting.

Not much on the agenda today except for work, work, and probably some more work.

6:32 AM | Life

archivist makes use of Template Toolkit, and I use vim for damn near everything. So recently I'd gotten incredibly annoyed with the lack of syntax highlighting for TT files, whined at rjbs, who thumbed his nose at me and told me to go google for it.

Came up with this, which is an imperfect solution, but possibly the start of a Good Solution.

14:10 < rjbs> well, this guy solved his own problem. and gave the solution away.
14:10 < rjbs> now you can munge it to fix yours.
14:10 <@bda> Yeah, yeah. :P
14:10 < rjbs> I bet he still will have solved the harder bits:
14:10 <@bda> Doesn't mean I'm not allowed to whine about it.
14:10 < rjbs> fucking vmethods, etc.
14:10 <@bda> Heh.
14:10 < rjbs> no, but I can try to make you feel bad about it.
14:11 <@bda> pft.
14:11 <@bda> Good luck with that.

So if I get overly annoyed with the fact that I have no HTML highlighting unless my TT file starts with <html> (which is absurd), I may try and fix it. I've tried to do vim syhi files in the past... it's less than fun.

2:16 PM | Programming
March 13, 2004

Yeah, this brings back some memories.

Hell, I bought my second piece of computer equipment (a 14.4 modem!) off one of the local BBS sysops (Dreamsomething or other), and they ran Renegade.

I remember staying up all night playing LoRD and Tradewars (and Pimpwars), or playing X-COM until I had to go to school (rinse, wash, repeat all week).

My first piece of kit was for my parent's 486: A 4meg RAM chip.

$120. For four megs of RAM.

Yeah, man, the bad old days were pretty bad.

5:13 AM | Linkwhore
March 15, 2004

So Adam calls me up Saturday afternoon and says, "We're going to Manhattan. You should come."

So Ian rolls up with Adam and Jason (who was down visiting for a show our friend Nick was spinning at), with John in tow, and after a quick stop at Ian's house, we drove up to Jersey City where Ian had some religious program thing to go to. We walked Ian to the house where his thing was, and he got us some directions to the train station. There's an SUV there, with Hawaii plates. First time I've seen Hawaii plates on a car outside, you know, Hawaii. Jersey City is a mix of old Philly suburb and South Philly. Broken concrete and sidewalks, too many law and bail bond offices.

After asking a few people for directions ("Yeah, man, it's over there", pointing in the opposite direction we'd been going. "You can walk wid us."), we get to the train station. John, Adam, Jason and I PATH into NYC around 1700 and headed to Jason's dorm at NYU.

I manage to get my bag caught in the fucking doors getting on the train, to the short-lived amusement of the other passengers. John had to push the doors open for me. That was fun.

In New York freedom looks like
Too many choices
In New York I found a friend
To drown out the other voices

This being my first time in New York, I suppose I should relate some of my initial impressions: Streets encased entirely in the shadows of buildings. People are much more vocal here than in Philadelphia, or Phoenix, or Albuquerque. It feels like L.A., only maybe less mean and turned sideways so it's vertical.

Walking towards the dorm, we see numerous BDSM shops, some transvestites scuffling (I missed this, apparently). People talking loudly, yelling at each other (though generally not meanly, just being loud). Tiny corner stores and a twenty-four-hours flower shop.

Voices on a cell phone
Voices from home
Voices of the hard sell
Voices down a stairwell
In New York
Just got a place in New York

I see someone with my model cell phone, for the first time in three years, and it's the first of maybe four. Fucking figures.

The subway is necessarily more complete than the Philly transit system. You can buy rechargable cards, which is awesome. Each trip costs two bucks, which is less than awesome, but whatever.

Twenty-eight floors up, the view from Jason's dorm room is amazing. Adam gestures to a point in the sky and says, "That's where the towers were."

In New York summers get hot
Well into the hundreds
You can't walk around the block
Without a change of clothing

We drop off our bags and head back out. They take me to see the Hole. People are selling photo albums of the towers, the five-picture time lapse series. The towers crumpling. The Hole is awash in floodlights, fenced in, with a concrete barrier on the other side so you can't actually see down it, just look across at the buildings on the far side, at the spanning emptiness.

We go for food. Adam has been talking about this Japanese place for a few hours now, how it's so cyberpunk, just like the noodlecart in Blade Runner. It's less than cyberpunk, the service sucks, but my udon was good so it's all whatever. They manage to make Adam's ramen without any seafood, so he doesn't end up dying, which is also probably a good thing.

Jason gets a hold of Akira via SMS or AIM on his cell phone and we agree to meet up at 2130 in Times Square.

Hot as a hair dryer in your face
Hot as handbag and a can of mace
New York
I just got a place in New York

We head out, and Times Square is Vegas without the over-planning and less guilt. The crowds are close, volatile things. The smell of roasted peanuts and the ever-refracting glare of neon off mirrored glass. We go to Toys R Us to play in the Legos section, and there's a projector on the ceiling displaying an interactive demi-game on the floor. You step on what look to be floating candy bars and a computer in the projector notes this, and breaks the candy bar into pieces. Kids are bouncing up and down on the tile, stomping on light. A life-sized version of the T-Rex from Jurassic Park roars every few minutes, and young girls giggle at it, daring each other to touch it.

We wander up into the giant Barbie Dream house, and there's just too much pink, everywhere you look, and it's damn near suffocating.

In New York you can forget
Forget how to sit still
Tell yourself you will stay in
But it's down to Alphaville

Adam is getting twitchy by this point, too much mediation, and Hell, it's New York, there's plenty else to do. We wander around for a while, go into the Virgin for a few minutes.

Finally it's time to head to the damn bar for Scotty's birthday party (which I suppose was what initiated us coming up here). A couple of guys are standing outside some giant store with frosted glass, rapping to the passing human flood.

Akira finds us as we're wandering down a mostly empty side street and we pile into his car. Akira's driving is what people are always talking about, when they talk about New York drivers. Considering his method of navigation, a constant and seemingly uncontrolled weaving in and out of traffic, cutting around cars lined up to turn and a complete disregard for safety laws, lanes, or even simple common sense, you'd think anyone driving with him would be praying to any God or other nearby creature with a supposed omniscience, but not once did it feel like Akira was in any way out of control of the vehicle.

Of course, the fact that everyone else was driving like this didn't do too much for my nerves, but hey, if you're gonna go out...

Kyle calls us just minutes after we get into the car and we go to pick him up at Penn Station. Jason gets the privilege of Kyle sitting on his lap. New Yorkers have no issues with yelling at you if you're half-hanging out the window of a car, either.

After a half hour of driving around we find parking and head to the bar. A few things should probably be explained about this place. It's Remote Lounge, which according to mdxi was talked about a few years ago on teh Interweb. I hadn't heard anything about it until Adam brought it up, however.

The Irish been coming here for years
Feel like they own the place
They got the airport, city hall
Asphalt, asphalt
They even got the police

Irish, Italians, Jews and Hispanics
Religious nuts, political fanatics in the stew
Happily not like me and you
That's where I lost you

The concept of the place is painfully and disturbingly post-modern (or pomo as hipsters and the unsubtle ironic say): There are cameras all over the place. Each booth is equipped with a console containing pinhole cameras on servos in a glass jar, a phone, a video monitor, and simple controls (about a dozen buttons and a joystick). You can control cameras anywhere in the bar from the consoles. The bar itself is also equipped with cameras and controls, and there's a bank of monitors above the bartender displaying what people are looking at.

In New York I lost it all
To you and your vices
Still I'm staying on to figure out
My midlife crisis

There are roughly fifty cameras in the place. Mostly they're pointed at girls chests or butts.

We meet up with Ian and Eric in the bar, and get introduced to Scotty, who I don't think anyone but Jason knows, and some guy who will forever be known as the Wisconsin Guy.

After tooling around for an hour or so, Jason finally procures a booth and we start drinking and fucking around in earnest.

As Jason has a Zaurus, and Manhattan has all the 802.11 coverage you could ever want he starts leeching bandwidth from a misconfigured access point and spams porn at the bar via the booth camera. Not to be outdone, the guy on the other side of the booth moons his camera (a couple times, actually).

I manage to get Adam and Jason to goatse the bar. I can only hope that by that point there were many people tuning into our booth feed, because that may be the only crime against humanity I'll be able to partake in, and get away with.

Some people come and go, some of which we seem to know, some of whom Jason has invited over via the booth's phone. Eventually Adam gets some woman to get some Jaeger shots and she and her friend join our table. This is the part where the story gets funny.

I'm mildly drunk by this point, and not really giving a damn about much of anything. So this woman, who turns out to be 41 year old, Italian-Cuban, and from 181st Street (which meant little to me), starts hitting on me. A lot. After a couple hours she's draped herself on me and continues to refer to me as her "little blond boy". She says, repeatedly, that I look like Andrew McCarthy, who she's always had a crush on. I have, at the time, no fucking clue who this is and go so far as to deny this persons existence. He is, however, a real person, and was, in fact, in Pretty in Pink and fucking Mannequin.

At some point, Eric left with two girls.

You know I'm still afloat
You lose your balance, lose your wife
In the queue for the lifeboat

You got to put the women and children first
But you've got an unquenchable thirst for New York

I don't recall much, if any, of the conversation, except for me saying vaguely and improbably profound things about how surreally fucked up the entire concept of the bar is (considering that I've been dealing with IRC for almost a decade, and various socio-political and personal relationships stemming from all that, you'd think the whole thing would have affected me less), but I do remember Jason explaining some of what he does at NYU (neuro-science) to Nyra, the woman who at that point was nuzzling me and playing with my hair. To put it mildly, Jason is fucking smart.

Another round of Jaeger was ordered, which I declined on the basis of me already being drunk enough.

Lucky too, as by the end of the night (around 0330), Adam attempted to get the woman to take me home. Insisted on it, in fact.

I managed to fall over getting out of the booth, not all that drunkenly, simply because Kyle was looking at me and edging in and out of my vision. I get up and stare at Adam, who is still arguing the case for me getting taken home by someone old enough to be my mother, almost, and I say "Dude, she hassa go to Mass in the morning, fuggoff." Or something. I don't remember.

The short of it is I didn't go home with Nyra, but instead got put into a cab with Adam and Kyle, by Jason, who told the cabbie: "Take them to Fulton and Waters, and don't let them move." I haven't mentioned yet, but Jason's a bit of the fucking insane. A typical thing for a genius to be, right?

So Adam, Kyle and I end up at that intersection, wherever the fuck it was, and decide that it's too goddamn to stand around on the corner and that anyway we're hungry. So we walk up to the street to a McDonalds and get some burgers.

In the stillness of the evening
When the sun has had its day
I heard your voice whispering
Come away now

I couldn't really explain why, but eating shitty hamburgers on a Manhattan corner at four A.M. was probably one of the strangest things I've ever done. Skyscrapers rising up around us, empty cabs sliding past, and we're devouring the nation's favorite meat by-product.

Jason showed up a few minutes later, and we stopped by a supermarket where he informed a couple of girls that he was in search of cookies. "They're down the aisle," they say, and go back to their conversation.

"No," he insists, "You don't understand. We want cookies."

"Yes. We do understand. They're down the aisle."

"A-ha!"

I can't tell if it's because he's drunk, but I sort of doubt it. I suspect this is just how Jason acts. Adam is laughing the whole time, as Jason wanders around some more, demanding Kiwi Water from random people who stare at him. Eventually he buys some milk.

He explains all this to the clerk, who says "Shit, no wonder you didn't get the girls. They wanted the fucking Kiwi Water, man, and you got milk instead." Or something equally nonsensical. I'm sobering up by this point, but that doesn't mean anything is making any sense to me.

There is music reverberating down the street, coming from the third or fourth story of a building, a party obviously in progress. Our New York host gets the attention of someone leaving the building and asks if the party's any good, what the cover is, what the ratio is.

"Yeah, it's aight. Ten fuckin' bucks, man, you believe that? And about one to one, half. S'aight."

Jason's vote of going to this party is shot down by myself and Kyle, and we head back to the dorm, where we proceed to sit around for a half hour. I fall asleep for a few minutes at the very least and am woken up by Adam who informs me that we're going to head back to Philly now.

I'm down with sleeping in my own bed instead of on Jason's floor, so we head down to the subway and stand around, bullshitting and talking about the night. Finally, though, it's decided we should just cab over to Penn Station as it's damn near 0500 and the first train to Trenton leaves at 0515.

We get a cab coming out of the subway station and say our goodbyes to Jason, thanking him for the awesome time. We end up running through Penn Station to catch the train, running down an escalator the wrong way, and careening across the platform juts as they're making last call. And here is where our story takes a tragic turn.

Kyle's about twenty feet ahead of me, and we're all running flat out, and I see Kyle's cell phone jump out of his pocket and go skittering across the platform and down under the train.

Adam and the stone-faced transit employees manage to convince Kyle that crawling down onto the tracks is about the least good idea ever. "Dude, I don't have any [next of kin] contact info for you," Adam quips.

The ride into Trenton and then the switchover to SEPTA for the ride into Philly is mostly full of napping. I force Kyle to read Just Another Empire instead of his Java Cookbook for a bit. Finally we get to 30th St Station and share a cab.

Philadelphia sunlight filtering down through light cloud cover, and it's good to be home.

Except for Kyle losing his phone, I'd have to say my first trip to New York was pretty much perfect. Good people, good fun, random funny things happening. We'll definitely be doing it again before too long.

Oh. There are pictures.

March 16, 2004

I love spending a morning writing a database abstraction layer only to have Ricardo go: "Why not just use Class::DBI? It's practically core."

And yeah. It does exactly what I was doing, only better.

Mmf.

4:59 PM | Programming
March 17, 2004

This is just fucking astounding.

I can't wait until prisons in the U.S. get privatized and corporations start trying this shit on for size...

2:05 PM | Linkwhore
March 19, 2004

All tutorials should be written like this.

A few choice lines:

Let's say "Gone With The Wind" is released on DVD with some shock-
ing new footage of a bizarre Scarlet/sheep scene.

$gone->NumExpldodingSheep(5);
$gone->Rating('NC-17');

And:


copy()
A new object can be made with all the info of another, except the
primary key. This is a very useful feature, given how little imag-
ination Hollywood posesses.

my $yojimo = Film->retrieve('Yojimbo');
my $fistful = $yojimbo->copy('Fistful Of Dollars');

Worth reading even if you know What's Up.

5:06 AM | Programming

Sometime yesterday afternoon, the test fileserver's netatalk install decided to stop displaying directories in the root share. I'd stayed home to code, so when my co-worker called and informed me of this, of course I had just put my clothes (all of them) in the wash.

So a few hours later, when I had pants to wear, I headed down to Factory to see what was up. After some screwing around, I couldn't determine if I'd managed to fix the problem or not. So I had to come into work (where I am now, half-awake and reading Perl docs), getting in just before it started snowing in earnest.

The problem was caused, I think, by having shares within shares (we have a root volume, with "client" volumes underneath, which are just directories containing jobs for a specific client). Pretty sure it made the .AppleDB databases sad in some way. Unfortunately I don't know enough about netatalk (I suppose I could take eniak's approach and read the source, but, gar, reading C gives me a headache) to be sure.

Luckily the resource forks (which lives in .AppleDouble) didn't explode.

Volumes that didn't have shares below them didn't exhibit any problems, so my solution was to move the .AppleDB directory out of the way, let it get recreated, and remove all the sub-shares.

As I'm looking to move primary fileserver to Linux/netatalk, hopefully we won't be running into too many of these issues...

My favorite part is where I google for the error I'm getting, and all I find is some German bulletin board.

Lovely, that.

5:14 AM | Systems Administration

A fun little comment block in netatalk's 1.64 etc/afpd/file.c, discovered by eniak:

* What a fucking mess. First thing: DID and FNUMs are
* in the same space for purposes of enumerate (and several
* other wierd places). While we consider this Apple's bug,
* this is the work-around: In order to maintain constant and
* unique DIDs and FNUMs, we monotonically generate the DIDs
* during the session, and derive the FNUMs from the filesystem.
* Since the DIDs are small, we insure that the FNUMs are fairly
* large by setting thier high bits to the device number.

Of course, they generate the damn IDs the same way, which as eniak also discovered, requires that your total inodes be under 24 bits.

Which means I get to have some fun once we get our terabyte RAID array in.

5:33 AM | Programming
March 24, 2004

I just Grokked Class::DBI.

I've spent the last three days trying to hack it into being something other than what it's Meant To Be. I finally got tired of trying to use a hammer as a lever and set it up how it wants: One class per database table. Holy Hell on toast.

I got inserts, updates, and reads working in the space of three minutes (the templates were already set up).

Each table subclass is 20 lines each, eg:

package Archivist::DB::RunModes;

# $Id: RunModes.pm,v 1.1 2004/03/24 19:54:37 bda Exp $

use strict;
use base 'Archivist::DB';

# Set the table.
__PACKAGE__->table('run_modes');

__PACKAGE__->columns(All => qw/id mode_name display title status comment created modified/);
__PACKAGE__->columns(Primary => 'id');

__PACKAGE__->sequence('run_modes_id_seq');

sub new {
bless {}
}

1;

As you can see, the table subclass just defines how the database table is actually built.

Ane the code to add a new Run Mode (this is from Archivist::Config):

sub addMode {
my $self = shift;
my %modeInfo = @_;

require Archivist::DB::RunModes;
my $db = Archivist::DB::RunModes->new;
my $query = $db->create(\%modeInfo);
$query = $db->update;
$query = $db->dbi_commit;

return;
}

Obviously I'm not doing any input validation there, but! So easy!

The table subclasses inherit connection information from the Archivist::DB overclass, which just contains a typical DSN and calls Class::DBI's set_db() method.

Now maybe I can actually get some work done.

2:59 PM | Programming
March 27, 2004

I was talking about daemons in #perl the other day, asking if anyone had any common gotchas for writing them in Perl. A fellow Philly hacker suggested Network Programming With Perl.

I was also directed to Stem, by the author. Stem looks super interesting for writing network applications. I think Eric and I are going to be checking it out for a (so far) theoretical NMS (network monitoring system) we've been talking about the last few days. I've been talking to Uri, the author, for a couple days now, and it seems like a good fit for a bunch of stuff we'd have to write anyway to get the nodes and aggregators talking to each other.

Going to try and have a brainstorming session with Eric tomorrow about it over lunch or something.

Work on archivist proceeds. I am a subclassing fool; encapsulation is god.


00:36 <Danelope> You're the Bipolar Programmer.

00:36 <Danelope> <bda> OMG WTF HATEal;skja;lkjsd;lkasjdl;akjd WHOA DBI++

This is essentially true. I have a serious problem with getting the initial concepts of something down, tend to get really frustrated, yell and bite people... and then that epiphany thing happens. I may not get the fine details, but I get enough of the Big Picture to use whatever it is I've been fighting with. And that's totally enough.

Stem is neat because it seems to act in a way that makes sense to me already. So we'll see how that goes.

At any rate. Back to archivist.

12:58 AM | Programming
March 29, 2004

This is moments after kitten spends ten minutes bitching about people using their desktop to store useless shit for long periods of time. And giving me crap for having two dirs on it since last night.

15:33 <kitten> If I could make Firefox do the little navigation clicks like IE
does, I'd make it my default browser.
15:35 <bda> ..."navigation clicks"?
15:35 <bda> You mean make noise?
15:35 <kitten> It makes a little "click" noise, yes.
15:35 <kitten> Default in 2k and XP.
15:35 <kitten> But I've had it set that way since Win95, before I even knew you.
15:35 <bda> ..and that's what's keeping you from using a technically superior and actually updated browser..
15:35 <kitten> So I'm used to it and not having it is really disconcerting.
15:35 <bda> And you're bitching about how OTHER people use computers.
15:35 <kitten> Heh.
15:35 <kitten> Screw.

<3

3:37 PM | irk
March 31, 2004

The two most annoying mistakes I make at least once a day are:

Wrong:

%hash = %newhash,%hash;

Which clobbers the values from the new hash. The correct way to write this is:

Right:

%hash = %hash,%newhash;

This is really useful if you're setting defaults for a method, and want to override them by passing named arguments, or if you're calling an accessor which returns new values you want to access via the original hash. e.g., You're making a database call, which updates the hash with a new row's id or a status message or whatever).


%hash = (%hash,$foo->addHottie(

chica=>"scarlett johansson",
image=>"lurve")

);

Of course, you could just dump %hash to addHottie(), but there are some cases where you don't want an accessor to have access to certain variables (like if you're doing an update, but don't want to risk the possiblity of clobbering any of your unique values -- like your primary key!). For an insert, that probably doesn't really matter too much, if you're doing some other form of input validation.

The other mistake also involves hashes...

Wrong:

sub foo {
my $self = shift;
my %hash = shift;
...
}

Hmm! What's wrong with that? Gee, probably I actually meant:

Right:

my %hash = @_;

Grrr. Simple little mistakes, but I keep making them!

I need to get them tattoo'd on my forearms or something.

5:11 AM | Programming | Comments (1)

The other night, Evan, Adam, Andrew and I were hanging around at Factory, Andrew had brought a couple DVDs, so we decided to watch Suicide Club. Wow.

Talk about fux0red.

The film starts out with 50 school girls jumping waiting for a train at Shinjuku station. Train gets closer, the schoolgirls link hands and count down... and then jump in front of the train, sending a torrent of blood raining upon the horrified onlookers.

And the movie just kept getting more and more fucked up.

The director (who is also apparently a porn star; only in Japan..) spent a lot of time bouncing back and forth, adding random, odd subplots, which were mostly useless. I'm used to this, though, thanks to all the other Japanese media I've subjected myself to over the years. The random subplots added to the surreal feeling of the film.

Overall the movie was very good... ranging from a decent message about consumerism and the inherent soulessness in a self-dispossessed social body (e.g., if you have no personal-center -- spiritual or otherwise -- you have no reason to exist), to desensitization of violence, blah blah, media, yadda. Typical stuff, but still good.

Something I really liked about it was how the whole suicide trend progressed. It starts off with a single dramatic act, and as media covers it, it becomes a more and more accepted thing. Just another fad.

Also, the Dessert jpop was hardcore, yo. Straight from the hood.

5:56 AM | Movies