Thursday, November 01, 2007

twitter

Yeah, so I'm late to the game.

In fact, twitter's not really a game I was ever interested in. I only started using it today because of the work we're doing at Divmod. The reason I was never enthusiastic was I just couldn't see myself using yet another application or having yet another web page open all the time.

But it hit me this morning at 3:00am when I couldn't sleep that with tying a single script's name at the command line, I could push whatever command I had just issued to my twitter. That script uses bash's history command as well as python-twitter. I wrote another simple script that I can use to push arbitrary text too. That coupled with the fact that 1) twitter supports an IM service and 2) I'm now using BitlBee, I can now use twitter without context switching (since I spend 80-90% of my computer time in the terminal and my IRC client).

I'll probably be using twitter mostly as an open-ended replacement for setting IM/IRC status. Interesting commits or revealing bash activity will make their way, too. And, of course, I will be using it for the as yet unannounced Divmod app we will be releasing :-)

Technorati Tags: , , , ,

Monday, October 29, 2007

trac Stats Gathering with Storm

One of the things we've wanted to do recently at Divmod is track development status of milestones as well as gain some perspective on repository history/trends in activity. The first thing I did? Looked at SQL for about 2 and a half minutes. The second thing I did? Fired up a python instance and imported storm.locals :-)

With a few minutes of typing and looking stuff up (e.g., how to define compound keys for an already extant schema/db), I was up and running and was able to concentrate fully on the problem at hand (reports) and how to represent data visually (matplotlib). Now that's how an ORM is supposed to work :-)

Here are the schemas I defined in python:




Note the 1-to-m relationship of revision to nodes changed -- so easy :-)

This is exactly what a (good) tool is supposed to let you do: focus on and solve the larger problem at hand, not get lost fixing tools. With the schemas defined, the queries took literal seconds to write, I had my data, and was able to start generating textual summaries as well as processing the queries for graphs.

Wanna see some graphs? Below is a slide show of some graphs (just a few of the hundreds that are generated) representing the work of the Divmod dev team over various points in time on a secondary trac instance (not our main, Divmod trac instance). Though I haven't included them in the slide show, the code also generates graphs per-user, per-time-period.


Created with Admarket's flickrSLiDR.

Update: Thanks Nafai for poking me about the oversight of not giving shouts out for the graphing tool: matplotlib (of which I have been a huge fan of since I first heard about it years ago, having suffered through proprietary and kludgey Matlab as a physics student).



Technorati Tags: , , , , ,

Wednesday, October 17, 2007

rst2a

I've been meaning to blog about this for a couple weeks: rst2a. I think this is a hot little site for the following reasons, in order of what my brain experiences when visiting the site:
  • Visually, this is a very "clean" (and good looking) application; in a world of over-featured web junk, this is most refreshing.
  • Similarly, the functionality of the application is represented excellently by the clear design and layout: I always know where to go and what button to click.
  • I use ReStructured Text all the time; any notes I take for everything, I write using rst (and I have already used rst2a a great deal).
  • This applications is most useful: it can output my rst text to styled HTML or PDFs, it handles unicode well, and new styles can be defined and uploaded.
Finding a nice web application that does one thing useful and doesn't try to be everything to everyone, looks good, and actually freakin' works feels like a one in a million occurrence. Having a web tool that converts your rst may not seem very "big" or sexy, but try it -- I think you'll find it surprisingly useful. And the way that they have designed this thing, you will enjoy the actual usage experience in addition to the result (or at the very least, won't have the pain associated with poorly- or over-designed apps).

Now, to encourage them to commit a crime which I have just decried, perhaps they could a feature I would use: slide show output. This would increase the output formats from two to three: HTML, HTML Slideshow, and PDF. That's not too bad, is it?

Technorati Tags: , ,

Tuesday, October 09, 2007

Twisted Horse

I've loved riding horses since I was a kid. I have no riding skillz, but I've been on horses (irregularly, and sometimes with large gaps of time in between) since I was a little boy. But *damn* it's amazing riding a horse.

So imagine my joy when
  1. my girlfriend tells me she wants to rescue two trail horses she's known for a couple years and is able to get a really good deal on;
  2. they are larger horses (quarter horses), so they will fit me; and
  3. the larger of the two is named "Twist".
Well, they arrived today, brought up from Colorado by our friend Lindsey. They were treated poorly by someone (riders and/or handlers) this summer, and so are in pretty rough shape, but Marjorie has already started working on them and is putting their recovery plan into effect immediately. As soon as they get fattened and happied back up, I'll be learning to ride bareback! Woo-hoo! Or perhaps "yee-haw," in the parlance of our locale.

