I'm Paul Bissex, and e-scribe.com is my consulting business. I build web applications using open source software, especially Django. In the '90s I did graphic design for newspapers and magazines. Then I wrote technology commentary and reviews for Wired, Salon.com, Chicago Tribune, and lots of little places you've never heard of. Feel free to email me.
I'm co-author of "Python Web Development with Django", an excellent guide to my favorite web framework. Published by Addison-Wesley, it is available from Amazon and your favorite technical bookstore as well.
Built using Django, served by Apache and mod_wsgi. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive. The markup engine is Markdown.
Akismet, bitbucket, del.icio.us, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, Markdown, Mercurial, OS X, Postfix, Python, Review Board, S3, SQLite, TextMate, Ubuntu Linux
At least 96057 pieces of comment spam killed since January 2008, mostly via Akismet.
For a long time I've wanted to try working with Bicycle Repair Man, the Python refactoring tool. Unfortunately, the fact that it had neither documentation nor integration with my favorite editor kept pushing it to the back burner.
About a month ago I was excited to come across a post from a guy named David Coffin who had created a BRM integration script for TextMate. I hooked it up per his instructions, and with a little fiddling I got it working. The first thing I tried was the Extract Method or Function command. I had code something like this (structurally, I mean):
def funfacts(string):
l = len(string)
a = string.count('a')
u = string.upper()
print "Length: %s Number of a's: %s Uppercase: %s" % (l, a, u)
I selected the three assignment lines, ran the "Extract Method or Function" command, and typed a name for the new function (funfacts_helper) into the dialog. I hit return and my code changed to this:
def funfacts(string):
l, a, u = funfacts_helper(string)
print "Length: %s Number of a's: %s Uppercase: %s" % (l, a, u)
def funfacts_helper(string):
l = len(string)
a = string.count('a')
u = string.upper()
return l, a, u
Cool. Now, people who have been using fancy refactoring IDEs for a long time may just laugh in their sleeves that I was impressed by this, but I was. This is great timing for me since I expect my copy of the Refactoring book to arrive any day.
David's biketextmate.py script supports five BRM commands: Rename, Find Definition, Extract Method or Function, Inline Local Variable, and Extract Local Variable.
I decided this thing needed to become a proper distributable TextMate bundle. (I actually have commit privileges in the bundle repository, not that you'd know it from my activity in the past year.) I made some minor changes to the biketextmate.py script, mostly to improve handling of file paths with spaces. Boy, did it take me a stupidly long time to figure out where those errors were coming from.
Anyway, please try it out and provide feedback. You'll need to install Bicycle Repair Man (try easy_install bicyclerepair), then fetch a tarball of the bundle -- or get the latest via Subversion:
svn co svn://open.e-scribe.com/python/misc/biketextmate
I don't have contact info for David, but I'm posting a comment on his blog pointing here. So David, if you're reading this, feel free to take my work and run with it, assuming you find it useful.
Have you still been using Bicycle Repair Man? Worth installing?
Thanks for reading! Please note: Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.
Booktools
2 comments
A different kind of URL shortener
4 comments
The syncbox
2 comments
Branching and merging in real life
8 comments
Summer Spam
1 comment
malpaso
Understanding tuples vs. lists in Python
13 days ago
vj100
Understanding tuples vs. lists in Python
13 days ago
scott
Bicycle Repair Man bundle for TextMate
19 days ago
Jasmine
Trying to send eBay a message?
56 days ago
Smok Cigs
Let's play a game: BASIC vs. Ruby vs. Python vs. PHP
93 days ago
Copyright 2012
by Paul Bissex
and E-Scribe New Media
I couldn't get to the repository anymore but I downloaded the tarball. It has a slight conflict with the latest version of Bicycle Repair Man. You have to change all the brm.findDefintion() calls to brm.findDefinitionByCoordinates().