4 ms·
Interactive debugging. "Most bugs are a result of the execution state not being exactly what you think it is" (Carmack) and it's astonishing how many people jus
by juangacovas 8y ago
Interactive debugging. "Most bugs are a result of the execution state not being exactly what you think it is" (Carmack) and it's astonishing how many people just refuses to effectively debug using an interactive debugger, which allows for easy inspection of anything, at any moment, with a REPL for a given state of your program, including call stack inspection/jumping and what not. Some say that "printing" and/or "logging" is just "enough", when those are other debugging techniques and often needed too. Heck, even some say that "if you need to step through your code you already are in bad shit" just as an excuse.
Knowing how to do effective, interactive debugging in any language is a major step in productivity: it helps in so many ways: learning, diagnose, getting things done...
- arduinomancer 8y agoI can’t stand watching people do the add print statement —> compile —> run loop over and over. You can save so much time just stepping through and printing things in the REPL. It’s like you’re gonna be in this industry a long time, learn the damn tools. Sometimes if I’m writing a complicated piece of logic I’ll even jump straight to the debugger on first run just to look at all the values and make sure the assumptions were correct.
- wingerlang 8y agoBoth have their place, printing is good when you need to get some quantity reads.