Learning from a failed deployment

This morning a deployment failed catastrophically. One of the scripts for upgrading the database caused several objects to be dropped unexpectedly. We restored the database from backup, corrected the script, and repeated the deployment, which was successful. We now had to do a retrospective to learn what went wrong and how to avoid it in …

Model-Based Testing

Robert Binder’s Testing Object-Oriented Systems book sits permanenly on my desk. At over 1500 pages long, it is almost a never-ending read, but from time to time I pause to read a few choice chapters. Binder also wrote about the compliance testing of Microsoft’s court-ordered publication of its Windows client-server protocols in 2012. An interesting …

The unit in unit-testing

Interpreted literally, unit testing means testing each class individually. Complete isolation is, however, difficult given that a class typically interacts with other classes. Therefore, for this definition of unit testing to hold, collaborating classes must be replaced with fakes in a test. But developers confront two main problems when using these mock objects. First, tests …

How we use SQL Server Data Tools

This post describes our process for developing databases with SQL Server Data Tools (SSDT) in Visual Studio. For it to work, the conventions below must be respected. Use the live database as the gold standard for schema objects (and data). Deploy only database projects that have been built successfully. Deploy to a database that matches the schema of …

Three golden rules to tackle complexity

Tim Newing, the IT director of Camelot, shares three golden rules to manage complexity in IT projects. Think of a collection of simple solutions instead of one complex project. Manage outside the ‘business as usual’. In other words, set up a different structure so that the project team is not distracted by the normal business. …

Three weeks with a MacBook Pro laptop

I have been using my MacBook Pro for the past three weeks. The MacBook Pro is a great laptop, perfectly suited for development work. The laptop delivers incredible performance, thanks to its Core Duo Intel CPU and the high-end ATI X1600 graphics chip. After using an iBook G3 for the past four years, I am …

How to identify and fix an anaemic domain model

In most CRUD applications, classes consist of many accessor methods and few behaviour methods. It is often difficult for developers to recognise this as a symptom of an anaemic model. Anaemic classes are characterised by having only methods for reading and for writing attributes. In addition to negating the benefits of object-oriented programming, such methods …

How to switch off a screen laptop under Linux

In this post, I describe how to write a shell script that switches off a laptop screen. The instructions are tested with Ubuntu Linux 5.10 (Breezy) on a Dell Latitude C810. First, set the governor for the CPU frequency with the following command. echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor This command can be run automatically at run-level …