Joe Walnes
  Blog



Recent Entries

Creative uses of Hamcrest matchers

Hamcrest 1.1 released

Testing on the Toilet

Building testable AJAX apps (Does my button look big in this?)

QDox is back - 1.6 released

Java and .NET RESTful interoperability with XStream

I've joined Google

OSCon: SiteMesh, SiteMesh, SiteMesh, SiteMesh

Flexible JUnit assertions with assertThat()

SiteMesh and Content Management @ O'Reilly OpenSource Conference

XStream 1.1.2 released. Java 5 Enums, JavaBeans, field aliasing, StAX, and more...

VB.Net is the bestest

XStream 1.1.1 released

Accessing generic type information at runtime

XStream 1.1 released

JUnit tip: Setting the default timezone with a TestDecorator

XStream: how to serialize objects to non XML formats

How my backflip went...

Backflippin' in 4 hours.

Is 100% test coverage a BAD thing?

Looking back at the SiteMesh HTML parser

The road ahead for SiteMesh 3

Joe's Backflipping for Autistic Research - time is nearly up...

SiteMesh 2.2 Released

Advanced SiteMesh

More... [RSS | RDF]

About Joe Walnes

I am a software engineer for Google, based in London.

Open Source

WebStuff (coming soon)

XStream

ActiveMQ

SiteMesh

QDox

nMock

jMock

Pico Container

Nano Container

OpenSymphony

Squiggle

MockDoclet

MockObjects

Jelly

Groovy

PatternStitcher

XJB

Books

Java Open Source Programming, Wiley JSP Site Design, Wrox

Talks

Mock Roles, not Objects
October 26 2004, Vancouver, Canada. OOPSLA'04

Personal Development Practices Map
June 24 2004, Salt Lake City, Utah. Agile Development Conference

SiteMesh.NET and ASP.NET MasterPages
May 20 2004, Bangalore, India. Bangalore .NET User Group

Mock Objects: Driving Top Down Development
March 29 2004, St Neots, UK. OT2004

Mock Objects
December 2 2003, London, UK. XP Day 3


Blog

Creative uses of Hamcrest matchers

The matcher API of Hamcrest is typically associated with assertThat() or mocks. I always knew other people would find good uses for it, but I never really knew what. I particularly like these: Collection processing Håkan Råberg blogged about how...

Hamcrest 1.1 released

http://code.google.com/p/hamcrest...

Testing on the Toilet

At Google we have pretty good internal documentation, tutorials and places to find good tips. If you know you don't know something, it won't take long to find the answer. However, it's slightly tougher to place something to be read,...

Building testable AJAX apps (Does my button look big in this?)

Last week, Adam Connors and I presented "Does my button look big in this? Building testable AJAX applications." at the Google London Test Automation Conference. Watch the video online (approx 50 mins). Unfortunately the code is unclear on the video,...

QDox is back - 1.6 released

QDox history QDox is a fast JavaDoc/Java parser built in 2002. It was originally intended as a stop gap until Java supported annotations by allowing tools to easily get access to JavaDoc attributes. Essentially it provided nothing more than a...

Java and .NET RESTful interoperability with XStream

My ex-colleagues Paul Hammant and Ian Cartwright have written an article on their experiences of building SOA applications using RESTful services in .NET and Java that could interoperate over web services and message queues. XStream made this possible. Buzzwordtastic. http://www.infoq.com/articles/REST-INTEROP...

I've joined Google

Woooo..... this looks fun....

OSCon: SiteMesh, SiteMesh, SiteMesh, SiteMesh

Just got back from the O'Reilly Open Source Convention in Portland. Fantastic conference - met lots of really interesting people (and the odd nutter). It was a good conference for SiteMesh. It opened my eyes to two things: SiteMesh rocks....

Flexible JUnit assertions with assertThat()

Over time I've found I end up with a gazillion permutation of assertion methods in JUnit: assertEquals, assertNotEquals, assertStringContains, assertArraysEqual, assertInRange, assertIn, etc. Here's a nicer way. jMock contains a constraint library for specifying precise expectations on mocks that can...

