PROGRAMMING

The story of dpaste.com 2.0

Eight years ago, I launched a simple pastebin site written in Django. In those early Django days I spent a lot of time in the #django IRC channel. I thought we should have a pastebin that knew how to correctly colorize our code, and which was written in our framework to boot. So I wrote one. Eventually its URL ended up in the channel topic, then in the Django source code itself.

Creativity and Constraint

O’Reilly Media recently asked in their “Programming Today” newsletter: For many old-school software engineers, developing code has always been as much an art as a science. But as the industry focuses more on practices such as Test-Driven Development, and Patterns become the lingua franca of programming, is there any room left for real creativity in coding? Or, has it become an exercise in cookie-cutter production, putting together components in new ways, but without any real room for individual style?

Branching and merging in real life

At work I still mostly use Subversion for version control. Its main selling points: stable, performs as expected, integrates nicely with Trac, holds all our old stuff (legacy inertia). Note that “pain-free branching and merging” is not on that list. (And don’t give me the old “branching is cheap in svn!” line. It’s not about the branching, it’s about the merging.) A couple years ago I started also using Mercurial and plan to eventually replace svn with it entirely.

Aesthetics and computation

This evening, the Western Mass. Developers Group was treated to a talk by Ben Fry of Processing fame. It was excellent and inspiring. Having not much prior exposure to Processing or his work, I left hungry for more. (The title of this post is taken from the name of the group at the MIT Media Lab where Fry did his PhD work.) I liked the graphical-REPL flavor of his live demos.

A tiny little dpaste.com API

When I created dpaste, I tried to make it both a simple browser-based tool and a simple RESTful API. With very little work you could write a script that created a new paste item with a single POST. Over the life of the site a few people have discovered and played with that “secret” API. I’ve now made it a bit more official. The new API has its own URL (versioned, even!

Making your way from PHP to Python and Django

“I’m a PHP programmer and I want to check out this Django thing. What should I do?” I’ve been seeing this kind of question pop up more and more, and I have a few answers. First-hand experience as well as many conversations with developers online have led me to the same conclusion: the curious person behind such a question should be encouraged and assisted. (I’ll call that person “Pat” for the rest of the post, for convenience and conscientious gender-neutrality.

Programming and Ice Cream

There are connections between programming and my favorite ice cream. In our new book on Django, I used the sentence “My favorite ice cream is Herrell’s” in some example code where I needed text – a tribute to my favorite local ice cream parlor. Walking by Herrell’s this afternoon, I saw Steve Herrell inside. Because I had a copy of my book with me, I decided I’d see if he wanted to take a quick look at the code snippet.