Canned Wicket Test Examples
Can of worms, can it be?
Unit testing of the GUI is not the same as unit testing through the GUI. We are interested in the logic of the GUI rather than the placement and order of the GUI widgets on screen.
Testing the logic makes the tests less sensitive to changes in presentation but introduces the problem of JavaScript dependent features. AJAX is in the vogue so we wish to be able to do testing of that too without being forced to start a browser. There is some support for AJAX in Wicket that may be reached using the test framework that is part of Wicket. However, it is not straightforward to use and there are some pitfalls.
Here are three examples of avoiding those, one for each of the check box, drop down and radio group controls.
Some Gotchas for Java Developers Learning JavaFX
Experiences from a workshop
I would say it is a quite subtle difference.
What happened was that the onKeyPressed and onKeyReleased were not called. My immediate reaction was that it was due to some bug in JavaFX but yesterday I realized what had happened.
Agile and Architecture
Slides from my presentation
Yesterday I held a presentation on the subject "Agile and Architecture" at EDB. They have an internal competence network which meet
My point in this presentation was that every system has an architecture that determines the qualities of it. Given a set of functions, different architectures will give these functions different qualities, such as performance and cost of maintenance.
This is still true, no matter if you do waterfall, RUP or Scrum.
Lean vs Traditional Project Management
IMHO
This week, we have Mary Poppendieck with us. She held an evening seminar which inspired me to think about the differences between Lean and traditional project management. I also am inspired by the questions I get from my spouse on this.
I thought that it would be interesting to do a side-by-side comparison between the two. I am no process expert, I am just a programmer who has been the subject of 30 years of different processes. I have seen DOD 2167, RUP, PROPS, PEJL, XP, Scrum and a few others. So this is just my humble opinion.
| Aspect | Traditional Project | Lean | Comment |
Jada jada JavaFX – Why I Love the Idea
New ways required
The TDD Tetrahedron, version 1.0
Now for you to download
As I write this, we have a course on advanced TDD with Robert C Martin as teacher. I took the opportunity to introduce the first version to the participants.

Uncle Bob and the TDD Tetrahedron.
TDD Illustrated
Do you see what I mean?
Being a visual person, I had an idea that would illustrate this in a few pictures. Here they are for your scrutiny and enjoyment!
The TDD Tetrahedron
Best thing since sliced bread
Are you looking for some concrete expression for Test Driven Development? Let me give you a glimpse of what I am working currently on – the TDD Tetrahedron.
The idea originates from when a colleague at Crisp, David Barnholdt, wrote about not focusing on one step at the time. So I thought for a while and came up with this idea, a tetrahedron where each side displayed “failing test”, “implementation” and “refactor”, respectively.
You turn it and look at the first side where you read “failing test”. You write a failing test and turn it again, reading “implementation”. Write the implementation and run the test to get the green bar. Once again you turn the tetrahedron and read “refactor”. You look for something to refactor, confident that if you do, you will be supported by unit tests all the way.
Or the thing just sit on your table to tell everyone how cool you are as being a TDD programmer. At least wish to be. :-)
Anyways, here are some sneak preview pictures of the greatest thing that ever happened to the world of programming, ta da – the TDD Tetrahedron!
Change Based Configuration Management
The simplest advanced branching strategy
A CM-plan will deal with several matters, from simple to decide things, such as naming of releases to more advanced subjects, such as branching strategy. I will talk about the latter today.
There are of course different ideas about what a good branching strategy should be. It is my firm belief that it must be aligned with the subject at hand, namely changes.
Beyond Basic TDD
Where are you now?
A few months ago we hosted a very popular course with Michael Feathers. He talked about refactoring legacy systems and of course, unit tests which are an essential part of that. But the crowd cried out for more.
I have been practicing TDD for two years. I program in Java and frequently use Mockito and Wicket. The latter has support for unit testing web interfaces and it is great although it has its quirks.
But what is everyone else doing?
Not the Fixed Price Contract
Happy Together
On the way from JAOO I talked to Udi Dahan and that made it fall into place in a different fashion. Not that this is what he said, this is what he sparked.
The fixed price contract is not necessarily fixed price, a contract or evil.
Design Principles for Error Handling
I Said Principles
One common and important set of principles are those of error handling. It is good to have the same principles throughout the system as it produces fewer surprises and mistakes.
In this post, I will discuss some principles that including checked exceptions and Null Object, which you may not fancy. But it is always good to think this subject through, so please come along.
The Last on Code Review
How fun are you to be with?
I was doing RUP and before that some waterfall process from DoD. Before that I was programming Fortran. Now, what has been my single most important recommendation for reaching code quality?
Peer code review.
But enough. It just struck me how much I do not miss code reviews.
I'll tell you why and I'll tell you what is the replacement, because there should be one.
Modal Windows Considered Harmful
Cornering the user is bad style
I have discovered that the modal windows that was gone when web applications started to spread, are starting to come back. And they are bad, even if they are not as bad as the goto statement that was accused the same way as I just did: harmful.
A modal window is something that pops up in the face of the user, screaming its importance by not letting the user touch anything else until the modal window had its way.
Stable Interfaces - any good?
Stability for your flexibility
Now, stable means not changing which means nothing gets better. So why would anyone want stable interfaces? And what should we say about the opposite, "unstable"?
Stable interfaces is a cornerstone in tactics for modifiability, so how do stability and modifiability go hand in hand?
Do you see my finger?
Requirements Specification is Waste
Time to Talk about Emperor's Clothes
Eclipse trashed some code for me today and I had to recreate the workspace. On such days, I can get a bit edgy and maybe I was, when commenting Richard Kronfält's blog on Scrum and traditional QA.
Sorry about that, Richard, but you are a viking so I guess I can get away with a glass of mjöd if I ever bump into you.
But my point is still, requirements specification is waste. It follows from that the issue tracking is as well. Well, not always.
Mock the Clock
Take Time to Throttle Testability
But it doesn't stop at unit tests. System tests, too, may depend on time.
You should have a strategy for how your system perceive time. Read on.
Understanding a System
What do you do to understand?
What strikes me most is that the majority has never read any architecture document. Since writing such documents is one of the main topics of the course, I have a long road for them as they haven't read any.
So, when you are faced with a system that you are about to change, how do you go about to understand it?
A Lean Simulation in JavaFX
Nothing beats visual models
Here is a picture:
Don't let Java ruin your JavaFX
The new kid on the block is not thread safe
Me and Oscar is currently working on a small project, just to learn JavaFX.
We stumbled on some nasty crashes which we at first did not understand.
ArrayIndexOutOfBoundsException? Is there a bug in JavaFX?
It turned out to be a callback from Java. Let us see how we got there.




