Hacker News new | ask | show | jobs
by jeremiep 3956 days ago
I don't really enjoy debugging low-level code either, but I absolutely love developing it, reasoning about it and finding solution to problems at that level.

Knowing how to code low-level has radically changed how I code high-level as well because I now understand what the potential bottlenecks are on the hardware.

Come to think of it, I don't really enjoy debugging no matter what abstraction level I'm at! I prefer taking more time to think carefully about the problem and preventing bugs rather than spending that time chasing them. Which isn't always possible sadly.

1 comments

The bugs that catch me out are those where a change was made somewhere else that invalidated the assumptions made by the function. These sort of bugs can’t be picked up by static analysis or valgrind, and if they are rare are really hard to trace.
Which is why you should put those assumptions in contracts. Preconditions, postconditions and invariants were made exactly for that purpose.

I used to think these were a distraction from actual programming until I realized how much debugging time they save.