[–] FroshKiller 5y ago ↗ Validate parameters first thing on all public APIs and fail early. Write code in the functional style.
[–] uberman 5y ago ↗ I 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 5y ago ↗ By 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 goLearn how to use an IDE-integrated debugger properlyAvoid magic at all costs (the reflection-based DI in .NET is a particularly egregious example of this -- it is literally undebuggable)
3 comments
[ 2.6 ms ] story [ 17.3 ms ] threadIf you have assumptions about how this should work, assert() that they are correct.
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)