Thoughts on testing
Image via Wikipedia
Integrating unit testing into Java development as a means to prove suitability and strength of the application. Is there any benefit to doing this or is it just a waste of time and effort?
What happens over time as the code develops and the tests do not, do they merely become a hindrance to the process of creating code?
Interesting…I wrote this a while back and never finished it….now I think I really understand what I was doing when I was writing the tests first and using them to develop the tool/application as I went along. Having just finished the first rewrite of a community contribution which involved rewriting the code in a more object oriented way I deliberately setout to ensure that this rewrite included unit testing. I also deliberately setout to write the tests first and not as a result of writing the code, in some areas I succeeded but in others I have to admit that I wrote the code first and wrote the tests around the code…unfortunately they were probably the classes that I had the most problems with.
Another area I had problems with was not understansing all the tests I needed to write to thoroughly test the application. Something that involves just as much thought as the actual design….tip no1 – think of every possible test case and write it….then write the code…you won’t get bitten in the ass when you deliver it….
Is there time for writing tests?? The real saving with writing tests comes after the fact…when there is a bug or when you need to alter the functionality, this is when you reap the rewards of putting the time and effort into creating tests in the first place…is there time?? yes, build the time into the initial estimate…if they ask why so long then tell them…I need the time to prove to the customer that it works…..
Feelings on the whole TDD process….much better and when you come back to working with the code again and having to refactor some of the code it is so much easier with tests in place that show you it works….do yourself and those that will come after you a favour and write the tests…
Related articles
- Why do we (not) write tests [via Zemanta]
The secret of Vanuatu’s happiness
The South Pacific country of Vanuatu has been voted the happiest place in the world so what makes its inhabitants such a happy lot?Jean Pierre John (photo: James Mair)Not having to worry about money – the secret of Jean Pierre’s happiness (photo: James Mair)Jean Pierre John is living the dream. That popular fantasy of owning one’s own island, complete with swaying coconut palms, coral sea and tropical forest, is his for real.
BBC NEWS | Programmes | From Our Own Correspondent | The secret of Vanuatu’s happiness
I love this quote from the article….
The twin pillars of a classically happy life – strong family ties and a general absence of materialism – are common throughout this island nation.
The simple things in life, it seems, really do make you happy.
Simplicity makes life enjoyable…..and when you have to you make do…..bowls from washed up buoys!!!
Tags: happiness, vanuatu, bbc, life, improvisation, needs, wants, materialism





