4 ms·
Ask HN: How to reduce the amount of time spent debugging?
- FroshKiller 6y agoValidate parameters first thing on all public APIs and fail early. Write code in the functional style.
- uberman 6y agoI finding spending more time writing pseudo code helps me write less code that requires debugging. If you have assumptions about how this should work, assert() that they are correct.
- smt88 6y agoBy far the biggest time saver is to use a language with a strict static type system (ideally Kotlin for JVM, F# for .NET, TypeScript for Node, etc.) Practice TDD, even on small projects, and write unit tests as you go Learn how to use an IDE-integrated debugger properly Avoid magic at all costs (the reflection-based DI in .NET is a particularly egregious example of this -- it is literally undebuggable)