Tag Archive | Software Engineering

Software Testing: How much is enough?

At a recent job interview, a colleague of mine posed the following hypothetical for the candidate. If a software bug was only reproducible five percent of the time, how many tests would be required to prove it was fixed?

Having just recently read Nate Silver’s “The Signal and the Noise“, I recognised this as a problem that Bayes’ Theorem could be used to provide some insight. As a result I decided to analyse the issue.

Read More…


Ini files and Apache Commons Configuration

[tweetmeme source=”gosub3000”]

Trashing old software

Trashing old software

The project I’m currently working on uses a simplistic object store for persistence.  The original authors, in their collective wisdom, decided that whenever something needed to be saved they would save it to a hashtable, and use Java serialization to save that to a file.

In a way I can see why they did. It’s a quick way of getting a simple to use object store.  The project has been through several revisions since, but the data store stayed the same.  It should have been replaced with something more robust a long time ago.  I’ll explain more after the jump …

Read More…

The Perfect Build Setup – Hudson

[tweetmeme source=”gosub3000”]


I have had a passing acquaintance with Hudson for some time, but it is only recently that I’ve had to get down and dirty with it.  For one reason or another, much of the build infrastructure work for my current project has fallen on me.  This has allowed me to become much more involved with Hudson on a daily basis, and I have to say I’m loving it.

Hudson is a continuous integration environment.  We have configured it to check code out of our subversion repository on a regular basis, run the build scripts, gather the cobertura code coverage, junit test reports, findbugs reports, etc., and have these metrics published and trended over time.  I think I can speak for my team when I say, we’ve found it a boon to be able to regularly build our system in a clean environment, and gain such insight into our code quality.

So without further ado, I present instructions to allow you to set your own build system up in 20 minutes or less.
Read More…

Design Patterns

Introduction to Design Patterns

Within each engineering discipline, engineers have found that when analysing problems, similar types of sub-problems would tend to recur from time to time.  Having had experience from previous project work, they knew that a similar solutions to those problems could be reused.  This became the basis for design patterns.
Read More…

Unified Process vs Agile Processes

[tweetmeme source=”gosub3000”]

Introduction to the Unified Process

The traditional view of system implementation is seen as a series of steps toward implementation, covering areas such as analysis, design, construction, documentation, handover, etc.  Hay (1997) gives a good undertaking of the traditional approach stating:

Read More…

Getting Subversion Revision in Ant

[tweetmeme source=”gosub3000”]
Here’s a nifty Ant snippet. This can be used to get the Subversion revision number from your Ant build system. Using this, you can label your build artefacts, providing better visibility on what exactly is contained in each build.

<target name="find_revision" description="Sets property 'revision.number' to the head svn revision">
        <property name="revision" value="HEAD"/>

        <!-- find out revision number of HEAD, need svn.exe installed on local machine -->
        <exec executable="svn" outputproperty="svnlog.out">
            <arg line="log ${homedir}/.. -r ${revision} -q"/>


        <!-- need ant-contrib.jar for this in lib dir of ant install -->
        <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
        <propertyregex property="revision.number" input="${svnlog.out}" select="\1">
            <regexp pattern="r([0-9]*)"/>

        <echo>Revision found: ${revision.number}</echo>
%d bloggers like this: