Sometimes it's the Simple Things
Sometimes it's the Simple Things
Productivity can suffer from anything, even thinking too much about problems! Learn how to simplify issues and improve productivity and quality.
Join the DZone community and get the full member experience.Join For Free
See why over 50,000 companies trust Jira Software to plan, track, release, and report great software faster than ever before. Try the #1 software development tool used by agile teams.
Hi, my name is Andrew, and I have a problem. I sometimes overthink things…just a bit. If you share that tendency you may, like me, instinctively greet any issue you run into as an opportunity for deep analysis and troubleshooting, which may not always be the place to start.
Overthinking in Action
A case in point. I've been working on a project that uses Crystal Reports (yes, plenty of people still use that) in an ASP.NET Web Forms app to generate reports for a non-profit. I was tasked with creating several new reports, which was a pretty straightforward task, and seemed to be going smoothly, when I went to test the PDF version of a given report and the report viewer simply returned a bunch of gobbledygook text in the browser.
Given that I had been making modifications to the code, I assumed that I must have changed something and broken the PDF reporting, though given the changes I'd made (which didn't have anything to do with report rendering) I couldn't imagine what. So I dutifully pored over the report rendering code, making sure it was sending the right MIME type, stepped through in the debugger, etc. Given that the application saved the PDFs to a temp directory before rendering, I also tried copying them over to another machine and opening them, and verified that the PDFs themselves were perfectly fine. Which left me feeling something like this:
In all, I probably spent at least a half hour or so trying to chase down the problem, only to realize that the answer was quite simple. The VM in which I was working had no PDF reader installed, so naturally, there was nothing to render the PDF in the browser, or allow me to save it.
Once I installed Adobe Reader (which gets ever harder to do without installing a bunch of unwanted crapware, but that's a topic for another post), the reports rendered fine. Problem solved.
I'm a fan of Sherlock Holmes, and in particular the oft-repeated quote:
"…when you have eliminated the impossible, whatever remains, however improbable, must be the truth."
In the case of troubleshooting code, I'd go even further. Sometimes you need to eliminate the improbable and start with the simple things. Check those things first, and then once you've eliminated the simple, move on to more complex and time-consuming troubleshooting steps.
Also, don't assume that just because you've touched something in a project, anything that isn't working is your fault. This is particularly true of code someone else originally wrote. Such code may have multiple issues that are known to the users and the original developer, but which may not have been shared with you.
Have you ever encountered an issue that turned out to be much simpler than you initially assumed? Share your story in the comments below!
Published at DZone with permission of G. Andrew Duthie , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.