SiteMesh and Content Management @ O'Reilly OpenSource Conference

I'm talking at the O'Reilly OpenSource Conference (OSCON) - Wednesday Aug 3, Portland, Oregon. Come and say hi. A problem faced in every web application is how to separate style from content. SiteMesh is a framework that provides an elegant...

XStream 1.1.2 released. Java 5 Enums, JavaBeans, field aliasing, StAX, and more...

New features: Java 5 Enum support. JavaBeanConverter for serialization using getters and setters. Aliasing of fields. StAX integration, with namespaces. Improved support on JDK 1.3 and IBM JDK. Changelog: http://xstream.codehaus.org/changes.html Full download: http://dist.codehaus.org/xstream/distributions/xstream-1.1.2.zip Jar only: http://dist.codehaus.org/xstream/jars/xstream-1.1.2.jar...

VB.Net is the bestest

I was happily coding away in VB.Net today (grrr) when I noticed a little weirdity in the intellisense popup. Documentation says: The NotOverridable modifier defines a method of a base class that cannot be overridden in derived classes. All methods...

XStream 1.1.1 released

I'm pleased to announce the release of XStream 1.1.1 - the powerful, yet easy to use Java to XML serialization library. Some of the improvements in this release: Converters can be registered with a priority, allowing more generic filters to...

Accessing generic type information at runtime

A common misconception about generics in Java 5 is that you can't access them at runtime. What you can't find out at runtime is which generic type is associated with an instance of an object. However you can use reflection...

XStream 1.1 released

I'm pleased to announce the release of XStream 1.1. New features include: Improved support for serializing objects following the Java Serialization Specification: Calls custom serialization methods, readObject(), writeObject(), readResolve() and writeReplace() in class, if defined. Supports ObjectInputStream.getFields() and ObjectOutputStream.putFields() in...

JUnit tip: Setting the default timezone with a TestDecorator

A problem I was finding when testing XStream is that many of the tests were timezone dependent. Initially I had some code in each setUp()/tearDown() method to set the default timezone and reset it afterwards. This lead to a lot...

XStream: how to serialize objects to non XML formats

As you know, XStream makes it easy to serialize objects to XML: Person person = ...; xstream.toXML(out); Producing: <com.blah.Person> <firstName>Joe</firstName> <lastName>Walnes</lastName> <homePhone> <areaCode>123</areaCode> <number>433535</number> </homePhone> <cellPhone> <areaCode>4545</areaCode> <number>4534</number> </cellPhone> </com.blah.Person> I often use this approach whilst debugging to dump out...

How my backflip went...

Well, I'm still alive :) This is a brief entry as I'm currently enjoying a two week vacation in Thailand. I'll give you the full details when I get back (assuming my inbox hasn't burst by then). I achieved a...

Backflippin' in 4 hours.

Gulp. Six weeks went quickly. The story so far. If anyone has a video camera (or one of those digital cameras that can record video snippets), please bring it along... I'm having a bit of a camera shortage....

Is 100% test coverage a BAD thing?

I'm a huuuge advocate of TDD and high test coverage, and I will often go to great lengths to ensure this, but is 100% such a good thing? I recently heard Tim Lister talking about risk in software projects and...

Looking back at the SiteMesh HTML parser

Before talking about how the new SiteMesh HTML processor works (to be released in SiteMesh 3), I thought I'd write a bit about how the current parser has evolved since it's first attempt in 1999 - purely in the interest...

The road ahead for SiteMesh 3

Here's an update of what's in store for the upcoming SiteMesh releases and how they benefit you. Firstly, there are a number of accumulated bugs that we're steadily working our way through. The recent 2.1 and 2.2 releases have been...

Joe's Backflipping for Autistic Research - time is nearly up...

A reminder of my challenge: I've had six weeks (I'm now on week five) to learn to do backflips to raise money for the International Autistic Research Organization. This includes: 1. A single back handspring 2. Three back handsprings in...

SiteMesh 2.2 Released

I've just released SiteMesh 2.2 This release fixes a number of minor bugs. No code changes are required if migrating from 2.1. The following improvements have been made: The <excludes> tag in decorators.xml now takes into account ServletPath, PathInfo and...

