Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How to reduce the amount of time spent debugging?
1 point by nso95 on Nov 30, 2020 | hide | past | favorite | 3 comments



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 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)


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.


Validate parameters first thing on all public APIs and fail early. Write code in the functional style.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: