DEV Community

Oyetoke Toby
Oyetoke Toby

Posted on

What's the longest time you ever spent debugging your code and how did you fix it?

Latest comments (3)

Collapse
 
haideralipunjabi profile image
Haider Ali Punjabi

2 1/2 to 3 months. I started developing an Android app which used Facebook API back in December 2016 (before all that Data Leak, etc so the API was much different). As it was my first time with FB API, I started testing different endpoints to get used to the API.
One of the first things I tested was the uploading endpoint to upload a post with a photo. I tried adding an upload progress bar in the notifications and was faced with the worst bug of my life. The progress used to hang at a particular value for large files and then skip directly to 100%.
I asked for a solution on many sites including SO, but didn't find any answer.
I finished the first version of the app and released it for testing at the end of February 2017 but the bug was still there. I spent the next month fixing it and finally asking the question on Facebook Developer Support helped me.

Apparently, the official docs at that time had the code sample on sending the photo as a byte array, and the fix was to send it as a bitmap.

Collapse
 
godsgood33 profile image
Ryan P

Days. Just needed to put it away for a while to get a clear head about the goal then think about possible solutions. I found that if I tried to long to fix something I tend to focus only on one possible solution, giving myself that extra time opened my mind to other possible solutions.

Collapse
 
ujwaldhakal profile image
ujwal dhakal

4hours and I solved by spending half hour at toilet.