posts | images | bookmarks

dev

By anders pearson

remember, drachen, the mp3 database frontend that i wrote a while back? in case you don't, its motivation was that i have a huge collection of mp3s and ogg vorbis files and all other mp3 players i've tried just aren't designed to handle a collection that large and their track selection interfaces are virtually unusable. so drachen is a python frontend to a postgresql database of all my mp3s.

i've been working on porting it to PyGTK and Glade (see this article). the old Tk interface that you can see in the old screenshots was getting old and from using it for a while, i had some ideas on ways to improve it. GTK looks much nicer and has a nice multi-column list widget that i wanted to use. not to mention that i wanted a good excuse to do something with Glade and figure out if it is really as slick as it looks.

i basically spent two nights getting up to speed on glade and (mostly) GTK. glade is a cinch and once i figured out that a lot of the python + glade tutorials on the web are out of date and refer to a libglade python library that has been replaced with gtk.glade, it took me no time to get the shell of the interface built and turned into a glade file that python could read. GTK is a lot more complicated and, unfortunately, not quite as well documented as i’d like. in particular, it took me quite a while to figure out how to do some basic things with the ListStore and TreeView. the individual APIs are documented pretty well, but i had to combine information and example code from a bunch of different places to figure out the general usage patterns.

then i spent this evening tying the new frontend to the old backend. luckily i designed it to be as MVC like as is possible with Tkinter before, so the database code was pretty cleanly split from the Tk code.

while playing with it though, i started to get frustrated with how slow it was at searching the database. when you enter a query into the search box, it had to do a massive join (bringing together the tracks, artists, and albums tables) and do three LIKE comparisons on the fields. even with adding every index i could think of, postgres just can’t make that kind of query fast over 20,000 records.

so i decided to go all the way and build a reverse index like a real search engine would have. i won't bother explaining the concept of a reverse index since this perl.com article does a better job than i probably could.

it turned out to be easier to implement than i thought it would. just added a reverse_index table to the database and wrote a 10 line perl script to go through all the database records and index them (it took 10 minutes to run – longer than it took to write). now, searches are nice and fast.

here's a quick screenshot of the new GTK interface. much more modern looking than the old stuff.

the man with the cut glass heart

By anders pearson

i can never adequately describe the music of the Legendary Pink Dots, so i don’t see how i could hope to describe Edward Ka-Spel’s solo work. it’s similar to the Dots but different. a little more emphasis on the electronic side of things and not as much guitar or wind instruments. but still with the richness, acoustic density, and intricacy that he brings to all his projects.

saw him last night at the knitting factory. fantastic show, but i’m a sucker for anything with a theremin.

i also bought a copy of Ka-Spel’s <a href=”http://www.mercuryhouse.org/loveloud.html”>book</a> and i’m enjoying it thoroughly.

connected

By anders pearson

online in my new apartment now.

we also got the new <a href=”http://www2.twcnyc.com/index2.cfm?GXHC_gx_session_id_=GXLiteSessionID-7385099042489831838&c=dtv/formdvr”>DVR</a> service with our cable. haven’t really played with it yet, but it looks nice. basically a Tivo but with 2 tuners and just $10/month. switching channels and using the menus is slower than with the TW digital cable box in my last apartment, but is still faster than the RCN stuff that this apartment had when we moved in.

some girls

By anders pearson

yesterday, gerard and brian had an extra ticket to get rid of, so i went with them to brave the hurricane and see Some Girls (basically Juliana Hatfield's new band) play at the knitting factory.

i've had bad experiences with the sound at the knitting factory before, but last night they did a pretty good job (ie, they didn't turn it up way too loud, like they did with Foetus).

the show was a really good time. there was an opening band (‘the unbusted’) who weren’t very good and played for 45 minutes, which was really about 25 minutes longer than they should have. we survived that with help from cheap beer.

the really nice thing about the knitting factory is that the performance space is tiny so even if you’re in the back of the room, you’re pretty close to the stage. juliana has an awkward, shy sort of stage presence that she somehow makes charming.

