So, PyCon is over (for me). I wasn’t able to participate in the sprinting this year, probably a good thing as too many late nights make me cranky. All in all, I had a great PyCon, met a lot of interesting folks, learned some new stuff, and had a lot of fun. The sessions I attended were good, but the BoF’s really stand out for me this year. Especially the Netflix BoF and the follow-up data-visualization BoF. Both were small (+! Small BoF’s FTW!) and really got me thinking.

The conference itself was really well managed. Things ran smoothly, people mingled, sandwiches were eaten, and talks were given. Friday and Saturday night were both pretty late and beery, yet again proving that I’m 31 and have baby. My rockstar genes have seriously been damaged by fatherhood. As an aside, I’ve been giving a after-several-beers rant about how MySpace is the greatest thing since representative democracy for so long now that Atul Varma finally cut off further discussion until I blog the speech. It’s a pretty good speech, I’m not sure it’ll survive the light of day, but I’ll work on it soon.

The best part of PyCon, in my esteemed opinion, is the people you meet. I finally got to talk to Mike Bayer, whom I’ve often pointed out as “the most prolific Python library writer ever.” I’ve been a fan of Data Wrangling for a while, and had the chance to talk to its steward Pete Skomoroch. He led the Netflix BoF, and his colleague Chris Gemignani led the data visualization BoF. They work for Juice Analytics, which seems to be doing some really interesting work.

PSC (whom I work for), was a sponsor this year. We had some good conversations with people at our booth, and sponsored a dinner Friday night. It was sort of our coming out party, as we’ve been working pretty hard (though quietly) for the past year to establish a solid Python based consultancy within a 100 person IT firm. PSC has been around for 17 years, has a great group of traditional manufacturing clients, and has never been unprofitable. They saw opportunities in the Python world, and hired me last year to help build a team. We’re 7 developers strong as of this morning. That, coupled with 1040 attendees at PyCon this year (up from 600 in 2007) says to me that Python is really building a market here in Chicago and elsewhere. It’s an exciting time to be a Python developer.

Anywho, great PyCon this year folks…looking forward to next year already.

It’s started. We stuffed a thousand bags with thirty volunteers and seven pizzas. (Yes, it sounds like the volunteers and pizzas were stuffed into the bags, I realize this after having already written in. It’s a shame my backspace key is totally broken, so I can’t fix it. Also, it’s funny sounding.)

Anywho, Pycon is on! Hurray for Pycon!

I wrote a short article on writing Excel files with Python and exporting them with Django on developer.com. The site caters to a (mostly) Java and .NET crowd, but they’re expanding into Python and Ruby. I’m going to try and write an article or two a month for them. I’ll link to them here. The topics will probably be a little bit basic for the regular Python crowd, the goal is to bring some new folks into the fold.

Quite a well thought out rant about why Django, not Pylons. Although I agree with most of his points, I get frustrated with these posts as they end up pulling a lot of nutbags from the nutbag store, who usually act like big nutbags in the comments.

Competition and opinions are good. Comment-baiting perfectly valid projects (just because I like Django’s oomph more than Pylon’s doesn’t mean that Pylons is bad (far from it), it’s just not for me) is a fast track to not-dating-ville.

I’d like to put forward the following bit of Franklin-like common sense wisdom, “no one ever got laid by arguing about web frameworks.” Thanks Adam for putting on paper why a lot of us prefer Django to PylonTurboZopeGears, but screw you dummy blog trolls that really believe there’s some sort of conflict worth taking sides on.

Save your energy for things that matter, like football.

Amazon is starting a limited beta of an online database they’re calling SimpleDB. It’s functionally very similar to CouchDB, in that it uses REST for queries and inserts, stores data in flat “schema-less” pages, and is generally geared towards web-app-like data. The NYTimes DBSlayer takes a half-fast approach by layering a JSON REST API on top of an existing relational database.

Although these three projects each take a different stab at the same problem, they all agree on one thing, “you should really put DB in your name…somewhere.”

Amazon SimpleDB solves the problem that a lot of EC2 explorers end up running into the minute they want to have persistent data across sessions. Because EC2 is a fresh slate on each reboot, typical databases aren’t really usable, unless you spend an awful lot of time figuring out how to off-load your data to Amazon S3 on a regular basis.

I wish I had some sort of pithy analysis of the recent leanings by web-visionaries away from SQL databases and towards these sort of REST db’s. The timeline in my head goes something like this:

Raw SQL begat ORMs begat full stack web frameworks begat wrapping a REST interface around an ORM begat “hey, let’s have our controllers talk to the REST interface, rather than the ORM” begat “hey, why do we need an ORM, or a traditional database? Let’s just make a REST accessible database!”

I guess that’s relatively pithy.

Really though, I’m not entirely sure what to make of this “trend.” I’ve yet to build even a trivial project using any of the three (Amazon is a closed beta, so I’m not sure if it’ll even be a possibility anytime soon). Maybe it’s time I take a crack at one of them.

I’ve blogged about my random obsession with bees in the past. The release of Pyglet encouraged me to pick it up again and try to make a bee-system associated with coordinates rather than with abstract “locations.”

Over the weekend, I started to write a trig library that could compute angles and distances, so I could move my bees around a grid. It turns out, I’m pretty bad at math. Brant Harris sat down and explained Vectors to me in about 15 minutes. I immediately ditched my trig library, and built a basic Vector bee demo in a half hour or so last night. The code for it is in my expansive public-works repository. In that same module is trig.py, which is the start of the trig library I ended up ditching. The Vector work was already written in PyEuclid, the very excellent Euclidian Geometry library written especially for Pygame development.

The code, suitable for cutting and pasting, is as follows:

[source:python]
#!/usr/bin/env python
# notes on how to use vectors to move the bees around in pyglet
from euclid import Vector2 as v
from pyglet import window
from pyglet import font
from random import randint

b = v(1,1) # bee at 1,1
h = v(150,150) # hive at 4,4

def in_range(b, h):
# return true if magnitude (distance) is less than 1
return (b – h).magnitude() < 1

# move the bee one tick towards the hive
def move_towards_hive(b,h):
return b + ( h – b ).normalized()

def move_random(b):
return b + (v(randint(0,100), randint(0,100)) – b).normalized() * 5

win = window.Window()
ft = font.load(‘Arial’, 18)

while not win.has_exit:
win.dispatch_events()
while not in_range(b,h):
b = move_random(b)
print “b: %s h: %s” % (b, h)
win.clear()
b_text = font.Text(ft, ‘b’, x=b.x, y=b.y).draw()
h_text = font.Text(ft, ‘h’, x=h.x, y=h.y).draw()
win.flip()
[/source]