5 Reasons Why You Should Never, Ever Write Tests

This post was originally published at kais.blog.

As a software developer, there is one topic that always leads to controversial discussions. Should one write tests or not? While there are always questionable experts who argue FOR writing tests, I h…


This content originally appeared on DEV Community and was authored by Kai

This post was originally published at kais.blog.

As a software developer, there is one topic that always leads to controversial discussions. Should one write tests or not? While there are always questionable experts who argue FOR writing tests, I have the definitive answer. Don't.

Many terrible things happen once you start testing your code. So I prepared a small, incomplete list to show you why you should never, ever, write tests:

You would start to question your code

What audacity. If you wrote tests, which of course you won't, your code would be questioned. Does it work as expected? Of course it does. Besides, there's no point in catching catastrophic bugs early, after all, they only ever happen in someone else's projects.

Your code would be clearly defined and well designed

You're not an art student, are you? Then what do you care about design? If you ever test parts of your code, you would be forced to clearly define what the code is responsible for. So you would focus on what is essential. With that you take away the possibility to sneak in code that nobody needs and nobody uses.

You would have to write less code

Testing can lead you to write less code. After all, you only ever implement so far that the tests pass. And less code means fewer lines of code. Who can brag about having worked on gigantic projects when there aren't that many lines of code? Besides, we're still in the 2000s, somehow, and we're billed on the basis of lines of code (LOC). Never reduce the lines of code. Ever.

You would save countless hours that you could normally waste on debugging or maintenance

This point is really critical. If, strangely enough, you are not paid by lines of code, then at least by the hour. With testing you would save many hours. How awful is the idea that you suddenly have time for other things and on top of that the certainty that the code behaves as expected. Scary.

You would enable others to understand your code and collaborate with you

I don't really need to write that much about it. Why would you even want to do that? With tests, your code is suddenly documented and much easier to refactor. Not good. If you are no longer the only one who can work on a project, then you will definitely be replaced immediately.

Final Thoughts

There you have it. My list of reasons why you should definitely not write tests. In summary, tests have only drawbacks and you should definitely follow me on Twitter if you want to learn even more about how to avoid being a good software developer.

If you want to convince other software developers why they shouldn't write tests, feel free to share this post with them.

Seriously though, write tests.

This post was originally published at kais.blog.


This content originally appeared on DEV Community and was authored by Kai


Print Share Comment Cite Upload Translate Updates
APA

Kai | Sciencx (2021-08-30T11:57:33+00:00) 5 Reasons Why You Should Never, Ever Write Tests. Retrieved from https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/

MLA
" » 5 Reasons Why You Should Never, Ever Write Tests." Kai | Sciencx - Monday August 30, 2021, https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/
HARVARD
Kai | Sciencx Monday August 30, 2021 » 5 Reasons Why You Should Never, Ever Write Tests., viewed ,<https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/>
VANCOUVER
Kai | Sciencx - » 5 Reasons Why You Should Never, Ever Write Tests. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/
CHICAGO
" » 5 Reasons Why You Should Never, Ever Write Tests." Kai | Sciencx - Accessed . https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/
IEEE
" » 5 Reasons Why You Should Never, Ever Write Tests." Kai | Sciencx [Online]. Available: https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/. [Accessed: ]
rf:citation
» 5 Reasons Why You Should Never, Ever Write Tests | Kai | Sciencx | https://www.scien.cx/2021/08/30/5-reasons-why-you-should-never-ever-write-tests/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.