the set was nice and long but seemed short. i hadn’t really heard anything from Some Girls before; i’m just familiar with older juliana hatfield stuff. the new material is very similar to what you’d expect and very solid. i think juliana’s guitar playing has improved some. live, her guitar tone and style actually reminded me a bit of neil young’s work with crazyhorse but a little more controlled. that mixed in with her voice makes for an interesting sound.

we were really surprised that they didn’t play any of her older solo material. we kind of expected at least ‘sister’ or ‘spin the bottle’ or something thrown in, but it was all Some Girls material for the whole set.

ring of fire

By anders pearson

last night i found myself wandering around central park in the rain. there was a point to it. for the park’s 150th anniversary, they were having a <a href=”http://www.creativetime.org/lightcycle/1.html”>fireworks display</a> culminating in a 1000ft ring of fire over the reservoir (the johnny cash reference apparently wasn’t planned, but i appreciated it nonetheless).

i didn’t have the best vantage point, but it was still impressive. i was expecting the ring to be solid. instead it kind of worked its way around, with only part of it in existance at a time. standing in the middle of it all was pretty intense. there was a good 45 seconds or so of continuous explosions that shook the whole park and sounded like automatic cannon fire.

my pictures didn’t turn out too well (taking pictures of fireworks in the rain isn’t very easy). <a href=”http://thraxil.org/images/2003/09/imgp0610.jpg.html”>this</a> is probably the best one.

back to mutt

By anders pearson

a couple weeks ago, i did a system update on my workstation. among the software updated was <a href=”http://www.mutt.org/“>mutt</a>, my email client of choice. something was fishy with the new version (1.5.1) and it no longer wanted to talk to columbia’s imap server.

for fun, i decided i’d try out a few of the other mail clients available. from past experience, i’ve concluded that it is a bad idea to dismiss any open source software that you haven’t tried out in the last couple months. often, bugs are fixed and features added at an astonishing rate and any complaints you may have had will have vanished. an application that was completely unusable a few months ago may have suddenly blossomed into something best of breed.

i’ve been a happy mutt user from some time now so i hadn’t bothered really looking at the other available linux mail clients. mutt has a reputation for being extremely customizable, but it is a text-based client and pretty old-school in its design.

i have some very special requirements for mail clients. most importantly, i <a href=”http://www.gnupg.org/“>GPG</a> sign all of my email (in this age of <a href=”http://www.consumer.gov/idtheft/“>identity theft</a> and knowing how painfully easy it is to forge email headers, not signing my email is absolutely not an option. i would argue that the same is true for most other people who use email but i seem to be in the minority with that opinion), so i need a mail client with good support for encryption. luckily, on linux this now means most email clients.

columbia’s network admins are fairly paranoid (a good thing) so the client has to be able to connect to imap over ssl/tls and send through authenticated smtp. again, this doesn’t seem to be a problem with most linux clients.

i’ve used emacs for years and learned all the basic keyboard shortcuts by heart. actually, i’ve learned them too well. most of the applications that i use on a regular basis also support the emacs keybindings so i’ve developed the habit of using C-p, C-n, C-f, C-b in place of the arrow keys and C-a and C-e for Home and End. this is good because it’s really efficient; my fingers barely have to leave the home row. unfortunately, some other software uses those keybindings for different actions. eg, i have a very hard time using just about <em>anything</em> on windows because everytime i want to go up a line, i hit C-p and windows apps invariably pop up a print dialog. i really can’t emphasize enough how annoying it is to try to type any large amount of text using the arrow keys to move the cursor when you’re used to emacs style. so support for emacs keybindings in one way or another is fairly important for me.

the apps i tried out this time around: <a href=”http://kmail.kde.org/“>kmail</a>, <a href=”http://www.ximian.com/products/evolution/“>evolution</a>, and <a href=”http://www.mozilla.org/projects/thunderbird/“>mozilla thunderbird</a>.

kmail

before i settled on mutt last time, i had tried out kmail and i remember not being too pissed off at it. so i gave it another try.