Advanced SiteMesh

Sunil Patil has written an article about SiteMesh for ONJava.com: Read Advanced SiteMesh....

REST and FishEye

The latest version of FishEye now has a REST API (oh and an XML-RPC API too, which is less interesting). I'm happy partly because FishEye is a great tool and this will allow integration with other tools - things we...

The power of closures in C# 2.0

Martin Fowler (obligitary Fowlbot namedrop) recently blogged about the power of closures in languages that support them. It's worth remembering that C# 2.0 has true closure support in the form of anonymous delegates. This includes reading and modifying variables outside...

NMock article in MSDN Magazine

An article about NMock has appeared in the October issue of MSDN Magazine. Chuffed :) Mock Objects to the Rescue! Test Your .NET Code with NMock...

Joe tries to do backflips

I'm doing a sponsored backflip to raise money for the International Autistic Research Organization. How did this happen? I'm not totally sure, but if I recall it started in a conversation with Martin Gill, my manager, that went something like...

XStream article on O'Reilly XML.com

http://www.xml.com/pub/a/2004/08/18/xstream.html...

A simple way to access JavaDoc attributes at runtime

It's easy to gain access to JavaDoc attributes using QDox, however this requires you to have the source available. At runtime this isn't always possible, unless you're happy giving your source away. A workaround to this is to use QDox...

XStream roadmap: What do YOU want to see?

I'm assessing where the next version of XStream should go. There are three major chunks of work I'd like to tackle (described below), however I can only take on one at a time and need to prioritize. What do you...

XStream 1.0.2 released

Changes: Many more converters for common Java types. Fields of type byte[] are now encoded using Base64. Improved support for using XStream in environments where classes are hot-redeployed. More... Download: Full distribution or Jar only xstream.codehaus.org...

SiteMesh 2.1 released

SiteMesh 2.1 has been released. The main changes in this release: Out-of-the-box support for writing decorators in Velocity. Performance improvements. Numerous bug-fixes, particularly container-specific issues. Read an introduction and then download. http://www.opensymphony.com/sitemesh/...

Agile Development Conference coming up...

ADC in Salt Lake City is just around the corner. I've heard nothing but good reports from the previous events so I'm checking it out. The line up looks great. Apparently there are still spaces available. If you're going, get...

Unit Testing Asynchronous Code

I try to avoid using code that instantiates threads from unit-tests. They're awkward to write, brittle and I would rather extract the controlling thread, using the test as the controller. However there are times when it's unavoidable. Here's an example....

How to host your own private CVS repository

Here's a quick way to host your own remote private CVS repository, accessible via SSH. All you need is an SSH enabled shell account on a UNIX box that has the CVS client installed. If the box doesn't have a...

ASP.NET MasterPages and SiteMesh

It's nice to see the SiteMesh approach catching on... ASP.NET 2.0 includes a features called MasterPages, which is a kind of hybrid of SiteMesh and Tiles . Specifying a master page with ASP.NET is similar to how you do with...

Announcing XStream: Java to XML serialization, and back again.

XStream is a simple library to serialize objects to XML and back again. Features Ease of use. A high level facade is supplied that simplifies common use cases. No mappings required. Custom objects can be serialized without need for specifying...

OT2004 : Delegation in Java

Ivan Moore is blogging about it here....

OT2004 : Taming the Tiger (Java 1.5)

This session was presented by Benedict Heal, and he was brilliant; concise, clear, humourous and extremely chilled out. Even the fact that Josh Bloch was listening in on his presentation didn't phase him. Most of the new Java 1.5 features...

OT2004 : Personal Practices Map

In the evening, everyone had a chance to run a Birds of a Feather session. I thought I'd give it a go and repeat the session from XtC last year. It was a chance to talk to other developers about...

OT2004 : Elegant Implementation of Null Objects

Since Dan and I have both been working together again (2 years at ThoughtWorks) and since I moved into a house less than ten minutes walk from his, we very rarely see each other. So it was good fun to...

OT2004 : Towards EJB 3.0

Despite the title, this session, led by Scott Crawford from the EJB expert group, turned out to be one of my favourites. I'm a bit rusty on EJB. I was big into EJB for a few years and then one...

OT2004 : Generic Mechanisms in Software Engingeering

This workshop, hosted by Simon Davies, and chums from Microsoft (with a bit of Bruce Anderson), was a thinking excercise about the pros and cons of some of the language features of C# (and conveniently also Java) including generic types,...

OT2004 : Mock Objects: Driving Top-Down Development

Nat and I were first up with our talk on Mock Objects. Yes, we are still harping on about them :). Here's what we covered: OO concepts: an application is a web of collaborating objects, each providing a distinct responsibility...

OT 2004

So here I am, about to start the final day of OT2004. I overslept this morning and missed my chance to join the main conference room for todays keynote. Joshua Bloch is in there now talking about how to design...

How to do Dynamic Proxies in C#

Background: A dynamic proxy dynamically generates a class at runtime that conforms to a particular interface, proxying all invocations to a single 'generic' method. Earlier, Stellsmi asked if it's possible to do this in .NET (it's a standard part of...

Making JUnit friendlier to AgileDox

Here's a little trick to make JUnit display your test results in a similar way to AgileDox. Override TestCase.getName() in your unit test... public String getName() { return super.getName().substring(4).replaceAll("([A-Z])", " $1").toLowerCase(); } ... and your test runner results are transformed...

Inversion of Control and Dependency Injector Pattern

Martin Fowler has pubished a new article: In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they...

What's a YAUL? Or a YAUC?

Hani has a very valid post about util libraries. Libraries that just have a bunch of non focussed utils in them, rarely provide a benefit to anyone other than the original authors. When developers are looking into using a third...

When simplicity backfires

I put a lot of effort into refactoring a larger, more complicated library into the lean and simple Squiggle you see today. Annoyingly... Freshmeat tries to avoid listing projects which fall below a certain level of size and/or complexity, and...

Easily build complicated SELECT statements with Squiggle

After serving me loyally for four years, I've finally got around to open-sourcing Squiggle - a small Java library for dynamically building complicated SQL SELECT statements. Sometimes (not often these days) you just need to get your hands dirty and...

Running Groovy natively without the JVM

Two days ago I was hacking away at some Ruby scripts and thought it would be nice if I could write them in Groovy (not necessarily useful, just nice). Of course, for small scripts that honour the UNIX philosophy, that...

Java Open Source Programming book biled

Well I knew eventually the book would be biled. While I usually find negative feedback very helpful (thanks Werner!), I feel that Hani's review has unfortunately missed the point of the book. The book is based around the theme of...

XStream 0.2 released

See this....

Java Open Source Programming book reviewed on TheServerSide

Dion Almaer has reviewed our book: Full review Discuss the review I'm glad he picked up on many of the points we tried to emphasise to make the book stand out from the crowd....

XStream is nearing a release

XStream is a simple object -> xml -> object serialization tool. There are many other tools that do similar things out there. Here are some of the features that distinguish it from the others: Very fast. Requires no custom mappings...

New Book: Java Open Source Programming

Our new book, (With the snappy title, Java Open Source Programming : with XDoclet, JUnit, WebWork and Hibernate) hits the shelves this months. A joint effort between Pat Lightbody, Ara Abrahamian, Mike Cannon-Brookes and myself. This book : Highlights many...

Tutorial: Using mock objects to drive top-down development

Tim Mackinnon and Nat Pryce and Steve Freeman and I are presenting a session on how mock objects can be used to drive code from the top (requirements first, infrastructure last) to produce high quality, clean and decoupled object designs...

Test Driven Development is not about testing

Dan writes: "Writing the test before you write the code focuses the mind - and the development process - on delivering only what is absolutely necessary. In the large, this means that the system you develop does exactly what it...

Breaking my silence

aslak_hellesoy: i was stoned when you put cheese in my source code...

Toywatch: Whiteboard Photo

Mike Brown pointed me to Whiteboard Photo - a simple little tool for converting crappy photos of whiteboards into something usable. It even distorts the image to compensate for the perspective the photo was taken at. A mere $249 -...

