Ask HN: What overlooked class of tools should a self-taught programmer look into
Unit testing, mocking, and various other testing techniques.<p>Why? Any project of sufficient complexity is very hard to test. If all you&#x27;re doing is code -&gt; build -&gt; run to debug your code, you can very easily break something that&#x27;s not in your immediate attention.<p>The problem is that good unit testing is hard, and time consuming. It can be so time consuming, that unless you can really plan in advance how you test, you could spend more time writing test code than real application code. (This is what happens when writing professional, industrial-strength code.)<p>So, when a hobby project becomes sufficiently interesting enough; such that the code will be so complicated that your code -&gt; build -&gt; run loop won&#x27;t hit most of your code, you should think about how to have automated tests. They don&#x27;t have to be &quot;pure, by the book&quot; unit tests, but they should be an approach that can hit most of your program in an automated manner.<p>You don&#x27;t need to do &quot;pure&quot; mocking either. If you&#x27;re writing something that calls a webservice, you could write a mock webserver and redirect your program to it. If you&#x27;re writing something that works with pipes, you could have a set of known files with known results, and always compare them.<p>The goal is that you should cover most of your program with code -&gt; build -&gt; tests; and only do code -&gt; build -&gt; run for experimentation.