Who Robs a School?

Kids in Ami’s classroom have been collecting pennies in a fundraising drive. Yes, that’s right, pennies. They’re a low income school, so I’m sure asking for anything else would have been a bit much. I digress. Last night her school was broken in to and all the jars of pennies were stolen. Who steals from a school, let alone who steals pennies? These (literally) poor kids have been saving up for months only to have some hoodlum steal their jars of pennies from their classroom. Pathetic and deplorable. An elementary school? Come on. 

A Soma Loft

We took a look at an amazing loft today on Tehama & 5th in Soma. While we’re not really looking to buy a loft, this one was cool enough to blog about. Outside of the usual 20 foot windows and what have you, the seller was including in the sale a G4 Cube, a Nakamichi wall-mount stereo system, DVD player, a wall mounted TV as well as a projector setup that lit up one wall in the loft. While all the extra goodies are nothing more than a sales trick, how cool is the projector? Projected TV or movies or anything else (Cather guys, you know what I’m talking about here) on to a 20 foot wall!

Power Outage in SF

Power went out in a good part of the city last night. My building lost power around 7PM so I left the apartment to see what was up. The elevators were out, so I crisscrossed around the elevator shafts to find an exit that I could get back in via. After a couple of minutes of exploring some “new” parts of my building (e.g. the Section 8 housing on the 2nd floor), I managed to exit via the the parking garage.

Power on Mission was out from 4th to at least 8th, on Market and up through downtown. The city is incredibly eerie without any lights. I hung out for a while at Market and 6th (a very sketch part area), where the cops were hanging out — probably to prevent looting  — who let us know there was a fire at the PG&E station and power would be out for a couple of hours. They had laid flares out across the intersections on Market and Mission. Playgoers who were seeing Evita were sent back home and general madness reigned supreme on Market (although, that’s not really much different than any Saturday night).

I got back to my place around 9PM and power was back on at 9:30. While the power was out at home, I had an opportunity to take some cool pictures.

More on Terri Schiavo

Jamus pointed me at a great op-ed piece in the NYT. The opening blow:

If you are in a “persistent vegetative state” and there is a dispute about whether to keep you alive, your case will probably go no further than state court – unless you are Terri Schiavo. President Bush signed legislation yesterday giving Ms. Schiavo’s parents a personal right to sue in federal court. The new law tramples on the principle that this is “a nation of laws, not of men,” and it guts the power of the states. When the commotion over this one tragic woman is over, Congress and the president will have done real damage to the founders’ careful plan for American democracy.

I fully agree with this. First of all, I don’t believe this to be even newsworthy and that it should be a matter for the family to deal with. Since, however, this 15 year old issue has caught the national eye having federal issue made of it is an abuse. Ben points out the hippocracy of Bush (having executed the most people ever in Texas) and Jamus adds some backing comments of Congress (particuarly of DeLay).

Hero

Watched Hero tonight. It’s a gorgeous film, colors matching perfectly with the film’s emotion, epic soundtrack to match the action and events perfectly, and a facinating plot loosly based on history. My favorite scene had to be the action sequence on the lake, where the entire lake stayed totally placid even while the actors were fighting over it. Fantastic cinematography. The director, Yimou Zhang, also has directed another favorite of mine, To Live.

Recent CD Purchases

Bored of my music, I made a set of purchaces over the two weeks or so:

  1. Chemical Brothers – Push the Button
    Solid set of the typical Chemical Brothers work. First track with Q-Tip works well.
  2. U2 – How to Dismantle an Atomic Bomb
    Outside the incredibly bizzare intro to the CD in Spanish, it’s enjoyable. Nothing really shocking or winning here.
  3. Green Day – American Idiot
    Great album, probably their best since Dookie. Great lyrics and guitar work. I’m still listening to this one to get through all the content.
  4. Linkin Park/Jay Z – Collision Course
    This was a total cop out to radio music driven by Numb/Encore. It fires at about 50%, with Jigga What/Faith, Points of Authority/99 Problems, and of course Numb/Encore being steller tracks. The DVD is also worth a watch.
  5. Frequent Flyer – Rio de Janeiro
    An arbitrary pick up at SFO while waiting for a flight. First disk opens with some strong down temp bossa nova, gets weak towards the middle and end. Second disk pulls through with some faster beats and more vibe.

The Terri Schiavo Case

I was going to write up some commentary on this issue, but Shane’s done a fantastic job already, you should read his thoughts. This is the most asinine news story I’ve heard of in a long time. I’m horrified that Congress is now involved; the blatant abuse of the legislature is appalling. [update: fixed title]

Building Your Own Blog Search Engine in an Afternoon

A couple of weekends ago, I sat down and thought it’d be fun to write a blog search engine just by giving it a go and seeing what happened. It turns out that writing a simple, basic search system for blogs is pretty easy.

RedYawning Search ended up writing has three components: a library to get updates from the blogosphere on what’s changed, a service that runs to pull down RSS feeds and write them to disk and a web site to let you execute the queries. The total time in writing the RY Search was about 6 hours.

The first problem is getting some content for you to crawl. In order to get myself bootstrapped, I knew that sites like weblogs.com and blo.gs allow sites to ping them and let applications consume those updates via some API. Weblogs.com is a pretty wacky system of a gigantic XML file but blo.gs provides a real-time XML fragment stream that you can hook in to get real time updates that it’s receiving. To consume those updates, I wrote a little C# library called CloudStreamer that hooks in to the stream from blo.gs and fires back a event to all the event subscribers for every weblog that comes across its path. The only trick I ran in to on CloudStreamer was sometimes the blo.gs feed would drop out and stop transmitting, so CloudStreamer has the ability to recycle itself if it stops getting data or is getting bad data.

The Service was a multi-threaded app that’s backed by a database. It has two heads, the first to receive and queue blog updates via CloudStreamer and the second to dequeue updates out of the database and read, parse and save their RSS (or ATOM) feeds. In a typical search system, this component is the crawler. In the database is stored the feed locations and whether they need updates and the metadata for each entry (e.g. the permalink, the Title, and a unique ID). When stored to disk the individual entries are written down as regular text files into a file named whatever the ID was, in to a directory modulo some partitioning value of the ID (in order to keep directories from getting too full or hard to manage).

In order to actually index the individual RSS entries, the major saving grace is the Windows Search service. I can’t believe this thing: it’s been around since Windows 2000 and it rocks. I can’t believe nobody has used it. My use of it is super straightforward: I tell it to index the files that are stored to disk. That’s it. Whenever you execute a search against its index, it returns to you the name of the file it found the words in, which, conveniently enough, is the ID of the entry. The last piece, the web site, simply accesses the Search service through its ODBC interface, gets a list of filenames, uses those as IDs to look up titles in the database and poof, a blog search engine.

Download RedYawningSearch v1.0.