Posts

Showing posts from October, 2020

Give it some time to think, before you start code;

Image
 Yesterday night, I was solving a problem. I had completed the task in python3. But the clients system runs in python2. So I need to resolve all the dependencies.  The program runs smoothly, but suddenly I noticed that, the program is generating wrong results. Panic mode was on. I rechecked the code, it was perfect. Back to python3 code again and tested the program. Got the correct answer.  So I started debugging the whole code in python 2 line by line.  After 5 hours I found the reason for the bug.  In python2  5/2 will be treated as 2. But in python3  5/2 will be treated as 2.5   Yes  the value 0.5 wasted my 5 hours in the life.