Archive for the 'Software' Category

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):
[...]

Caching HTTP Responses with CherryPy

Wednesday, February 25th, 2009

The most basic case is very simple.

import time
import cherrypy
 
class WebSvc(object):
@cherrypy.tools.caching(delay=300)
@cherrypy.expose
def quadruple(self, number):
time.sleep(1) # make the real call somewhat costly
return str(int(number) * 4)
 
cherrypy.quickstart(WebSvc())

That uses an in-memory cache and [...]

HTTP Utilities with CherryPy

Thursday, January 8th, 2009

Eric Florenzano posted a detailed blog entry on creating fast web utilities with bare WSGI. In the blog he shared that the larger Python web frameworks are overkill for small utility-like applications. He then proceeded to build a small utility app that conforms to the WSGI spec.
I like to use CherryPy to write [...]

My Solution for the Auto Industry (and the Economy In General): Smaller, Faster, Leaner

Saturday, December 20th, 2008

Ok, this post is on a controversial issue, and I’m entitled to my own ridiculous opinion. Therefore …
The fact that we have 3 major automakers in the US that our economy apparently hinges upon is a problem. From the news, the talk is that a failure of any of them is disaster.
The problem [...]

Useful Diagramming Web Application

Friday, October 17th, 2008

I stumbled across Web Sequence Diagrams the other day.
It’s a web-based diagramming application that uses a simple syntax to generate UML diagrams. No clicking around and positioning little boxes all over the place - just type in text that describes the diagram, and voila, there it is. He even provides a number of [...]