Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Test Driven Development, for software and for pancakes

by karlgoethebier (Abbot)
on Jul 24, 2017 at 15:51 UTC ( [id://1195883]=note: print w/replies, xml ) Need Help??


in reply to Re: Test Driven Development, for software and for pancakes
in thread Test Driven Development, for software and for pancakes

Thanks for sharing the cool link. I never really used TDD but anyway - some thoughts: Let's say you want to write a chess engine. You start with the board representation. This is quite tricky. Robert Hyatt needed years to understand how to accomplish this. Nowadays these techniques are less or more well know, but you still need a mistakeless representation. Isn't something like this a use case where you are lost without TDD?

My 2˘ about the other manias:

  1. Everything Has to be an Object: No
  2. Forcing Yourself to Use as Many Design Patterns As Possible: No
  3. Argue Over Code Formatting Styles: Yes. Always in style
  4. Programming has to be Beautiful: Yes. Even the dishes i cook are so (but perhaps my programs are not)
  5. Hire More Developers to do Pair Programming: Yes. I did just a handful of jobs using it but this were my best projects ever

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Replies are listed 'Best First'.
Re^3: Test Driven Development, for software and for pancakes
by BrowserUk (Patriarch) on Jul 25, 2017 at 06:42 UTC
    but you still need a mistakeless representation. Isn't something like this a use case where you are lost without TDD?

    I really fail to see why you think that particular example is amenable to TDD, or unamenable to any of the other non-test-driven development methodologies?

    Nor why a game's internal data representation should be any more "mistakeless" than that of an automated drug dispenser, or a traffic control system, or fingerprint matching algorithm?

    But as you've chosen that example, here's a little thought experiment for you. You are charged with writing a replacement board representation: write your first test.

    Chances are, you simply haven't a clue where to start; and you'd defend that by saying that you need a specification.

    But how do you write a specification for something you have no idea how to write? So maybe you read this (if you haven't already). So, now you know a little about the possible representations and requirement of them, so write that first test. Once again you (probably) cannot.

    One thing I can guarantee, Robert Hyatt didn't use TDD back in 1968, and -- having read a few of his papers -- I doubt that, even given his 50 years of experience and knowledge, that he used it when they switched from rotated bitboards to magic moves circa 2004.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit

      Thanks and best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found