This isn’t my usual TDD workflow but I use it when my understanding of the mangauge or language feature are blocking me.
30 karma · joined September 20, 2011
Agile Thoughts podcast: https://agilenoir.biz/series/agile-thoughts/ SciFi Thoughts podcast: https://LancerKind.com/series/SciFi-Thoughts 敏捷理念播客:https://agilenoir.biz/series/敏捷理念/
This isn’t my usual TDD workflow but I use it when my understanding of the mangauge or language feature are blocking me.
TDD is about writing tests as you build the design. You’re not supposed to write a bunch of micro tests before writing any code. Rather you want to write a single micro test, then write a little code, when the test goes from red to green, you then enhance your existing test or add another test, then add a little more product code. So the effect is growing your tests as you grow your product code. Episode 12 illustrates this workflow for a simple example: https://agilenoir.biz/podcast/012-an-example-of-doing-tdd/
The TDD series starts with episode 9 and is still continuing as of episode 15. https://agilenoir.biz/series/agile-thoughts/
Getting a copy of “TDD by Example” or buying a video course will get you further.
You mentioned getting bug fix requests. How many times over the year do requests like this interrupt your other project work? On average, how much of your effort does servicing such requests (research, meet over them, plan a fix, then do the agreed upon fix and test the agreed upon fix, deploy the fix) take? Hours, days,...?
Also, if you don't mind my asking, how many years of experience did you have in working in the IT industry when first trying your hand at TDD?
Measuring code coverage on TDD created software that was built without monitoring the code coverage, then later use code coverage at the end as an evaluation: I've only a few anecdotal (two) instances where I did this and I found the code coverage to be well above 95% for the code base and at 100% for modules that were pure logic. In one of those instances, after many rounds of defect injection, I discovered one or two locations where another unit test could be added.
All in all, I've been pretty happy with TDD. But who cares? I want to hear from the industry why others aren't doing it. :-)
Thank you eesmith, I enjoyed the discussion!
How about hearing some more from others? What's stopping you from doing TDD? Is it because you don't believe it? If you don't believe it, how was it presented to you? Did you try it?
Let me say it another way: if you have a great business idea, tell everyone you can find about it and learn from their reactions/questions what's working in your pitch and not working.
As a business owner, the same process applies. I describe to them what I'm doing, and I can see the evaluation process at work in their face as to whether they get the value I'm trying to create or not. (Or put another way, if the value I'm explaining is actually valuable or not.)
In both cases, I may do nothing and let it fall the way the cards may and then hear their feedback, OR I may make adjustments in real-time as I read the listeners body language and use that as cues to feedback into my value proposition (visit my biz, read my story).
Comedians are masters at finding the heart of a dialog and adjusting (like jazz musicians) what they say to maximize the effect.