OpenSymphony.com gets a facelift

OpenSymphony.com is looking nicer these days....

Fun for Londoners

Just a reminder for anyone in the London area, there's a couple of weekly meetups that you can come along to if you'd like to discuss ideas, learn, teach or simply chat. Open to everyone - and free. The eXtreme...

Blog : iteration 2

Well, based on initial feedback, I've revamped by new and improved blog to be even newer and improveder. Noteably: Removed categories (too confusing). Put all links on one page. Enabled comments. Enabled trackback (I think). Grab your RSS or RDF...

Tim Bacon has a blog

My friend, coach and colleague has a blog. Tim Bacon - hear him roar. CoachSpot...

Discuss your maintainability patterns

http://joe.truemesh.com/blog//000056.html

Design by contract: testing implementations of interfaces

Here's a nice way of associating contracts with interfaces and testing the implementations conform. A sample interface: interface CheeseMaker { int getCheeseCount(); void addCheese(Cheese cheese); } With the contracts: there should be zero cheeses on creation. adding a cheese should...

Maintainability patterns

I love tech. Look at all the fun stuff that's happening in this development wonderland at the moment. We have libraries to do everything under the sun. Persistence, web-apps, security, code generation, presentation, remoting, messaging, concurrency, XML processing, testing, containers,...

Agiledox

Chris Stevenson, fellow team-member, has started Agiledox, a small project to collect ideas and tools for automating documentation. It is typical in agile projects that the code and design changes so quickly that the documentation (if any) never keeps up....

StaticMesh first cut

Rune Toalango Johannesen has created a first cut of StaticMesh - an offline version of SiteMesh for building static web-sites. Like SiteMesh, it takes a plain HTML document (content) and an HTML decorator (presentation) to generate some pretty content as...

What's in a skin?

Like the look of the site? Some of the subtleties that went into designing it: Tabs. The clearest form of navigation when there are a small number of sections. Color coding. Each of the four sections has a different color...

SiteMesh.NET in CVS

Jeremy Clymer has ported SiteMesh to .NET. And it works like a charm! Here's the feedback that I've had so far. "SiteMesh.NET rocks dude!" "I downloaded and it just worked." You can get it from CVS if you can't wait...

MockObjects Java 0.09

The latest release of the Mock Objects Java project is available. The dynamic mock generation API has been improved greatly and it now allows a lot more flexibility in setting up expectations and return values resulting in less brittle tests....

New MockObjects wiki(s)

In a move to push the community and documentation of MockObjects further, a new wiki has been setup. This is to include news and releases for all the mock object projects (across languages), articles, FAQ and general discussions on effective...

NMock 1.0

After many months of little changes, we deemed NMock production quality. It stabilised quickly many months ago and has changed very little since. Documentation is somewhat sparse - contributions welcome! http://nmock.truemesh.com/...

Blogging software

My last blog was powered by Radio. It was a great introduction to the blogging world. Apart from being easy to use (single client download, no server setup necessary) it was a very elegant all in one blog poster and...

First (new) blog entry

Hello world! My old blog went kind of quiet recently as I have been spending a lot time working on a new house and book (with Mike, Pat and Ara). Meanwhile life has been rushing by. Time for me to...
ThoughtBloggers

Martin Fowler

Dan North

Aslak Hellesoy

Darren Hobbs

Geoff Oliphant

Mike Roberts

Chris Stevenson

Jon Tirsen

Loads More...

Agile Bloggers

Ken Arnold

Ward Cunningham

Brian Marick

Robert Martin

Bret Pettichord

Java Bloggers

Ara Abrahamian

Mike Cannon-Brookes

Vincent Massol

Bob McWhirter

Rickard Oberg

Joseph Ottinger

James Strachan

Hani Suleiman

Communities

eXtreme Tuesday Club (XTC)

Thursday GeekSpeek

ThoughtWorks GeekNight

London Java Meetup

The Codehaus

[RSS | RDF]
© 2001-2004, Joe Walnes

Powered by SiteMesh and Moveable Type.