Skip to main content


Showing posts from December, 2012

Thought exercise - how do you unit test declarative programs?

Unit testing has traditionally been a process of writing tests for a piece of imperative programming.  For example, if you want to write a function that converts a piece of text to upper case, you'd write a series of tests to verify that lower and upper case strings of varying contents (and contexts like UTF-8) are converted correctly.  But the declarative version would simply be a fact.  How would you unit test that?

Well, one thing that comes to mind is the idea of testing consistency between declarations. In other words, you'd want to make sure that you didn't have declarations that were inconsistent between one another.  But what would that look like?

For the above example, you'd provide declarations such as:

given a lower case string, return an all upper case stringgiven an upper case string, return an all upper case stringgiven a mixed case string, return an all upper case stringOnly alphabetic characters need be converted. (This feels a lot like a functional prog…

So you want to use Fossil DVCS as your SCM solution? Here are some first steps.

First steps when using Fossil SCM.

Download the executable from

Depending on your programming language and operating systems, you'll want to make sure you ignore certain kinds of file extensions.

You might want to create a configuration file and store it in fossil for use in other fossil setups.  The configuration file goes into the top level directory under a folder called ".fossil-settings".  The filename matches the configuration setting, thus it is called "ignore-glob".

For unix/linux, I would ignore the following file extensions (you can put one per line or separate them with commas. I'll use the per line convention here.)


For Windows, I would ignore these:


Next, you'll want to decide on binary file for the purpose of merging. These go in the .fossil-settings/binary-glob file:


Typing fossil settings binary-…

Checking your speed on

SpeedTest.Net is really handy when you're trying to find out how fast your connection really is.

You can see my results (in the Baltimore-Washingon DC area):

If you're a comcast customer, you can try their app.  The numbers I got seemed in line with