Comment by flysand7

Comment by flysand7 15 hours ago

4 replies

100%, debugging is an absolute joy, especially with niche systems-level kinda of bugs that simply can not be debugged with simple printf's.

I had a friend once asking me to help debug a weird issue over discord. We went through some obvious things like are there any other threads running or is there something obviously wrong with the code. We didn't find anything so we went on to the best part -- trying to figure out the root cause from the panic. Checked the pointer values, wrote them down, checked where the TLS is, wrote that down to. At that point I forgot how Windows had TLS arranged, so I pulled up some docs, while the other guy fiddled around with the debugger. I found the TLS layout, and the debugger we used didn't have any kind of TLS debugging enabled, so we had to pull up PE spec to do some calculations on where the addresses could end up and sure enough the answer came -- we had a TLS corruption. Turns out he used a C bindings library that had a typo that overwrote the TLS and was messing with his variables.

Debugging is such a joy when it feels like Sherlock Holmes movies.

(*) For anyone who thinks might be misreading this, TLS means thread-local storage, not transport layer security. I'm sure I've had my share of wrong search results because of this too.

foobarian 14 hours ago

> niche systems-level kinda of bugs that simply can not be debugged with simple printf's

Funny, printfs are the only thing that works for me for debugging niche systems-level bugs :-)

thinkingemote 15 hours ago

Also love debugging, it's puzzle, pattern matching, evidence gathering, poking around, experimenting, it's using tools, diving into documentation, learning more than whats required to write it and learning about humans and machines and why and how we make mistakes and forgiving these mistakes and fixing the errors. That feeling when spending lots of time to write just one line of code to close that one pesky bug.

Are all developers like this? Is there something I should look for when looking for a job that can help me get more of a career with more of this joy in it?

  • skydhash 10 hours ago

    Debugging can be a joy when dealing with a single system. Not so much when dealing with things like microservices where every combination has a possible failure scenario related to that bug. And because of the deployment strategy, you can't easily test that combination in isolation. Also no tests for each service, only full integration tests that takes a while to run.

    I know distributed systems can be a pain to reason about, but I think every node should be capable of being tested in isolation, at least to be able to partition errors (either the node, or the distributed nature of the system)

  • bluedino 11 hours ago

    > Are all developers like this?

    No, there are different types of developers. Some are like this (and so are some sysadmins) but others have strengths in different areas.