News for hackers. Stuff that matters.
Re:Ask HN: How to Think Systematically as a Programmer? by gregjor on Thursday October 08, 2020 @10:12PM (#24726047)
You learn from experience. Trial and error, experiment, and mentoring. You study code that works and code that doesn’t.
Re:Ask HN: How to Think Systematically as a Programmer? by svrma on Thursday October 08, 2020 @11:37PM (#24726536)
Are there any books or resources your can suggest? I feel like my accuracy in thinking about corner cases have been stuck around 65% for a while and I'm looking for ways to improve.
Re:Ask HN: How to Think Systematically as a Programmer? by gregjor on Friday October 09, 2020 @04:00PM (#24733804)
I had to learn what we used to call “desk checking” when I started programming, out of necessity. Desk checking is reading through your code and “running” it in your head, keeping track of state on paper. You learn to notice edge cases because at every step you have to think about the next possible states. After some practice you get better at this and it becomes more automatic.

This isn’t practical for large code bases, but you can do it with individual functions and chunks of code. I still work this way but I don’t think it’s a common technique anymore.

Re:Ask HN: How to Think Systematically as a Programmer? by sixstringtheory on Friday October 09, 2020 @12:35AM (#24726866)
you can probably find some good ones here if you haven’t tried it before: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...