4 ms·
A few weeks into a new job, I was tasked with fixing a bug in an ASP.NET application. I stepped through the application and was able to reproduce the issue, whi
by partisan 10y ago
A few weeks into a new job, I was tasked with fixing a bug in an ASP.NET application. I stepped through the application and was able to reproduce the issue, which unfortunately for me only happened when a payment was submitted. So I went through the code, once, twice, thrice, testing various scenarios to understand why the issue would happen. At some point, I started reading the code at a line level and realized that embedded right in the middle of that payment logic was a line of code that sent an email to the customer indicating that a payment had been made. Then I realized I had sent 10s of emails out during each debugging pass. I immediately ran over to my new boss and explained what happened. He smiled when I told him how many emails were sent and then asked me to get customer service in contact with the customer. He was obviously unhappy, but he said he was glad that I had realized it and that I had raised the issue to him immediately.
Lesson: Read the code before jumping headlong into a debugging session. If you make a mistake, inform someone immediately. They would probably rather hear it from you than discover it on their own. I stuck to this principal at that job and it served me really well.
- clooless 10y agoHappened to me. Now, my Debug web.config file has a setting that directs all outgoing email to a local "SpecifiedPickupDirectory".