Git and Other Time Machines
2012-09-27
I have revised my opinion. Git is complicated partially because it has a bad UI, and partially because parallel universes with time travel. Mercurial, having parallel universes but lacking time travel, is significantly easier to master.
A case may now be made that Git had a bad interface because it allows time travel. Time machines are notorious for terrible UI. Indeed, it is required by law in the state of California.
Read more →
Python Unit Testing Quickstart
2012-08-20
Suppose you want to write some unit tests in Python. What do? Fortunately, you already have a module called unittest (or unittest2 in Python 2.4-2.6) in the standard library. We’ll use that.
Directory structure First, create a directory named tests. Place an empty file named init.py inside. This distinguishes the directory as a package.
Next, create your first test file and place it in the tests directory. I called mine test_database.
Read more →