Saturday, 5 September 2009

Another space tourist - so what?

I've just read about Guy Laliberté's Poetic Social Mission for the One Drop Foundation. The seventh private space traveller is doing more with his once-in-a-lifetime opportunity than just enjoying himself - he plans to stage a worldwide music and arts event involving himself aboard the ISS, to draw attention to the worldwide need for fair and equitable access to water.

The guest list sounds brilliant (Peter Gabriel, U2, Shakira and many others) - the downside is that the two-hour spectacular is due to kick off at 8pm Eastern on October 9th, which makes it about 1am in our time zone. I think it's being broadcast via YouTube, so perhaps we'll be able to watch it later on? Details about this are a bit sketchy at the moment - the site just says "broadcast right here".

Wednesday, 5 August 2009

Save Bletchley Park with Boffoonery!

The title says it all really.

Jason Gorman has managed to get some amazing events off the ground in the past couple of years and this one should be absolutely excellent. It's called Boffoonery! ("buffoonery for boffins") - a once-only comedy benefit gig to raise money for the extremely important wartime heritage site (Station X) and unique computing museum that is Bletchley Park near Milton Keynes.

Jason's partners in crime are comedy writer James Cary, whose credits include hit TV comedies like My Hero and My Family and who also writes the cult BBC Radio 4 sitcom Hut 33, which is set at Bletchley Park, and veteran TV and radio comedy producer David Tyler.

The show is still taking shape, but Jason is delighted to be able to confirm that Robert Llewellyn (Red Dwarf), Richard Herring (Fist Of Fun, This Morning With Richard Not Judy) and cerebral stand-up Robin Ince are on the bill. More big name comedians and comedy writers are TBA, so keep en eye out for updates.

The best way we can support Bletchley Park is to send a message to government and funding bodies about how much we care. If the show were to sell out, and sell out quickly, that would send a very clear message indeed.

And since you ask - yes, you can help. Tickets go on sale on Wednesday Aug 12th at 9am. Please help to spread the word and create a splash on Wednesday. Here are some of the ways you can help:

  • Buy your tickets on Aug 12th
  • Tell your friends and colleagues about Boffoonery!, and encourage them to buy their tickets on Aug 12th
  • Print off copies of the show's A4 poster, which you can download from, and stick them up on your noticeboards at work
  • Blog about Boffoonery, and pass on these suggestions about how people can help save Bletchley Park
  • If you're a Twitter user, on the morning of Aug 12th send a tweet about #boffoonery and, and RT any #boffoonery tweets that cross your path

It's going to be brilliant evening, and your kindness and generosity will ensure that generations to come will be able to see and experience the achievements of those brilliant boffins whose ingenuity saved 22 million lives and ushered in the information age.

You can find out more by visiting, or following #boffoonery on Twitter or "boffoonery" on Facebook.

A pity there isn't a theatre big enough in Bletchley Park itself to host this event! That said, the Bloomsbury Theatre is easier for me to get to...

Don't forget: tickets go on sale on 12th August 2009 at 9am and the show takes place on Tuesday Nov 3rd.

PS other efforts to support the National Museum of Computing at Bletchley Park include this amazing URL Shortener called Station X. Keep up the good work, guys!

Monday, 27 July 2009

Gimme Shelter

A friend has been made homeless - as a result of a bout of illness, he got behind with his rent payments. One morning his landlord just turned up with a heavy friend and dumped him and most of his belongings outside without a key.

While this is clearly an illegal eviction (the landlord should have taken the court route), my friend is unable to defend himself because he's still not well and besides, he's sure that no-one will believe his version of events. Well, it is fairly monstrous.

