3 ms·
It depends on what you're building. If you know the domain you're writing for and feel confident that you can build at least an 80% accurate model first time,
by kstenerud 3y ago
It depends on what you're building.
If you know the domain you're writing for and feel confident that you can build at least an 80% accurate model first time, focus on clean code.
If you're not that confident and expect to make design mistakes that you'll correct along the way, focus on making it work first, then clean up the code.
It's the same for testing: Well known territory and confidence in your model? Write unit tests first. Otherwise write unit tests second.
If it's completely unknown territory, write a prototype first with no tests, validate your assumptions, then throw out the prototype and write as if you're not going to get an 80% accurate model.