Optical Storage

By lani 09 Jun 2005

This is a shameless cry for geek help!

<p>Our lab would like to archive files for the future.  We are storing large tiff files that are about 200MB each.  Hopefully, I am putting out decent data and we will need to keep the files for&#8230;let&#8217;s say 10-20 years at least.  I was looking into external <span class="caps">DVD</span> burners (both Mac &amp; PC compatible) and am currently considering the Plextor 716UF.  And whilst searching, <a href="http://www.blu-ray.com/">Blu-ray</a> and HD-<span class="caps">DVD</span> cam up.  So here&#8217;s my question&#8230;and it may be stupid because I&#8217;m not a computer person&#8230;but does anyone thing that <span class="caps">DVD</span> storage of data will be uselessly obsolete in 10-20 years?  will I need to put <span class="caps">DVD</span>-<span class="caps">ROM</span>s into storage along with them?</p> 

3 years late

By tuck 30 Apr 2005

a long time ago i mentioned my acting debut. there were problems with the production of the film, and things were complicated further by the death of one of the actors (a piece of the set collapsed under him while filming at the Beijing Film College), and i pretty much figured the whole project had been scrapped. well, while looking for some new dvds this afternoon, i noticed one that had a familiar face on the cover. it took me a few moments to place it, but, it suddenly dawned on me: “isn’t that… the guy i was in that movie with?” i grabbed it, took it home, and sure enough.

<p>the bad news is that they decided not to use the sequence where i actually say a line. bastards. the good news is that&#8230; i&#8217;m in there! and i look cool. Warriors of Virtue II: Return to Tao. i&#8217;m a prisoner, i&#8217;m wearing a cloak with a big hood. i have chin hair. what talent! what natural ability! four stars for me!</p> 

raw queries with SQLObject

By anders pearson 18 Apr 2005

i use SQLObject for all my programming that involves a database. i think it hits a real sweet spot on the simplicity/power curve.

using it basically involves creating some classes that inherit from SQLObject for each table in the database and giving them each attributes that correspond to the columns of the tables. it doesn’t really let you forget that you’re using a database to store your stuff, but it saves you from having to hand code all the simple SELECT and UPDATE type SQL queries. i really like this approach; it’s more of a representation of database tables and rows as objects than an attempt to force fit objects into a relational database.

it’s got a powerful enough query syntax to cover about 95% of anyone’s needs. for four of the remaining five percent, the ability to pass in raw SQL for the WHERE clause covers you. so you can do LEFT OUTER JOINs to your heart’s content when you really need to.

what it’s missing out of the box though, is the ability to specify which columns get fetched. since it returns a list of objects instead of raw results, it will always fetch the columns it needs to build those objects. 99% of the time that’s fine. but it prevents you from using a lot of SQL’s built in functions like COUNT(), MAX(), or AVG(), which are useful for various reporting type queries and for doing really complex queries with GROUP BY and HAVING constructs.

but all hope is not lost!

i had to dig around in the source code a bit to figure out exactly how to do it, but it’s actually pretty easy to directly access SQLObject’s internal database connection methods and make raw queries directly. it just looks like:

:::python
# Node is a class that inherited from SQLObject
results = Node._connection.queryAll(
    """SELECT [some really complex and nasty SQL
    that needs aggregate functions, etc.]""")
# results will then be a list of tuples,
# one tuple per row returned.

there’s also a queryOne() method that just returns one tuple if that’s all you want.

the only thing you don’t want to do is use that stuff for updates, inserts, or deletes since it bypasses SQLObject’s caching and you could end up with weird inconsistencies between what’s in the database and what’s in memory. use SQObject’s regular interface for anything that modifies the database.

anyway, this post is here so google will find it and other people wanting to do raw queries won’t have to dig through the source code (although it’s pretty easy to understand if you’re so inclined).

plone work

By anders pearson 14 Apr 2005

i’ve been kind of busy in the world of plone lately.

one project that i contributed to is out now: Wicked, “wiki with no wiki aftertaste”. it’s pretty cool but might not make much sense to you unless you’re already immersed in plone development.

another one that my coworker, Jonah, and i are building is PloneStickies. it’s not really release ready yet, but should be soon. it basically implements “sticky notes” (“post-its” is trademarked) for plone. Jonah’s doing most of the actual plone part and i’ve been concentrating on the frontend javascript and CSS part. as a taste of what’s to come, here’s my stickies test page which has the latest version of the frontend stuff which will hopefully make it into the upcoming PloneStickies release.

i’m rather proud of that bit of code. it’s fast, robust, full-featured, fairly clean and it even works in IE i’m told. i’m trying to keep it general enough that at least parts of it will be useful outside Plone.

conclave corruption

By anders pearson 14 Apr 2005

Bruce Schneier has an interesting write-up on the security procedures of the papal elections.

they’re quite elaborate and, as he points out, quite secure. over the last thousand years, they’ve done a pretty good job of preventing just about any kind of voter fraud that could be imagined.

what really gets me about the whole thing is that with all of this obvious thought having been put into ensuring fairness and transparency, it’s clear that the cardinals don’t trust each other very far (or at least historically haven’t). all of those cardinals are supposed to be holy, moral, ethical men, but if there had never been problems, no one would have bothered coming up with and codifying all these elaborate safeguards. so clearly at least a few bad apples have made it through. yet, once one of them is elected pope, he is elevated to the holiest office in the world and is considered to speak directly for god.

it reminds me of Bill Hicks’ observation on the popemobile and its inch thick bulletproof plexiglass: “that’s faith in action, folks.”

musical voyeurism

By anders pearson 11 Apr 2005

i’ve been using mpd as my music player lately. it’s a neat little program; very minimalist but it does a good job with my music library and is a lot less flakey than yammi has been lately.

mpd doesn’t really keep track of the songs you’ve played though. i really like archiving that kind of data for some reason. i have to keep my packrat tendencies under control when it comes to physical stuff since my apartment would fill up, but with data, i figure disk space is cheap. so if there’s any chance i might someday find it useful, i try to figure out how to put it in a database.

so, a couple lines of python later, i had a little script that would detect song changes and fire off an http request with the info.

with the help of subway and a few more lines of python, i had a nice web interface to the database of what songs i’d listened to when. it’s open to the public too; the curious can check out the last 50 songs i’ve listened to updated in real time.