Loading ...
Sorry, an error occurred while loading the content.

TDD + effort != return

Expand Messages
  • Paul Cowan
    I would like some debate that the following post has provoked me to ask some questions of my own devlopment
    Message 1 of 90 , Sep 21, 2008
      I would like some debate that the following post has provoked me to ask some questions of my  own devlopment process:


      I get the impression that a lot of people in the community have been stating and reiterating that TDD, BDD, whatever is just fantastic and we should all do it and anybody who is not, is obviously doing something wrong.

      I do practice TDD for the design merits but it has taken me a long time to get up to speed with it.

      I made countless (and still do) mistakes at the start and the learning curve has been steep.

      My first experience was that all the developers started with the best intentions but our initial tests were un-maintainable as they were affectively integration tests.

      Using a mocking framework helped to write maintainable, fast running tests. but took a period of adjustment to get up to speed. 

      I do love the test first paradigm but I often wonder if I have actually got the return that my outlay warrants.

      I use NHibernate and I rarely mock out ISession, ISessionFactory or ICriteria etc.

      If I was after high code coverage (and I am not saying everyone is), I would have to mock out these for no other reason than to get high code coverage.  I use layering to hide this code behind its own abstracted dependency.  

      What if I have a WCF or asmx proxy, then should I write tests just to keep my code coverage high (if you are a code coverage zealot)

      A side effect of test first is you get unit tests to test your logic but if you are expecting unit tests to catch bugs and keep QA to a minimum then you are approaching the methodology wrong.

      I also have a problem with new people coming onto the project who are inexperienced with TDD.  They naturally write unmaintainable bad tests.

      Maybe it is different where you are geographically but I struggle to find resource with the relevant skills.  I find myself writing the tests or fixing the broken tests a lot.

      TDD is a massive outlay and we should and I am questioning its return or how we could get a quicker return.

      I agree refactoring does not make sense without TDD but what about the extra time involved in "getting things out the door".


      Win £3000 to spend on whatever you want at Uni! Click here to WIN!
    • Heinrich Breedt
      TDD have any effect on global warming? (just joking)
      Message 90 of 90 , Sep 23, 2008
        TDD have any effect on global warming?

        (just joking)

        On Wed, Sep 24, 2008 at 12:18 AM, Casey Charlton <casey@...> wrote:

        One of the things explored in this series (and his books, where I cannot provide you with a specific reference) is the "kindness" factor in humanity - apparently a selfless act, but beneath it lies a host of reasons why we are actually kind to other people for selfish reasons ...  unfortunately you being a foreigner will probably not see this series except on some obscure late night TV cable channel :)
        Just because the platypus exists now, does not mean it will survive ... or perhaps it will/would ... part of the genius of evolution is the many and varied aborted attempts at a better way ... much like development! We humans think in such short time spans ...  
        2008/9/23 Greg Young <gregoryyoung1@...>

        >then I'll refer you to a higher authority - it is a basic fundamental of evolution that all life forms min/max ...

        Can you please provide a reference that evolution states that all life
        forms are min/max?

        I have read Darwin many times and never came up with that conclusion,
        just look at the platypus



        On Mon, Sep 22, 2008 at 11:14 PM, Casey Charlton <casey@...> wrote:
        > If you are disagreeing with the statement that people are by nature
        > min/maxxers, then I'll refer you to a higher authority - it is a basic
        > fundamental of evolution that all life forms min/max ... if you are stating
        > that people form their opinions based on their experience, then that seems
        > to be a statement of the bleeding obvious :)
        > If your disagreement is that you think on the whole developers want to do a
        > "good job", perhaps you have worked in places where the carrot/stick exists
        > in a form that makes it in their interest to do a "good job" ... but I said
        > earlier that the problem was finding a reason to make it in the developer's
        > interest to write good code. I have worked in places where it was in the
        > developer's interest to write good code, and in places where it wasn't, and
        > without exception I would say that they always followed what was in their
        > personal interest, whether they consciously knew it or not.
        > And even after that problem is overcome, you have to be able to define "good
        > code" ... which is down to individual perceptions unfortunately, as software
        > is almost too intangible to get two people to agree on what is good code,
        > let alone to get a team of 4 or 5 to agree, and getting even a small, highly
        > skilled and highly focused group like alt.net to agree is nearly impossible.
        > As long as you deal in intangibles, everything is open to interpretation and
        > personal opinion.
        > 2008/9/22 Richard Banks <richard.banks@...>
        >> I wonder if our disagreement is just a reflection of how we view people in
        >> general :-)
        >> My experience has been that with trust, encouragement and clear
        >> expectations that people will _generally_ rise to your expectations and do a
        >> good job, even if it involves more effort. Having said that I've also seen
        >> people who do the exact opposite, are lazy SOB's and will try to get away
        >> with whatever they don't have to do (think Wally from Dilbert). However I've
        >> generally seen far fewer of these type of people and many more of the
        >> former.
        >> If you're experience has been more of the second than the first, then I
        >> can understand why you wouldn't trust people as far as you could kick them.
        >> Regards,
        >> Richard Banks
        >> CSM | CSP | http://richardsbraindump.blogspot.com |
        >> http://twitter.com/rbanks54
        >> From: altdotnet@yahoogroups.com [mailto:altdotnet@yahoogroups.com] On
        >> Behalf Of Casey Charlton
        >> Sent: Monday, 22 September 2008 4:11 PM
        >> To: altdotnet@yahoogroups.com
        >> Subject: Re: [altdotnet] TDD + effort != return
        >> Big difference between wanting to do a bad job,and being happy with doing
        >> a job that gets a pay cheque with minimal effort.
        >> By nature, humans are min/maxxers - we always try and optimise everything
        >> for investment vs reward.
        >> 2008/9/21 Richard Banks <richard.banks@...>
        >> Disagree.
        >> No one starts out wanting to do a bad job. I think they just get
        >> conditioned into acting that way by their environment (nature vs nurture??).
        >> Regards,
        >> Richard Banks
        >> CSM | CSP | http://richardsbraindump.blogspot.com |
        >> http://twitter.com/rbanks54
        >> From: altdotnet@yahoogroups.com [mailto:altdotnet@yahoogroups.com] On
        >> Behalf Of Casey Charlton
        >> Sent: Monday, 22 September 2008 12:17 AM
        >> To: altdotnet@yahoogroups.com
        >> Subject: Re: [altdotnet] TDD + effort != return
        >> It is in the developer's interests to do a development job badly ...
        >> 1) It is "easier" in that it doesn't require spending time learning,
        >> researching, or thinking too hard
        >> 2) It makes the job take much longer, hence the developer has a job for
        >> longer (and on the whole individual developers don't work on fixed price
        >> work)
        >> 3) It keeps the developer in a job if they write bad code that nobody else
        >> can understand or wants to understand
        >> And as it is nearly impossible to demonstrate to a business owner that a
        >> develoepr is "doing a bad job" they have no way of knowing if their
        >> developers are applying the above three rules, or if they are actually
        >> trying to write a good piece of code ... until it is too late ... then the
        >> next developers come along promising everything will be done better ... and
        >> repeat
        >> 2008/9/21 Alan Dean <alan.dean@...>
        >> This speaks to something that I referred to at the Alt.Net UK
        >> Conference earlier this month. I look back over the last decade to
        >> when I started to act as an agent for change in different
        >> organisations to introduce extreme programming and, more lately, Agile
        >> (although I still consider myself more of an extreme programmer than
        >> an agilist).
        >> We then thought that the concepts and practices would prove to be
        >> viral (at least I certainly did),
        >> Why wouldn't they be? They were so self-evidently of value. It was
        >> (and still is) so easy to demonstrate significant productivity
        >> improvements both of individual developers and of development teams
        >> (at least those that were up to 20 / 30 strong).
        >> Yet, time after time, I found myself successfully introducing the
        >> change and delivering the value only to move on to my next change
        >> project and discover that all the concepts and practices dissipated
        >> where they had been introduced.
        >> This, needless to say, is problematic. We must ask ourselves why our
        >> concepts and practices fail to self-propagate. It's like a fission
        >> reaction below critical mass - it simply fizzles out, leaving a
        >> radioactive slag.
        >> I have various thoughts as to why this is the case (and they mostly
        >> revolve around our inability to convince and convert the sponsorship
        >> hierarchy because we are too developer-centric in our worldview).
        >> I am reminded of the early work done during the industrial revolution
        >> to convert what had been craft activities into industrial activities.
        >> The craftsmen who were the subject of the change did not consent
        >> willing (just read up on Luddites) but change did come eventually.
        >> When it did come, it was not on their terms because they lived in
        >> denial. I believe we must not repeat this failure of vision.
        >> I suspect that the article quoted and the conversation arising are
        >> both symptomatic of this situation.
        >> Regards,
        >> Alan Dean
        >> On Sun, Sep 21, 2008 at 11:26 AM, Paul Cowan <dagda1@...> wrote:
        >> > I would like some debate that the following post has provoked me to ask
        >> > some
        >> > questions of my own devlopment process:
        >> >
        >> >
        >> > http://weblogs.asp.net/rosherove/archive/2008/09/20/goodbye-mocks-farewell-stubs.aspx

        It is the mark of an educated mind to be able to entertain a thought
        without accepting it.

      Your message has been successfully submitted and would be delivered to recipients shortly.