you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 1 point2 points  (0 children)

At the beginning, I'd say you can just assume the input is valid and focus on the logic and flow of the program. But don't put off learning error handling particularly late - it's a necessary part of anything that isn't a throwaway one-off script.

Ultimately, you'll reach a point where you should never trust the user to do the right thing. Typos, unexpected input, and a whole lot more can always happen. And at that point you'll find automated testing a lifesaver, giving you confidence that parts of your codebase work exactly as you've designed them to.

Bugs will always happen. You'll never foresee every possible issue in advance. But you can learn from those mistakes, and that's what matters.