First Pass Completed: Rough Draft TDD Demonstration Videos 40

Posted by Brett Schuchert Mon, 05 Apr 2010 06:15:00 GMT

As promised, I’ve made a complete sweep through a series of videos. You can find all of them: here.

These videos include several warts and false starts. Depending on the interest and feedback, I’ll redo these at some point in the future.

Question: Should I repeat this series in C#, or some other language? Some people have expressed interest in this. It’s probably 15 hours of work in C#, so I’d need to know it was worth the effort. What’s your opinion on that?

The videos are meant to be watched in order. The link above is to an album that is in the correct order. Here are the direct links (also in the intended order):

I’ve already received several comments both here on the blog as well as with the videos. I’ll keep track of those comments and incorporate the ones that fit for me.

Each video has a link on its page to download it. However, to download a video, you will have to create an account and log in. So here are the links, these won’t work without first creating an account (I’ll update original blog with these as well):
Comments

Leave a response

  1. Avatar
    Ahmad about 2 hours later:

    A series in C# would be most welcomed!!

  2. Avatar
    Magesh about 3 hours later:

    Very useful videos. Thank you very much.

  3. Avatar
    leo about 3 hours later:

    Will be nice to have a series in C# but with a different story. Anyway I have learned some new Eclipse tricks and see how Fit works, so thanks.

  4. Avatar
    Dean about 5 hours later:

    useful links.. thanks ill save this post.

  5. Avatar
    Ryan Bergman about 6 hours later:

    Yes, C# would be great.

  6. Avatar
    Martinjras about 6 hours later:

    C# would be perfect :)

  7. Avatar
    Oliver R about 7 hours later:

    Greats videos. IMHO a series in C# is not necessary or are the TDD methods and processes significant different?

  8. Avatar
    Matt W. about 8 hours later:

    Actually I have been following you along building my own C# rpn calculator.

    Personally I think there would be only limited value in redoing a them in C#.

    The TDD flow and BDD style tests would very simliar in either language. I beleive most developers have little trouble adapting Java—>C#.

    The main difference would just be the mocking framework?

    Once again, thanks for putting these together!

  9. Avatar
    Isaac Rodriguez about 8 hours later:

    Certainly, a C# version will be very nice to have.

  10. Avatar
    joseph.vano@gmail.com about 9 hours later:

    C# nice to have.

  11. Avatar
    Aleš Roubí?ek about 9 hours later:

    I think, C# version will cost too much for a little value.

    Thank you for nice work.

  12. Avatar
    Doug Rohrer about 9 hours later:

    Nice series – I’m only through the first video so far but it’s nice to see the “transition from TDD -> BDD” as it helps people understand better how to structure tests in from a BDD perspective. Although I’ve been a .Net developer using C# for many years now, I think the example is simple enough that a complete redo for C# isn’t necessary. Perhaps one video hilighting some of the more advanced BDD/DDD tools on .Net (MSpec, for example) may be useful though, but this would be more of a tooling demo than major concepts.

  13. Avatar
    Brett L. Schuchert about 9 hours later:

    Hum… Mixed opinions on a C# version.

    The one commend about mocking tools I can quickly address. Use Moq for C#/.Net. Mockito seems to be heavily influenced by Moq (I think Moq came first, please correct me if I’m wrong).

    Here’s a link to getting started: http://schuchert.wikispaces.com/Mockito.LoginServiceExample

    I’ve used other libraries, and they are fine. I prefer Moq/Mockito. The examples as written in Java using Moq will closely translate (mostly syntax differences in the DSL) to Moq in C#.

  14. Avatar
    Bryan Ash about 10 hours later:

    I loved these videos. It was great to hear you explain the decisions you were making along the way.

    I don’t see much value in repeating the same exercise in C# given its similarity to Java.

    It would be interesting to see the RPN Calculator solved in Ruby or a different problem solved in C#.

    Thank you very much for the time and effort you put into these videos.

  15. Avatar
    Hugo Baraúna about 15 hours later:

    What about Ruby?

  16. Avatar
    Daniel about 16 hours later:

    Fantastic series!!

    Thanks!

  17. Avatar
    Brett L. Schuchert about 19 hours later:

    RE: Ruby

    I do like the language. The last time I looked, the refactoring tools were simply not there. So I’m going to pass on ruby videos for now.

    However… Check these out (and please understand these are OLD): http://schuchert.wikispaces.com/ruby.Tutorials

  18. Avatar
    Marius 1 day later:

    I’m a .Net devloper and I had no problems in understanding this series.

  19. Avatar
    James Scott 1 day later:

    I’ve really enjoyed these videos so far (will watch the remaining four tonight). Thanks for doing them.

    Regarding C# (I’m a .NET developer) I don’t think it would be worth the time. If a C# programmer can’t convert the code samples/IDE shortcuts in their head then they are likely to struggle with this series anyway. If the community really requires a C#/VS version then allow someone from the community to translate them on your behalf. Same goes for any other languages.

    Thanks again, I’ve learned an awful lot already.

  20. Avatar
    Eugene 1 day later:

    Videos are great! Can you provide direct download link?

    btw, repeating these videos in C# will be the waste of time. C# developers won’t have any problems in understanding these videos.

  21. Avatar
    A Y 1 day later:

    A series in C# would be very helpful for someone who is try to sink in with the concept of TDD, please add it.

  22. Avatar
    Brett L. Schuchert 1 day later:
    Each video has a link on its page to download it. However, to download a video, you will have to create an account and log in. So here are the links, these won’t work without first creating an account (I’ll update original blog with these as well):
  23. Avatar
    Bhoomi Kakaiya 1 day later:

    Yes C# would definitely be more helpful. Thanks.

  24. Avatar
    Mahendra Mavani 1 day later:

    I have been running similar series for C# world. More detail at http://mahendramavani.com/archive/2010/04/06/virtual-learning-series-ndash-beginnerrsquos-guide-to-software-craftsmanship.aspx

    Basically it’s a virtual learning series that covers one topic per week (Every Thursday 10:30 CDT) and later on I post code sample and video for future reference.

    Hope that might help somebody over here who are interested in C# version of video

  25. Avatar
    John Donoghue 3 days later:

    I spend most of my days in VB.Net but had no problem following these (extremely useful) videos – don’t see the need for a C# version myself.

  26. Avatar
    k2k 3 days later:

    It looks like the moq was impressed by mockito (like most c# libs :P )

  27. Avatar
    Brett L. Schuchert 3 days later:

    k2k,

    I though Moq came first. So it might be the other way around. Anybody actually know the timeline?

  28. Avatar
    k2k 4 days later:

    I’ve checked the first commit on the google code (there is one month gap – so not for sure)

  29. Avatar
    k2k 4 days later:

    looks like there is no right answer :) http://monkeyisland.pl/2008/02/01/deathwish/

    anyway – great videos – i really enjoy’em :)

  30. Avatar
    Micke 5 days later:

    Hi, awesome videos! But there is one thing i dont understand, why not use an enum instead of the factory? It will result in less code, and typesafe code. And alot less tests needed.

  31. Avatar
    Brett L. Schuchert 6 days later:

    Micke,

    Excellent question, with a whole lot of backdrop. Here’s a touch of that…

    First, here’s a stat from Jerry Weinberg: 2/3 of all 1-line bug fixes introduce new defects. This is in one of his books and I personally confirmed it with in via email.

    Of course, this number does not consider a situation where you have a huge regression suite of automated tests, even so, changing code is dangerous.

    Second, you can look up for numbers, but approximately 80 – 95% of all product cost is done in what is classified as “maintenance”. So we spend more time in maintenance, than “building” – whatever the hell building means.

    Requirements change, apparently well after we’ve released it, this is no surprise. It is dangerous to change existing code.

    Closed (stable, not changing) enumerations are fine. However, like the open API of the RPN calculator, the enum will be open, which requires testing any time it changes.

    So to me, an enum is basically the same (in terms of coupling and maintenance) as an open API when the enum is essentially selecting the operator (or operation, or whatever). Notice, the enum in this case identifies the type.

    In practice, many people do not understand that switching on type can be a problem. In a factory, no, but elsewhere, it can lead to partial duplication of a switch.

    So the enum really can lead to problems.

    Here’s one problem. Imagine if the enum changes. Say the developer keeps the operators in alphabetical order. A change to an enum will force the client code to recompile. Forcing recompilation is a good way to greatly increase coupling, and also deployment size, and time to be ready to deploy. Anything we can do to reduce the size of a releasable component is a good thing for long-lived systems.

    NOW, let’s go into counter arguments against what I just wrote.

    1. The calculator is not likely to be a component, but a complete solution, so testing the whole thing and releasing it is probably not going to cause problems.

    2. You are correct about a lost of type safety. This does not bother me. I’ve deployed solutions in statically typed languages and I’ve also released solutions in dynamically typed languages. I’ve been on projects where both worked and both failed. Not because of static typing (in the case of failures and successes).

    3. In this case, we are strictly using the enum for selection of creation of a type. Not really a problem since this is one case where switching on a enum (or a string) is a reasonable solution.

    But again, I get back to the open-ended nature of the enum. That does bother me (like the open-ended API). So when I see an open-ended enum, I think of it as a code smell. Remember, code smells are not all bad.

    But for this particular solution, is it overkill? Probably. But then it’s not really a big deal, and I see this as nearly idiomatic, so this bit of over design does not bother me. Later on, it sure makes programming the calculator easy.

    And to go one step further, what if we add the the factory the ability to ask for the names of all operators? And then add to each operator a description of what it does?

    Finally, the enum in the calculator bothers me, but what if someone wanted to adapt it to have such type safety? Put it in an adapter, in client code. So the client code can own that. Or, I can imagine both interfaces. A typesafe that may or may not be up to date with all of the actual features, and the dynamic API.

    In any case, I can say that you hit the nail on the head of a point that many people do not like about this problem the way I like to do it. Keep the idea in your back pocket. If it fits, use it. If it’s overkill, don’t use it.

  32. Avatar
    Rob 7 days later:

    +1 for c#

  33. Avatar
    Andrzej 7 days later:

    I agree next time you decide to do another TDD series, Visual Studio and C# would be nice, but still the principles are the same. Good work Brett!

  34. Avatar
    Ajay 7 days later:

    Yes, C# would be really great. +1 for c#.

    Thanks.

  35. Avatar
    Matt 8 days later:

    I’ve not watched this yet (I will when I have a moment!), but it would be great to see the series with C#, so I’ll add my vote!

    Thanks for doing these videos. I’ve always found I hit a stumbling block when trying to get into TDD and things like this really help get me going.

  36. Avatar
    Y 14 days later:

    Nice series. +1 for C# too.

    Just for your info, people can also use ClipNabber (http://clipnabber.com/) to download videos from vimeo for offline viewing.

  37. Avatar
    five finger shoes about 1 month later:

    I very much love all your writing way, very helpful ?

  38. Avatar
    emicsoft about 1 month later:

    M2TS to MKV Converter is the best software for user to convert M2TS to MKV file, With the powerful M2TS to MKV converter,you can convert M2TS to MKV with best quality and convert M2TS to all the video formats.m2ts to mkv converter

  39. Avatar
    Joe P 3 months later:

    Great series that I’m finally catching up on. I think that the false starts enhance the usefulness of the videos. If you redo, you might pretend to make those same false starts. The only think you mihgt change are the times you made typos.

  40. Avatar
    Workout 3 months later:

    Bull-puncher knickers is always at leisure wear the limelight, cowboy comfortable and cool and refreshing knickers shading effect, it is become big period of change garments according to the spring love and melody. Loose t-shirts , vests even swimsuit can matching, become do not fall convention of change garments according to the collocation of the election.

Comments