Comparison
Rubber duck debuggingvsXY problem
Rubber duck debugging
you explained the bug out loud to a colleague and worked out the answer before they said anything.
Explaining a problem step by step to someone or something else, which forces the gaps in your reasoning to surface. It works because narrating requires making every assumption explicit, and the wrong one usually announces itself when spoken. It is worth naming because it makes asking for help cheap: the request is for two minutes of attention, not for an answer.
Full entry →XY problem
someone asked how to parse a filename with a regex, and what they actually needed was the file's creation date.
Asking about your attempted solution rather than about your actual problem, so the help you get is help with the wrong thing. It wastes an enormous amount of time in code review, support channels and design discussions, and it is invisible from the inside. The habit that defeats it is stating the underlying goal in the first message, and, when helping, asking what someone is ultimately trying to do.
Full entry →