Archives
-
Using Haskell’s ‘newtype’ in C
A common problem in software engineering is avoiding confusion and errors when dealing with multiple types of data that share the same representation. Classic examples include differentiating between measurements stored in different units, distinguishing between a string of HTML and a string of plain text (one of these needs to be encoded before it can [...]
Oct 11th, 2010 | Filed under Software Engineering -
Some musings on ORMs
I’m pretty sure every developer who has ever worked with a modern database-backed application, particularly a web-app, has a love/hate relationship with their ORM, or object-relational mapper. On the one hand, ORMs are vastly more pleasant to work with than code that constructs raw SQL, even, generally, from a tool that gives you an object [...]
Jul 18th, 2010 | Filed under Software Engineering -
Check Plus: An EDSL for writing unit tests in C
Check is an excellent unit-testing framework for C code, used by a number of relatively well-known projects. It includes features such as running all tests in separate address spaces (using fork(2)), which means that the test suite can properly report segfaults or similar crashes without the test runner crashes. My main complaint about Check is [...]
Jun 26th, 2010 | Filed under Software Engineering -
Confessions of a programmer: I hate code review
Most of the projects I’ve been working on today have fairly strict code review policies. My work requires code review on most of our code, and as we bring on an army of interns for the summer, I’ve been responsible for reviewing lots of code. Additionally, about five months ago BarnOwl, the console-based IM client [...]
Jun 6th, 2010 | Filed under Software Engineering