Hacker News new | ask | show | jobs
by fredsted 3065 days ago
I think it's something you learn the more experience you have. I think the more mistakes, errors and bugs you see through your career, the better you get at recognizing pitfalls when you write code.

Also, I'm a big fan of and practice "defensive" programming. There's lots of articles written about that, but in short it kind of changes your mindset a little and steers it towards more robust code. What can fail? How can I limit and validate parameters most efficiently?

1 comments

There is defensive programming and there is bug hiding. Then there's also wasting performance in release builds.

Mixing the three is bad.