Hacker News new | ask | show | jobs
by betageek 2822 days ago
Learn how the debugger works for whatever language you use. You will be very tempted to just use logs as it's way easier and debuggers seem intimidating, but take a day out of your schedule to learn the debugger. When you really have no clue what's going on in your code there's no substitute for being able to stop your program mid run and inspect it's state interactively.
1 comments

This is absolutely true, but it mostly applies when your code is in development. Inevitably you will be asked to troubleshoot problems in production. So you'll need to learn how to read and understand log files. You should also learn how and when to log actions in your program.

That last sentence is part of my piece of advice: Try to add stuff (comments, logging statements, etc) to your projects that will make things easier in the future, either for you or other developers.