October 2011
2 posts
2 tags
The Point and Those Who Miss It
A lot has been said about Ted’s successful troll and the several responses that seem to miss the point—including mine. To that I say: if a point is never properly made, can one truly miss it? There are two reasons people are benchmarking Fibonacci in response to Ted’s post: Ted himself benchmarked it and concluded it was slow. This is wrong—it’s comparatively fast. But...
Oct 4th
5 notes
2 tags
Node.js Cures Cancer
I apologize for the title. But it’s no less accurate than this embarassing, poorly-reasoned article by Ted Dziuba. It’s flamebait, but I couldn’t resist. Sigh…here we go. First, Ted takes issue with this claim on Node’s homepage: Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers...
Oct 3rd
18 notes
September 2011
1 post
4 tags
So, you want to use require() in the browser...
You’ve written a bunch of JavaScript or CoffeeScript running on Node, which has helped you organize your code into modules, develop a test suite in any of numerous styles, experiment in a decent REPL, and take advantage of useful libraries. Now you want to deploy that code to the final frontier—the web browser. You have a couple options. A couple dozen, actually. Here are just the...
Sep 26th
40 notes
December 2010
1 post
3 tags
adminbrowse: Fancier changelist columns in...
I just released a new reusable Django app called django-adminbrowse on GitHub. This was factored out of a Django project I’ve been working on for a while. Ever wish it was easier to get around in the Django admin? Maybe you’ve deployed the admin site as a management tool for some less technical users? This project lets you easily spiff up changelist pages to include better text and...
Dec 3rd
October 2010
1 post
The Numbers: Day 70
More updates are coming! Erin and I will be taking a break from our trip next week in order to celebrate our birthday—October 30 for the both of us—back in Cleveland with friends and family. We’ll be in town from Wednesday, October 27 until Tuesday, November 2, when we’ll most likely continue our journey from Eugene, Oregon. Miles since Cleveland: ~2,000 Cycling days:...
Oct 24th
September 2010
3 posts
Days 12-14: Milwaukee
The ferry arrived in Milwaukee just as the sun was setting. As we hadn’t yet arranged for a place to spend the night, we debated skipping the city altogether and riding 20 miles south to find a camping spot. A light rain started to fall, so after sending some futile last-minute CouchSurfing requests, we booked a room at the Ramada Inn downtown. We showered at the hotel, and, having just...
Sep 30th
The Numbers: Day 34
Some quick data while I work on writing the backlog of our trip… Miles since Cleveland: ~1,000 Cycling days: 22 Leisure days: 12 Rainy days: 1 Nights camped: 6½ Nights in motels: 8½ Nights couchsurfed: 19
Sep 18th
6 tags
Days 5-12: Ann Arbor to Milwaukee
We made some changes to our route in Ann Arbor. Our plan was to pass through Kalamazoo, Michigan and Gary, Indiana on our way to Chicago. But we looked into taking a ferry across Lake Michigan when we heard that Gary might be a bit hazardous to our health and morale. So after enjoying the Lake Folk show and spending the night in Ann Arbor, we headed out for Lansing and Grand Rapids. We set...
Sep 18th
August 2010
2 posts
Days 1-4: Cleveland to Ann Arbor
Friends and family met us at Lakewood Park on Sunday to send us off—two days later than we originally planned. We finally hit the road a little after 3pm, but stopped at Century Cycles in Rocky River for some last minute supplies. The ride to Oberlin was slow, but we made it. It took us quite a few miles to get used to the weight of the bikes—each carrying about 50 pounds. There...
Aug 19th
Bike Adventure Gear, Part 1: Camping
Over the next few days, I’ll be posting all the gear Erin and I are bringing on our bike trip to Seattle. I’m a determined comparison shopper and bargain hunter, so every last item here was meticulously researched, and we got great deals on almost everything. Maybe these posts will save you some time if you’re planning a similar adventure! Today’s post: our camping...
Aug 6th
July 2010
1 post
The State of the Weblog
My media server is down, so some content may be missing (pictures, linked documents), and I’m using a temporary theme. My last day of work in Cleveland is one week from today. The week after that I’ll be riding my bicycle to Seattle with my girlfriend, camping and couchsurfing on the way. It’ll take us about five weeks, and I’ll be posting frequent updates here. Hopefully...
Jul 31st
April 2010
1 post
Serious Games talk at Case
I’ll be giving a talk on serious games at the next meeting of the CWRU Hacker Society on Wednesday, April 14th, 8pm in Glennan 313. The scope will be much wider than my previous talks on Unit Testing Achievements. A rough outline: What are serious games? How can they be applied to software? How do they affect behavior? What’s out there now? What’s left to be explored? ...
Apr 13th
February 2010
1 post
Achievement Unlocked
[This post is adapted from a lightning talk I gave at the Testing in Python Birds-of-a-Feather session at PyCon 2010.] One of those most fun advancements in video games in recent years is not about the improved graphics, or playing with hundreds of people at once. It’s that games have evolved beyond points. While a good point system may be a good indicator of a player’s abilities, it...
Feb 24th
January 2010
1 post
Jan 22nd
November 2009
1 post
Emergency party at my place
Dear Reader, You knew keeping this blog in your RSS reader would pay off one day, didn’t you? You did, right? Well now you can reap the rewards, my friend. There comes a time. You are invited over to my house on Friday, November 13 for a party and performances by several talented musicians. There will be a full bar. Also an actual, physical bar. Celebrated Clevelander Marta...
Nov 11th
April 2009
1 post
Apr 17th
13 notes
February 2009
1 post
Cleveland Code Co-op meeting on Sunday
The fifth meeting of the Cleveland Code Co-op will commence this Sunday, February 22, from 13:00 till 19:00. We’re expecting more participants than usual, and likely projects so far include: redit, a text editor in Ruby 80sheep, an ADC (peer-to-peer) client in Python a Python tutorial for beginners your wildest software fantasies This month’s meeting will take place in the EECS...
Feb 19th
January 2009
2 posts
1 tag
Python instance descriptors: when class...
Python descriptors are great for customizing access to attributes on a class or instance. They are a big win for tasks like mapping Python objects to data from non-Python sources (such as SQL), since mapped attributes will need to be encoded/decoded and connected to other attributes in some way. Below is a very simple descriptor; as you can see, accessing it from both the class and the instance...
Jan 29th
“The purpose of syntax highlighting is to turn your code into a map, not The Jimi...”
Jan 6th
1 note
December 2008
3 posts
geopy sprint at December C³ meeting
Today (Sunday) the third meeting of the Cleveland Code Co-op will be held from 1pm to 7pm at Gypsy Beans & Bakery. We’ll be focusing on geopy again, continuing our sprint goals from last time. All are welcome to attend. You can join us via IRC in #c3 on irc.freenode.net.
Dec 14th
Christmas tree adventure
I’ve never taken the time to get a Christmas tree while living on my own before because, honestly, Christmas doesn’t mean much to me. But having moved into a spacious single-family carriage house with Steve, it sounded a lot more fun to drag a big needly tree into my living room this year. Today Mandy and I drove all the way out to Tower-N-Pines Farm to cut down our own tree. We...
Dec 14th
Dec 3rd
November 2008
1 post
3 tags
geopy sprint at November C³ meeting
After suffering from over a year of poor maintenance, geopy is finally getting some love this month. A few other developers and I will be focusing on geopy at this month’s Cleveland Code Co-op meeting. We’ve come up with an ambitious todo list, including: Merging pending patches (bug fixes, Python 2.3 support, accuracy support) Adding unit tests Reverse geocoding support (finding...
Nov 5th
October 2008
8 posts
2 tags
Oct 31st
Oct 29th
4 notes
2 tags
Simple scheduled message queue (with threads)
Here’s a more flexible version of the message queue in my last post. This version uses the threading module instead of processing, so it has no dependencies. See the new example after the code. """ Simple message queue. Messages are scheduled and processed in a single worker thread spawned from the main process. Thus, events are enqueued asynchronously, but processed in a linear...
Oct 18th
3 tags
Simple scheduled message queue in Python
Here’s a very simple message queue using Python’s sched module and processing (available as multiprocessing in Python 2.6). This lets you asynchronously schedule events to occur at a specific time. It would be very easy to modify this to process messages with a pool of workers, or use threading instead of processing. There is one thing I could use lazyweb’s help with: find...
Oct 18th
Cleveland Code Co-op →
This Sunday will be the first meeting of the Cleveland Code Co-op. Our goal is to contribute to a different Free Software project at each session, determined by the interests of those present. This Sunday will be a Django sprint. All are welcome to attend.
Oct 15th
3 tags
Oct 8th
Oct 7th
2 tags
Python talk at October Clepy meeting →
This Monday (October 6th) at Clepy, I’ll be giving a talk about the ingredients for creating DSLs in Python. These ingredients include deferred expressions, the generative/builder pattern, metaclasses, and descriptors. See the meeting announcement for details.
Oct 6th
September 2008
2 posts
Distributing media with Django apps
Reusable Django apps have a sore spot right now: media. Introduction Django takes a hands-off approach to your media files. Your project has two settings, MEDIA_URL (the base URL where your media is located) and MEDIA_ROOT (the filesystem path where media files are stored). The only thing it does with these is put FileField files under MEDIA_ROOT. The rest — collecting the required...
Sep 20th
2 tags
django-batchadmin: Batch actions in the admin...
I’m releasing a new project tonight: django-batchadmin. It looks like this: Plenty of people have done this before with recipes or patches. But this is a project, and it’s distributed as a Django app, not with copy & paste or a diff. Also, since it’s being released post-1.0, it uses the latest and greatest in newforms-admin features. The app is very minimal but...
Sep 15th
July 2008
2 posts
Texts Rasterization Exposures →
As the guy who notices when a single pixel is off, I love this article about font rasterization. I’ve had it bookmarked for at least a year and sometimes read it just for fun.
Jul 16th
The New Yorker: I have to pay a lot of taxes living in New York City. What about you, are you a taxes guy?
Chris Onstad: I pay almost all the major taxes, and I’m also part of a local program in my town where we pay experimental taxes to see if we get mad.
Jul 10th
April 2008
1 post
3 tags
Dumb little obscure languages →
The level of complete misunderstanding here is absolutely hilarious.
Apr 14th
March 2008
3 posts
2 tags
Menu buttons in 20 lines of jQuery
This is my approach to menus using jQuery. I’ll go through it line by line to serve as a mini introduction to events in jQuery. Here’s a preview of what we’re making. The desired behavior: Clicking on a button opens its menu Clicking anywhere except inside the menu closes it I use two elements per menu: a button and a div. Clicking the button makes the div appear. The...
Mar 28th
1 note
2 tags
Rendering search results in Django
This weekend I wrote a Django tag & filter module for rendering search results. The primary feature is truncating a body of text to show the search terms in context, just like Google shows you an excerpt. A decent text indexer will normally provide this, but most of my projects aren’t big enough to justify setting one up, so I make do with normal database queries. Examples and...
Mar 24th
2 tags
jQuery: Animated Hover Effect (ahover)
Some days I wake up and feel like writing some JavaScript. I’m a big fan of jQuery and designing interfaces and interactions, so today I made a simple plugin for making animated hover effects. Besides just triggering custom animations—which is easy enough to do without the plugin—the idea is for the hover effect to be able to slide smoothly between hovered items and grow or shrink...
Mar 14th
February 2008
2 posts
Pagoda finds help in NYC
Ian and I spent the last week of January in New York City staying with some friends. While visiting, we had a chance to meet up with Michael Bayer, developer of SQLAlchemy. As I’ve discussed before, we rely on SQLAlchemy’s advanced mapping features for Pagoda’s database layer. Unfortunately, after spending months developing many different solutions to our problem, we still...
Feb 11th
Every employee's dream come true
Rumor has it that Yahoo! employees are not too thrilled with Microsoft’s offer. “Microsoft’s just not evil enough for us” seems to be the general consensus. It was with great pleasure, then, that news sprung up yesterday about a possible offer from News Corporation (owned by conservative media tycoon Rupert Murdoch). Word had gotten to Murdoch that Yahoo! was...
Feb 2nd
January 2008
4 posts
“I hear that in Internet Explorer 9, to get the most standardest standardy...”
– James Justin Harrell (via)
Jan 23rd
Identity adventures
I just had a phone conversation with a nice Texan girl. She thought I might be a teacher of the same name who helped her put modelling photos on the Internet some time ago. Didn’t catch your name, but good luck. A dude named Larkeese has been text messaging me for the past week wondering what I’m up to. Tonight I learned that he’s trying to hook up with someone named...
Jan 10th
RTA Schedule improvements since launching v2
Fixes Adding any route resulted in an error for a while. This has since been fixed as evidenced by the long list of routes. I only added a few, the rest were all you! Route 67X/AX works now. Better support for filtering stop names with punctuation. Fixed most of the Internal Server Error responses caused by database locking. Improvements Added a button for compacting the route list now that...
Jan 8th
1 tag
PyCon 2008: Awkwaaard
All this comment thread needs is for Guido to show up and announce that he’s forking the language, “and I never even liked your code anyway!” Don’t you see? This is exactly what They want to happen!
Jan 3rd
December 2007
20 posts
“I feel like I’m “blogging” at a rich friend’s house. It...”
– Chris Onstad
Dec 28th
Dec 24th
“Do you have 20 years of experience, or the same year of experience 20 times?”
– Andy Hargadon (via → via → via)
Dec 23rd
2 tags
Dec 23rd
2 tags
highlight.js language file for Python profiler...
Chances are slim, but if you happen to use highlight.js for your syntax highlighting (highly recommended unless you’re doing it server-side) and also want pretty Python profiler output, just drop profile.js into highlighter’s languages directory. Don’t forget to load the ‘profile’ language and give it some style. Mine looks like this: 5765127 function calls...
Dec 23rd