OpenCover in Jenkins

Posted on Mon 24 October 2011 in Tools • Tagged with ci, coverage, pain

I just updated my Jenkins job for TestNess to use OpenCover to measure code coverage.

Previously, I used PartCover. The setup of PartCover was quite painful. The first error came when I tried to build the source code from a directory path that contained a space. Then, I ran into …


Continue reading

Code demo using git, part 2

Posted on Mon 17 October 2011 in Tools • Tagged with git demo

In my first post about using Git for doing a code demo, I mentioned in passing that making local changes during the demo can mess things up. I thought I’d mentioned some more about cleaning up local changes.

The cherry-pick method

Cleaning up local changes when using the cherry-pick …


Continue reading

Uniprocessor HAL to multiprocessor HAL in Windows

Posted on Mon 17 October 2011 in Tools • Tagged with hal, multiprocessor, windows

The other day, I decided to “upgrade” my virtual Windows 2003 server by doubling the memory size and adding an extra CPU. The memory was not an issue, of course, but the extra CPU turned out to be. Although Device Manager picked up the correct number of CPUs under Processors …


Continue reading

My .screenrc

Posted on Mon 17 October 2011 in Tools • Tagged with screen

Posted mostly for my own sake, since I need it each time I create a new VM, and I always end up googling for it.

I found my favorite .screenrc here. For easy copying:

vbell off
autodetach on
defscrollback 10000
startup_message off
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended …

Continue reading

Code demo using git

Posted on Mon 10 October 2011 in Tools • Tagged with demo, git

I’m very fond of git for many reasons, one being its changeset-based commit model. Today I ran a demo of some code for a customer, and I used git as a demo driver - much like a TV chef brings out stuff he or she has prepared earlier. There are …


Continue reading

Cancer.js?

Posted on Thu 06 October 2011 in Opinion • Tagged with algorithm, complexity, infrastructure

A colleague made me aware of this post by Ryan Dahl, the author of Node.js, where he complains that most software is overly complicated, that the whole software situation is messed up and that all that matters is the end user experience. In a response to his own post …


Continue reading

When security gets in your face

Posted on Sun 02 October 2011 in Sysadmin

When I started writing that post, I kept getting HTTP 406 Not Acceptable errors from the web server as I tried to preview it or save a draft. I managed to narrow down the cause of the problem to two seemingly innocent words: test and method. Whenever my post contained …


Continue reading

On discovering Test-Driven Development

Posted on Sat 01 October 2011 in Coding • Tagged with TDD

Test-Driven Development (TDD) is a programming practice that to me is an immensely useful quality assurance tool. In brief, TDD is about writing unit tests first and letting the unit tests drive the design of your code. Some of the most important benefits are:

  • The public API your create becomes …

Continue reading

Test data provider using Python metaclass

Posted on Sat 01 October 2011 in Coding • Tagged with metaclass, Python, test

In my airpnp project, I had to write a binary plist parser in order to parse certain data posted by iDevices. To support my unit tests, I created a number of binary plist files using an existing tool. I ended up with 17 files, and quickly realized that I wanted …


Continue reading

Mocking Zope interfaces

Posted on Wed 28 September 2011 in Coding • Tagged with mock, test, python

In one of my pet projects I use Twisted for handling asynchronous network events. While browsing the Twisted source code, I encountered Zope interfaces. In a dynamically typed language like Python, what good are interfaces?

It turns out that Zope interfaces are slightly different from interfaces found in a statically …


Continue reading