11
swap
8y

Something isn't working, I play around with the code, and try all possible things in the code. Still it doesn't work. Spend a couple of hours reading each and every line but still in vain. Finally, I find out that I was editing the wrong file (same file at another location) the whole time!! This happened a couple of times when I was a newbie, one of my most annoying mistakes.
Lesson learnt: Now when anybody asks me to debug his code, I first edit/add a print statement to make sure this is the correct file. I thought I was being skeptical, but it has saved me a lot of time (mostly interns do this rookie mistake).

Comments
  • 2
    I do this sometimes.

    make a change,
    check the browser,
    nothing,
    try again,
    nothing,
    try again,
    nothing,
    reload page...

    project wasn't running.
  • 1
    Just had this last night! After a couple, I was editing a client's application - couldn't figure out for the life of me where this supposed 'bug' was, it was running fine... Looking at the previous version of the code...
Add Comment