my stuff

what's new with me

Thursday, July 28, 2005

Weird bucket

Weird bucket
Weird bucket,
originally uploaded by atomic_fish.
I made a Flickr photo page since I've been hearing so much about Flickr. I'm really impressed by how well Flickr is coded.. just a really well designed and full featured piece of software, it's fun to use. No more using up my storage quota with all the pictures I upload, either.

If you like to collect and upload pictures, check Flickr out. You can download clients for most OSs that make uploading as easy as dragging and dropping.

Oh, and this is a weird bucket I found in the woods on the way to the mailbox the other day.

Tuesday, July 26, 2005

ASDFASDFQWE(FASSKJF

I am so wound up I can barely sit still. Must have been something in the coffee (only had one cup).

Monday, July 25, 2005

appropriate

My laptop just momentarily froze (busy moving files around) and I heard the first few chords of Maiden's "Deja Vu" about 4 times, like a stuck record. Appropriate.

Sunday, July 24, 2005

Berkeley DB is my mortal enemy

I wasted a lot of time today on the following little snippet of Perl code:

if( not defined $dict{$node1} ) {
$dict{$node1} = $current_id;
$current_id++;
}

die "Broken" if not defined $dict{$node1};


Essentially, I was going through a file full of strings and assigning each string a unique ID number. I was storing the correspondences between the ID numbers and strings in the dictionary %dict, which I had tied to an oh-so-handy Berkeley DB earlier in the code..

tie( %dict, 'DB_File', $dict_filename, 
O_RDWR|O_CREAT, 0640, $DB_BTREE ) or die;


We're talking something on the order of 5 million unique strings, but no problem; I'm using a btree, so there should be plenty of room for them all. But then I ran into the problem above - I define $dict{$node1}, but then only a few minutes later it becomes magically undefined. The snippet above would die at a certain point, which should be impossible. What?

The problem turned out to be that the key, $node1, was too long (it could be up to around 2k bytes in length). Even if I used the alternate "method call" way to store the key, the status still wouldn't reflect an error, i.e.
$x = tie( .... );
$status = $x->put( $node1, $current_id );


would leave $status with 0 (success!) while silently failing to do anything. It wasn't until I would retrieve a key later with $x->get(..) that the Berkeley DB would realize that something wasn't right. You're giving me an undefined value? I think I can figure out for myself that something's wrong, thanks.

Anyway, it boiled down to increasing the page size of the database to 8k. It's horribly slow now, but at least it works. Good thing I only have to do this calculation once (hopefully).

Thursday, July 21, 2005

so how does this work

This news article made me stop and think.

Gushing faucet could land artist in court

So how does this work? Can I clearcut a rainforest to protest against (and draw attention to) the needless clear cutting of rainforests? Should I drive an SUV all the time to protest needless gasoline consumption? Would this make me an artist?

I think I will stop working for 365 days to protest excessive laziness. If I get fired it will be because the administration are Philistines with no appreciation for my artistic mind. I'm starting to like the sound of this..

Friday, July 08, 2005

movie

I wish I could make a movie. I'm not sure what the plot would be, other than it would involve a mystical electric guitar that imparted its bearer with the ability to rock beyond all known limits. Perhaps it could also shoot flames.

The sequel would involve a drum set with similar abilities.

Perhaps kids from different countries would find the two instruments and then finally meet, so part of the movie could be taken up with hilarious misunderstandings due to the their cultural/linguistic differences. You know, where one would say "Hi there" in his language, but in the other person's language it means "May your mother's leg fall off".

That movie would make a lot of money. Or maybe it wouldn't but the flame-shooting guitar would be cool. Just ask Yngwie Malmsteem.

Tuesday, July 05, 2005

running in place

Really feel like I've been running in place lately. Ready for the summer to be over.

Soon perhaps I'll be the proud owner of this digital camera. I've wanted a digital camera for some time and this really looks like a good one, if a little on the expensive side.

Oh, and I just dropped my (open) contact lense case in the sink, but since I hadn't put any solution in it yet the lense stuck to the bottom and didn't fall out. That's how smooth I am.

Saturday, July 02, 2005

ouch

I did this exercise for the first time Wednesday night. Now on Saturday my inner thighs still hurt. It's a weird feeling.

I did sled presses the same day up to a decent weight, but for some reason the muscles of my leg involved with that aren't still sore.

Back to your regularly scheduled programming.