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. Other Discussions
  3. The Weird and The Wonderful
  4. Test-driven voodoo magic

Test-driven voodoo magic

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasewcfsysadminbusinessregex
13 Posts 12 Posters 0 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.
  • J Offline
    J Offline
    jesarg
    wrote on last edited by
    #1

    I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

    P S OriginalGriffO G L 6 Replies Last reply
    0
    • J jesarg

      I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

      P Offline
      P Offline
      Paladin2000
      wrote on last edited by
      #2

      Perhaps you could set the server on a nice, comfortable couch and have a psychologist discuss the "daddy issues" with the code, due to inept "parent" programmers..? Same thing.

      1 Reply Last reply
      0
      • J jesarg

        I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

        S Offline
        S Offline
        Slacker007
        wrote on last edited by
        #3

        jesarg wrote:

        but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not.

        :thumbsup:

        Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
        "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) "It is the celestial scrotum of good luck!" - Nagy Vilmos (2011)

        1 Reply Last reply
        0
        • J jesarg

          I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

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

          jesarg wrote:

          stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not.

          I didn't know it was a recognised technique - I've been doing my testing that way for years... :-D

          Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

          "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
          • J jesarg

            I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #5

            jesarg wrote:

            hiring a witch doctor to stand next to the source control server

            Hmm. I administer a number of SourceSafe data bases. Maybe sacrificing small animals is what I've been missing...

            Software Zen: delete this;

            1 Reply Last reply
            0
            • J jesarg

              I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

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

              I only know a lazy cargo cult Java team. They turn everything into a hollow useless ritual that's not worth the work you put into it. They also wanted me to write unit tests. The problem was that they were far too agile to provide any specifications about what might be correct and what is not correct. To be precise, they were not able to come up with any specifications at all. So I was creative and tested everything that might possibly go wrong that came to my mind. The result was that practically all the tests failed, once I checked them in. Oh horror! The build ritual failed! And how did they 'fix' it? No, not by looking at the tests and sorting out where the tests might be too strict or where they might be pointing out some issues. They simply commented out all the code in the tests and checked them in again. Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

              And from the clouds a mighty voice spoke:
              "Smile and be happy, for it could come worse!"

              And I smiled and was happy
              And it came worse.

              B E J 3 Replies Last reply
              0
              • L Lost User

                I only know a lazy cargo cult Java team. They turn everything into a hollow useless ritual that's not worth the work you put into it. They also wanted me to write unit tests. The problem was that they were far too agile to provide any specifications about what might be correct and what is not correct. To be precise, they were not able to come up with any specifications at all. So I was creative and tested everything that might possibly go wrong that came to my mind. The result was that practically all the tests failed, once I checked them in. Oh horror! The build ritual failed! And how did they 'fix' it? No, not by looking at the tests and sorting out where the tests might be too strict or where they might be pointing out some issues. They simply commented out all the code in the tests and checked them in again. Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

                And from the clouds a mighty voice spoke:
                "Smile and be happy, for it could come worse!"

                And I smiled and was happy
                And it came worse.

                B Offline
                B Offline
                Bernhard Hiller
                wrote on last edited by
                #7

                CDP1802 wrote:

                they were not able to come up with any specifications at all.

                Looks quite familiar to me. Someone in our company decided then that we desperately need to get a test tool...

                I 1 Reply Last reply
                0
                • B Bernhard Hiller

                  CDP1802 wrote:

                  they were not able to come up with any specifications at all.

                  Looks quite familiar to me. Someone in our company decided then that we desperately need to get a test tool...

                  I Offline
                  I Offline
                  ii_noname_ii
                  wrote on last edited by
                  #8

                  Keep the managers busy, distract them, so they leave you alone.. lol I just test, as a user would. I'm a programmer & designer & db admin & test tool. :laugh: *throws a bone to manager to keep him busy with something else* FETCH!

                  1 Reply Last reply
                  0
                  • L Lost User

                    I only know a lazy cargo cult Java team. They turn everything into a hollow useless ritual that's not worth the work you put into it. They also wanted me to write unit tests. The problem was that they were far too agile to provide any specifications about what might be correct and what is not correct. To be precise, they were not able to come up with any specifications at all. So I was creative and tested everything that might possibly go wrong that came to my mind. The result was that practically all the tests failed, once I checked them in. Oh horror! The build ritual failed! And how did they 'fix' it? No, not by looking at the tests and sorting out where the tests might be too strict or where they might be pointing out some issues. They simply commented out all the code in the tests and checked them in again. Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

                    And from the clouds a mighty voice spoke:
                    "Smile and be happy, for it could come worse!"

                    And I smiled and was happy
                    And it came worse.

                    E Offline
                    E Offline
                    ekolis
                    wrote on last edited by
                    #9

                    CDP1802 wrote:

                    Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

                    Wouldn't that be NaN% successful? Or did they only comment out the code INSIDE the tests, not the tests themselves?

                    L 1 Reply Last reply
                    0
                    • E ekolis

                      CDP1802 wrote:

                      Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

                      Wouldn't that be NaN% successful? Or did they only comment out the code INSIDE the tests, not the tests themselves?

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

                      Exactly, they commented out everything inside the tests that could potentially fail, mostly the assertions. They did leave the parts which call methods, so that the tests still 'cover' much of the code.

                      And from the clouds a mighty voice spoke:
                      "Smile and be happy, for it could come worse!"

                      And I smiled and was happy
                      And it came worse.

                      B 1 Reply Last reply
                      0
                      • L Lost User

                        I only know a lazy cargo cult Java team. They turn everything into a hollow useless ritual that's not worth the work you put into it. They also wanted me to write unit tests. The problem was that they were far too agile to provide any specifications about what might be correct and what is not correct. To be precise, they were not able to come up with any specifications at all. So I was creative and tested everything that might possibly go wrong that came to my mind. The result was that practically all the tests failed, once I checked them in. Oh horror! The build ritual failed! And how did they 'fix' it? No, not by looking at the tests and sorting out where the tests might be too strict or where they might be pointing out some issues. They simply commented out all the code in the tests and checked them in again. Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.

                        And from the clouds a mighty voice spoke:
                        "Smile and be happy, for it could come worse!"

                        And I smiled and was happy
                        And it came worse.

                        J Offline
                        J Offline
                        Julien Villers
                        wrote on last edited by
                        #11

                        CDP1802 wrote:

                        cargo cult

                        The expression I was gonna use! :thumbsup: There seem to be no lack of cargo culting around agile sadly.

                        'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail

                        1 Reply Last reply
                        0
                        • L Lost User

                          Exactly, they commented out everything inside the tests that could potentially fail, mostly the assertions. They did leave the parts which call methods, so that the tests still 'cover' much of the code.

                          And from the clouds a mighty voice spoke:
                          "Smile and be happy, for it could come worse!"

                          And I smiled and was happy
                          And it came worse.

                          B Offline
                          B Offline
                          BillW33
                          wrote on last edited by
                          #12

                          That is just really sad. :sigh: The tests are worse than useless, they are misleading because it looks like you have good coverage and are passing all the tests. X|

                          Just because the code works, it doesn't mean that it is good code.

                          1 Reply Last reply
                          0
                          • J jesarg

                            I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile. The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them. I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not. Know any witch doctors looking for employment?

                            P Offline
                            P Offline
                            prasun r
                            wrote on last edited by
                            #13

                            that is the default testing technique used by millions of programmers. unless you have good dedicated programmers who really care about their code this unit testing BS will not yield any fruit...and the catch is if you have good programmers then very rarely they would need unit tests as they will write it right the first time. I deal with such programmers everyday they add 5 items to a list then check if the list has 5 items as if there was some leak in CLR.

                            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