Aug 28 2007

the moon will soon be eaten…

Tag: Ranting and ReflectionsJoe @ 12:28 am

In another few minutes, the total lunar eclipse will begin. This will be the second one I’ve seen - the first being nearly 20 years ago while I was camping with a large pile of friends in Pennsylvania. I remember that night well - “The moon’s being eaten!” was the catch phrase of the evening.

I suspect I won’t be functioning too well tomorrow - but hey, these things don’t happen every day. I’m even supposed to drag Karen out to see it at the relevant hour.

Update:

There’s a great picture (or really, hundreds) on Flickr of the eclipse. I was wasted most of the morning from staying up until 3am watching, but it was still really cool. I recommend Shaun Johnston’s flickr set for great view.


Aug 25 2007

Django Queue Service

Tag: Geekstuff, Ranting and Reflections, djangoJoe @ 10:15 pm

I know I’ve been quiet on the Django front for a while. Here’s something to make up for it. Without further ado, let me present to the world the Django Queue Service.

At OSCON 2007, I was hunting around for something to use to deal with background processing initiated from my web application. Not finding anything that I could immediately use and implement, I took it as a challenge to knock out something in the time I was there. The result is the django queue service.

It was later in the week (at the Django BOF) that I learned about TheSchwartz and Gearman, which Brad Fitzpatrick is hacking away it to make a queue mechanism available for fellow Python and Ruby geeks.

At the time, I thought “I wonder if I can hack this out in a week…” Well, yes I could. I modeled the service after the REST API from the Amazon Simple Queue Service, because that seemed both reasonable and effective. And I didn’t mind the idea of having my own Queue that (mostly) matched that API that I didn’t have to pay anything to use.

The project also contains from code from the CherryPy project. Mark Ramm (a really nice fellow, by the way) gave a session at OSCON about WSGI servers that was really intriguing. I’ve been looking for a “pure python” service to run Django with for a while, and after chatting a bit with him, thought I could probably make it happen with the CherryPy WSGI server. So I did. I have a little piece of linkage code that fires up the CherryPy WSGI server code and links it right on through into Django. I didn’t want to use the rest of CherryPy, so I nicked that code and dropped it into this project as a nice reference and a handy way to run the queue.

I suppose this project could easily end here, and of course there was the “but I want to…” list of things that I had in mind to do before I released it into the world. Well - as they saying goes: “Now is better than never.” so out it goes.

If you are interested in getting involved with the project, sending me patches, or whatever - let me know. You can leave a comment here or use that spiffy Google Code Hosting issue tracker. The project is functional, but not brilliant - an not entirely cleaned up in terms of its API. But enough excuses - its there, feel free to use it or not as you like, contribute or not as you like.


Aug 25 2007

Interesting tidbit on Mercurial…

Tag: Geekstuff, Ranting and ReflectionsJoe @ 9:06 pm

After Andrew’s presentation on Mercurial and Git, I thought I’d give one of them a shot. Since Mercurial is written in Python, it obviously won. Well - obviously for me, but then I really like Python.

Anyway, an interesting quirk about using Mercurial. If you are working on the command line in a subdirectory, it doesn’t know about the repository you’re in. For example, I took the obvious tact of managing apache configs with it. I picked /etc/apache2 as a nice good top location, initialized the repository, and added in all the files.

Then tonight I was back in there, making a few edits, and I was editing a file in /etc/apache2/sites-enabled/. At this point in subversion, I’m used to getting a response from “svn st”, so I tried “hg st” - nothing. “hg commit” to commit the changes also didn’t work. It wasn’t until I switched back to the central directory that I could see the changes and do the commit.

After thinking about it a bit, this all made sense - it’s working from the .hg directory I left in place at /etc/apache2, but it still took me a bit by surprise.


Aug 25 2007

Law is code… and it desperately needs refactoring!

Tag: Geekstuff, Ranting and ReflectionsJoe @ 6:11 pm

I’ve been thinking about this topic for a while. Actually - what and how to write about it has been darned tricky. It’s about the Law. Our “Legal Code”. Interestingly, they use some of the same terminology - that it’s code and there’s plenty of parallels that have already been drawn there.

But what really sparked this off was the combination of really reading a license agreement (VMWare’s Server EULA, if you are curious), having recently signed a lease, and thinking back to a conversation with Nathan about how many dense, annoying, and obtuse pieces of paperwork you need to sign to purchase property.

I think anyone who has learned a few programming languages will easily take a look at a legal document and see how that sort of matches in. The downside is that the programming language (in this country anyway) is english - and it’s a shitty language for explicit instructions. Another downside is that us monkeys don’t readily take to explicit instructions, so there’s the dreaded compiler problem: interpretation.

Now look at signing a lease or (worse) the paperwork needed to purchase a property. Read some of that shit. It’s an aggregation of patch on top of patch on top of patch. Everything that has fucked up previously has had a “test” written for it, and it becomes another piece of paper that you have to wade through and deal with it.

Nathan had the brilliant and twisted idea that we should sue some poor sumbitch for giving us writer’s cramp in signing all that damn stuff, and try and force a contradictory “legal test” that would reduce the mile high paper load. More concretely, I wonder if a suit against that process that we can’t freakin’ understand it anymore has validity? Lawyers are sort of alternate compilers for this crap, and they combined with a judge or jury make up the results of that program.

What’s really bad about all this is the virii that inhabit so many legal documents. Yep, virii. Look at some of the really amazingly stupid shit you have to sign when you get a job. Legal contracts, binding you to often unenforceable positions. What the fuck? That’s why I think it needs some significant refactoring. God knows how that should happen - I’m not that brilliant on Law myself, but it sure seems to need it.

In the meantime, get a good virus scanner…. cause those legal virii are vicious!


Aug 23 2007

XCoders - Git & Mercurial…

Tag: Ranting and ReflectionsJoe @ 11:33 pm

Andrew Carter gave a really good overview presentation of two of the more popular distributed source code management systems out there today - Git and Mercurial. Lots of people have been talking about Git lately, mostly because of the video of Linus’ talk about it at Google.

Both were interesting, and conceptually they’re really intriguing concepts. Andrew’s talk did a good job of illuminating the core concepts for me, and I smile and shake my head when I think of the changes that would happen in a larger company to really make distributed source control work for them.

Based on my own experience, I think it would be a hell of a mental shift. Very easily doable for a smaller outfit, and hellish for a larger one that’s built up a concept of a central repository and some sense of control. To my mind, what is needed to really make it work is the concept of a maintainer in a development group. The soul who is responsible/gatekeeper for the code. I haven’t seen many development groups in large companies that have that setup. Most groups have a lead or something equivalent, but the social dynamics in a company don’t generally end up putting people into positions like that who are good at working with other folks socially - most especially when they’re being looked at to be responsible for other folks code. It would be a really odd dynamic - they gatekeep patches, but they can’t say “I won’t ever take another patch from you” if a developer keeps putting in really nasty code. There’s a “you’ve got to work with them” framework at a company, and real pressures to “get something done” that might not ever make it into what you’d classically think as open source with a strong gatekeeper.

Anyway, I walked away from the presentation thinking “Yeah, I could use that…”. My biggest takeaway, using source control can (and perhaps should) be a very low impact, low threshold task that you can use for just about anything.

Oh - and for you macports folks, it’s easy to get rolling:

sudo port install mercurial
sudo port install git-core


Aug 21 2007

HALO 3

Tag: Ranting and ReflectionsJoe @ 10:46 pm

I took some time this evening to go see the Halo 3 IMAX Preview Event. Imagine playing Halo on a big screen. A really, really big screen. Now combine that with seeing the game as its winding down into its final state and getting a chance to see some of the game play. Yep, that’s what I did.

