Archive for the 'Software' Category

A JSON Parser Using SimpleParse

Wednesday, July 21st, 2010

I’ve been reading the recent posts on CodeTalker with interest. I’ve written a handful of parsers using two different parser generators for Python: PLY and SimpleParse. My most recent work with parsing has had me gravitating toward SimpleParse so I thought I’d see how it stacks up against CodeTalker.
First I checked the web [...]

Rebasing to a New Branch with Mercurial

Friday, July 9th, 2010

I had a situation at work the other day where I had made a number of local commits to the default branch of my repo. I wanted to push them upstream to our central server but the feature was incomplete and I didn’t want to break anything in case someone needed to make a [...]

Getting Version Information from Mercurial

Thursday, May 13th, 2010

In an application I’m working on at work I want to be able to display various bits of version information in the UI. This goes for both production deployments from Python EGG files and in development running straight out of the repository.
We use Mercurial for revision control so it is a logical choice for [...]

My Take on Multiple Constructors

Wednesday, March 17th, 2010

I noticed the same question on c.l.p that Steve Ferg responded to on his blog. I was feeling too lazy to respond to the thread earlier but I thought I’d throw my idea up on the ol’ blog before wrapping up for the day.
I think this is a classic use-case for class methods. Here [...]

Tagged Revision Log Messages in Mercurial

Friday, March 12th, 2010

I work at YouGov and we use the Mercurial for revision control.
We tag every release in a MAJOR.MINOR.BUGFIX format. 2.32.2 for example.
Recently I wanted to get a summary of the commit log messages for each of the tagged revisions. Here is the magic command that got me the output that I wanted:

# get [...]

Evolution of a Haskell Function

Thursday, March 11th, 2010

I’m going through Real World Haskell trying to get a handle on the Haskell programming language. Python is my current language of choice, but I like to learn new programming languages too.

So last night I was going over the chapter that introduces ‘let’, ‘where’, ‘case’ and guards and I wanted to try them out. I contrived a simple situation where I thought I could use them.

Link: PiCloud Overview

Thursday, March 11th, 2010

Here’s a great overview of using PiCloud that goes beyond “hello world” type stuff.
For those of you who don’t know, PiCloud is a cloud computing platform for Python that aims to simplify the task of running code in “the cloud.”
cw

On Tree Houses and Software

Thursday, November 12th, 2009

From the ShopTalk blog:
The Minimum Viable Tree House
A case-study in what not to do with your software project.

Diesel

Wednesday, September 23rd, 2009

I’ve been working with some friends on getting a startup off the ground. We just released one of the core libraries that our software is built on.
Announcing Diesel!
cw

Odd Old-Style vs. New-Style Class Behavior

Thursday, May 21st, 2009

So we have some older Python code at work that uses old-style classes. We usually try and bring those up to date when we encounter them.
The other day one of the developers did that and one of our tests started failing. A simple change from:

class Foo:
# stuff here

to:

class Foo(object):
[...]