I've got some initial pics up here, taken after we got them off the trailer and into the arena. Twist is the lighter colored, larger horse. I can tell you what I'll be doing on weekends, now! When I'm not traveling to Denver. Or hacking python. Or...

But, man! I can't believe that I've got a horse named Twist, of all things! How sweet is that synchronicity?

Technorati Tags: ,

Chicago

I was in Chicago very briefly this weekend for the Chicago Marathon; several of my friends from the 311th MI Bn (101st Airborne Division) were running in the event and others of us from the same unit were there supporting them. For us, the whole event was dedicated to our dear friend Todd Drobnick who was killed in Iraq several years ago. It was really great seeing some old friends, savoring some memories, making some new ones and even planning the next get-together. I put some pics up here.

For the weekend, we ended up renting this great little place (two places in fact: 2nd and 3rd stories) that was right on Clark Ave. at mile marker 9: a perfect location. I also ended up bringing my dog with me, and as a result, did lots of walking in and around the area.

I am not a city person; I generally am fairly averse to them. Cities with character, however, I find most appealing. Boston, San Francisco and New Orleans come at the top of that list. But I tell ya, I gotta admit that Chicago rocketed through the ranks this last weekend. I've been there before, but only downtown. Staying for a day and a half in Chicago's Mid-North District made me want to come back right away! Here are some pics I took (with my cell phone; not the best light control) of some of the places that caught my eye.

Sadly, PyCon 2008 won't be held in Mid-North. However, 1) I look forward to exploring the area near the conference, and 2) Mid-North is only going to be about 13 miles from the hotel, so I can always talk some of you into catching the 'L' with me and riding over for dinner and a walk :-)

Technorati Tags: ,

Wednesday, September 19, 2007

Code Monkey

Why isn't this our theme song? I can't believe I haven't heard of Jonathan Coulton until now (and it was a non-coder who shared it with me). Turns out this guy wrote a song a week for a year. Totally insane. And brilliant.

More for the geeks:
He reminds me of Jeffery Gains and They Might Ge Giants. I will probably end up buying all this guy's albums...

Technorati Tags: , , ,

Saturday, September 15, 2007

The Schro is Back

Well, after year and a half of no posts, Schrödinger's Böx is back, with three new entries:

http://schrobox.blogspot.com/

The reason for the long gap is that feedster.com had stopped publishing their top 500 list. The list was pretty convenient, since they provided RSS links of each blog's full recent entries. Parsing them was cake. When that went away, so did posts for SchroBox.

I had a few minutes this morning to play, so I hacked on the really awful code to add support for parsing Technorati's top 100. This should make Greg very happy, as he has oft lamented the early and sad demise of The Box.

As for what this madness is and where it comes from, this post tells all (hint: it uses NLTK extensively).

Thursday, September 13, 2007

Nevow Athena: AJAX/COMET with Twisted

Some of you may remember when, given 5 seconds to say something about Nevow's AJAX capabilities at the PyCon Web Framework panel, I said "we were there first." I was serious about that. If you take the time to dig through the dusty attics of Twisted's and Divmod's svn repositories, you'll see it too.

Not that I blame anyone for not knowing, though. If there are any two crimes that Twisted devs are guilty of (among potentially uncountably many) they would be:
  1. being frighteningly clever, and
  2. not sharing the useful bits of the cleverness with the world at large.
We're trying hard to really start sharing the goodness, though, honest!

Along these lines, we've got a series of tutorials about Athena that will be published "real soon, now." Initially, we're going to put out some intro text and two basic tutorials. Follow-on tutorials will cover advanced topics and/or basic ones in more detail.

It will be very exciting, though, to bring the power and elegance of Athena to the masses :-)

Personally, I've found that writing Athena apps (with its tightly bound Python and JS) provides ease of use and peace of deterministic structure in an arena (AJAX/COMET application development) that is usually littered with the bodies and casualties of poor planning, poorly established boundaries between application components (in requirements, architecture, and implementation), and poor education.

I look forward to community feedback on the tutorials: it's a complicated topic that will be condensed into only a little code in each fully functional example. The need for clarity and the defeat of confusion is paramount.

Technorati Tags: , , , , , ,

Tuesday, September 04, 2007

Merging New trunk Features to a Development Branch

