<p>What do I lose by adopting test driven design?</p>

<p>List only negatives; do not list benefits written in a negative form.</p>

[{'answer_id': 64355, 'author': 'Joel Coehoorn', 'author_id': 3043, 'author_profile': 'https://Stackoverflow.com/users/3043', 'pm_score': 2, 'selected': False, 'text': '<p>You lose a lot of time spent writing tests.  Of course, this might be saved by the end of the project by catching bugs faster.</p>\n'}, {'answer_id': 64358, 'author': 'Jason Cohen', 'author_id': 4926, 'author_profile': 'https://Stackoverflow.com/users/4926', 'pm_score': -1, 'selected': False, 'text': '<p>TDD requires a certain organization for your code.  This might be inefficient or difficult to read.  Or even architecturally wrong; for example, since <code>private</code> methods cannot be called outside a class, you have to make methods non-private to make them testable, which is just wrong.</p>\n\n<p>When code changes, you have to change the tests as well.  With refactoring this can be a \nlot of extra work.</p>\n'}, {'answer_id': 64366, 'author': 'Tim Sullivan', 'author_id': 722, 'author_profile': 'https://Stackoverflow.com/users/722', 'pm_score': 3, 'selected': False, 'text': "<p>Well, and this stretching, you need to debug your tests. Also, there is a certain cost in time for writing the tests, though most people agree that it's an up-front investment that pays off over the lifetime of the application in both time saved debugging and in stability.</p>\n\n<p>The biggest problem I've personally had with it, though, is getting up the discipline to actually write the tests. In a team, especially an established team, it can be hard to convince them that the time spent is worthwhile.</p>\n"}, {'answer_id': 64372, 'author': 'Chris Canal', 'author_id': 5802, 'author_profile': 'https://Stackoverflow.com/users/5802', 'pm_score': 1, 'selected': False, 'text': "<p>I second the answer about initial development time.  You also lose the ability to confortably work without the safety of tests.  I've also been described as a TDD nutbar, so you could lose a few friends ;)</p>\n"}, {'answer_id': 64373, 'author': 'MarcE', 'author_id': 7262, 'author_profile': 'https://Stackoverflow.com/users/7262', 'pm_score': 1, 'selected': False, 'text': '<p>It\'s percieved as slower. Long term that\'s not true in terms of the grief it will save you down the road, but you\'ll end up writing more code so arguably you\'re spending time on "testing not coding". It\'s a flawed argument, but you did ask!</p>\n'}, {'answer_id': 64381, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 6, 'selected': False, 'text': '<p>When you get to the point where you have a large number of tests, changing the system might require re-writing some or all of your tests, depending on which ones got invalidated by the changes.  This could turn a relatively quick modification into a very time-consuming one.</p>\n\n<p>Also, you might start making design decisions based more on TDD than on actually good design prinicipals.  Whereas you may have had a very simple, easy solution that is impossible to test the way TDD demands, you now have a much more complex system that is actually more prone to mistakes.</p>\n'}, {'answer_id': 64383, 'author': 'Vargen', 'author_id': 6371, 'author_profile': 'https://Stackoverflow.com/users/6371', 'pm_score': 1, 'selected': False, 'text': '<p>It can be hard and time consuming writing tests for "random" data like XML-feeds and databases (not that hard). I\'ve spent some time lately working with weather data feeds. It\'s quite confusing writing tests for that, at least as i don\'t have too much experience with TDD.</p>\n'}, {'answer_id': 64402, 'author': 'Rob Cooper', 'author_id': 832, 'author_profile': 'https://Stackoverflow.com/users/832', 'pm_score': 6, 'selected': False, 'text': '<p>I think the biggest problem for me is the HUGE loss of time it takes "getting in to it". I am still very much at the beginning of my journey with TDD (See my <a href="http://cantgrokwontgrok.blogspot.com" rel="noreferrer">blog</a> for updates my testing adventures if you are interested) and I have literally spent <strong>hours</strong> getting started.</p>\n\n<p>It takes a long time to get your brain into "testing mode" and writing "testable code" is a skill in itself.</p>\n\n<p>TBH, I respectfully disagree with <a href="https://stackoverflow.com/questions/64333/what-is-the-downside-to-test-driven-development#64358">Jason Cohen\'s comments</a> on making private methods public, that\'s not what it is about. <strong>I have made no more public methods in my new way of working than before</strong>. It does, however involve architectural changes and allowing for you to "hot plug" modules of code to make everything else easier to test. You should <strong>not</strong> be making the internals of your code more accessible to do this. Otherwise we are back to square one with everything being public, where is the encapsulation in that?</p>\n\n<p>So, (IMO) in a nutshell:</p>\n\n<ul>\n<li>The amount of time taken to think (i.e. actually grok\'ing <em>testing</em>).</li>\n<li>The new knowledge required of knowing how to write testable code.</li>\n<li>Understanding the architectural changes required to make code testable.</li>\n<li>Increasing your skill of "TDD-Coder" while trying to improve all the other skills required for our glorious programming craft :)</li>\n<li>Organising your code base to include test code without screwing your production code.\n\n<hr></li>\n</ul>\n\n<p>PS: If you would like links to positives, I have asked and answered several questions on it, check out my <a href="https://stackoverflow.com/users/832/rob-cooper">profile</a>.</p>\n'}, {'answer_id': 64439, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': -1, 'selected': False, 'text': "<p>You lose the ability to make incremental changes (code refactorings) and still feel warm and fuzzy that the code does what it is supposed to. You lose practically free and painless motivation to structure your code with minimal explicit dependencies. IOW, you'll be able to embed lots of dependencies without noticing. Were you to use TDD the dependencies would show up as pain/smell when writing the tests.</p>\n"}, {'answer_id': 64441, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>You will lose large classes with multiple responsibilities.\nYou will also likely lose large methods with multiple responsibilities.\nYou may lose some ability to refactor, but you will also lose some of the need to refactor.</p>\n\n<p>Jason Cohen said something like:\nTDD requires a certain organization for your code. This might be architecturally wrong; for example, since private methods cannot be called outside a class, you have to make methods non-private to make them testable.</p>\n\n<p>I say this indicates a missed abstraction -- if the private code really needs to be tested, it should probably be in a separate class.</p>\n\n<p>Dave Mann</p>\n'}, {'answer_id': 64453, 'author': 'Chrass', 'author_id': 8600, 'author_profile': 'https://Stackoverflow.com/users/8600', 'pm_score': 4, 'selected': False, 'text': '<p>TDD requires you to plan out how your classes will operate before you write code to pass those tests.  This is both a plus and a minus.</p>\n\n<p>I find it hard to write tests in a "vacuum" --before any code has been written.  In my experience I tend to trip over my tests whenever I inevitably think of something while writing my classes that I forgot while writing my initial tests.  Then it\'s time to not only refactor my classes, but ALSO my tests.  Repeat this three or four times and it can get frustrating.</p>\n\n<p>I prefer to write a draft of my classes first then write (and maintain) a battery of unit tests.  After I have a draft, TDD works fine for me. For example, if a bug is reported, I will write a test to exploit that bug and then fix the code so the test passes.</p>\n'}, {'answer_id': 64463, 'author': 'Calum', 'author_id': 8434, 'author_profile': 'https://Stackoverflow.com/users/8434', 'pm_score': 4, 'selected': False, 'text': '<p>Prototyping can be very difficult with TDD - when you\'re not sure what road you\'re going to take to a solution, writing the tests up-front can be difficult (other than very broad ones). This can be a pain. </p>\n\n<p>Honestly I don\'t think that for "core development" for the vast majority of projects there\'s any real downside, though; it\'s talked down a lot more than it should be, usually by people who believe their code is good enough that they don\'t need tests (it never is) and people who just plain can\'t be bothered to write them.</p>\n'}, {'answer_id': 64465, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': "<p>You have to write applications in a different way: one which makes them testable.  You'd be surprised how difficult this is at first.</p>\n\n<p>Some people find the concept of thinking about what they're going to write before they write it too hard.  Concepts such as mocking can be difficult for some too.  TDD in legacy apps can be very difficult if they weren't designed for testing.  TDD around frameworks that are not TDD friendly can also be a struggle.</p>\n\n<p>TDD is a skill so junior devs may struggle at first (mainly because they haven't been taught to work this way).</p>\n\n<p>Overall though the cons become solved as people become skilled and you end up abstracting away the 'smelly' code and have a more stable system.</p>\n"}, {'answer_id': 64480, 'author': 'Aaron Lee', 'author_id': 8351, 'author_profile': 'https://Stackoverflow.com/users/8351', 'pm_score': 3, 'selected': False, 'text': '<p>If your tests are not very thorough you might fall into a false sense of "everything works" just because you tests pass. Theoretically if your tests pass, the code is working; but if we could write code perfectly the first time we wouldn\'t need tests. The moral here is to make sure to do a sanity check on your own before calling something complete, don\'t just rely on the tests.</p>\n\n<p>On that note, if your sanity check finds something that is not tested, make sure to go back and write a test for it.</p>\n'}, {'answer_id': 64571, 'author': 'Doug T.', 'author_id': 8123, 'author_profile': 'https://Stackoverflow.com/users/8123', 'pm_score': 2, 'selected': False, 'text': '<p>Refocusing on difficult, unforeseen requirements is the constant bane of the programmer. Test-driven development forces you to focus on the already-known, mundane requirements, and limits your development to what has already been imagined.</p>\n\n<p>Think about it, you are likely to end up designing to specific test cases, so you won\'t get creative and start thinking "it would be cool if the user could do X, Y, and Z". Therefore, when that user starts getting all excited about potential cool requirements X, Y, and Z, your design may be too rigidly focused on already specified test cases, and it will be difficult to adjust. </p>\n\n<p>This, of course, is a double edged sword. If you spend all your time designing for every conceivable, imaginable, X, Y, and Z that a user could ever want, you will inevitably never complete anything. If you do complete something, it will be impossible for anyone (including yourself) to have any idea what you\'re doing in your code/design.</p>\n'}, {'answer_id': 64696, 'author': 'Thomas Jespersen', 'author_id': 8547, 'author_profile': 'https://Stackoverflow.com/users/8547', 'pm_score': 8, 'selected': False, 'text': '<p>If you want to do "real" TDD (read: test first with the red, green, refactor steps) then you also have to start using mocks/stubs, when you want to test integration points.</p>\n\n<p>When you start using mocks, after a while, you will want to start using Dependency Injection (DI) and a Inversion of Control (IoC) container. To do that you need to use interfaces for everything (which have a lot of pitfalls themselves). </p>\n\n<p>At the end of the day, you have to write a lot more code, than if you just do it the "plain old way". Instead of just a customer class, you also need to write an interface, a mock class, some IoC configuration and a few tests.</p>\n\n<p>And remember that the test code should also be maintained and cared for. Tests should be as readable as everything else and it takes time to write good code.</p>\n\n<p>Many developers don\'t quite understand how to do all these "the right way". But because everybody tells them that TDD is the only true way to develop software, they just try the best they can.</p>\n\n<p>It is much harder than one might think. Often projects done with TDD end up with a lot of code that nobody really understands. The unit tests often test the wrong thing, the wrong way. And nobody agrees how a good test should look like, not even the so called gurus.</p>\n\n<p>All those tests make it a lot harder to "change" (opposite to refactoring) the behavior of your system and simple changes just becomes too hard and time consuming.</p>\n\n<p>If you read the TDD literature, there are always some very good examples, but often in real life applications, you must have a user interface and a database. This is where TDD gets really hard, and most sources don\'t offer good answers. And if they do, it always involves more abstractions: mock objects, programming to an interface, MVC/MVP patterns etc., which again require a lot of knowledge, and... you have to write even more code.</p>\n\n<p>So be careful... if you don\'t have an enthusiastic team and at least one experienced developer who knows how to write good tests and also knows a few things about good architecture, you really have to think twice before going down the TDD road.</p>\n'}, {'answer_id': 64726, 'author': 'Ron McMahon', 'author_id': 2205331, 'author_profile': 'https://Stackoverflow.com/users/2205331', 'pm_score': 3, 'selected': False, 'text': "<p>The downside to TDD is that it is usually tightly associated with 'Agile' methodology, which places <strong>no</strong> importance on documentation of a system, rather the understanding behind why a test 'should' return one specific value rather than any other resides only in the developer's head.  </p>\n\n<p>As soon as the developer leaves or forgets the reason that the test returns one specific value and not some other, you're screwed.  TDD is fine IF it is adequately documented and surrounded by human-readable (ie. pointy-haired manager) documentation that can be referred to in 5 years when the world changes and your app needs to as well.</p>\n\n<p>When I speak of documentation, this isn't a blurb in code, this is official writing that exists external to the application, such as use cases and background information that can be referred to by managers, lawyers and the poor sap who has to update your code in 2011.</p>\n"}, {'answer_id': 64801, 'author': 'Martin08', 'author_id': 8203, 'author_profile': 'https://Stackoverflow.com/users/8203', 'pm_score': 3, 'selected': False, 'text': "<p>I've encountered several situations where TDD makes me crazy. To name some:</p>\n<ul>\n<li><p>Test case maintainability:</p>\n<p>If you're in a big enterprise, many chances are that you don't have to write the test cases yourself or at least most of them are written by someone else when you enter the company. An application's features changes from time to time and if you don't have a system in place, such as HP Quality Center, to track them, you'll turn crazy in no time.</p>\n<p>This also means that it'll take new team members a fair amount of time to grab what's going on with the test cases. In turn, this can be translated into more money needed.</p>\n</li>\n<li><p>Test automation complexity:</p>\n<p>If you automate some or all of the test cases into machine-runnable test scripts, you will have to make sure these test scripts are in sync with their corresponding manual test cases and in line with the application changes.</p>\n<p>Also, you'll spend time to debug the codes that help you catch bugs. In my opinion, most of these bugs come from the testing team's failure to reflect the application changes in the automation test script. Changes in business logic, GUI and other internal stuff can make your scripts stop running or running unreliably. Sometimes the changes are very subtle and difficult to detect. Once all of my scripts report failure because they based their calculation on information from table 1 while table 1 was now table 2 (because someone swapped the name of the table objects in the application code).</p>\n</li>\n</ul>\n"}, {'answer_id': 65042, 'author': 'Kilhoffer', 'author_id': 5469, 'author_profile': 'https://Stackoverflow.com/users/5469', 'pm_score': 0, 'selected': False, 'text': '<p>Let me add that if you apply BDD principles to a TDD project, you can alleviate a few of the major drawbacks listed here (confusion, misunderstandings, etc.). If you\'re not familiar with BDD, you should read Dan North\'s introduction. He came up the concept in answer to some of the issues that arose from applying TDD at the workplace. Dan\'s intro to BDD can be found <a href="http://dannorth.net/introducing-bdd" rel="nofollow noreferrer">here</a>.</p>\n\n<p>I only make this suggestion because BDD addresses some of these negatives and acts as a gap-stop. You\'ll want to consider this when collecting your feedback.</p>\n'}, {'answer_id': 65539, 'author': 'Garth Gilmour', 'author_id': 2635682, 'author_profile': 'https://Stackoverflow.com/users/2635682', 'pm_score': 5, 'selected': False, 'text': "<p>On your first TDD project there are two big losses, time and personal freedom</p>\n\n<p>You lose time because:</p>\n\n<ul>\n<li>Creating a comprehensive, refactored, maintainable suite of unit and acceptance tests adds major time to the first iteration of the project. This may be time saved in the long run but equally it can be time you don't have to spare.</li>\n<li>You need to choose and become expert in a core set of tools. A unit testing tool needs to be supplemented by some kind of mocking framework and both need to become part of your automated build system. You also want to pick and generate appropriate metrics.</li>\n</ul>\n\n<p>You lose personal freedom because: </p>\n\n<ul>\n<li>TDD is a very disciplined way of writing code that tends to rub raw against those at the top and bottom of the skills scale. Always writing production code in a certain way and subjecting your work to continual peer review may freak out your worst and best developers and even lead to loss of headcount.</li>\n<li>Most Agile methods that embed TDD require that you talk to the client continually about what you propose to accomplish (in this story/day/whatever) and what the trade offs are. Once again this isn't everyone's cup of tea, both on the developers side of the fence and the clients.</li>\n</ul>\n\n<p>Hope this helps</p>\n"}, {'answer_id': 65679, 'author': 'Vasco Duarte', 'author_id': 9362, 'author_profile': 'https://Stackoverflow.com/users/9362', 'pm_score': 2, 'selected': False, 'text': '<p>The biggest downside is that if you really want to do TDD properly you will have to fail a lot before you succeed. Given how many software companies work (dollar per KLOC) you will eventually get fired. Even if your code is faster, cleaner, easier to maintain, and has less bugs.</p>\n\n<p>If you are working in a company that pays you by the KLOCs (or requirements implemented -- even if not tested) stay away from TDD (or code reviews, or pair programming, or Continuous Integration, etc. etc. etc.).</p>\n'}, {'answer_id': 65927, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>It takes some time to get into it and some time to start doing it in a project but... I always regret not doing a Test Driven approach when I find silly bugs that an automated test could have found very fast. In addition, TDD improves code quality.</p>\n'}, {'answer_id': 65973, 'author': 'Bob Dizzle', 'author_id': 9581, 'author_profile': 'https://Stackoverflow.com/users/9581', 'pm_score': 1, 'selected': False, 'text': '<ul>\n<li>unit test are more code to write, thus a higher upfront cost of development</li>\n<li>it is more code to maintain</li>\n<li>additional learning required</li>\n</ul>\n'}, {'answer_id': 67184, 'author': 'Adi', 'author_id': 9090, 'author_profile': 'https://Stackoverflow.com/users/9090', 'pm_score': 8, 'selected': True, 'text': "<p>Several downsides (and I'm not claiming there are no benefits - especially when writing the foundation of a project - it'd save a lot of time at the end):</p>\n\n<ul>\n<li><strong>Big time investment.</strong> For the simple case you lose about 20% of the actual implementation, but for complicated cases you lose much more.</li>\n<li><strong>Additional Complexity.</strong> For complex cases your test cases are harder to calculate, I'd suggest in cases like that to try and use automatic reference code that will run in parallel in the debug version / test run, instead of the unit test of simplest cases.</li>\n<li><strong>Design Impacts.</strong> Sometimes the design is not clear at the start and evolves as you go along - this will force you to redo your test which will generate a big time lose.  I would suggest postponing unit tests in this case until you have some grasp of the design in mind.</li>\n<li><strong>Continuous Tweaking.</strong> For data structures and black box algorithms unit tests would be perfect, but for algorithms that tend to be changed, tweaked or fine tuned, this can cause a big time investment that one might claim is not justified.  So use it when you think it actually fits the system and don't force the design to fit to TDD.</li>\n</ul>\n"}, {'answer_id': 67569, 'author': 'Chris James', 'author_id': 3193, 'author_profile': 'https://Stackoverflow.com/users/3193', 'pm_score': 0, 'selected': False, 'text': '<p>You have to make sure your tests are always up to date, the moment you start ignoring red lights is the moment the tests become meaningless.</p>\n\n<p>You also have to make sure the tests are comprehensive, or the moment a big bug appears, the stuffy management type you finally convinced to let you spend time writing more code will complain. </p>\n'}, {'answer_id': 67727, 'author': 'rmaruszewski', 'author_id': 6856, 'author_profile': 'https://Stackoverflow.com/users/6856', 'pm_score': 3, 'selected': False, 'text': '<p>The biggest problem are the people who don\'t know how to write proper unit tests. They write tests that depend on each other (and they work great running with Ant, but then all of sudden fail when I run them from Eclipse, just because they run in different order). They write tests that don\'t test anything in particular - they just debug the code, check the result, and change it into test, calling it "test1". They widen the scope of classes and methods, just because it will be easier to write unit tests for them. The code of unit tests is terrible, with all the classical programming problems (heavy coupling, methods that are 500 lines long, hard-coded values, code duplication) and is a hell to maintain. For some strange reason people treat unit tests as something inferior to the "real" code, and they don\'t care about their quality at all. :-(</p>\n'}, {'answer_id': 68867, 'author': 'Jack B Nimble', 'author_id': 3800, 'author_profile': 'https://Stackoverflow.com/users/3800', 'pm_score': 0, 'selected': False, 'text': "<p>The person who taught my team agile development didn't believe in planning, you only wrote as much for the tiniest requirement. </p>\n\n<p>His motto was refactor, refactor, refactor. I came to understand that refactor meant 'not planning ahead'.</p>\n"}, {'answer_id': 90147, 'author': 'casademora', 'author_id': 5619, 'author_profile': 'https://Stackoverflow.com/users/5619', 'pm_score': 6, 'selected': False, 'text': "<p>In the few years that I've been practicing Test Driven Development, I'd have to say the biggest downsides are:</p>\n\n<h2>Selling it to management</h2>\n\n<blockquote>\n  <p>TDD is best done in pairs. For one, it's tough to resist the urge to just write the implementation when you <strong>KNOW</strong> how to write an <em>if/else</em> statement. But a pair will keep you on task because you keep him on task. Sadly, many companies/managers don't think that this is a good use of resources. Why pay for two people to write one feature, when I have two features that need to be done at the same time?</p>\n</blockquote>\n\n<h2>Selling it to other developers</h2>\n\n<blockquote>\n  <p>Some people just don't have the patience for writing unit tests. Some are very proud of their work. Or, some just like seeing convoluted methods/functions bleed off the end of the screen. TDD isn't for everyone, but I really wish it were. It would make maintaining stuff so much easier for those poor souls who inherit code.</p>\n</blockquote>\n\n<h2>Maintaining the test code along with your production code</h2>\n\n<blockquote>\n  <p>Ideally, your tests will only break when you make a bad code decision. That is, you thought the system worked one way, and it turns out it didn't. By breaking a test, or a (small) set of tests, this is actually good news. You know <strong>exactly</strong> how your new code will affect the system. However, if your tests are poorly written, tightly coupled or, worse yet, generated (<em>cough</em> VS Test), then maintaining your tests can become a choir quickly. And, after enough tests start to cause more work that the perceived value they are creating, then the tests will be the first thing to be deleted when schedules become compressed (eg. it gets to crunch time)</p>\n</blockquote>\n\n<h2>Writing tests so that you cover everything (100% code coverage)</h2>\n\n<blockquote>\n  <p>Ideally, again, if you adhere to the methodology, your code will be 100% tested by default. Typically, thought, I end up with code coverage upwards of 90%. This usually happens when I have some template style architecture, and the base is tested, and I try to cut corners and not test the template customizations. Also, I have found that when I encounter a new barrier I hadn't previously encountered, I have a learning curve in testing it. I will admit to writing some lines of code the old skool way, but I really like to have that 100%. (I guess I was an over achiever in school, er skool).</p>\n</blockquote>\n\n<p>However, with that I'd say that the benefits of TDD far outweigh the negatives for the simple idea that if you can achieve a good set of tests that cover your application but aren't so fragile that one change breaks them all, you will be able to keep adding new features on day 300 of your project as you did on day 1. This doesn't happen with all those who try TDD thinking it's a magic bullet to all their bug-ridden code, and so they think it can't work, period.</p>\n\n<p>Personally I have found that with TDD, I write simpler code, I spend less time debating if a particular code solution will work or not, and that I have no fear to change any line of code that doesn't meet the criteria set forth by the team.</p>\n\n<p>TDD is a tough discipline to master, and I've been at it for a few years, and I still learn new testing techniques all the time. It is a huge time investment up front, but, over the long term, your sustainability will be much greater than if you had no automated unit tests. Now, if only my bosses could figure this out.</p>\n"}, {'answer_id': 362932, 'author': 'Mike Dunlavey', 'author_id': 23771, 'author_profile': 'https://Stackoverflow.com/users/23771', 'pm_score': 1, 'selected': False, 'text': "<p>Good answers all. I would add a few ways to avoid the dark side of TDD:</p>\n\n<ul>\n<li><p>I've written apps to do their own randomized self-test. The problem with writing specific tests is even if you write lots of them they only cover the cases you think of. Random-test generators find problems you didn't think of.</p></li>\n<li><p>The whole concept of lots of unit tests implies that you have components that can get into invalid states, like complex data structures. If you stay away from complex data structures there's a lot less to test.</p></li>\n<li><p>To the extent your application allows it, be shy of design that relies on the proper ordering of notifications, events and side-effects. Those can easily get dropped or scrambled so they need a lot of testing.</p></li>\n</ul>\n"}, {'answer_id': 821495, 'author': 'Uncle Bob', 'author_id': 73476, 'author_profile': 'https://Stackoverflow.com/users/73476', 'pm_score': 3, 'selected': False, 'text': '<p>You lose the ability to say you are "done" before testing all your code.</p>\n\n<p>You lose the capability to write hundreds or thousands of lines of code before running it.</p>\n\n<p>You lose the opportunity to learn through debugging.</p>\n\n<p>You lose the flexibility to ship code that you aren\'t sure of.</p>\n\n<p>You lose the freedom to tightly couple your modules.</p>\n\n<p>You lose option to skip writing low level design documentation.</p>\n\n<p>You lose the stability that comes with code that everyone is afraid to change.</p>\n'}, {'answer_id': 3922398, 'author': 'Mouna Cheikhna', 'author_id': 271999, 'author_profile': 'https://Stackoverflow.com/users/271999', 'pm_score': 0, 'selected': False, 'text': '<p>Development time increases : Every method needs testing, and if you have a large application with dependencies you need to prepare and clean your data for tests.</p>\n'}]
['https://Stackoverflow.com/questions/64333', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8509/']