Archive Page 2
WTF 2.0
I’ve never been particularly comfortable with the Web 2.0 label that seems to get applied to everything these days. It’s probably one of the most overused and misapplied marketing labels I’ve ever come across in my experience in the software industry. At least during the dot-com boom you knew what people were talking about – using the web to sell stuff to people1.
What is the accepted definition of Web 2.0 anyway2? In a very real sense it’s a term that was coined by Tim O’Reilly to sell convention space. As he said in this article recently:
Continue reading ‘WTF 2.0′
Filed under: Business, Marketing, Web2.0 | 7 Comments
![]() |
| Picture by greefus groinks |
In the previous part of this series on retrofitting unit tests I talked about how you can break the unit-test as integration-test pattern by introducing mock objects. Probably the best way to do this is by using one of the many mock object toolkits out there1 . For Java development my preference is for EasyMock although there are plenty of others.
Introducing mock objects can cause their own set of headaches though and when retrofitting unit tests to existing code you’re likely to find a number of reasons why it can prove difficult or even impossible to introduce them.
Continue reading ‘Retrofitting Unit Tests Part 3 – Mock Object Hell’
Filed under: Agile, Software Development, Unit Testing | Leave a Comment
![]() |
| Picture by scamall Some rights reserved. |
Damien Mulley has a series of posts about how to rig the Irish election and it all sounds like a fierce hard amount of work to me. I have a much simpler idea about how you might influence the outcome of a general election in Ireland1.
1. Make sure your political party has a well organised grass-roots movement like, say, this one does.
2. Make excuses and some lame attempts to embarrass the public into accepting e-Voting machines, solving a problem that doesn’t exist2. You could try these ones. I think we already have some in stock.
Continue reading ‘Rigging the Irish Election? I Have A Better Idea.’
Filed under: Humour, Politics | 2 Comments
![]() |
| Picture by icathing |
One of the most common mistakes I’ve found, particularly with teams who haven’t had a good deal of experience of unit testing or TDD, is that if they do have unit tests they’re often really integration tests with fake mustaches. A small, relatively self-contained piece of code needs a database with test data or a running ORB and server process otherwise the test “fails”.
The issue here is one of scope and the key word is “unit”. Typically this is a single class but could even be a single method in a class. A unit test should only test a single unit of code and not any of its external dependencies. If you’re writing a test to see if a particular Java class aggregates some data correctly prior to writing it to a database then you shouldn’t need a database to find out if it works or not. The test ends when the database is invoked with the correct (or incorrect!) data and the database is treated like a black box that just works.
Continue reading ‘Retrofitting Unit Tests Part 2 – When A Unit Test Isn’t’
Filed under: Agile, Software Development, Unit Testing | Leave a Comment
Retrofitting Unit Tests
![]() |
| Picture by hugovk |
A while ago I promised to write a few articles on the art of test-driven development or TDD1. Rather than starting with TDD itself I wanted to start by talking about what happens when you try to write unit tests after you write your code.
This can happen for any number of reasons. A team may want a suite of unit tests with good coverage but may not be willing or experienced enough to either try TDD or make it work. All too frequently a team that isn’t used to writing unit tests, or can’t get it’s collective head around how you can write a test for something that doesn’t exist yet, will usually revert to writing the test afterwards. The result is that unit tests drop down on the priority list and are the first thing to be cut when a project starts slipping.
Filed under: Agile, Software Development, Unit Testing | 3 Comments





