Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. TDD for dummies !

TDD for dummies !

Scheduled Pinned Locked Moved The Lounge
comtestinghelpquestion
26 Posts 17 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Wonde Tadesse

    I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

    If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

    .... The Way Of Testivus[^]

    Wonde Tadesse

    B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #3

    :thumbsup:

    1 Reply Last reply
    0
    • W Wonde Tadesse

      I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

      If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

      .... The Way Of Testivus[^]

      Wonde Tadesse

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #4

      If a Test Fails in the night, and no ones there to see it: Does it make an error?!

      D 1 Reply Last reply
      0
      • W Wonde Tadesse

        I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

        If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

        .... The Way Of Testivus[^]

        Wonde Tadesse

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #5

        Codefucious, he say "Man who code and not test, He a farkin' eejit"

        Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • W Wonde Tadesse

          I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

          If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

          .... The Way Of Testivus[^]

          Wonde Tadesse

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #6

          Nice, but writing tests is one thing and having a test-based *design* something very different.

          utf8-cpp

          Z W 2 Replies Last reply
          0
          • N Nemanja Trifunovic

            Nice, but writing tests is one thing and having a test-based *design* something very different.

            utf8-cpp

            Z Offline
            Z Offline
            ZurdoDev
            wrote on last edited by
            #7

            :thumbsup:

            There are only 10 types of people in the world, those who understand binary and those who don't.

            1 Reply Last reply
            0
            • W Wonde Tadesse

              I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

              If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

              .... The Way Of Testivus[^]

              Wonde Tadesse

              A Offline
              A Offline
              AlexCode
              wrote on last edited by
              #8

              Just 2 things: 1st "I often see TDD is dead!" it's a good header if you want to get some pageviews 2nd TDD is not just writing tests...

              W 1 Reply Last reply
              0
              • W Wonde Tadesse

                I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

                If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

                .... The Way Of Testivus[^]

                Wonde Tadesse

                B Offline
                B Offline
                Brisingr Aerowing
                wrote on last edited by
                #9

                LOL!

                What do you get when you cross a joke with a rhetorical question?

                1 Reply Last reply
                0
                • N Nemanja Trifunovic

                  Nice, but writing tests is one thing and having a test-based *design* something very different.

                  utf8-cpp

                  W Offline
                  W Offline
                  Wonde Tadesse
                  wrote on last edited by
                  #10

                  Agreed. But it starts by knowing the basic which is Testing.

                  Wonde Tadesse

                  1 Reply Last reply
                  0
                  • A AlexCode

                    Just 2 things: 1st "I often see TDD is dead!" it's a good header if you want to get some pageviews 2nd TDD is not just writing tests...

                    W Offline
                    W Offline
                    Wonde Tadesse
                    wrote on last edited by
                    #11

                    AlexCode wrote:

                    "I often see TDD is dead!"

                    May be/ May be not. Who knows the outcome!

                    AlexCode wrote:

                    TDD is not just writing tests...

                    Agree. Starts with "T" testing though. If he/she continues his/her dumbness, will follow another round for TDD for Dummmies 102, 202 even 400 and 500 once ! :)

                    Wonde Tadesse

                    1 Reply Last reply
                    0
                    • W Wonde Tadesse

                      I often see TDD is dead, no longer exists blah blah. Well this might help for anyone who is confused want to shape up him/her self.

                      If you write code, write tests The pupil asked the master programmer : “When can I stop writing tests?” The master answered : “When you stop writing code.” The pupil asked : “When do I stop writing code?” The master answered : “When you become a manager.” The pupil trembled and asked : “When do I become a manager?” The master answered : “When you stop writing tests.” The pupil rushed to write some tests.He left skid marks. If the code deserves to be written,it deserves to have tests.

                      .... The Way Of Testivus[^]

                      Wonde Tadesse

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #12

                      TDD as a religion should die. In my previous contract the team (before I joined) followed their own (misguided) interpretation of DDD and TDD. They had an awful lot of passing unit and integration tests (pats on back and a slice of cake for everyone, hoorah! :java:), but the project didn't work properly from the users perspective, it continually missed all it's deadlines and after spending over £1 million on it, the team and the project have been canned (I'd got out before then, it was obvious from the start where the project was heading - I'd raised issues with management, but it all fell on deaf ears). If you're developing a product, it's the product that matters at the end of the day, not the tests. TDD is a nice to have, but it's far from essential.

                      G T W 3 Replies Last reply
                      0
                      • L Lost User

                        TDD as a religion should die. In my previous contract the team (before I joined) followed their own (misguided) interpretation of DDD and TDD. They had an awful lot of passing unit and integration tests (pats on back and a slice of cake for everyone, hoorah! :java:), but the project didn't work properly from the users perspective, it continually missed all it's deadlines and after spending over £1 million on it, the team and the project have been canned (I'd got out before then, it was obvious from the start where the project was heading - I'd raised issues with management, but it all fell on deaf ears). If you're developing a product, it's the product that matters at the end of the day, not the tests. TDD is a nice to have, but it's far from essential.

                        G Offline
                        G Offline
                        glennPattonWork3
                        wrote on last edited by
                        #13

                        I keep seeing a JavaTDD role advertised, I was wondering TDD was a tool box, but from this it appear to a half- bottomed approach to testing...(think I will stay clear...) :)

                        L 1 Reply Last reply
                        0
                        • G glennPattonWork3

                          I keep seeing a JavaTDD role advertised, I was wondering TDD was a tool box, but from this it appear to a half- bottomed approach to testing...(think I will stay clear...) :)

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #14

                          Don't get me wrong, I'm not anti-TDD but it's a means to an end, it's not the end in itself. Too many developers get obsessed with having every possible angle covered by unit tests, in many cases the size of the unit tests become significantly larger than what they're testing. The worst thing is when you see an awful architecture with classes with 32 dependencies - or more - being injected (yes, I have seen this, hard as it is to believe :wtf:) into the constructor, then you see the huge amount of objects being mocked in the unit tests!?!? TDD in itself is a good thing, but in practice I've rarely seen it used in a good way. It's not the fault of TDD, much in the same way as it's not a guns fault someone gets shot. For every team where TDD works my experience is that there are many more teams where it doesn't because of the poor team culture and/or way it's being implemented.

                          M T 2 Replies Last reply
                          0
                          • L Lost User

                            TDD as a religion should die. In my previous contract the team (before I joined) followed their own (misguided) interpretation of DDD and TDD. They had an awful lot of passing unit and integration tests (pats on back and a slice of cake for everyone, hoorah! :java:), but the project didn't work properly from the users perspective, it continually missed all it's deadlines and after spending over £1 million on it, the team and the project have been canned (I'd got out before then, it was obvious from the start where the project was heading - I'd raised issues with management, but it all fell on deaf ears). If you're developing a product, it's the product that matters at the end of the day, not the tests. TDD is a nice to have, but it's far from essential.

                            T Offline
                            T Offline
                            Tasadit
                            wrote on last edited by
                            #15

                            lol did we work on the same project?

                            L 1 Reply Last reply
                            0
                            • T Tasadit

                              lol did we work on the same project?

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #16

                              Possibly, or perhaps it's an indication how pervasive problems are in interpretations of TDD across the board :)

                              1 Reply Last reply
                              0
                              • L Lost User

                                Don't get me wrong, I'm not anti-TDD but it's a means to an end, it's not the end in itself. Too many developers get obsessed with having every possible angle covered by unit tests, in many cases the size of the unit tests become significantly larger than what they're testing. The worst thing is when you see an awful architecture with classes with 32 dependencies - or more - being injected (yes, I have seen this, hard as it is to believe :wtf:) into the constructor, then you see the huge amount of objects being mocked in the unit tests!?!? TDD in itself is a good thing, but in practice I've rarely seen it used in a good way. It's not the fault of TDD, much in the same way as it's not a guns fault someone gets shot. For every team where TDD works my experience is that there are many more teams where it doesn't because of the poor team culture and/or way it's being implemented.

                                M Offline
                                M Offline
                                Mel Padden
                                wrote on last edited by
                                #17

                                Even worse, farkloads of dependency injection, levels of indirection and hopelessly complex and abstruse APIs to facilitate "proper" design, and then.... No tests. Orrrr.... Out of date tests that are never run, and one hopeless soul in a corner who's not really good enough to be a developer but was hired because the budget isn't there for a dedicated test team so we need a muppet to hand-test the entire sorry ball of sh.... Yeeeah. TDD has improved code quality? No it damn well has not. If anything it's become yet anohter excuse for lazy, lackadaisical people to call themselves "architects". Do it right, or not at all. And a good team of coders can minimize the need for test coverage by using decent, intelligent coding practices in the day-to-day.

                                I too dabbled in pacifism once.

                                L 1 Reply Last reply
                                0
                                • M Mel Padden

                                  Even worse, farkloads of dependency injection, levels of indirection and hopelessly complex and abstruse APIs to facilitate "proper" design, and then.... No tests. Orrrr.... Out of date tests that are never run, and one hopeless soul in a corner who's not really good enough to be a developer but was hired because the budget isn't there for a dedicated test team so we need a muppet to hand-test the entire sorry ball of sh.... Yeeeah. TDD has improved code quality? No it damn well has not. If anything it's become yet anohter excuse for lazy, lackadaisical people to call themselves "architects". Do it right, or not at all. And a good team of coders can minimize the need for test coverage by using decent, intelligent coding practices in the day-to-day.

                                  I too dabbled in pacifism once.

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #18

                                  On the project I mentioned, the first warning signs to the team should have been that there were 149 projects in the solution (C#, MVC4) yet all it actually did was show a login form (and even that didn't work properly!) :doh: And when you mention anything you get the usual "you don't understand TDD/DDD", "that's an anti-pattern", "what you're suggesting isn't Agile", etc. (i.e. ways to try and prevent any discussion of the real problems).

                                  V J 2 Replies Last reply
                                  0
                                  • P Paul M Watt

                                    If a Test Fails in the night, and no ones there to see it: Does it make an error?!

                                    D Offline
                                    D Offline
                                    Dan Neely
                                    wrote on last edited by
                                    #19

                                    Not until I log into my computer the next morning and see the cruisecontrol.net icon in my tray has turned red. :laugh:

                                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                                    1 Reply Last reply
                                    0
                                    • L Lost User

                                      Don't get me wrong, I'm not anti-TDD but it's a means to an end, it's not the end in itself. Too many developers get obsessed with having every possible angle covered by unit tests, in many cases the size of the unit tests become significantly larger than what they're testing. The worst thing is when you see an awful architecture with classes with 32 dependencies - or more - being injected (yes, I have seen this, hard as it is to believe :wtf:) into the constructor, then you see the huge amount of objects being mocked in the unit tests!?!? TDD in itself is a good thing, but in practice I've rarely seen it used in a good way. It's not the fault of TDD, much in the same way as it's not a guns fault someone gets shot. For every team where TDD works my experience is that there are many more teams where it doesn't because of the poor team culture and/or way it's being implemented.

                                      T Offline
                                      T Offline
                                      thomas michaud
                                      wrote on last edited by
                                      #20

                                      :thumbsup:

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        On the project I mentioned, the first warning signs to the team should have been that there were 149 projects in the solution (C#, MVC4) yet all it actually did was show a login form (and even that didn't work properly!) :doh: And when you mention anything you get the usual "you don't understand TDD/DDD", "that's an anti-pattern", "what you're suggesting isn't Agile", etc. (i.e. ways to try and prevent any discussion of the real problems).

                                        V Offline
                                        V Offline
                                        Vark111
                                        wrote on last edited by
                                        #21

                                        Brent Jenkins wrote:

                                        there were 149 projects in the solution (C#, MVC4) yet all it actually did was show a login form

                                        My jaw quite literally dropped open when I read this. I know I'm guilty of gold-plating my code, but the worst I've ever gone on a single application is 9 projects. :doh:

                                        L 1 Reply Last reply
                                        0
                                        • L Lost User

                                          On the project I mentioned, the first warning signs to the team should have been that there were 149 projects in the solution (C#, MVC4) yet all it actually did was show a login form (and even that didn't work properly!) :doh: And when you mention anything you get the usual "you don't understand TDD/DDD", "that's an anti-pattern", "what you're suggesting isn't Agile", etc. (i.e. ways to try and prevent any discussion of the real problems).

                                          J Offline
                                          J Offline
                                          jschell
                                          wrote on last edited by
                                          #22

                                          Brent Jenkins wrote:

                                          the first warning signs to the team should have been that there were 149 projects in the solution

                                          Seems like that would have been more like the 100th warning sign unless all of those projects just showed up all at once in the middle of the night.

                                          Brent Jenkins wrote:

                                          and prevent any discussion of the real problems

                                          Process, any process, that doesn't allow change in response to actual work is guaranteed to fail.

                                          L 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups