One of the challenges when attempting to track down a bug in code is often that you are so deep in the area of the code where you are convinced the problem is, that you lack objectivity. Any evidence that the problem might originate elsewhere is easily discarded as a red herring while you laser focus in on the likely culprit.
In this scenario I find the Cardboard Cutout Programmer (CCP) to be an invaluable ally, the Watson to my Holmes if you will. The CCP doesn’t know they are made of cardboard — often they are one of my colleagues, a living, breathing bag of mostly water. But they might as well be a cardboard cutout, as they don’t need to do anything other than let me talk at them to try to explain the problem.
The CCP doesn’t have my i̵n̵h̵e̵r̵e̵n̵t̵ ̵b̵i̵a̵s̵ hard won knowledge as to where the problem is, nor can they make the leap straight to what is presumed the correct code after hearing just a few words of the description of the problem. So I have to start at the beginning and explain the purpose of the functional area that is failing, a reasonable amount of detail about the architecture and design, and the full details of the problem. This is when the magic happens.
By taking that much needed step back and explaining how things work from first principles in conjunction with the problem scenario, it suddenly becomes blindingly obvious where the issue is. Sometimes it’s where I was originally convinced it would be, which makes me feel a little smug. But usually it’s not, which makes me feel a little stupid and annoyed with myself for wasting time on something that is clearly, with the benefit of hindsight, a wild goose chase.
While my CCP is usually not a cardboard cutout, they might as well be. Their job isn’t to help me figure out what the problem is, rather it’s to allow me to explain things in sufficient detail to allow me to figure it out for myself.
So next time you’re several hours into a debugging session that is going nowhere, try to explain the issue to someone or something else, even an inanimate object — you’ll be surprised how often it helps.
I’m better known in the Salesforce community as Bob Buzzard — Umpteen Certifications, including Technical Architect, 6 x MVP and CTO of BrightGen, a Platinum Cloud Alliance Partner in the United Kingdom who are hiring.
Brightgen Careers | Brightgen
For 10 years organisations have relied on BrightGen to show them what Salesforce — and their business — is capable of…
You can find my (usually) more technical thoughts at the Bob Buzzard Blog