When I was on the development team for Zenoss, I tried to get them to use branch-based development, including Divmod Combinator. They eventually did switch to using branches for any big changes, but they didn't embrace Combinator. When I'd taken over development of the Zenoss community code, there were only two developers, so I only implemented a very basic branch management process. But having used Combinator a lot recently, I wish that I'd taken that opportunity to get them using Combinator... man, their lives would be so much easier right now if I'd taken that step.

I am now managing all of my svn-based projects with Combinator. Even the ones were I am sole developer. The time saved and convenience gained is enormous.

Below is a perfectly good example of how Combinator makes svn management less painful. I don't know about you, but every time I have to manually to push new trunk changes into my current development branch, my brain does a little freak-out dance. I stress, thinking "Crap; I have to get this right. What are the exact commands I have to use again?" Thanks to Combinator, this is no longer a problem, and my brain does a happy dance instead.

These days, I am using Combinator on an almost hourly basis. It's very simple (to get setup with Combinator, see the tutorial and other example usage).


Background


Assuming you've got a Combinator-managed project called "Project", let's do some background first. Say you want to branch trunk for a new feature, one that you're tracking in ticket #836. Here's how:
$ mkbranch Project viking-feature-836
Now, just to make sure that you are no longer in trunk, check which branch you are in:
$ whbranch
Project: viking-feature-836
Divmod: trunk
Twisted: trunk
(Note that every project that you are managing with Combinator will be listed.)

Say you've got another ticket you're working on, #1066. You created the branch with this command, just like the other branch:
$ mkbranch Project norman-feature-1066
After starting this branch, you complete 836 and merge to trunk:
$ chbranch Project viking-feature-836
$ unbranch Project
$ svn commit -m "Completed 836."
unbranch updates trunk with the latest changes and then merges the branch it just came from (viking-feature-836) into trunk. Running svn diff will show you just how true this is.


Merging


So much for the background! Now for the merging I'd promised:

If the norman feature depends on the viking feature, we need to "merge" trunk to branch. Using Divmod Combinator, this is how that is accomplished:
$ chbranch Project norman-feature-1066
$ unbranch Project
$ mkbranch Project norman-feature-1066-2
$ cd ~/Project/branches/norman-feature-1066-2
$ svn commit -m "Merged changes from norman-feature-1066."
In other words, we:
  1. merge our work to date from norman-feature-1066 to trunk (without committing!)
  2. make a new branch, based on that trunk, which includes the norman feature to-date and all the latest changes made to trunk
  3. commit the branch changes to our new branch
We're using trunk to get what we need by only making changes to trunk in the working directory, without making any changes in the repository. Keep in mind that the changes from the first branch were added (and not committed) to trunk before creating the second branch. Since the second branch was created from this modified trunk, we will need to commit those additions. Also, you will most definitely want to revert your tweaked trunk once you have finished creating your new, updated branch!


Paths


As a side note, Combinator is especially excellent for python projects, because of its python path management features. Any python tools, scripts, pluggins, or applications that use the code in your Combinator-managed projects will import from the current, active code (whatever shows up in whbranch). So when you're working in branch and you run your unit tests, you know that it's the branch code that's getting tested. When you switch back to trunk, all your code is running against trunk. Very nice :-)

Technorati Tags: , , , ,

Wednesday, August 29, 2007

Hello, Divmod

As I've mentioned before, the first time I had face-to-face time with Glyph and Amir was not too long after they'd formed Divmod, at pycon 2004. I'd toyed with Twisted for about two years prior to that, and the stuff they were doing with Quotient was just amazing (better feature sets than gmail). So, when they reached out after I'd blogged about my Zenoss contract coming to an end, I was just thrilled. We had some exciting talks about current development and the future, and given my long-standing love of Twisted and Divmod products (such as Nevow), wild horses couldn't have dragged me away.

I consider the core Twisted developers (and Divmod programmers) to be some of the best in the world. To be working with these guys is a dream come true and I am giddy with anticipation of both what we will be producing and all that I will be learning.

And now, I would like to take a moment to give some love to the python community in general: you guys are awesome.

I know you already know this, but one can never say it enough :-) I had all sorts of people and companies offer really cool positions when they heard I was available. There are some exciting startups that need developers and fantastic non-profits (that pay salaries) that would be great fun to work for (and feel good about). Also, my favorite dev team at my favorite Linux distribution's parent company reached out; they totally rock and I want to thank them for that (you know who you are!).

Two things I learned: VMware uses python and even better, LucasFilm uses Twisted. How totally cool is that? Hopefully we'll be talking to them on the TwistedShow sometime in the near future...

Technorati Tags: , ,