America's Broken Laws

Do you remember Real Player? Huge in the late 1990s. They provided software for streaming audio/video over the Internet before Macromedia blew them out of the water with Flash. They've been quiet for a while, but recently they re-emerged with their latest product: RealDVD. It is software that allows you to make a backup of a DVD.

They knew that this was going to get them sued by the MPAA, and they were looking for the fight. As much as I (and millions of others) hated RealPlayer back in the 1990's I (and millions of others) have been on their side in this battle.

So what is the battle? DVDs are "protected" with the Content Scramble System (CSS). In 1999 DVD Jon gained his name by cracking this system; allowing anyone to access the data stored on DVDs without paying the fee required to get the code to decrypt the content. Yes, that's right. Any DVD player you've ever used; whether in your laptop, desktop, or connected to the tv; was only allowed to be produced after the manufacturer ponied up the cash for the license to legally decrypt the CSS and agreed to the demands that they wouldn't produce a product which allows the consumer to make a copy of the DVD.

So when DVD Jon reverse-engineered CSS, and let the cat out of the bag, the MPAA was not happy. Luckily for the MPAA they had already managed to pass the Digital Millennium Copyright Act (DMCA). Section 1201 (2) Says:

`(2) No person shall manufacture, import, offer to the public, provide, or otherwise traffic in any technology, product, service, device, component, or part thereof, that--
`(A) is primarily designed or produced for the purpose of circumventing a technological measure that effectively controls access to a work protected under this title;
`(B) has only limited commercially significant purpose or use other than to circumvent a technological measure that effectively controls access to a work protected under this title; or
`(C) is marketed by that person or another acting in concert with that person with that person's knowledge for use in circumventing a technological measure that effectively controls access to a work protected under this title.

In short: If there is any kind of copy-protection measure on a piece of media then it is illegal to access the content without paying the proper people for access (and since the people authorizing access won't authorize any use allowing duplication we have our problem).

DVD Jon's work is illegal under the DMCA. Fortunately for DVD Jon, he lives in Norway and the MPAA can't really do much about it. The bigger issue for the MPAA is that the code necessary to break the encryption on a DVD is so simple it can be written on a t-shirt. Not exactly a big hurdle for people that want to use it.

So why is this an argument at all in the first place? Something is illegal, so you shouldn't do it, right? Well, the problem is this little notion of Fair Use (also see the Electronic Frontier Foundation's FAQ). The Fair Use doctrine says you can make a personal back-up copy of content you own.

Fair Use says you can make a backup copy of any content you own, the DMCA says it's illegal to make that copy if the content has any type of copy-protection system in place. Take a guess which side wins in these arguments. I'll give you a hint, it's not us, the individual citizens of the country. If we want to make a back-up of The Fox and the Hound so that when the DVD gets all scratched and destroyed we don't have to buy it again, we can't.

This is the current state of the law in the United States. Absolutely ridiculous and inconsistent. The RealDVD case was decided today by U.S. District Judge Marilyn Hall Patel in San Francisco (ruled against Real). In her remarks she made this absurdity very clear:

So while it may well be fair use for an individual consumer to store a backup copy of a personally owned DVD on that individual’s computer, a federal law has nonetheless made it illegal to manufacture or traffic in a device or tool that permits a consumer to make such copies,

(For a complete article on the matter see Wired's Judge Rules DVD-Copying Software Is Illegal)

Django - Cronjobs Made Easy!

For those that have no interest in reading about my nerd-ventures, you can stop reading this post now.

If you're still reading, don't say I didn't warn you.

As has been mentioned previously (mainly on my previous blog), I've been doing a fair bit of side project work using the Django Framework. Sadly, the out-of-the-box Django doesn't provide a solution for running cronjobs (for tasks that need to be run within the Django environment).

Since that's a fairly common requirement I didn't think it was going to be a big deal, but there wasn't a really solid solution out there. There are a few different attempts, but they each have some limitation. There's django-cron but that just skips over the native cron entirely, which I felt was a bit extreme. Cron can already do a good job of waking up and running a command, so duplicating that functionality doesn't seem necessary. It also self-declares that it is designed for frequent tasks (hourly or more frequently), which doesn't work for me. Tasks on the Board need to be able to run from a minute scale to a daily scale and beyond.

Then I found this guy's method, which works, but I'd like a little more integration. That way when developing apps the "go add cron job" isn't a separate step. I want the job information to right in with the rest of my app information. That way I can see what should be happening and when.

That's when I came across Django-Chronograph. This solution was 95% of what I wanted. It provides a nice interface to the system to monitor your jobs and view logs. It requires only a single crontab entry. It uses the iCalendar style of task declaration so you have total control of when your jobs run. However, it is limited to running commands through the Django Management system. I wanted something a little more programmatic. Such that I could just point at whatever function I wanted for my jobs.

So I took Django-Chronograph and started my modifications. The result is Django Cron Manager. Setup is very similar to using the Admin system. You call the cron_manager.autodiscover() function from your urls.py file. This goes out and inspect your installed apps and registers any Cron Jobs they declare. Then, using the guts of Django-Chronograph, it keeps track of these jobs in the database and monitors when they need to run.

I'm planning on posting all the code with an example at some point, but I'm going to try to get in touch with Weston (the guy who wrote Django-Chronograph) to see if he just wants to roll my changes into his system permanently. If you stumble upon this post and the changes aren't in Django-Chronograph, and I haven't provided any further information. Just leave a comment that you're interested in the code with a way to contact you and I'll get something to you.

*** Update ***
I've posted the code here: http://code.google.com/p/django-chronograph/issues/detail?id=15

My evening alone

Tonight marks the first evening that Jess and I have spent away from each other. I must say it is strange. It is very quiet around here. For those that are just joining us here, Jess volunteered with the Utah County Rape Crisis Team when we lived in Utah. Eager to do similar volunteer work here in Livermore she found Tri-Valley Haven and joined up with their crisis team. Tonight was her first night of training, so that's where she's been all evening.

I decided that it would be a good evening to go for a run. I want to get back into running regularly, since I haven't been running since some time in February. So I took off jogging down Livermore Avenue. Boy am I out of shape. I jogged for about 1.5 miles before resting and stretching. Then I walked a mile and jogged the remaining half mile to get back home. It was a good run, I'm just completely out of shape.

The rest of the evening I've spent working on some programming projects. I did some work to keep the Board alive, and got the code base setup on my desktop so I can start working on Board 5 again. I made dinner (exciting plate of spaghetti and a slice of toast). And now I'm finishing up this blog post. Jess will be home in another 30 minutes or so. Maybe I'll play some Guitar Hero in the interim.

Also, unlike the cool weather Mike is having down in Sunnyvale, the weather here in Livermore is lovely:
Livermore_weatherThis is usually how the weather is, occasionally it gets cranky and pushes into the 90's and even the 100's, but that doesn't usually last very long. I certainly don't miss Utah summers.

Ubuntu 9.04 Touchpad Scroll Region

Jess has switched her laptop to Ubuntu and in the process there are some tweaks to be done. One of them was that her touchpad has a little area set apart for scrolling and the default option on Ubuntu was allowing scrolling for a small amount past that set apart area. Unfortunately, they've just updated those settings to be part of the HAL device settings rather than the Xorg.conf settings. So now there is not a nice clean GUI configuration program.

After some messing around I was able to figure it out though. You need to create an FDI policy in the directory "/etc/hal/fdi/policy". It doesn't seem to matter what you call this as long as it ends in ".fdi". So I called mine "touchpad.fdi". In this file we put:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="input.x11_driver" string="synaptics">
 <merge key="input.x11_options.RightEdge" type="string">5900</merge>
</match>
</device>
</deviceinfo>

(For more information on how to form this file see: https://wiki.ubuntu.com/X/Config/Input.)

If you follow these instructions and things don't seem to work, you might try switching the encoding option from "ISO-8859-1" to "UTF-8".

Anyway, save that text into a file like "/etc/hal/fdi/policy/touchpad.fdi". The next step (which was left out of 99% of the information I found online and made me very frustrated) is to restart HAL:

sudo /etc/init.d/hal restart

After HAL restarts, log out and then log back in.

If it found and read your file properly something should have changed. If you want to test to see if things are working at all you can try setting the RightEdge value (5900 in the above) to something small (I'll warn you that this will probably turn your entire touchpad into a vertical scroll area, however you can do some sneakiness to recover, first you can still access a terminal by accessing your menus using ALT+F1, and you can access the shutdown menu (not the logout menu sadly) with ALT+CTRL+DEL).

You'll need to play with that value in order to get it to work for you. I tried to be clever and calculate it from some information, but it didn't work, so [shrug] just play with it. I changed things about 200 at a time which was enough of a change to notice.

I hope this helps someone out.

For the record

We went and saw Harry Potter 6 last night. Everyone seems to think it's an incredible movie. I thought it was incredibly flat and lacking almost any substance. Of course when you take a long book and condense it into a movie things are going to get left out, but I think you need to really choose certain scenes and plot points to develop rather than just grazing over everything (and what was the deal with adding an entire scene not in the book which adds nothing to the story?).

So, I don't know what everyone is going crazy about. The piece that the entire book builds toward was entirely anti-climactic for me (No Battle Scene?! They just walk out without any resistance?! Ridiculous!). I was sure that the movie would end with the funeral, but they skipped that entirely too. Instead it's a rather dull scene on top of the astronomy tower.

I think it would have highly benefited from being stretched out another 30 minutes, throw in the fight scene that at least half the audience is waiting for, and develop the important scenes further (the cave lasted all of like 10 minutes).

The book, to me, was mostly to educate us about Voldemort's history. But very little of that comes out in the movie. Since we're not focusing on that, we end up not really focusing on anything, since what Draco is doing is a secret until the very end. So it's kind of like, random thing here, oh Draco acting angsty, another random thing, Dumbledore being vague, Draco being angsty, anti-climactic scene, anti-climactic scene, the end.