6 ms·
Same with commands with no output in nominal execution - output only happens in case of error
by liotier 6y ago
Same with commands with no output in nominal execution - output only happens in case of error
- kibwen 6y agoThis one's a little trickier to apply: if e.g. I'm executing a command to update some rows in a database, a successful execution can tell me how many rows were changed. If the number seems too high or too low, that's useful for setting off my own internal alarms that something might have been wrong with my query.
- scottLobster 6y agoWhich is kind of a dark pattern for anything even a little time consuming. A pilot can tell just by looking out the window/flying the plane as to whether the plane is moving. Software however can hang up for all sorts of reasons and never complete execution. You might be waiting on a network timeout for an hour because some didn't code that piece properly, or some random hardware error causes a stall. Reasonable visibility into the real-time operations of the program is useful for the same reasons package tracking numbers are useful.
- inamberclad 6y ago> A pilot can tell just by looking out the window Not in IMC
- t0mas88 6y agoThen by looking at the PFD
- saagarjha 6y agoOne extremely useful debugging "superpower" is just to sample a process when its hung–the stack trace can often give you a good idea what it is doing, even if the UI doesn't.
- hashhar 6y agoI've recently learnt this trick too but am having a hard time manually diffing stack-traces. Do you know of some tool that can help me analyze samples of stack-traces?
- jeffbee 6y ago"Analyze samples of stack traces" is what a profiler does. Can you feed such information into a profiler (such as pprof or perf-report)?
- saagarjha 6y agoOn macOS I just use Activity Monitor's sampling tool, which gives me the hottest stack trace. Something similar probably exists for other platforms? If not, you can emulate it poorly by attaching a debugger and repeatedly interrupting execution and seeing if anything shows up many times–if your program is truly stuck, it will generally be easy to see why because it'll show up in all your traces.
- oh_sigh 6y agoOne of the first things humans discovered about flight is that you can't trust your senses.
- TeMPOraL 6y agoYes, but you can trust your senses enough to tell you're in the air and not yet dead. Software with no output doesn't give you even that.