Recovering from PyCon

Last weekend, I attended PyCon 2007. I hadn't originally intended to go, but I could hardly miss my father giving the final keynote.


The keynote was riveting as expected. To be honest, I hadn't expected much of the conference beyond that. The first PyCon was an amazing experience, but as the topics drifted more towards "web frameworks" and away from more general programming, later ones were progressively less interesting. I missed last year's and nothing I read caused me to regret it much.


I'm happy to say that this expectation was completely wrong, and this conference was amazing. I thoroughly enjoyed it on many levels.


In previous years, a lot of my time was soaked up by justifications, answering questions like "why does Twisted make me do foo" or "why haven't you made Nevow do bar yet". This year, the discussions I participated in were all productive and engaging, including the two, multi-hour Twisted birds-of-a-feather sessions which I attended.


Many of the exciting developments that I enjoyed while I was there aren't ready for public consumption quite yet, so I can't say much here. I can give you some incredibly vague hints though! It was a very rewarding conference both from a business and community development perspective. (Those of you with privileged information, please do not add anything revealing to the comments. Seriously.)


One cool thing that I can shout from the rooftops already is that Guido, a group of concerned hackers, and I got to have a meeting of the minds, which Guido has already blogged about, addressing many upcoming concerns we all had about Python 3. That, and several other discussions with the responsible developers about the proposed transition plans for the 3.0 release have put my mind at ease. That's not to say that I agree with every decision that has been made - and I definitely need to participate in a few more mailing list discussions - but I feel much more comfortable that the whole thing is in good hands.


My major regret for this conference is that I was completely unprepared for the truckload of great stuff that happened. I thought I would take it easy for a few days and get back to work. If I had a better idea of what would be happening, I would have prepared at least a few lightning talks, a more structured BoF session, and better allocated my time to the many interesting folks who wanted to bend my ear so that I wasn't rushing from conversation to conversation.


I told a lot of people that I'd be doing a lot of things as soon as the conference was over. Unfortunately the first thing I actually did when the conference was over was develop the worst cold I've had in the last 5 years, and promptly stay home sick from work for a week, sleeping most of the time. To make matters worse, the conference and the illness coincided with the blackberry software on my phone crashing very badly and a not-quite-perfect beta-test of the Divmod migration process on my email account.


In other words, if I told you I'd get back to you at the conf, I probably haven't. I'm trying desperately to claw through my backlog right now, but it's going to take a while. Please be patient, and if you haven't heard from me in a week or so, feel free to send some repeat emails and nag me. If I said I wanted to get back to you, I really do.


I should warn you that I'm still not quite back at 100% HP/MP yet, and I have lots of actual work work to do as well, so you might want to wait a few days, but please, everybody, stay in touch.

Twisted BoF at PyCon

The attendance list seems a bit anemic so far, so I thought I'd point it out:


Twisted Birds of a Feather session at PyCon 2007


I'll be there.

I Got the Black One

As I predicted, I purchased the black MacBook.

After every other laptop I've purchased, I experienced some form of buyer's remorse.  In this case, I didn't.  The overall experience has been positive.  I really don't have time to do a complete review (especially after spending all that time trying to remember how the heck bluetooth modems work - ugh!), but I'll offer the highlights, from an outline I was working on to do a fuller review:
  • It's very fast.  It runs the unit tests even faster than my work machine, a beefy Opteron.
  • More than any other Apple computer or appliance I've owned, its design is a work of art.  There are no special function keys (unless you count "eject"), no latches, no status indicator lights, clips or plug covers or anything.  The only moving parts are the keys and the disc drive.  It's also almost completely silent.  This can be slightly creepy: there's hard disk light, no sound from the disk, no network activity light, no external indicators to show that the machine is doing something.  I might have to get some blinkenlights panel applets just to make myself feel comfortable!
    • MagSafe is a really, really good idea.  It's not just about not knocking your laptop off of the table - it makes every other laptop plug you've ever used feel like utter crap.  The Vaio still holds a strong second in my book, because it allows for a fair amount of play on the plug before anything starts to bend or break, but... this is really in a class by itself.
  • The keyboard is delicious.  For some reason I had the impression that macbook keyboards were bad, probably because of the silly placement of the 'ctrl' key if you don't re-map it.
    • Old school powerbook/linux and powerbook/emacs people, you'll know what I mean when I say this: capslock-as-ctrl doesn't stick.  In either OS.
  • It works well with Ubuntu, with a few minor caveats:
    • The bad news:
      • The 'fn' key is in software, which means I don't get pgup/pgdn/home/end or volume control keys in linux.  Also, the 'fn' key shows up in 'showkey' but not in 'xev' - it's not accessible to X for some reason. I don't know why this is, but it isn't really enough of an annoyance for me to bother with fixing yet.
      • Suspend has some issues around restoring the display properly when waking up.  I really don't care, so I'm unlikely to figure out how to fix this - I prefer the machine to hibernate when I close the lid anyway.
    • In general, however, lots of things worked out of the box or with minimal tweaking in linux:
    • sound
    • video (with accelerated 3D)
    • bluetooth
    • USB
    • firewire
    • wired ethernet
    • hibernate
    • CD/DVD burning
    • 3-button mouse emulation (using right-apple and enter keys as middle and right click)
The real litmus test for this laptop was that, immediately after purchasing it, I ended up having to drive all over Quincy for some reason, while also trying to catch up on several days of work.  The laptop performed like a charm; I connected to seven or eight different wifi networks, wrote several hundred lines of code, hibernated and resumed half a dozen times, sometimes just snapping it shut and tossing it in my bag without worrying about heat issues (the vents are along the top of this machine, where the bag is open, instead of along the side where they'll be instantly blocked).

This experience was actually quite pleasant, devoid of the usual "new laptop that doesn't quite have all the drivers installed" experiences I've come to expect.  Edgy can take some of the credit for this, of course, but the macbook itself is fast, light, comfortable to use, and has good battery life.

A Graphical Guide to Getting your God Damned Bluetooth Modem to Work Again in Linux (Ubuntu Edgy)

Much to the chagrin of my cell phone company, I use Bluetooth tethering to provide myself with always-on internet connectivity so that I can always be connected, even when traveling unexpectedly.  It's shocking how often I end up in areas without wifi coverage of any kind, but such is the world we live in.

For the fifth time now, I have managed to convince myself that configuring this in Linux is really easy, and not bothered to back up the one or two critical tidbits which allow it to work.  Also for the fifth time I have found myself in a situation where I needed to use my phone as a modem through my laptop and have been in an awkward situation because I could not.  For myself as much as for anyone else, I'm going to post the instructions for getting a bluetooth tethered modem up and running quickly under Linux, using GUI tools as much as possible.  Other tutorials that I've found for setting this up are rambling monstrosities that cover everything from a threat analysis of bluetooth security to a 1000-line-long configuration for command-line ppp dialer, so I am aiming to just provide a brief overview of how to get the phone up and running.  These instructions are fairly generic, but in my particular case, they apply to Cingular, the Nokia 9300 smartphone, and Ubuntu Edgy.
WARNING: BE AWARE OF THE BILLING IMPLICATIONS OF TETHERING BEFORE YOU FOLLOW ANY OF THESE STEPS, EVEN IF THEY SOUND NEAT.  CELL PHONE COMPANIES HATE TETHERING LIKE RED SOX FANS HATE YANKEES FANS.  THEY WOULD MUCH RATHER SELL YOU A MUCH FASTER AND BETTER DATA CONNECTION THAN ALLOW YOU TO USE YOUR PHONE IN THIS CAPACITY.  TETHERING DATA IS NOT BILLED THE SAME AS DATA ON YOUR DEVICE, YOU MAY INCUR EXTRA CHARGES EVEN IF YOU HAVE A VERY GOOD DATA PLAN FOR YOUR SMART PHONE.  TETHERING ON A DEVICE IS NOT THE SAME AS USING A DATA CARD EVEN IF BOTH ARE ON THE SAME ACCOUNT, AND YOU WILL INCUR EXTRA CHARGES FOR THAT.  IF YOU DO NOT HAVE A PREVIOUS AGREEMENT WHICH YOU ARE VERY SURE GRANTS YOU A LARGE AMOUNT OF TETHERING BANDWIDTH, DOING THIS MAY RESULT IN THOUSANDS OF DOLLARS IN DATA CHARGES.  I AM NOT LIABLE IF THIS HAPPENS TO YOU.  YOU HAVE BEEN WARNED.
Ahem.  Now that that's out of the way, let's move on to the main event.

Step One: make sure your bluetooth device is up and running.  This should happen automatically in edgy, so if you don't see output like this, it is unfortunately likely that your device is entirely unsupported.  You might try restarting your bluetooth device if it isn't visible here.



Step Two: Once you know your device is there, you'll need Linux to talk to your phone.  Scan the area for your phone, and then discover what channel your phone provides Dial-Up Networking (DUN) on.



Step Three: As root, edit /etc/bluetooth/hcid.conf and change the 'security' to 'auto'.  I've found that other methods for communicating the PIN are less reliable.  If you want to change your PIN, edit the "passkey" here.



Step Four: as root, edit /etc/bluetooth/rfcomm.conf to bind "rfcomm0" to your device's modem functionality.  Make sure to set both the "device" and the "channel". from Step Two.



Step Five: install the "gnome-ppp" package.  This is a nice graphical dialer that integrates well into the desktop.



Step Six: Run gnome-ppp.



Step Seven: In the initial window that comes up, enter any username and password that you like.  These are usually ignored by your provider, but they must be present.  I use 'user' and 'pass'.



Step Eight: Click the "Setup" button, and configure:
  • your Device to be "/dev/rfcomm0"
  • your Type to be "USB Modem"
  • your Speed to be something nice and high


Step Nine: Click "Init Strings" and type in the obvious strings that come to mind:
  • ATZ
  • AT+CGDCONT=1,"IP","isp.cingular"


Step Ten: Completely stop and then start your bluetooth services to make sure your phone is available.



Step Eleven: Click "connect" in gnome-ppp.  You will have to enter a PIN on your phone.  Hopefully, this will happen:



Then, the dialog will disappear and an icon will appear in your notification area telling you about the PPP connection.  There you have it!  Cellular internet connectivity, as easy as AT+CGDCONT=1,"IP","isp.cingular"!

I have absolutely no idea how, or why, any of this stuff works.  If the above steps don't work for you, unfortunately, I will not be of much help; I don't know how to diagnose problems other than googling around and running long bluetooth command lines that I don't really understand.  Still, I've been lucky enough to get it working every time after only a little banging my head against a wall.  Good luck!

Thoughts on Thoughts

I am in the market for a new computer, and it will almost certainly be a Mac.

Last week, I discovered that, with Vista, Microsoft has finally crossed the line between "pragmatic compromise" and "dangerous decision".  I have never been really comfortable with having a Windows machine that required "activation", but it's been worth it mainly for access to certain bits of software which are hard to get elsewhere.  I generally buy new computers with Windows installed to get the discount and avoid the hassles.  (Sure, Linux seems like a pain compared to Windows when setting up new hardware, but have you ever tried to get Windows bootstrapped?  From scratch?)  The new "premium content protection" garbage in Vista is such a terrible disaster waiting to happen that both the moral and practical ramifications of buying new Windows hardware have finally become overriding.

The first option I considered was System 76.  I desperately want to sing their praises, but the only experiences I've heard of with their laptops so far were decidedly ... lackluster.  Their service is apparently excellent though, and I will continue to consider them for future hardware purchases (the idea of not having to screw around with that one last fiddly device driver in my Linux setup is certainly appealing).

While I use, and will indefinitely continue to use, Linux for my day-to-day computing and development needs, having more than one major OS around is extremely handy to run the occasional bit of proprietary software.  Going over the pros and cons of Mac vs. Generic Windows hardware...

PRO CON
  1. I already know a few people who use Macs.
  2. Apple has already done right by me in the recent past, as the only company to contribute both software and hardware to the Twisted project.
  3. The MacBook is actually a fairly cost-effective way to get a reasonable Core 2 Duo setup.
  1. No Half Life games.
  2. Only one button on the trackpad.
As you can probably tell, I was already leaning in the "Get a mac" direction.  I still lacked a sense of real urgency or desire to get the new machine.

Then, today, I saw the latest from Jobs: Thoughts on Music.  In it, he lucidly declares the emperor naked and asks if maybe he would like to put on some clothes.  In a nutshell, he says DRM is obnoxious, ineffective, and extremely expensive.  Most importantly, he claims that Apple would prefer to support a DRM-free music store.

I could, of course, interpret this cynically as a publicity stunt, since there seems to be about zero chance that the big four music publishers will get their heads out of their asses before they're all bankrupt, but it wasn't offered as a sound byte or a press release.  It's in a sort of essay format and I get the impression that he is really trying to convince the reader that this is what he thinks is best, and he hopes it will happen.  Heck, if there anyone who can make it happen it's probably Jobs.

(I think I'll get the black one.)