the good: decent support for encryption (it doesn’t fully support <a href=”http://www.ietf.org/rfc/rfc2015.txt”>PGP/Mime</a>. PGP/Mime requires that the signature be in an attached file, kmail puts everything inline. some people prefer that (because Outlook on windows does stupid things when it receives PGP signature attachments), but i like standards, dammit. the <a href=”http://www.gnupg.org/aegypten/“>&#196;gypten</a> project should change this.). kmail allows you to use an external editor for composing messages, so keybindings are a non-issue (i just tell it to use emacs as my editor). it also is a generally nice looking app, integrates well with kde’s addressbook, and allows me to completely disable html email (email should be plaintext, the way god intended it).

the bad: kmail’s imap support seems like an afterthought. there’s no way to specify that an imap INBOX should be the main inbox. so when you start up the program, you then have to go through the additional step of selecting the imap INBOX. there’s also no way of telling it that you only want it to check certain imap folders for new messages. i subscribe to a few mailing lists which are automatically filtered out into their own folders. i also have dozens more folders where i store old messages. whenever kmail checks for new messages, it seems to go through the entire, huge directory of folders, which takes it about 2 minutes (and the rest of the interface blocks while it is doing that). i normally have my email client set to check for new messages every 10 minutes or so. with kmail, that would mean that it would be unusable 20% of the time, so i had to set it to 30 minutes or so.

evolution: Ximian

the good: full PGP/Mime support. having a calendar, task manager, and addressbook integrated right into the email client really is nice. i wouldn’t have believed it, but i like it now. it lets me set my imap INBOX as the main INBOX and only subscribe to certain folders.

the bad: no ability to specify an external editor and no support for emacs bindings. it even has C-p bound to ‘Print’ so it causes the same problem as windows for me. luckily, GTK2 (the GUI library that it was written in) allows for easy rebinding of keys. i couldn’t figure out how to get it to actually support emacs keys, but i could at least rebind “Print” to something less problematic. also, while i could tell it to only subscribe to certain folders, there was no way of accessing any other folders without subscribing to them as well. eg, i couldn’t save a message to one of the folders that i wasn’t subscribed to.

Mozilla Thunderbird:

the <a href=”http://www.mozilla.org/“>mozilla</a> suite started out as a combined web-browser, email client, html editor, chat client, etc. and has recently broken up into specialized components all using the same core libraries and technologies. <a href=”http://www.mozilla.org/projects/firebird/“>Mozilla Firebird</a> is my prefered browser so i figured i’d also check out Thunderbird.

the good: light, fast, well designed interface. there is even a Bayesian spam filter built right into it. very cool.

the bad: unfortunately, the <a href=”http://enigmail.mozdev.org/“>enigmail</a> component which allows for PGP/GPG integration hasn’t been updated to work with the newer Thunderbird releases on linux. it works fine in the mozilla mail client bundled with the full mozilla releases. unfortunately, if i try to run that mail client, i can’t seem to also run Mozilla Firebird as my browser; it forces me to use the older version of mozilla. there also is no support for using emacs as an editor or emacs keybindings. i think there’s a way to rebind keys in thunderbird, but without GPG support, it wasn’t worth the time for me to figure it out.

conclusion

i’m crochety and way too picky when it comes to email programs.

no. email is one of the main applications i use. for something that i use that frequently and depend on so much, i won’t accept anything less than perfect, and i refuse to feel bad about having high standards.

for me, there was really no other choice but to go back to mutt 1.4.1. i miss the integrated calendar of evolution and the smooth built in bayesian spam filter of thunderbird, but that’s about it. if i had to live without mutt, i would probably choose kmail. if it improves its imap and PGP/Mime support, i may yet. similarly, if evolution or thunderbird improve their imap integration and let me use emacs as an editor, i would also be tempted to switch.

for anyone else who doesn’t have the same requirements as me, i would heartily recommend at least taking a close look at any of the above (thunderbird is even available on other platforms).

projectors

By anders pearson

i’m apparently way ahead of the curve.

TechTV is finally <a href=”http://www.techtv.com/screensavers/products/story/0,24330,3516143,00.html”>catching on</a> about something <a href=”http://thraxil.org/nodes/2449”>i’ve been doing for over 2 years</a> (and my friend Obert has been doing even longer).

mine is a <a href=”http://www.projectorcentral.com/Sony-VPL-CX1_SuperLite.htm”>Sony VPL CX-1</a> that i managed to find (2 years ago) for about $1500. it does full XGA (1024x768) resolution so i also sometimes use it as my computer monitor. i haven’t really looked at projectors since then to see how the technology has improved. my hope is that newer models are quieter and brighter. from my occasional glances in catalogs and online listings, prices really seem to have stayed the same for the last 2 years. i still only very rarely see an XGA projector comparable to mine for under $2000. CRT and LCD monitors have both been getting progressively cheaper but projectors haven’t (i guess that’s good from my perspective since my investment hasn’t depreciated).

i’m <em>really</em> waiting for white LED technology to get to the point where they would be suitable for use as a projector bulb. the bulbs are really the achilles heal of current projector technology. they are extremely hot which necessitates loud fans, and are very expensive to replace when they die (mine is supposed to last about 2000 hours and costs $300 to replace. i’ve had the projector for 2 years and have used about 1000 hours of bulb life.) LEDs produce almost no heat, last forever and use less power. if they could just get them bright enough and down even to the $100 range, i think projectors would suddenly become a more realistic option for a lot more people.

(link via <a href=”http://goatee.net/2003/09#_07su”>goatee</a>)

saga

By anders pearson

when i found my apartment two years ago, it was a pretty good deal. since then, i’ve seen friends and coworkers find better apartments in the same neighborhood for less money.

so, when my friend julintip dropped out of law school and moved back to new york, looking for something in the columbia area for not too much money, we decided we’d pool our resources and look for a two bedroom place together.

we spent about two weeks scouring the columbia off-campus housing database, papers, and craigslist. we checked out a whole bunch of places and dealt with a bunch of slimy real-estate brokers in our search. we even put in an application for one halfway decent apartment. fortunately, while we were waiting for paperwork to go through on that one, i spotted an interesting listing on craigslist and went and checked it out. the apartment was beyond all my expectations and we acted quickly.

on 110th and central park west in a doorman building with a fenced in courtyard, laundry rooms, bike room, elevators, and a trash chute. the apartment is large, attractive, has a nice southern view with a lot of light, 1 and 1/2 baths, a dishwasher and air conditioners. it even came partially furnished. and my half of the rent (with gas and electric included) is about $250 less than what i was paying for my old apartment. there was no broker involved, so no enormous broker’s fee either.

signed the lease last friday and moved in on saturday. well, kinda…

i decided that since i now have furniture and i wasn’t going to have to pay a broker’s fee like i expected, that i might as well hire movers to do the move for me. i figured that it would make things less complex.

wrong.

the new place has restrictions on when deliveries can be made and when movers can operate. they only allow movers in between 9am and 5pm (although, they’re reasonably flexible and moving before 6 really wouldn’t be much of a problem). this should have been ok. the moving company i hired was scheduled to show up at my old place at 4pm. with an hour to load the truck, they would make it in without too much trouble.

at 4:30 the movers call me to let me know that they’re going to be a little late. i go talk to the doorman in the new building and tell him that they’ll be coming later than expected. he says that it shouldn’t be a problem.

the movers finally show up at 7pm. 3 hours late. lovely. they load the truck pretty quickly and we’re over at the new place by around 8pm. the doorman asks if we’re going to need to pad the elevator, i say, “yeah, i guess so”. he calls the super to send someone down to pad the elevator. the super says “nope. can’t move in this late. absolutely no way. come back between 9 and 5.”

there i am with absolutely everything i own from my bed all the way to my toothbrush on a truck and i can’t get it into my apartment. eventually we decide to just store it on the truck overnight and move it in first thing in the morning. being labor day weekend, the movers are booked solid, so they’re going to have to squeeze it in to an already filled schedule. and there will, of course, be extra fees involved.

saturday night i do not sleep a wink. everything i own is in limbo in the back of a truck parked god knows where. you wouldn’t sleep either.

sunday morning they show up with the truck right at 9. they start to bring things into the lobby and the doorman on duty stops us. apparently moves are actually only allowed on saturdays and wednesdays. shit. if we can’t unload the stuff right then, we’re all screwed. i don’t have anywhere else to put it since the lease is up on my old apartment. the movers are screwed because they’re already late for the next move they’re scheduled for and their truck is full of my stuff.

the super shows up and we talk to him for a while explaining the situation. finally, he shakes his head, says, “fine. just do it quickly.” and lets us in. he starts to call someone down to pad the elevator for us but then looks at my pile of stuff and decides that none of it is big enough to need that.

so 30 minute later, my stuff is all safely in my new apartment and i can finally exhale.

what i learned from this experience is that i really am a control freak. what bothered me most about the whole thing was not so much the general pain of it all, but that everything that was going wrong was completely out of my control. if i’d been moving things myself i could have made <em>sure</em> not to be late. but there was no way i could make the movers be on time.

now i am in my new apartment though. it is lovely indeed and the unpacking is going well. hopefully we will have a broadband connection up soon.

new w3c validator beta

By anders pearson

Terje Bess has <a href=”http://lists.w3.org/Archives/Public/www-validator/2003Aug/0105.html”>announced</a> a new <a href=”http://validator.w3.org:8001/“>beta version</a> of the venerable <a href=”http://validator.w3.org/“>w3c validator</a>.

the main improvements include more understandable, verbose error messages, and a ‘fussy mode’ that will warn about things that, while strictly legal, are known to cause problems in common browsers.

both are pretty cool. the improved error messages are <em>very</em> cool. the <a href=”http://www.webstandards.org/“>WaSP</a> is currently focusing on developer education about standards. one of the big hurdles developers have faced when trying to move to standards based markup is that you had to already be an HTML expert before some of the validator’s error messages made any sense. this change should go a long way toward fixing that and making it easier for developers to get started with standards.

if you have some free time, go <a href=”http://validator.w3.org:8001/“>test it out</a> or submit suggestions for further improvements to the error messages.

violently happy

By anders pearson

like probably most 20 something new yorkers, i went to the Björk concert on Coney Island last night.

it was fantastic.

it was actually my first time in a stadium. not being much of a sports fan, i've never been to a baseball game or anything. and with Björk being about as mainstream as my musical tastes go, i've never been to a big concert like that before. when i ordered the tickets back in may, it didn't occur to me that there would be anything besides General Admission and that that would really be preferable to seats way back in the stands. so i just selected 'best available' and took whatever ticketmaster gave me (which, of course, was way up in the stands).

luckily, keyspan park is pretty small as far as stadiums go. so even up in the stands wasn't too bad. we couldn't really make out much detail on the stage, but we could see Björk well enough to see her funny little dance moves. plus, i got to purchase a $5 budweiser in a plastic "anti-hooligan style" bottle.

the sound was ok too. not tremendously loud, but clear and well mixed.

Sigur Ros opened and they were good. i’d never heard them before; just knew that they were mellow and vaguely radiohead-esque and sing in a made up language. sure enough, they do sound quite a bit like recent radiohead though they have a couple songs that rock quite solidly.

immediately before Björk's set started, we were treated to a massive fireworks display. it was seriously impressive on its own. bigger than most 4th of july shows that i've seen. Björk was just spectacular. her voice sounded great live and she seemed to really be having fun performing. she played a lot of newer material off vespertine, selma songs, etc. throughout the show, there were more fireworks, timed to accent dramatic points in the songs. there were also two rows of torches along the front of the stage that would shoot out 5 or 6 foot jets of flame in synch with certain parts. i figured that with those in place, she would have no problems with stagedivers.

after the show, we all met up with jP and blair outside. that was kind of tricky because the sheer number of people with cell phones in such a small area was overwhelming the cell network and no one could really make any calls. luckily, SMS seemed to be unaffected. yay for SMS!

then six of us all piled ourselves into blair’s little VW Golf (four skinny-ass people in the back seat) and drove off.