Last updated : 05/09/2002; 08:02:41

Joe's Jelly

Joe Walnes rambling on and on about Software Development, Java and Extreme Programming.

NAVIGATION >>

/WIKI /WEBLOG /THOUGHTWORKS /OPENSYMPHONY /EMAIL

:: ELSEWHERE
xp developer wiki
c2 xp wiki
the server side
javaworld
sd magazine
jakarta

:: BLOGS
Mike Cannon-Brookes
Graham Glass
Paul Hammant
Elliotte Rusty Harold
Darren Hobbs
Patrick Lightbody
Charles Miller
Brett Morgan
Rickard Öberg
Mike Roberts
Sam Ruby
Joel Spolsky
James Strachan
Clemens Vasters
:: BACKLOGS
August 2002
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Jul   Sep



Click here to visit the Radio UserLand website.

:. 10 August 2002

  6:20:36 PM  

Shiftat's CTO Werner Ramaekers is the program chair for the Open-Source Java track at the BeJUG Conference
Mark your agenda, on November 13 and 14th 2002 BeJUG organizes it's BIGGEST Conference ever in the MetroPolis (Antwerp) ! A two-day event with different parallel tracks covering both technical and business topics.

I have already obtained confirmation of the following speakers :

  • Eric Gamma (Design patterns, JUnit, Eclipse)
  • Rickard Ôberg (JBoss, EJBDoclet/XDoclet, Webwork)
  • Vincent Harcq (XDoclet)
  • Mathias Bogaert (Sitemesh,XDoclet)

The Open-source java track will be organised as an interactive 4 hour session with speakers presenting topics and code-camp possibilities for users to try out the different open-source projects presented (ANT, XDoclet, JBoss, Struts/Webwork, JUnit)

We will also organise a BOF session in the evening so that all Open-source Java enthusiasts can get together and exchange ideas, have a drink, network and even write/exchange code.
[Shift@</A>]

Go guys go! We need more of this stuff!


  5:51:03 PM  

I hate it when I don't follow my own advice.

I've spent the last few hours trying to clean up the code of my Wiki, with a goal of eventually ending up with something I can make more widely available.

One big problem. I was lazy when I wrote this. No unit tests. I'm trying to do major changes to the functionality, and there's nothing telling me what I have, or haven't broken. You get this interesting feeling in the pit of your stomach when you make a big change, one of those "what have I missed?" feelings. If I'd written unit tests, I'd have a little green bar to tell me nothing was broken.

Of course, what I should do is take time out to write tests now. But...

[The Desktop Fishbowl]

I know the feeling. SiteMesh was designed with zero unit tests. It worked and has been pretty stable but it eventually got to a critical mass where it was very hard to add new features, refactor or bugfix without sweating. Inevitably, everytime something was changed, something elsewhere broke, and the "don't touch that" attitude approach started showing its ugly head.

Recently testcases have been retrofitted and the development has suddenly become fun again. We have a rule on the development team now that every line of production code is required to make the tests pass. If any line of code can be removed/modified and the tests still pass then it is redundant code. This works like a charm.

But... how did we go about retrofitting an application that wasn't designed test first without serious amounts of refactoring? If you refactor you're bound to break something without unittests in place but you can't put unittests in place without refactoring. Bad chicken! Bad egg!

Well, we created an automated regression testsuite. This automatically deploys an example application that uses of all SiteMesh's features to a container and tests the end result using raw HTML. This testsuite told us what we wanted to know - that all of SiteMesh's features were working as expected.

This regression testsuite by no means enables the benefits of test first development but it does allow the codebase to be refactored into a state where fine grain unittests can be used thereby giving developer confidence knowing the app works 100%.

The entire testsuite only took a few hours to create (which were admittedly dull) but it saved hundreds and put the dreaded 'rewrite' word out of my head. I think the other developers will testify how crucial the regression testsuite has become.

SO TAKE THE TIME OUT TO WRITE TESTS! ;)


  5:09:16 PM  

Atomic File Transactions in Java: Nifty - might be useful one day:

"Databases provide atomicity for data stored within them, but filesystems are not atomic with respect to their files. This two part article series explains how to achieve atomicity for standard filesystem actions. ... It's not hard to find programs that could benefit from atomic filesystem operations. Installers are a prime example: they do a lot of filesystem manipulation, and if there is an error or they crash, one would like the filesystem back the way it was."

[rebelutionary]

On the subject of this, Electric XML+ provides a nifty little class for persistence - TransactionDictionary. It behaves exactly like a standard hashtable except it persists objects to disk (one XML file per map entry) and supports atomic transactions (complete with rollback). This provides a robust and seamless persistence mechanisms for objects where querying is not required. No changes to your classes that need to be persisted is required and you only ever need to interact with 2 methods (get and put).

Life is so much sweeter when you avoid the hassle of a relational database...


Web-design by John Doe from open source web design.