• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Need an alternative solution to this recursion problem using array

Posts: 10780
Hibernate Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:It doesn't. TDD does not promise a guarantee correctness of your solution...but rather forces you to think about the requirements prior jumping on the actual implementation.

Yes, that makes a lot of sense. I guess it goes back to the "what" I'm always banging on about.

Back in Jurassic times, one of the things we were taught was to spend time on a "mission statement" - ie, a short sentence or paragraph that outlines the goal of an app, or module or program - which was one of our ways of "keeping your eye on the ball" and avoiding feature creep.

Unfortunately, it was by no means universal, and the quality of these statements could vary wildly (if there was even one to begin with), so I do like the formality of having to write a suite of tests before you start coding.

I guess my worry is that the tests could become an end in themselves, and that you write code simply to pass the tests rather than to perform the function they're meant to model.

Either way, it suggests to me that the tests that Ranajoy (or codebat) supplied are incomplete because they don't fully define the problem, whereas if they'd supplied a test like mine with an expected result, there would be no ambiguity.
Which probably makes it a good example of a "bad" test suite.

Interesting stuff.

Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic