The Anti Screen Saver

Build information radiators are useful for improving the visibility of the state of the build – bright green if it’s good, or bright red if it’s broken. On our current project we’ve been trying to assemble all the hardware to get some lava lamps going, but in the meantime we’re using a very old PC and its tiny CRT monitor to glow bright green or red.

A problem we had was the Power Options settings turns off the monitor after 20 minutes of (in)activity and it’s been too difficult to get Administrator privileges for the machine. Although not necessarily the most ideal solution, the most amenable one for Friday was a small program that moves the mouse cursor every the minutes. Get the results here if you want.

Usage:

java -cp MouseMover.jar <number of minutes each time you want the mouse moved>

Jumping through too many hoops just to complete one loop?

Feedback Loop of Java ProgramsOne of the benefits you get with consulting is that you get to see a variety of applications, processes, and in agile projects, different build pipelines. I take the developer loop very seriously, because how quickly you can get feedback determines how quickly you get serious things done. Different testing strategies are an important way of improving the amounts of feedback (as long as you can still write meaningful tests). Another technique is the ease with which you can configure various libraries, integration points and environments. Even splitting the build into various stages where failing earlier is more appropriate can help you get better feedback.

Feedback Loop of Interpreted LanguagesThe ultimate feedback loop I’ve seen in Java is the “change-compile-run test” loop. Anything more and you will decrease your feedback cycle and adversely affect how fast you can develop. Anything less than this is unacceptable – skipping the “run test” stage doesn’t do anything to validate that what you wrote actually works. On a side note, in an interpreted language, the loop is even tighter, simply being “change-run test”.

J2EE’s “Enterprise” Feedback Loop
I’ve worked on numerous J2EE systems that were all business successes. As a developer though, it still makes me cringe thinking about the feedback loop, and how long it takes to make a change to a class, or one of many, many XML files, jar up something several times, and then actually test it.

Feedback Loop of J2EE Applications

Optimising Your Build Loop
Visualising your build process is an excellent way of seeing exactly how many hurdles you have to go through to get any decent feedback. Even better is trying to work out which things you *really* need in a build and removing anything that just doesn’t add any value. I try to aim for the simplest and fastest feedback that you can get using the above diagrams as the ultimate goal. Give it a go!

It’s Never Been About The Hours

StopwatchI started at a new client yesterday, and we had a great conversation on my thoughts about working overtime. Anyone who has worked with me in the past knows that as a principle, I heavily dislike working overtime. I think I provided some pretty good reasons and thought I’d write about it.

I am a big believer in the “Sustainable Pace” concept because I think that quality software development is a limited resource. Even though I dislike working long hours, they’re inevitable because of various reasons, and when I’ve worked long hours, and witnessed other working long hours, I’ve observed developers get tired, and when they get tired, they get sloppy. For a project that will be running for a long time, you really don’t want that.

The reason I think of it as a limited resource is because if you have ever done solid software development, you will find it requires constant judgement, thinking and in general just solving problems and puzzles all day. It requires a large number of micro decisions and is a tiring exercise with a physical limit for how well you can sustain this before quality starts to suffer. Imagine playing sudoku all day long and see how long it is before your brain starts to tire (and I just did that with the amount of flying I recently went through!)

Of course some people handle this differently. Some developers I know, prefer to spread out this thinking with various breaks of checking email, surfing the web, etc. I’ve heard of stories where some developers will do these bursts in a series of several consecutive long days, but have lots of down time in between. These developers should never be confused with developers who are just lazy and continually check email, surf the web, or better yet “work from home”. I also think that the latter developers have no pride in their work and should not be in our industry.

I do agree that in some circumstances, it is important to be able to tap into “extra hours” and that it should be exceptional circumstances. The illusion that needs dispelling is that there are no “extra hours”, and that at some point, developers will need to rest and to be effective.

I suggest to business people who I’ve worked with that it is better to maximise the value you can get out of the limited resource, instead of trying to mine more of the resource. Oh, and did I mention that maximising business value is what agile is about?

Beware HttpUnit and NekoHTML

The latest version of HttpUnit still doesn’t work well with NekoHTML. Certain behaviour in NekoHTML parsing HTML into a DOM and assumptions in HttpUnit means that trying to set parameter values for a SELECT parameter fails even though you know it’s a valid option value. The current workaround is to use JTidy thought we’re still considering switching to HTMLUnit to improve performance issues we’re having. I have to remember to try disabling javascript interpreting in HttpUnit as I remember this was quite a slow down for tests on a previous project.

Down by the Poole

Poole

Looks like I’m back in Poole after six months. Updates to this blog may be far and few between as access to the Net is scarce and finding time to write even more so. Poole hasn’t changed much since I was last year. It seems like Biker Tuesdays are back on, the weather is getting a little bit warmer and the sunrises are quite spectacular.

Sunrise in Poole

Testing According to the Capability Maturity Model

  1. Initial – You don’t test or manually test in an ad hoc manner
  2. Repeatable – You start building test suite(s) that can be run repeatably
  3. Defined – You automate your test suites and run them in a continuous integration environment
  4. Managed – You start observing metrics from the tests such as how good the coverage is, how long it takes to run and how difficult they may be to write
  5. Optimising – You start to make changes to your code to make it easier to test, and you use the tests to highlight areas that need refactoring or a redesign. You start running Test Driven Development or Behaviour Driven Development to enhance the testability of your code.

After applying the CMM to way I execute testing, I find it interesting that the practices that emerged from the agile community are heavily biased towards the higher end of the CMM. There’s definitely a message here.

Disclaimer: This list was created by myself and does not reflect any official source associated with the Software Engineering Institute (SEI). It was written by me in terms of thinking of how I have seen testing executed and then trying to describe it in terms of the CMM.