Re: A quick newbie question on TOP.



Harry wrote:

TDD? Hmm, will surely check it out. However, am skeptical at the very
outset (for reasons already mentioned). Plus, even for non-GUI
situations, sometimes writing code to programmatically test another
piece of code is, in my experience, non-trivial. Eg, you have to be
able to come up with accurate invariants, embed more intermediate
state/expressions in the original code, etc. (Java, not having
conditional compilation, makes you think twice whether or not to slow
down a small little function by inserting additional TDD test code),
etc.

Test-first never slows you down.

If you only write lines of code in reponse to failing tests, this
forces the code to be more testable. And we are not talking about
rigorously defined QA-style tests. Just whatever brainless test you can
get to fail.

For Java, get with JUnit.

That's no excuse not to write them.

Again, the work culture on the whole is sometimes such that you cannot
but comply with the hostile demands. Unless, of course, you're willing
lose your job to a more 'pragmatic' programmer.

Well, the Pragmatic Programmers are totally behind TDD, and they are
not about to take my job. Yes indeed there are bosses out there who
will fire a worker who is delivering features early and often, with a
super-low bug rate, and will replace them with a code monkey who
creates bugs all day. Much of this is just sticking to your guns and
letting your velocity speak for itself.

(And, unlike TOP, you will find in TDD a thriving community supporting some
major killer apps, such as Eclipse or Rails.)

Could it be because they are open-source, community-driven apps?

That too. They happen to be the leaders in fields of open-source
alternatives that support less TDD, and have less clean code and high
velocity.

In private/small
business s/w however, the final executable is what ultimately matters
to the customer and to the (typical) mgt folks. So, it is legal and
infact you are expected to load whatever crap you can in order to meet
a release deadline.

A year from now, when the customer asks for a new feature, you
shouldn't have to say "that will now cost twice as much as it would
have last year, if you had thought to mention it."

Per the other thread on this topic, high-quality is cheaper, both
short-term and long-term.

--
Phlip

.



Relevant Pages

  • Re: Test Tools
    ... Extreme programming guys seems to be proponent to this practice. ... TDD works for Acceptance Tests and Unit Tests. ... Debugging is boring. ... a lot the way the programmer does his job, and therefore, the way ...
    (comp.software.testing)
  • Re: Bitwise Mag editorial calls OOP Snake Oil
    ... In my view, TDD ... > proponents have an extremely myopic view of software development. ... Programmer: I can't think of a test for that. ... Customer: Should I put more people on the project? ...
    (comp.object)
  • Re: TDD and private classes/usercontrols
    ... So whether a programmer formally states the Business ... But I didn't think TDD is supposed to identify this kind of stuff. ... paralleling tdd (okay unit testing) and the compiler ... but it is definitely NOT rubbish. ...
    (microsoft.public.vb.general.discussion)
  • Re: The Override Problem
    ... Andrew McDonagh wrote or quoted: ... > Any (Java) programmer who can't TDD will soon find their resumes ...
    (comp.lang.java.programmer)
  • Re: rant -> your religion gets bashed here ... [long]
    ... that he is not a fashionable chap using XML. ... I concluded, as a consequence of that thread, that TDD has nothing to ... programmed in a more usable language. ... It allows the C programmer to fantasize that he is a "real" ...
    (comp.programming)