Today he rang Shelter to try to obtain help (having already had a pretty hopeless interview with the emergency housing office in his borough - they took the attitude that since he didn't have a court order evicting him, he must have made himself intentionally homeless). He reports that he got an answerphone message that began "Welcome to Shelter. Please note that we cannot provide accommodation..."

Well, what on Earth is Shelter for then?

I am also disappointed that The Salvation Army was unwilling to help him - I have been supporting it with a regular monthly donation for years as I was under the impression that it provided help to the homeless.

Monday, 20 July 2009

Passwords passé?

I've just read a highly amusing and (for Twitter) embarrassing story about the loss of confidential information stored by a Twitter staffer under Google Apps.

The article closes by trotting out the usual advice about making usernames and passwords secure - make them long and cryptic, don't use the same credentials for more than one service, and don't write them down. However, I heard a piece on BBC Radio 4 not long ago in which Damian Grammaticus investigated computer security and hacking. It showed that any Windows password under 14 characters long could be cracked in seconds, regardless of how many punctuation characters and digits it contained. Since we're all forced to register with dozens, if not hundreds of different IT services on the Internet and our employers' networks, it simply isn't possible for standard-issue mortals to memorise that many cryptic usernames and passwords (particularly where IT policy demands that the password be changed regularly).

Common approaches to overcome these wetware limitations include
  • Writing usernames and passwords down - not recommended because anyone could find them and steal your precious secret information
  • Using a standard username and password for many different sites - again not recommended because if a thief finds out one valid combination, (s)he can access all your accounts
  • Generating usernames and passwords by means of some function, which you can compute mentally without too much effort and which preferably takes the current month and/or the URL of the service as parameters - this works OK in certain situations, but because the algorithm can't be terribly complicated, someone could reverse-engineer it and have access to all your accounts
  • Using a password manager application: something that you install on your laptop (say) and which stores all your usernames and passwords for you, encrypted of course, so that you can only gain access using a master password or even biometric authentication - disadvantages may include the risk of losing the device or the master access key, as well as the inconvenience of having to have the device to hand whenever you need one of your account credentials (not to mention the cost of the password manager itself)
  • Trusting an Internet service such as DataInherit to manage the keys for you, which has the advantage that should you die or be incapacitated, a nominated person or persons can automatically be given access to selected accounts in your portfolio - disadvantages include the price and the number of steps you have to go through to retrieve any given username and password
Surely the time is ripe for a security architecture that fully separates authentication from authorisation. Depending on your spending power and level of paranoia, you could procure authentication services from any reputable trust authority of your choosing, which could make use of a single very secure identifier and pass phrase, optionally combined with more stringent authentication factors such as digital certificates, RSA SecurID devices, or even biometrics. The identity thus established would be securely and trustworthily conveyed to whatever service you were trying to access - regardless of whether it is on a company intranet, the public Internet or your ATM network.

Unfortunately the Twitters and Googles of this world, not to mention the myriad online shopping sites, still want you to register with them directly and not with some third-party authentication provider. This is because they believe that there's value in knowing your real world (meatspace) name and address, age, marital status and what have you so that they can push targeted marketing at you. It doesn't seem to bother them that the majority of the data thus gathered is probably untrue, because most Internet users are paranoid about giving away such information.

I want single sign-on to be ubiquitous, effortless, virtually unhackable and foolproof (as well as heritable, as directed by me, when I leave this world, so that my digital assets are not locked away forever). By "ubiquitous", I mean that I should be able to use the same sign-on for my employer's network as for any client's network which wants to authorise me to access some selection of their IT services, for Internet services on which I register and preferably at the bank's ATM too. By "effortless", I mean that authenticating myself to all these services is necessary only once per computer per day and ideally doesn't require me to memorise anything, or at most one thing. A physical token in addition, or a biometric, would be acceptable.

The theoretical foundations already exist, underpinning such standards as Kerberos and WS-Trust. But to make it work in the real world of competing and highly disparate IT services, the community of service providers would need to discover some kind of shared interest in implementing it as standard. A grand computing challenge for the new millennium, perhaps?

Monday, 15 June 2009

Test-Driven Design is not testing

I've recently worked with a team doing its first agile project (though one or two team members had been involved in an agile project before). The most difficult concept to get across was TDD - test driven design. I found that people really didn't grok the idea until I pair-programmed with them for a couple of hours. I wonder why that might be.

Dan North has suggested one possibility. He observed that newcomers to TDD often don't get the really big payback because they continue to think that TDD is mainly about testing - even if they will admit that writing the tests before the code leads to better quality code. They never transition to treating TDD as a design process, letting them discover the API to a component they're writing, nor to the realisation that TDD is about defining the behaviour of their component and its interactions with other components of the system.

Keith Braithwaite has put forward another consideration. In physical engineering disciplines, practitioners speed up their work process by using gauges. There are many kinds, from the simple spark plug gap gauge, which is simply a sliver of metal to slide between the electrodes, to electronic vernier calliper gauges that can be pre-set to a precise dimension with tolerances above and below. Each workpiece is tested at each stage of the process by checking its dimensions with the appropriate gauge(s). Workpieces that are out of tolerance are sent back for rework or scrapped. Our unit tests are a bit like that - they provide a safeguard that the software component we're working on still meets all its requirements following any engineering we've done.

It occurred to me today that unit and acceptance tests, particularly if automated, perform another valuable function in the context of an agile (especially a lean) development process. Whereas the waterfall processes familiar to most developers are characterised by "quality gates" at key stages, every single artifact in an agile development has its own little quality gate, manifested in the appropriate tests. This theoretically frees the development process from the usual bottlenecks that the quality gates tend to become.

I say "theoretically", because in many instances agile development projects have to take place within a quality system that doesn't take advantage of incremental delivery. Instead, continued approval and in many cases funding for the project tends to be contingent on passing the traditional quality gates following requirements analysis, functional specification, high-level design, low-level design, coding, integration, system test and acceptance. Project managers are therefore forced to conjure up some kind of spurious linkage between the milestones laid down in the rigid quality system and some arbitrary points along their product release plan. This can hamper their freedom to adjust the release plan in response to changing circumstances and emerging technical insights.

This could be avoided if the quality system could recognise that properly written tests represent every work product of a software development project apart from the code itself. It should therefore simply insist on a verification at each iteration (or at each release, perhaps) that the tests comprehensively and comprehensibly represent the requirements of the business on the system under development and that the required set of tests pass repeatably. I say "the required set" because there's always the possibility that some tests will intentionally fail - e.g. where they have been written to test features that are not yet in the current release.

In other words, TDD can be used to eliminate the quality-gate bottlenecks of quality systems that assume waterfall development processes.

Friday, 15 May 2009

24th March 2009: Theory of Constraints Challenged

My sincere thanks to Kevin Rutherford and Allan Kelly for co-presenting a fascinating session about lean software development to the BCS Kingston & Croydon branch on 24th March this year, entitled "Lean, Constraints, Action!". The audience was excellent too and helped us re-create a famous experiment related by Eliyahu Goldratt in "The Goal".

(Click images to see a larger version)

I had participated in this game previously at the London XP Day 2008 (facilitated by Karl Scotland in an Open Space session). It is designed to demonstrate an intuitively paradoxical finding: that a lean, pull-oriented flow substantially reduces the amount of inventory or work in progress (WIP), while improving throughput.

However, I had a sneaky feeling that the experiment was biased, because in the first "push" simulation, the assembly line was not pre-loaded with WIP, while in the second "pull" simulation, the line was pre-loaded with workpieces at each "workstation's" input buffer up to either the maximum limit or to 50% of that limit. Therefore in a simulation of 10 rounds (equivalent to ten working days - approximately equal to the average cycle time in a six-workstation setup) the push simulation will only start to produce output towards the very end of the simulation, while the pull simulation will produce something from the very first day.

So I got Allan and Kevin to agree to vary the rules a little bit, to try to get closer to a "steady state" from the first "day". Before each of the two simulations, our teams placed three Lego blocks on each of the coasters representing the input buffers of the second through sixth workstations (the first workstation of course has the whole of the product backlog as its input hopper). In fact, as it turned out, four workpieces would have been closer to the true steady state in the pull simulation, even more in the push simulation.

Off our teams went and played the production line for ten rounds each. In the push simulation, the die was passed in order from workstation 1 to workstation 6 during each round and the number of workpieces transferred to the next input buffer was the number thrown, up to the number of pieces available in the workstation's input buffer. Instances of starvation were rare under this system, but did occur sometimes. At the end we counted up the number of pieces that had come off the end of the line and the number currently in progress (i.e. on any of the five input buffers for workstations 2 to 6).

In the pull simulation, the die was passed in the opposite direction and the input buffers were constrained to a maximum of six workpieces. So if the next input buffer had three pieces already in it and the player threw anything over a 3, they could only pass along 3 more workpieces (subject to their own input buffer holding at least 3, of course). Once again, the results after 10 rounds were compared.

The results didn't surprise me particularly, but I think some of the others were a little taken aback:

As you can see, the constraint resulted in both lower WIP and lower throughput. This makes sense when you consider that there were far more occasions during the pull game than during the push game when players were unable to process the full number of workpieces indicated by the die.

Looking back at the game notes, it is noted that if the simulation is run for much longer than 10 days, the pull (or Kanban) system "will rarely produce as much as the traditional push". This may have escaped the attention of some readers (or perhaps it's a more recent edit - I don't know).

My conclusion is that you get nothing for free. The cost of reducing WIP is reduced throughput, which is perfectly acceptable as long as you're aware of it. Software development projects are not production lines in any case, so it is very unlikely that any developer will sit around kicking her or his heels if the work runs out on a given day. There are always low priority tasks such as fettling the build system, cleaning up the documentation on the project Wiki, answering user support requests etc. - or just take the next item off the product backlog and raise the kanban limit temporarily.

Tuesday, 5 May 2009

Distributed bug-tracking in Haskell

At the recent SPA 2009 conference, there was a lot of talk about functional programming, Haskell in particular (a couple of years ago, the flavour of the month had been Erlang). Just to prove that Haskell is no longer "just a research language", along comes DisTract, a distributed issue-tracking system that runs in Firefox browsers. If you're already using Git, Darcs, Mercurial or Monotone as your distributed software configuration management solution, the author reasoned, why shouldn't you be able to close bugs while you're off-line at the same time as you check in your fix? Caveat: I have not tried this yet, but it sounds like a really neat idea. Does anyone know of a user forum?

Thursday, 9 April 2009

SPA2009 - first impressions

Maybe I'm biased, of course, but for me the SPA2009 conference felt even better than last year's. I think it had the right mix of technical and non-technical sessions, mostly of very high quality, and a few really interesting BOF (birds of a feather) sessions - which for once, didn't feel as if they were just squeezed in at the last minute.

Functional programming (in particular, Haskell) was a major theme this year, as was testing. My eyes were opened to the possibility of doing test-driven development (TDD) in Haskell - in fact, functional languages are better at this than imperative (stateful) languages. It was also good to meet up with a lot of familiar faces at the joint XtC meeting on the Tuesday night.

My session notes are on my other laptop. I will try to post them on the SPA SG site over the Easter weekend, other duties permitting.

Saturday, 4 April 2009

Automating testing of web sites with multiple browsers

After several days of trying, I've just abandoned an attempt to automate web site tests with multiple browsers (Firefox, Internet Explorer, Safari and Opera under various operating systems). My findings are written up here. Briefly, I think that Selenium RC has the right architecture, but currently the linkage between the RC server and the browser only works 100% for Firefox. This isn't enough.

It seems from the documentation that Watir should support the functionality needed. Can anyone confirm that it's possible to test pages such as this one in at least three different browser types with it?

Update (9 April): I discovered that Selenium RC has a start-up parameter "-proxyInjectionMode", which is equivalent to choosing the "*pi..." launchers where available. Unfortunately this only works with "*firefox", so you might just as well use "*pifirefox". It isn't clear to me why it causes tests to fail when they launch a browser with "*mock".

I was also reminded at the SPA2009 conference that it might be worth trying out Cucumber, rSpec, Concordion or other tools, so long as they will drive more than one browser.

Thursday, 19 March 2009

Why people think it's OK to cheat / steal

Dan Ariely has given a brilliant talk about this and how it impacts the global economic crisis. Watch this on Ted - it'll be 16 minutes well spent. Good insights into human psychology and behaviour.

Tuesday, 17 March 2009

Tools to support agile methods

The whole point of managing a project using an agile method is to use lots of coloured cards and post-it notes, but sometimes you have to fall back on a boring old software tool. The thorny question keeps arising: which one do I recommend?

Many different project management tools exist, at different price-points and levels of functionality. A long list is shown below. It is important to be clear about a project's requirements for a tool before selecting. Avoid the temptation to extend any tool you select or to spend much effort integrating it with the rest of your project environment – this is a sure way to lock yourself into a single supplier.

The following list of tools is not exhaustive, though I have kept adding to it as I came across new tools:

  • ]project-open[

  • Achievo

  • ActiveCollab

  • Agilebuddy - reported by a comment on this post to be a full-featured agile project management software tool, which is easy to use and great for Scrum teams. Offered on a subscription model for US$9.95 per user per month

  • Agilefant

  • Agilo – based on the Trac issue-management tool and said to support only a single project at a time

  • airTODO – PMBOK rather than agile, but minimalist (an Eclipse plug-in)

  • AxoSoft's OnTime - available as a hosted cloud solution, a Windows native application or as a web application, one comment under this post has reported that it "great for agile / scrum development". Comparable in scope to Trac, but looks a lot more snazzy

  • Banana Scrum - according to one comment below, this is a nice, web based tool that helps without getting in team's way

  • Extreme Planner

  • Greenhopper – a JIRA plugin favoured by some Scrum teams

  • IceScrum

  • Mingle - provides a shared workspace for agile teams, supporting XP, Scrum and custom hybrid approaches. Includes a virtual card wall, wiki, charts, reports and more. Integrated with issue tracking and continuous build. Priced US$995 per user with substantial discounts for multiple licences, academic institutions etc.

  • Pivotal Tracker

  • ProjectCards – mixed approach that uses both physical cards and software

  • ProjectKoach

  • Rally

  • Rational Team Concert - integrates work item, continuous integration builds and software configuration management (SCM) on the collaborative infrastructure of the Jazz Team Server

  • redMine

  • Scrum Edge - someone commented below that it was much simpler to use than most other Scrum tools

  • Scrumworks - quite popular free open source package, heavily forms-based, can integrate with JIRA

  • Silver Catalyst

  • StuffPlanner – Zühlke's inhouse-developed browser-based tool now at version 0.1 and with an Eclipse Mylyn connector available; access can be provided by arrangement

  • TargetProcess - designed to support Scrum, XP and custom Agile processes particularly in the .NET environment. Includes a comprehensive set of tools and features, including defect-tracking, test management and customer helpdesk portal. Community edition free for up to 5 users

  • teamwork

  • tinyPM

  • VersionOne - very full-featured, supports Scrum, DSDM, XP and AUP across multiple projects. Priced from US$348 per user per year, there is a free "team edition" for one team of up to 10

  • XP Story Studio – no development since 2004

  • XPlanner
  • - a popular free open source planning and tracking tool for XP. Quite simple in keeping with the low-ceremony agile approach
  • xProcess - free open source project management and process improvement tool, focused particularly on agile and priority-driven approaches. Preconfigured processes include Scrum, FDD, Prince2, Unified and others; can be tailored. Gantt/Burndowns/target status continuously updated. See also xProcess Europe

  • XPWeb

A number of web sites compare small subsets of the available software tools, including

Latest unwarranted privacy violation

The Daily Telegraph reports that the travel plans and personal details of everyone leaving Britain are to be tracked by the Government. Under the "e-borders" scheme, they intend to make it a criminal offence not to submit, in advance of every trip, personal information such as passport and credit card details, home and email addresses and exact travel plans. This is already starting to happen.

The kind of thing that e-borders enables is illustrated by this story, which shows that you could be stopped from leaving the country if you have unpaid parking fines or indeed any other mark against your name. What are the chances that before the year is out, we'll be reading stories about innocent people trying to travel abroad who get arrested at the airport or sea port thanks to some mix-up?

With developments like these, it's hard to believe that we are not living in a police state.


This looks really intriguing: CodeCity gives a really nice way to visualise properties of Java code bases. An example is shown below (an analysis of Azureus v2.5.00):

It's a free download, so give it a try on your own code!

Thursday, 26 February 2009

My Favourite Keyboard Shortcuts

That was the title of a session I proposed for today's first-ever Software Craftsmanship Conference, at the BBC's attractive Media Centre in London's White City. To my surprise, the session was accepted. It worked quite well despite attracting only about half a dozen participants. I certainly learned a good deal from it!

The output of the session has been posted on the conference Wiki. However, you'll have to be logged in to see it, as the wiki is private to conference participants. I don't know if Jason Gorman plans to change this now the conference is over.

The top tips (as a result of a quick spot vote at the end) were:

The three-step refactoring tango: Jason's recipe for method extraction where one or more parameters are themselves method calls. In Eclipse, it goes ALT-SHIFT-L (extract local variable), ALT-SHIFT-M (extract method), then ALT-SHIFT-I (inline local variable as method parameter).

Expand/shrink current selection: In Eclipse, ALT-SHIFT-up/down arrow or in IDEA, CTRL-w/W. With the cursor on a given word, the word is selected. Repeated applications of the same keyboard combo selects progressively larger portions of the source file (up to and including the entire file). Using the opposite key combination reduces the size of the selection all the way back to 0.

Wednesday, 18 February 2009

Test-Driven Web Development on Spring and Hibernate

Adam Shimali and I will be piloting our TDD course at SPA2009 on the Sunday afternoon. Three two-hour samples of a full two-day course for free - and you get a 10% discount off the cost of the full course for yourself or a colleague.

The course is very hands-on. If you bring a laptop (Windows or MacOS) we can provide you with the complete Eclipse development environment installation on a CD or memory stick - you'll be good to go in about five minutes. It will help if you've done a bit of Java programming before, but even this is not essential as you'll be paired with someone experienced.

There's still time to book for SPA2009, but don't delay!

Tuesday, 17 February 2009

Agile and Lean - complementary or conflicting?

Dave West has contributed an article entitled A Marriage Made in Heaven?. I found it very instructive to read that as well as the comments attached to it. To my mind, there are things that the software community can learn (and has learned) from lean manufacturing, but in many respects software development is much more of a joint creative act. As Dave says, Peter Naur as long ago as 1985 equated programming with collaborative theory-building - in other words, it has much in common with research at the forefront of physics or mathematics, where results are difficult to predict and effort is almost impossible to forecast.

Monday, 16 February 2009

BALPA refuses to co-operate with ID card scheme

Well done, the British Airline Pilots Association. It has refused to co-operate with the odious National ID register, as reported in The Times. I especially enjoyed reading BALPA's clear views on the insidious methods the Government has chosen to bring in the ID cards:

"It is clear that the Government's staged introduction of biometric identity cards first to overseas students, then to migrant workers and then for aviation workers, represents a way of picking off what are seen as easy targets."

It'll be interesting to see what the Home Office chooses to do next. They can't afford to be seen to back down in the face of such a challenge to their "authority", yet they can't force airlines to sack valuable staff. So I expect that a technical pretext will be found for not requiring the airline pilots to carry the cards after all, and the department will go after another softer target first.

It is beyond me why the Government keeps on trying to introduce this scheme. The Tories and LibDems have both pledged to scrap the whole thing as soon as Labour is voted out of office, which only gives them a couple more years at most to push it through. Sadly, the stubborn and unimaginative lot currently in power are likely to waste hundreds of millions of pounds of our money on this folly before it is finally sunk.

Monday, 26 January 2009

Predictably Irrational: the international financial crisis

My eternal gratitude to Dan Ariely and his Predictably/Irrational blog for pointing out the existence of a radio programme and its transcript in PDF, which for the first time properly explained to me why we're in such a mess. I wonder what collective idiocy is next up.

It also provides a sobering reminder that it's usually a bad idea to throw money at a problem. In this particular instance, Gordon Brown's fantastic idea to "save the world" by hosing all our cash and then some into the banks' pool of money supply was such a bad idea that it must stand as one of the most monumentally stupid decisions of all time. Read the transcript yourself to find out why.

Anyone without the requisite quarter of an hour to hand can refer to this very much more succinct, but necessarily less thorough, tale. It seems prescient, having been posted in 2005!

Friday, 23 January 2009

How to write conference session proposals

Most of you probably already know how to do this - after all, you get your papers accepted at conferences all over the world all the time, right?

If (like me) you find your brilliant ideas trampled underfoot as often as not, read Kent Beck's advice. It may have been written over 15 years ago, but I'm certain it applies equally well today. It's also charmingly self-referential.

Tuesday, 6 January 2009

Mock external components using AOP

Mark Nadelson has provided a well-written tutorial for a novel (to me, at any rate) use of Aspect-Oriented Programming in Java. Read the "print" version to get the whole article in one lump without the commercials.

When you write jUnit tests, you often encounter a need to create mock objects (e.g. using JMock or EasyMock) that can simulate some external dependency of the software under test. Mark has extended this idea to any external component that has an interface. In order to determine whether the software under test uses a mock component or the real one, he uses dynamic aspect-weaving by means of Spring AOP with AspectJ annotations.

I've got to have a play with this approach to see whether it can be used flexibly enough to support TDD fully. One problem I could foresee is that the pointcut specification is not in the test script but in the mock object (i.e. the class that implements the aspect). So it might be less than straightforward to link the mock object to specific test cases/steps. By contrast, when you use JMock in a jUnit test, you specify both the mock object and its expectations in one place.

Monday, 5 January 2009

XPath made simple

I know I'm a bit behind the curve on this one, but I've only just stumbled across a really useful tool:

XPather can
  • generate XPaths while browsing or inspecting HTML/XML/*ML documents
  • evaluate your XPaths and inspect the results
  • extract the content of *ML documents
The latest version 1.4.1 was released on June 18 2008 (Firefox 3.0 compatible).

XPather is a simple Firefox extension that integrates both with the browser and its DOMInspector. It is designed to be lightweight and cross-platform. It is valuable mainly as a web/XML-app development and debugging tool. In combination with the DOMInspector, which I can also highly recommend, it is particularly useful for developing WebTest scripts: right-click in any element of a page that you want your script to compare or set, and the option "Show in XPather" pops up a new window with the precise XPath to select that element.