Skip to main content

Posts

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 http://www.fossil-scm.org

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.)

*.o
*.a
a.out
*~
*.pipe
*.tar

For Windows, I would ignore these:

*.obj
*.exe
*.lib
*.tmp
*.$$$


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

*.jpeg
*.jpg
*.gif
*.bmp
*.mpeg
*.mpg
*.avi
*.flv
*.ico

Typing fossil settings binary-…

Checking your speed on Speedtest.net

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):

http://www.speedtest.net/results.php?sh=091c97772e987c5763e86d64ffbc999b&ria=0




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

http://speedtest.comcast.net


http://stage.results.speedtest.comcast.net/result/192919912.png