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. Unit Testing... yay or nay?

Unit Testing... yay or nay?

Scheduled Pinned Locked Moved The Lounge
testingbeta-testingquestion
78 Posts 21 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.
  • M Mike Hankey

    I'm a one-man-shop so any QA hasta be done by moi. *PartsBin - An Elctronic Parts Organizer[^] I also use the app so as I find bugs they get fixed quickly. Working on a new version now, so QA in progress. :) *Shameless plug

    Definition of a burocrate; Delegate, Take Credit, shift blame. PartsBin an Electronics Part Organizer - Release Version 1.3.1 JaxCoder.com Latest Article: EventAggregator

    J Offline
    J Offline
    Jeremy Falcon
    wrote on last edited by
    #10

    Nice man. The app looks pretty cool.

    Jeremy Falcon

    M 1 Reply Last reply
    0
    • J Jeremy Falcon

      Mircea Neacsu wrote:

      I am a fan of unit testing. So much that I wrote my own framework that I described in an article here.

      Noice. Same here. It's like the more you do it, the more you see the usefulness. Kinda like eating your veggies. :laugh:

      Mircea Neacsu wrote:

      Sometimes I write tests while I develop a piece of code because it's easier to verify just a small part instead of waiting to the very end.

      Same. Although, I don't use Jest or a testing framework for the temp/intermediary stuff. In the JS/TS world, I'd just pop open a JSFiddle or use a Node immediate window to test stuff. If the code does that I think it will, it makes it way into the routine that I'll eventually unit test for real. Those will hang around though.

      Mircea Neacsu wrote:

      Most of these tests get discarded when the project is finished as they don't make much sense for a finished product.

      Just the temp ones though right? You still keep the non-temp ones? I know for me, probably the best non-obvious reason to keep the non-temp ones is being able to automate finding out when someone breaks your code.

      Mircea Neacsu wrote:

      I never found myself writing tests in advance of the code itself as I understand you should do with TDD.

      Same

      Jeremy Falcon

      M Offline
      M Offline
      Mircea Neacsu
      wrote on last edited by
      #11

      Jeremy Falcon wrote:

      Just the temp ones though right? You still keep the non-temp ones?

      Indeed; a lot of those are for corner/limit cases that would be hard to verify from outside.

      Jeremy Falcon wrote:

      being able to automate finding out when someone breaks your code.

      AKA regression testing. Conversation overheard at work: "if you touch my code again, I'll break your 🐘 hand!" :laugh:

      Mircea

      1 Reply Last reply
      0
      • J Jeremy Falcon

        Nice man. The app looks pretty cool.

        Jeremy Falcon

        M Offline
        M Offline
        Mike Hankey
        wrote on last edited by
        #12

        Thanks for the kind words.

        Definition of a burocrate; Delegate, Take Credit, shift blame. PartsBin an Electronics Part Organizer - Release Version 1.3.1 JaxCoder.com Latest Article: EventAggregator

        1 Reply Last reply
        0
        • J Jeremy Falcon

          So I got to thinking... dangerous I know. But curious to know how many peeps unit test their code. IMO _some_ arguments can be made for not doing BDD/functional testing, but unit testing is hard to say "that's a bad thing" for. I know for me, I used to loathe the concept of unit testing. It was like just as boring and tedious as documentation (that nobody ever reads). That was right up until it saved my bacon a few times. Prior to that experience, I've only ever seen devs write crappy tests that were useless and thus considered it a feel-good exercise for a green checkmark. Didn't really think about the dev just being lousy at writing tests. Still don't do TDD though, but fo sho do unit tests after development. Anyone here big into unit testing? Yay? Nay? Has cooties?

          Jeremy Falcon

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #13

          I have never written Unit Tests per se. I found the way that works for me was to use small apps to test functionality as I develope it, once I am happy with the results I integrate it in the real project. Once the real project get to a stage, then I test functionality as soon as it makes sense, when parts get ended. When ended, I play a couple of days with the debug version before compiling to release and play again for a couple of days. Then I deliver.

          M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

          J H 2 Replies Last reply
          0
          • N Nelek

            I have never written Unit Tests per se. I found the way that works for me was to use small apps to test functionality as I develope it, once I am happy with the results I integrate it in the real project. Once the real project get to a stage, then I test functionality as soon as it makes sense, when parts get ended. When ended, I play a couple of days with the debug version before compiling to release and play again for a couple of days. Then I deliver.

            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

            J Offline
            J Offline
            Jeremy Falcon
            wrote on last edited by
            #14

            Come to the dark side Nelek... come... (evil smiley)

            Jeremy Falcon

            N 1 Reply Last reply
            0
            • J Jeremy Falcon

              So I got to thinking... dangerous I know. But curious to know how many peeps unit test their code. IMO _some_ arguments can be made for not doing BDD/functional testing, but unit testing is hard to say "that's a bad thing" for. I know for me, I used to loathe the concept of unit testing. It was like just as boring and tedious as documentation (that nobody ever reads). That was right up until it saved my bacon a few times. Prior to that experience, I've only ever seen devs write crappy tests that were useless and thus considered it a feel-good exercise for a green checkmark. Didn't really think about the dev just being lousy at writing tests. Still don't do TDD though, but fo sho do unit tests after development. Anyone here big into unit testing? Yay? Nay? Has cooties?

              Jeremy Falcon

              Greg UtasG Offline
              Greg UtasG Offline
              Greg Utas
              wrote on last edited by
              #15

              I've hardly ever written a unit test. The few times I did, it was to test a complex, standalone function. Other than that, the test harness would have been far too much work. System and regression testing (automated) are where it's at. Where I worked, developers tested new features--code that they'd written, in many cases largely standalone--but almost always ran tests with their code integrated into the entire system. A decade ago, Jim Coplien (one of the original C++ gurus) wrote a good article about this. It's fairly long, so scroll to the bottom for his recommendations if you don't have enough patience. Why Most Unit Testing is Waste | PythonTest [^]

              Robust Services Core | Software Techniques for Lemmings | Articles
              The fox knows many things, but the hedgehog knows one big thing.

              <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
              <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

              J 2 Replies Last reply
              0
              • Greg UtasG Greg Utas

                I've hardly ever written a unit test. The few times I did, it was to test a complex, standalone function. Other than that, the test harness would have been far too much work. System and regression testing (automated) are where it's at. Where I worked, developers tested new features--code that they'd written, in many cases largely standalone--but almost always ran tests with their code integrated into the entire system. A decade ago, Jim Coplien (one of the original C++ gurus) wrote a good article about this. It's fairly long, so scroll to the bottom for his recommendations if you don't have enough patience. Why Most Unit Testing is Waste | PythonTest [^]

                Robust Services Core | Software Techniques for Lemmings | Articles
                The fox knows many things, but the hedgehog knows one big thing.

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #16

                Greg Utas wrote:

                Other than that, the test harness would have been far too much work

                Overlooking the "too much work" part... People that say that don't know unit testing. I can promise you that. Not sure what you define as harness, but if you mean setup, say for something data-driven, then mocking and fixtures are a thing. If anyone thinks they don't help alleviate any issues, then they don't know unit testing.

                Greg Utas wrote:

                A decade ago, Jim Coplien (one of the original C++ gurus) wrote a good article about this. It's fairly long, so scroll to the bottom for his recommendations if you don't have enough patience.

                Not trying to turn this into a debate, but you should know that titles don't mean jack to me. Don't care if they wrote an article or not or if he knows C++ or not. Doesn't mean that automatically qualifies him as the expert of all things ever created. I'm not coming at this from a n00b man; I'm just keeping it casual instead of preachy. I can tell you this man, it's usually the people that know the least about a subject that have such strong opinions. Not always, but a lot times that's true.

                Jeremy Falcon

                Greg UtasG H 2 Replies Last reply
                0
                • Greg UtasG Greg Utas

                  I've hardly ever written a unit test. The few times I did, it was to test a complex, standalone function. Other than that, the test harness would have been far too much work. System and regression testing (automated) are where it's at. Where I worked, developers tested new features--code that they'd written, in many cases largely standalone--but almost always ran tests with their code integrated into the entire system. A decade ago, Jim Coplien (one of the original C++ gurus) wrote a good article about this. It's fairly long, so scroll to the bottom for his recommendations if you don't have enough patience. Why Most Unit Testing is Waste | PythonTest [^]

                  Robust Services Core | Software Techniques for Lemmings | Articles
                  The fox knows many things, but the hedgehog knows one big thing.

                  J Offline
                  J Offline
                  Jeremy Falcon
                  wrote on last edited by
                  #17

                  Oh and please don't turn this into one of these dumb git-sucks type debates. I'm too old for that. :sigh:

                  Jeremy Falcon

                  1 Reply Last reply
                  0
                  • J Jeremy Falcon

                    Greg Utas wrote:

                    Other than that, the test harness would have been far too much work

                    Overlooking the "too much work" part... People that say that don't know unit testing. I can promise you that. Not sure what you define as harness, but if you mean setup, say for something data-driven, then mocking and fixtures are a thing. If anyone thinks they don't help alleviate any issues, then they don't know unit testing.

                    Greg Utas wrote:

                    A decade ago, Jim Coplien (one of the original C++ gurus) wrote a good article about this. It's fairly long, so scroll to the bottom for his recommendations if you don't have enough patience.

                    Not trying to turn this into a debate, but you should know that titles don't mean jack to me. Don't care if they wrote an article or not or if he knows C++ or not. Doesn't mean that automatically qualifies him as the expert of all things ever created. I'm not coming at this from a n00b man; I'm just keeping it casual instead of preachy. I can tell you this man, it's usually the people that know the least about a subject that have such strong opinions. Not always, but a lot times that's true.

                    Jeremy Falcon

                    Greg UtasG Offline
                    Greg UtasG Offline
                    Greg Utas
                    wrote on last edited by
                    #18

                    Titles also mean nothing to me. The fact that I have some respect for Coplien is therefore telling. Maybe unit tests work for you. I developed frameworks for most of my career. To test them, I developed applications that used them.

                    Robust Services Core | Software Techniques for Lemmings | Articles
                    The fox knows many things, but the hedgehog knows one big thing.

                    <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
                    <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

                    N J 2 Replies Last reply
                    0
                    • J Jeremy Falcon

                      Come to the dark side Nelek... come... (evil smiley)

                      Jeremy Falcon

                      N Offline
                      N Offline
                      Nelek
                      wrote on last edited by
                      #19

                      Jeremy Falcon wrote:

                      Come to the dark side Nelek... come... (evil smiley)

                      I would, but I am too lazy and procrastinator to do it now. Maybe tomorrow?

                      Jeremy Falcon wrote:

                      (evil smiley)

                      Something like 😈 this?

                      M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                      J 1 Reply Last reply
                      0
                      • Greg UtasG Greg Utas

                        Titles also mean nothing to me. The fact that I have some respect for Coplien is therefore telling. Maybe unit tests work for you. I developed frameworks for most of my career. To test them, I developed applications that used them.

                        Robust Services Core | Software Techniques for Lemmings | Articles
                        The fox knows many things, but the hedgehog knows one big thing.

                        N Offline
                        N Offline
                        Nelek
                        wrote on last edited by
                        #20

                        Greg Utas wrote:

                        To test them, I developed applications that used them.

                        That has been my approach for long too, without programming frames but Apps instead.

                        M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                        1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          So I got to thinking... dangerous I know. But curious to know how many peeps unit test their code. IMO _some_ arguments can be made for not doing BDD/functional testing, but unit testing is hard to say "that's a bad thing" for. I know for me, I used to loathe the concept of unit testing. It was like just as boring and tedious as documentation (that nobody ever reads). That was right up until it saved my bacon a few times. Prior to that experience, I've only ever seen devs write crappy tests that were useless and thus considered it a feel-good exercise for a green checkmark. Didn't really think about the dev just being lousy at writing tests. Still don't do TDD though, but fo sho do unit tests after development. Anyone here big into unit testing? Yay? Nay? Has cooties?

                          Jeremy Falcon

                          D Offline
                          D Offline
                          Daniel Pfeffer
                          wrote on last edited by
                          #21

                          IMO, it only makes sense to do unit testing when the inputs & outputs from a function/module can be specified. To take a very simple case, testing the strlen() function in C: * Input must be a non-null pointer * Output must be a non-negative integer * The (output)th character of the input is a null character. * No null characters are to be found in the range [ 0 .. (output) ) of the input In cases where the output is not easy to check (for example a trigonometric function), exhaustive testing is impractical. In this case, only very simple "sanity" tests can be performed. In real-world code I usually try to test all boundary conditions, but don't try to perform exhaustive testing.

                          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                          J H 2 Replies Last reply
                          0
                          • D Daniel Pfeffer

                            IMO, it only makes sense to do unit testing when the inputs & outputs from a function/module can be specified. To take a very simple case, testing the strlen() function in C: * Input must be a non-null pointer * Output must be a non-negative integer * The (output)th character of the input is a null character. * No null characters are to be found in the range [ 0 .. (output) ) of the input In cases where the output is not easy to check (for example a trigonometric function), exhaustive testing is impractical. In this case, only very simple "sanity" tests can be performed. In real-world code I usually try to test all boundary conditions, but don't try to perform exhaustive testing.

                            Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                            J Offline
                            J Offline
                            Jeremy Falcon
                            wrote on last edited by
                            #22

                            Daniel Pfeffer wrote:

                            IMO, it only makes sense to do unit testing when the inputs & outputs from a function/module can be specified.

                            Fo sho, that's actually a unit test. There other type of larger tests (functional tests) that get a bit more abstract, which one can make a case for or against. But, a unit test should test a very small unit. Typically that will equate to a routine, um... unless you have 5 page long functions. :laugh:

                            Daniel Pfeffer wrote:

                            In cases where the output is not easy to check (for example a trigonometric function), exhaustive testing is impractical. In this case, only very simple "sanity" tests can be performed.

                            Keep in mind, I don't know trig like at all... but most testing frameworks allow you to test all kinds of output. If by not being able to test trig you mean like a picture on the screen, you can even test that too whether it's against a fixture or something else. Or perhaps test the routine before it gets sent to a renderer than then also visually compare and so on. It's like riding a bike, the more you do it the mo' easy it becomes to test.

                            Jeremy Falcon

                            D 1 Reply Last reply
                            0
                            • Greg UtasG Greg Utas

                              Titles also mean nothing to me. The fact that I have some respect for Coplien is therefore telling. Maybe unit tests work for you. I developed frameworks for most of my career. To test them, I developed applications that used them.

                              Robust Services Core | Software Techniques for Lemmings | Articles
                              The fox knows many things, but the hedgehog knows one big thing.

                              J Offline
                              J Offline
                              Jeremy Falcon
                              wrote on last edited by
                              #23

                              Greg Utas wrote:

                              Titles also mean nothing to me. The fact that I have some respect for Coplien is therefore telling.

                              Fair enough.

                              Greg Utas wrote:

                              Maybe unit tests work for you. I developed frameworks for most of my career

                              There's absolutely no reason a framework would prevent unit testing. If you think that, and I swear I'm not trying to be mean, but you don't know unit testing. And that's ok... I don't know everything. So, just say you don't wanna do it because you don't wanna do it. :laugh:

                              Jeremy Falcon

                              Greg UtasG 1 Reply Last reply
                              0
                              • N Nelek

                                Jeremy Falcon wrote:

                                Come to the dark side Nelek... come... (evil smiley)

                                I would, but I am too lazy and procrastinator to do it now. Maybe tomorrow?

                                Jeremy Falcon wrote:

                                (evil smiley)

                                Something like 😈 this?

                                M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                                J Offline
                                J Offline
                                Jeremy Falcon
                                wrote on last edited by
                                #24

                                Nelek wrote:

                                I would, but I am too lazy and procrastinator to do it now.

                                Thanks for being honest, buddy. :laugh: :laugh: :laugh: This is why we get along.

                                Nelek wrote:

                                Something like 😈 this?

                                Yes!!!! :omg:

                                Jeremy Falcon

                                N 1 Reply Last reply
                                0
                                • J Jeremy Falcon

                                  Greg Utas wrote:

                                  Titles also mean nothing to me. The fact that I have some respect for Coplien is therefore telling.

                                  Fair enough.

                                  Greg Utas wrote:

                                  Maybe unit tests work for you. I developed frameworks for most of my career

                                  There's absolutely no reason a framework would prevent unit testing. If you think that, and I swear I'm not trying to be mean, but you don't know unit testing. And that's ok... I don't know everything. So, just say you don't wanna do it because you don't wanna do it. :laugh:

                                  Jeremy Falcon

                                  Greg UtasG Offline
                                  Greg UtasG Offline
                                  Greg Utas
                                  wrote on last edited by
                                  #25

                                  Quote:

                                  There's absolutely no reason a framework would prevent unit testing.

                                  I wasn't talking about a framework preventing it. I was talking about testing the framework itself.

                                  Robust Services Core | Software Techniques for Lemmings | Articles
                                  The fox knows many things, but the hedgehog knows one big thing.

                                  <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
                                  <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

                                  J 1 Reply Last reply
                                  0
                                  • J Jeremy Falcon

                                    So I got to thinking... dangerous I know. But curious to know how many peeps unit test their code. IMO _some_ arguments can be made for not doing BDD/functional testing, but unit testing is hard to say "that's a bad thing" for. I know for me, I used to loathe the concept of unit testing. It was like just as boring and tedious as documentation (that nobody ever reads). That was right up until it saved my bacon a few times. Prior to that experience, I've only ever seen devs write crappy tests that were useless and thus considered it a feel-good exercise for a green checkmark. Didn't really think about the dev just being lousy at writing tests. Still don't do TDD though, but fo sho do unit tests after development. Anyone here big into unit testing? Yay? Nay? Has cooties?

                                    Jeremy Falcon

                                    R Offline
                                    R Offline
                                    Ravi Bhavnani
                                    wrote on last edited by
                                    #26

                                    Yay for unit tests, because I like to sleep easy at night. :) Our DOD requires the creation/modification of unit tests when new functionality is implemented and existing functionality modified.  We don't yet do TDD but are in the process of implementing integration test projects that would make it easy for devs to write the test before writing the code. Note: IMHO best practices like these require the buy in of management.  Thankfully all our dev managers are ex-developers. /ravi

                                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                    D J 2 Replies Last reply
                                    0
                                    • J Jeremy Falcon

                                      Daniel Pfeffer wrote:

                                      IMO, it only makes sense to do unit testing when the inputs & outputs from a function/module can be specified.

                                      Fo sho, that's actually a unit test. There other type of larger tests (functional tests) that get a bit more abstract, which one can make a case for or against. But, a unit test should test a very small unit. Typically that will equate to a routine, um... unless you have 5 page long functions. :laugh:

                                      Daniel Pfeffer wrote:

                                      In cases where the output is not easy to check (for example a trigonometric function), exhaustive testing is impractical. In this case, only very simple "sanity" tests can be performed.

                                      Keep in mind, I don't know trig like at all... but most testing frameworks allow you to test all kinds of output. If by not being able to test trig you mean like a picture on the screen, you can even test that too whether it's against a fixture or something else. Or perhaps test the routine before it gets sent to a renderer than then also visually compare and so on. It's like riding a bike, the more you do it the mo' easy it becomes to test.

                                      Jeremy Falcon

                                      D Offline
                                      D Offline
                                      Daniel Pfeffer
                                      wrote on last edited by
                                      #27

                                      One can only test a trigonometric function by comparing its results to the results of another implementation coded using a different approximation. The problem is that one has to write this additional implementation, at least doubling the work that must be performed. One can perform spot checks by comparing the results to known result calculated by another implementation, but that is hardly an exhaustive test of one's implementation.

                                      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                      J 1 Reply Last reply
                                      0
                                      • R Ravi Bhavnani

                                        Yay for unit tests, because I like to sleep easy at night. :) Our DOD requires the creation/modification of unit tests when new functionality is implemented and existing functionality modified.  We don't yet do TDD but are in the process of implementing integration test projects that would make it easy for devs to write the test before writing the code. Note: IMHO best practices like these require the buy in of management.  Thankfully all our dev managers are ex-developers. /ravi

                                        My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                        D Offline
                                        D Offline
                                        Daniel Pfeffer
                                        wrote on last edited by
                                        #28

                                        Ravi Bhavnani wrote:

                                        Note: IMHO best practices like these require the buy in of management.  Thankfully all our dev managers are ex-developers.

                                        Upvoted for this. Over the decades, I have tried many times to get better practices to be adopted in my places of employment. My attempts have failed, usually when the managers realized that it isn't a magic bullet, and that there is a learning curve for adoption.

                                        Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                        J 1 Reply Last reply
                                        0
                                        • J Jeremy Falcon

                                          So I got to thinking... dangerous I know. But curious to know how many peeps unit test their code. IMO _some_ arguments can be made for not doing BDD/functional testing, but unit testing is hard to say "that's a bad thing" for. I know for me, I used to loathe the concept of unit testing. It was like just as boring and tedious as documentation (that nobody ever reads). That was right up until it saved my bacon a few times. Prior to that experience, I've only ever seen devs write crappy tests that were useless and thus considered it a feel-good exercise for a green checkmark. Didn't really think about the dev just being lousy at writing tests. Still don't do TDD though, but fo sho do unit tests after development. Anyone here big into unit testing? Yay? Nay? Has cooties?

                                          Jeremy Falcon

                                          L Offline
                                          L Offline
                                          lmoelleb
                                          wrote on last edited by
                                          #29

                                          Sometimes I am lazy and skip them - typically when I am not quite sure I have the main "flow" worked out. It gives a short term benefit not spending time on them, but of course that has to be paid later - so I do at least make sure to write decoupled code that I can easily add the test. If I am reasonable certain of the flow, I write the test along with the code (sometimes even before as TDD, but that is rare). It is often much faster to itterate over a code block in the test than running an application. And of course, when I do go back and write the tests I skipped I find a bug or two.... In general it works as an investment: loose an hour writing a test now, or waste a day at a later time due to lack of tests... Sometimes the hour now is worth more than the day in the future. It only becomes a problem if the cost of the day in the future isn't even considered when skipping the test.

                                          J 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