Monthly Archives: May 2008

Python weekend and Flow

This weekend I’ve been playing with python a bit, using the sqlite module, remembering how to use SAX parsers, and stubbing my toes on unicode and codec issues. Not issues as in bugs, but issues with my understanding of how it works. It is pleasantly strict about encodings, by default.

Nose is a nice alternative to simply using the included unittest framework. Do see the PyCon slides.

In preparation for a project where I’d like to deliver compressed wikipedia article text to a flash lite 3 application, I’m writing a tool to import the “pages-articles.xml” dumps into a database. I’m playing with a couple different approaches to this. One is to actually store gzipped article text in BLOBs in a database table. However, if there’s any doubt about the ability of the database to handle that, an approach that I know will work is storing offsets into a file which is a concatenation of individual gzipped articles. Thus, you can quickly seek to any record in the file. (This technique has been used where I work for years for storing the output of web crawlers without creating millions of small files in a filesystem — see the ISO draft WARC file format, Annex A.)

The more I use sqlite3, the more I like it. It seems to be capable of handling a 2-3G database okay, though I’d really like to benchmark both of the above approaches.

Also, I’ve slowly been reading through Mihály Csíkszentmihályi’s book, Flow: The Psychology of Optimal Experience. It’s a very satisfying book, and I’ll have to write more about it when I’m done reading it. It puts form to a lot of less connected ideas which I’ve been exposed to in the past.

New Shoes: Vibram FiveFingers KSO

When I first heard of the relatively-new Vibram FiveFingers shoes in a MetaFilter comment thread, I knew I had to have a pair. I’d always liked being barefoot, I always walking around barefoot at home since sometime in my teenage years when I discovered that walking around in socks on a splintery wood floor increased the chance of getting splinters in my foot (due to my feet slipping around more easily, driving the splinter in suddenly). Unfortunately, in the typical suburban or urban environment, walking barefoot isn’t that practical, in my opinion. While broken glass presents relatively less hazard than everyone thinks, the surfaces are pretty harsh, and additionally, where I live now (San Francisco), the months without rain means it gets really grungy.

I bought a pair of the FiveFingers KSO in black, because they’re the most subdued and look like shoes from a distance, while still being well-ventilated. I was sure to carefully follow the sizing info on their web site.

They arrived on Wednesday, and they seemed to fit fine. I had a couple little concerns at first, but after wearing them all day Thursday and Friday (admittedly for my rather sedentary job), I had only two remaining concerns. The first was, these are great, but how long before I wreck the soles? Compared to a normal shoe, the sole has to endure a lot of flex, including around the toes and ball of the foot. The other concern is that the big toes aren’t quite as large as my toes. While my toes feel comfortable, I’m concerned that the sole underneath not being as wide is going to gradually lead to the fabric on the side of the big toe coming in contact with the ground and wearing through.

I wore them again today. I went to the beach and walked a couple of miles. I got them wet. One thing I learned, which does not surprise me, is that these are not sand-proof. If that was a concern, I’d consider the FiveFingers Flow, which has neoprene sides and top, instead of mesh. The KSOs dry fast though. Aside from the sand trapped inside feeling a bit abrasive, they were quite comfortable.

These things feel great even when you’re walking over sharp gravel. And, it’s nice to have that uneven feeling of the ground you’re walking on to be carried through to your feet. I find myself even walking on different surfaces than I normally would, merely to find out how it will feel in these shoes.

When I got home today, after shaking out the loose sand, I decided to put these in the washing machine, since there was some bits of fine sand that just weren’t going to shake out. The instructions are warm wash, air dry. It’s great. This is a pair of shoes you can machine wash on occasion — especially good when you’re not wearing them with socks.

So, the real test is going to be whether these last a reasonably long time before wearing out, but aside from that, I’m very happy with them.

The hill I live on caught fire, again

This time, the fire department got here sooner and it seems to be out, though they’re looking around to make sure. Didn’t get any cool pictures this time, though I might have a good one of the hillside to post later.

Last time it happened was June 1st of last year. (See also what the hillside looked like the next day.)

I’m thinking this might be an issue that should be raised with the appropriate parts of the city government.

Update:
Burnt Hillside, second year in a row

Looks like they extinguished the fire much sooner this time.

Book Notes: Gateway

I was recently copying a lot of my pages of old Amazon wishlist items into Paperbackswap to see if the items were already available there, and if they were, to get them. I’m only part-way through the process when I found a copy of Gateway by Frederik Pohl. As far as I know, I’ve never read anything by him before.

The story drops us into a rather grim future Earth, one where Malthus was right, and people are mining oil out of shale, not for energy, but as feedstock for microbial processes which produce edible food for humans. But, they’ve also discovered an asteroid in our solar system with tunnels drilled into it by a vacant alien race (the Heechee) — they’d previously discovered evidence of prior settlements on Venus as well.

The best part of all is that this asteroid which had been turned into a space station had a bunch of small ships attached to it. And, while they are half a million years old, they frequently work. People are still trying to figure out how to set the destination in the FTL (faster than light) drives of these ships, so taking one out for a spin is risky work. However, if you can pay the fee to get transported to this asteroid, you can be a prospector in one of these crews taking the abandoned ships to previously-unvisited destinations, some of which offer artifacts and technologies that are in great demand back home. Many other destinations (or the trips there) kill you.

And then every other chapter is the main character, later in life, talking to a computer psychoanalyst. That part wasn’t terribly engaging, but it did (along with the other chapters) build up to a pretty clever conclusion. I’ll probably read the sequels.