4 ms·
Using awareness of how to use a debugger is a reasonable interview technique WRT javascript devs. In general, ignorance is not a pejorative but if a candidate w
by wwalser 10y ago
Using awareness of how to use a debugger is a reasonable interview technique WRT javascript devs. In general, ignorance is not a pejorative but if a candidate walk into an interview claiming to be an expert and I find out that you debug in anger using console log, I'm calling bullshit. They're either very green or too lazy to have investigated the tools available. Jr devs are, obviously, another story. Read up on how to use node --inspect for newer versions of node or node-inspector for older versions.
One common need that is a sad state of affairs in the Node world is performance tooling. It's available and competent professionals should invest in it once it becomes necessary but is a pain in the ass to setup and run.
- maxxxxx 10y agoAs usual in this industry there is a whole new generation of devs coming up that have forgotten stuff that has been standard for a long time. Then somebody implements this old stuff for the new tech and people think it's major innovation. I am sure soon somebody will create a node profiler.
- passive 10y agoSounds like a profitable model (introducing new devs to best practices).
- coldtea 10y ago>In general, ignorance is not a pejorative but if a candidate walk into an interview claiming to be an expert and I find out that you debug in anger using console log, I'm calling bullshit. Some of the best programmers advocate for printf over debuggers... And some of the crappiest programmers run around the debugger for hours with no idea what could be wrong in the program, stepping blindly here and there...
- coldtea 10y agoTo explain this further, I think printf is more focused and direct than running around in the debugger. You need to have a clearer idea of what you're looking for in advance and know how to exclude parts of the program as possible culprits, which I think helps with debugging in general. And, come to think of it, with hot code reloading, printf can be just as immediate, but more direct and focused, than using the debugger. Shame that few languages/environments offer hot code reloading...
- oselhn 10y agoUsing printf on everything is basically the same as debugger but a lot slower. People also tend to commit those added lines (sometimes commented for future uses) which clutters code base. I think that using permanent logs on higher verbosity plus debugger is a lot more productive.
- maxxxxx 10y agoIt sounds like you are trying to sell lack of a debugger as a feature that forces devs to to be more aware and more precise. Then we should maybe go back to writing code on paper first, create punch cards, submit to the mainframe and get the result next day? Then you have an even better idea of what your program does. Debuggers are a valuable tool that nowadays should be standard.
- coldtea 10y ago>Then we should maybe go back to writing code on paper first, create punch cards, submit to the mainframe and get the result next day? Just because someone advocates taking a step back in some particular issue (and for specific reasons they argue about) doesn't mean it logically follows that they advocate going all the way back. Two things: "slippery slope" fallacy and "marginal returns". I'm pretty sure we can find some ways in which you yourself advocates NOT using some modern language feature in favor of an older practice (e.g. you might be against visual programming languages). Does that mean you are ultimately in the same "punch cars" camp as you suggest I am?
- hashhar 10y agoI agree. The best printf debugging I've seen is Mike Conley from Firefox Live Hacking. He has quite a few debugging tricks up his sleeve. [1]: https://www.youtube.com/channel/UCTDXvmarLFnox4AO0w2NuiQ https://www.youtube.com/channel/UCTDXvmarLFnox4AO0w2NuiQ