Archive for June, 2008
Just a quick note to mention that Daniel will be carrying the torch for Zutubi at CITCON Asia-Pacific 2008 in Melbourne this weekend. After enjoying the event last year we signed up to sponsor this time around. Catch up with Daniel and ask him about Pulse 2.0 beta!
Sadly I won’t make it, on account of being on the other side of the planet…
Maybe my brain just doesn’t work in a way that appreciates them, but I really don’t see the point of tag clouds. Sure, adding a cloud makes your site feel oh-so 2.0, but does it really accomplish anything? Is there some advantage over a sorted list? Do people actually use tag clouds?
I find them annoying because they:
- Take up excess space (especially for the larger font sizes).
- Are hard to decipher, as the text is in a variety of sizes and is thus difficult to scan.
- Feel like a trend, followed mindlessly.
When the information is useful I would prefer it to be presented as sorted and/or coloured list of a uniform font size. I for one would be quite happy to see these useless jumbles of letters disappear!
Ever need to stub just a method or two of some interface to nicely isolate a unit to test? In the past I have used classic mock object libraries to help, but these suffered from a few problems:
- The use of strings to specify method names to stub, which breaks refactoring.
- Awkward syntax to specify parameter values to match.
- Compulsory verification of the order and number of calls to the stub.
Some time ago EasyMock came along and solved the first two problems. By using a new record-replay interface for defining expected calls, EasyMock tests were both more intuitive and more maintainable. However the third problem remained: sometimes I just want to stub the methods, and not verify that they are called in any specific order or number of times. Some contraints can be relaxed with EasyMock but it always seemed a pain to do extra work when I just wanted the library to do less!
Well, last week I discovered Mockito, a more recent library inspired in part by EasyMock. The difference with Mockito is that stubbing and verification are separated. Instead of recording expectations, you:
- Stub the methods of interest.
- Run your test.
- Selectively verify the calls to your stub as you choose.
This separation works brilliantly when you don’t want to verify everything by default. When the test is unconcerned with exactly how the stub is called, there is no need to verify at all.
You can read more about how Mockito came about on the author’s blog. I highly recommend checking it out!
Note for FireFox users: If, like me, FireFox is your default browser, you may also need to set IE as your default browser in Web Developer. You can do this by opening an HTML file, then going to “File > Browse With …” and setting IE to the default.
You are currently browsing the a little madness blog archives for June, 2008.