Stoofer's Random thoughts
Thursday, December 01, 2005
I can't write my tests until I write my code...
It has been an interesting time for me lately in a professional sense. In the last 12 months I have finally had the chance to try to adopt some agile techniques and put them to the test in a real world software project.
Fabulous! I have never known a project with so few bugs! As a new convert to the TDD fold, I feel that I am quite often evangelising at my collegues on other teams. This must be terrible for them - I can see their pained expressions, but the phrases keep tumbling out, no matter how much I try to keep quiet
"It's sooo much better writing the tests before you write the production code..."
"We have 5 times less bugs raised per day in this project than any other project I have worked on..."
"The project manager loves having builds that 'just work'!"
And so it goes on. The poor devils. I think many of them actively avoid me and my team now, so that we wont try to spread the good news anymore. (I'm starting to understand thep ain suffered by the Jehova's Witnesses as they try to convert me quarter on quarter).
But I understand completely why my collegues are so sceptical. They exist in the old world. The old world of programming is a world of pain and fear. Life is hard and bugs creep out when the test engineers shine the lights of the system test under the chassis of the code. Assuming that the bl**dy kit installs correctly in the first place. They don't have time to write tests, ironically because they are spending too much time fixing up existing problems. It is a vicious circle of the cruellest kind. Witness the reasons for not adopting TDD
However, we are slowly starting to make progress with a few of the more enlightened engineers in other teams. There will be no revolution at my workplace, but a lot can be achieved through baby steps. I was chatting to a collegue the other day about general techie stuff. He has finally started to write some JUnit tests for his new code. This is good stuff, and I enthused at him, keen to see how far down the path he had journeyed.
"Are you writing the tests first?", I asked (without a great deal of hope, it has to be said).
he answered, with a wry smile "I can't write the tests until I know what my class does!".
It's funny how the TDD community sees the world differently. I bit my lip. now was not the time. All I need is a day or 2 pair programming with him....and then we can prove to the world that viral marketting really doesn't work ;-)
Fabulous! I have never known a project with so few bugs! As a new convert to the TDD fold, I feel that I am quite often evangelising at my collegues on other teams. This must be terrible for them - I can see their pained expressions, but the phrases keep tumbling out, no matter how much I try to keep quiet
"It's sooo much better writing the tests before you write the production code..."
"We have 5 times less bugs raised per day in this project than any other project I have worked on..."
"The project manager loves having builds that 'just work'!"
And so it goes on. The poor devils. I think many of them actively avoid me and my team now, so that we wont try to spread the good news anymore. (I'm starting to understand thep ain suffered by the Jehova's Witnesses as they try to convert me quarter on quarter).
But I understand completely why my collegues are so sceptical. They exist in the old world. The old world of programming is a world of pain and fear. Life is hard and bugs creep out when the test engineers shine the lights of the system test under the chassis of the code. Assuming that the bl**dy kit installs correctly in the first place. They don't have time to write tests, ironically because they are spending too much time fixing up existing problems. It is a vicious circle of the cruellest kind. Witness the reasons for not adopting TDD
- My team doesn't practice TDD. I wont get my work done if I start wasting time on unit tests.
- My code works already. I'm wasting my time writing tests.
- I'm changing an old set of classes. The original code was not under test, so I cannot start to test it now.
- I've got to get this done NOW! I can't waste time writing tests - my boss will kill me.
However, we are slowly starting to make progress with a few of the more enlightened engineers in other teams. There will be no revolution at my workplace, but a lot can be achieved through baby steps. I was chatting to a collegue the other day about general techie stuff. He has finally started to write some JUnit tests for his new code. This is good stuff, and I enthused at him, keen to see how far down the path he had journeyed.
"Are you writing the tests first?", I asked (without a great deal of hope, it has to be said).
he answered, with a wry smile "I can't write the tests until I know what my class does!".
It's funny how the TDD community sees the world differently. I bit my lip. now was not the time. All I need is a day or 2 pair programming with him....and then we can prove to the world that viral marketting really doesn't work ;-)
technorati tags: TDD
Hangdog
Its a hard life being a dog....nose and ears the size of a planet.
I could pick out a pheasant from a field full of worn socks, but does she want me to work? No. All she wants me to do is sit still and look into this silly shiny box of hers.
I expect she'll want me to lie down in the mud next....
I could pick out a pheasant from a field full of worn socks, but does she want me to work? No. All she wants me to do is sit still and look into this silly shiny box of hers.
I expect she'll want me to lie down in the mud next....


