I’d like to suggest a new tag for stories or content mainly concerning debugging techniques or methods.
I’ve noticed a handful of stories recently that would be aided by such a tag: even though they concern different languages or problem scopes, they all have to do with the fine black art of debugging.
EDIT:
Irene pointed out that a list of examples would help, so here are some stories from the past couple of pages worth of recent/newest/frontpage (maybe a couple days of activity):
Why <cstdlib> is more complicated than you think – This article shows some obscure behavior that might trip up people debugging C/C++ code. It’s not pure language-lawyering, but covers something we might bang our heads against in practice.
“Optimization” based on undefined behavior hurts performance – This article is in same vein as above; it has some helpful pointers to figuring out why C/C++ code is not performing as it should, and again saves head-banging.
Custom formatters for Immutable.js – This article is specifically about better visualization for immutable.js data structures. It’s short, but it clearly explains a little trick that helps with debugging.
Debugging why ping was broken in Docker images – This article steps through a long “Why the hell is this not working right?”, and is primarily about the digging involved in debugging.
Moving breakpoints intelligently – A nice discussion about the use (and pitfalls) of breakpoints in JS debuggers. Again, head banging avoidance.
EDIT2:
So, I’d like to explain the difference (for me) between testing and debugging.
Testing is about proactively finding misbehavior. Articles about testing contain information on things like: how to specify systems so you can test their behavior, how to write good test scripts, how to encourage testing of various things in your org, how to avoid testing pointless things, how language features can support testing.
Debugging is about dealing with things that are on fire. Articles about debugging contain information on things like: how to step through a system to observe a value changing, how to instrument a running system to detect errors, how to sift through after-action data to spot a bug, what language features exist for inspecting runtime behavior, what language features exist that might cause your program to do what you wrote instead of what you meant, what methods can be used to track down the source of a malfunction.
Without wanking too much on philosophical differences, I think that the content is different enough between the two categories that we can safely support another tag.
One point I will make is that testing articles are less likely to contain arcane knowledge and “tricks”, because testing methods tend to translate well. A unit testing framework looks basically the same regardless of what language or system you’re in, barring some syntactical differences. Integration test scripts are usually high-level and don’t depend on the implementation language of the components being run through.
Debugging, by contrast, often involves weird specifics of a language/operating environment (as the root causes for bugs) or environment-specific tools (using profiler X vs. Y because it supports feature Z saving you time W).
So, the character of the articles can be very different.
EDIT3:
A few articles that are tagged testing currently that would be better tagged debugging:
A mystery with memory leaks and a magic number – Article talks about fixing a system in production that isn’t working correctly, pre-emptive testing probably wouldn’t have caught this.
Troubleshooting I/O load in a Solaris Openstack Cloud (Fore!) – In a production system, author noticed misbehaving clients, had to figure out why. Would not have been caught by testing.
Unikernel Profiling: Flame Graphs from dom0 – Article talking specifically about instrumenting a unikernel for debugging purposes.
Progress bar noticeably slows down npm install · Issue #11283 · npm/npm – Github discussion in which a bug is found, and the root causes uncovered.
Troubleshooting with an Interactive Drill-down in a Spectrogram using csysdig – Article talks about a very interesting visualization tool for troubleshooting and debugging.
Example of a FreeBSD bug hunting session by a simple user – Article walks through the bug discovery and hunting process for wireless misbehavior. Much to learn, great writeup.
Note especially the number of times the phrase “bug” or “troubleshooting” appears in the titles and articles.
Added
debuggingtag, changed description oftestingtag. Those old stories should get thedebuggingtag but I’m feeling lazy at the moment.previous discussion; my opinion is unchanged
The opinion in question (for people too lazy to click):
Your edits make a pretty compelling case for a “debugging” tag. I’ve also seen
reversingused for debugging stories when the author is not the original creator. I can see the distinction you’re drawing there between up-front avoiding of bugs and after-the-fact investigations.Do you see the the two topics as so different that someone would want to filter out one and still see the other? To me they’re both part of the larger topic of correctness, but I’ve been digging deep and long enough that I know I’ve probably developed idiosyncratic, unrepresentative views.
Debugging I think has little to do with correctness, honestly.
Debugging happens after your language’s correctness constraints fail, or succeed and prove that your program correctly does the wrong thing.
I think that testing (especially taken to the logical conclusion of correctness as a goal) rapidly becomes almost academic in nature and pursuit, whereas debugging is always going to be with us.
So, I can see somebody filtering on related topics like
debugging,unix,devops, and ignoring subjects that don’t directly solve their problems.Sounds plausible to me. The usual way to make a case for new tags is to link to a bunch of stories that you think should have that tag.
OP now has some in-depth examples and reasoning.
The
testingtag that was added is for this purpose.I feel like testing and debugging are somewhat different topics; debugging often happens to products already in production (sadly), whereas testing is often proactive and optimistic. I’m curious what other people think.
I agree, especially as the tooling in use vastly differs. The biggest problem of debugging is access to the place where the effect happens, while in testing, you usually have the whole thing wide open and “just” need to find strategies to properly test it.
Are there enough links for which the debugging tag but not the testing tag are applicable?
Added to the OP.
Testing basically wouldn’t help with any of those scenarios, other than to maaaaybe identify that there was, in fact, a problem.
A lot of stuff that I imagine would be covered by
debuggingis very practical, hands-on “Wow, this was a pain in the ass, let my misfortune serve as an example”.Testing is usually not nearly so hard-won.
None of the articles that OP has pointed to has the
testingtag, so it doesn’t seem to be serving that purpose right now.I’ve also updated the OP to include articles currently labeled
testingthat would better be labeleddebugging.