Medieval software construction : putlogging

Posted & filed under Software Engineering.

Medieval castle

It’s not as bad as it sounds! A putlog hole is an affordance in medieval construction that allows the structure to be built up. It has no real function other than to aid the construction of the building and is often filled in afterwards. The concept can be used in software construction too, especially if one indulges in TDD. (more…)

How to instantiate a happy Santa in Objective-C!

Posted & filed under iOS, Software Engineering.

It’s that time of year again when The Big Man gets on his sleigh and distributes prezzies to the kids. Unfortunately there’s a global recession in full swing and Santa’s bank manager wants some accountability from The Man In Red this time. In previous years Santa has tended to get quick loans or maxed out on his credit card to pay the Elves as although Santa is the front man, it’s the wee folk that do all the work of compiling lists and making presents to distribute. To make this as smooth as possible they’ve designed the Present Distribution Process (PDP):

The Present Distribution Process (more…)

Distributed SCRUM podcast

Posted & filed under Software Engineering.

Time for a coffee and a listen

Fascinating look into the world of software development

Posted & filed under Software Engineering.

I thought this article was rather enlightening. Some quotes that resonated strongly that I started ringing like a bell!

“…software skills are the most portable high-end skills on the planet”

“The really talented ones retain an evergreen ability to reinvent themselves around the latest, youngest technology layer, seemingly at will”

“The natural reaction that forms once a good developer recognizes his/her own value is to turn to either an individualist-mercenary mindset or a collectivist guild-like mindset”

On the philosophy of logging

Posted & filed under Software Engineering.

When your system is out in the wild, more often than not logging is the only way you can tell what’s going on if things go a bit wonky. Logging is your app’s way of saying something went wrong and why. Although I use the word “why”, the semantics aren’t that simple but the logs are the first stop in tracing the lineage of a fault. So it’s important to get it right and after seeing many logging patterns, both good and bad, my thoughts on the subject might be of some help to folk new to application logging.

The first question to ask yourself is, who’s doing the logging? Is it the caller or the callee? A common problem I see is what I’ll call Dispersed Logging. This is where the caller and the callee each have their own log files and tracking down a problem involves analysing both files and trying to sync dates and times, especially if the calling is done over JMS.

Dispersed logging (more…)

AMP Driven Development (AMPDD) in a confined space

Posted & filed under Software Engineering.

The following video follows Dan Pink’s talk about motivating creative people and how money doesn’t seem to work. You need AMP (Dan’s term) Driven Design (AMPDD – my terminology):

As William McKnight said in the 1930s:

“Hire good people and leave them alone” (more…)

Cycling and war: dealing with a project sniper

Posted & filed under Software Engineering.

Cat sniper

Every project has one. The sniper. They’re the person, usually a manager of some sort, who, by dint of them not being on the project, the project must therefore be crap and they let everyone on the project know that by hanging round things like the coffee machine or the corridor, or the toilet. The conversation usually goes along the lines:

“hey now! I see you’re on the Groove System Nine project. They’re using the Pod differentiator classes from Innovation Inc by all accounts. Not what I’d do. Nah. No idea why they’re using them. I’d use an open source alternative. Loads of them around. OpenPod. Check it out. Not heard of that?”

“No. Thanks for the heads up. What is the OpenPod?”

“aaaah. Well, you’ll just have to download it and play around. Not my place to say really…”

Sounds of the hand dryer, lots of throat clearing and the toilet door opening and closing. (more…)

Taking the first steps on a new project

Posted & filed under Software Engineering.

Work promotes confidence

Sometimes the best way I’ve found to get started on a small project is to start coding. Not on the project itself but on a side project. An agile spike if you like. It’s where I learn a new programming language or technology. I often start simple on the side and build up functionality as I go. When the main project needs a feature added, I’ll sometimes implement something similar on the side to see how it works. I’ll pare it down to the bare essentials and write a test for it to probe its functionality and when I’m happy I understand the feature’s technicalities I’ll migrate the code and tests into the main project. Over time, as I become more familiar with the technology area or language that was new to me, the side project falls away as I no longer need that level of experimentation. The tests do the job of the side project from then on. (more…)

no-raise API in Java

Posted & filed under Java, Software Engineering.

I’ve been reading Exceptional Ruby by Avdi Grimm to get a different perspective on exception handling and was pleased to see he recommends what he calls namespaced exceptions. In Java this is just bundling your own Exception classes as part of the API:

public class MatrixException extends Exception {
}

public boolean doSomething(File theFile) throws MatrixException {
  try {
    ... do something with a file
  }
  catch(FileNotFoundException fnfe) {
    throw new MatrixException(fnfe);
  }
} (more...)

Refactoring Java to smell nice

Posted & filed under Agile, Software Engineering.

Have you ever written a method in a Java class and then wished you could return two things from it? Have you also noticed a strange odour coming from your machine at the same time? That’s code smell! Any time you think you need to return two completely unrelated values from the same function means the method is trying to do too much. Let me explain with an example from the other day.

I’m in the latter stages of developing and testing a distributed provisioning system that I wrote in Java and has Apache Camel and ActiveMQ at its heart. One system I need to provision is Novell eDirectory and the messaging code basically boils down to processing an incoming User message and if it could create the account in eDirectory it sends a success message to the hub and also returns a a reusable MatrixConnection object which is passed in, in subsequent calls, for sending more success messages.

public MatrixConnection processUser(User user, MatrixConnection previousConnection) {
  createUser(user);
  return sendSuccessMessage(previousConnection);
} (more...)