I took a notebook and after dinner spent the time sketching and thinking about some code design problems, and aside from a rather uncomfortable wait outside the Seattle Center IMAX theatre, the time went pretty darn fast.

So here’s the dark secret - I don’t even know if I’ll be getting Halo right when it comes out (Sept 25th). I really liked Halo, and I enjoyed Halo 2. But I think I’m going to wait and see a bit with Halo 3. Don’t get me wrong - it looks incredible. It looks like a game built entirely for the twitch addicts of the world. Which, unsurprisingly, I’m not. I’m OK. I don’t really get into competitive multiplayer. What I really enjoyed was late night co-op play with my brother in law. Now it’s got that in spades - 4 person Co-op play. I’ve got to image this is going to be a tricky game to complete.


Aug 20 2007

Down for a day - literally…

Tag: Ranting and ReflectionsJoe @ 10:50 pm

I was down for the day - literally. I think I slept something like 16 hours all today today - way more than usual for me. Karen thinks it was because I finally relaxed a bit this weekend after a busy summer, and everything caught up with me. I don’t know what it was, but I was crashed all day. I don’t feel any worse the wear for it - and in fact, I’m kind of tired again now (nearly midnight), so I guess I clearly needed it. Weird how those things happen - I wouldn’t generally be able to sleep again so easily after having that much sleep recently.


Aug 16 2007

Catchin’ up from OSCON - Windmill

Tag: Geekstuff, Ranting and ReflectionsJoe @ 10:11 pm

Doing a little catchup time from OSCON… One of the pieces that I was particularly interested in from OSCON was Windmill. OSA Foundation’s variation on the Selenium theme for testing their Ajax and webapp views of Chandler. While I’ve got to admit its a damned impressive tool - it’s also just not “quite there” yet. I can see all the pieces roaming about, but I haven’t been able to quickly get it working on either Mac (binary available) or Windows (installed all the pieces and ran it from the shell).

It could easily be something I’m doing wrong, no doubt. But the obvious didn’t work off the bat and at the moment I don’t want to go digging deep and try and figure out where something isn’t quite working right. I know it’s a functional system - since I saw the demos and I have faith in what Ted and Mike put together. I’m afraid the documentation likewise isn’t quite there.

From a UI perspective, part of me really likes the wxWidget look - and another part of me kind of cringes and thinks “That just doesn’t look quite right”. The usual problem with wxWidgets - some fields are clipped and others look great - it’s just got an awkward feeling to it. The flip side is that the system is all-in-one - no crazy configuration to plug together like Selenium and the “RC” scripts.

Selenium actually didn’t do it for me either - I found I had very different functionality in the tests across browsers than I ever expected. Within one platform - great. But moving to another browser with the same tests just didn’t get me much.

I guess for now, I’ll be sticking with Twill and it’s mechanism like friends. I find the tests a little fragile, but they’re working well for me.


Aug 15 2007

Fun movie - Stardust

Tag: Ranting and ReflectionsJoe @ 10:17 am

Karen and I went to see Stardust last night. I hadn’t even realized it was a Neil Gaiman story, and from the web site “Best Date movie…” commentary, I wasn’t sure what I was getting into.

It’s a great flick. A good story (kinda classic realization/coming of age thing) with excellent characters, great acting, and a hell of a lot of really funny moments. I about bust a gut with Robert DeNiro’s scenes, and I thought Claire Danes did an exquisite job in the acting. Oh - and Michelle Pfeiffer made a great witch!


Aug 13 2007

What I’ve learned this weekend

Tag: Ranting and ReflectionsJoe @ 6:32 pm

What I’ve learned this weekend:

* I don’t breath very well at 12,000 ft elevation
* The high alpine meadows in the Rocky Mountain National Park are simply exquisite
* After being at 12,000 ft elevation, 7,000 ft feels like sea level
* You can actually taste the salt air here in Seattle - especially after having come home from the Rockies
* My brother is doing pretty darn well

I picked all this up around Estes Park, CO for Rusty and Gina’s wedding.


Next Page »