8
rox79
3y

I am embrassed.. :(

Situation was..

It was 3-4 months ago I written the process but now client was saying it is not working so I just need to update value in array..

I spent 2-3 hours everything was good..
only in the statement where I am assigning the value is not working.
I was like dude wtf call your senior why its not working .. everything is correct.. then suddenly my eyes catch the rubbish thing I did..

this is what I used mistakenly for assignment "=="

:( and I was looking at statement from 1-2 hour.. it just wasted my time

Comments
  • 4
    Don't you have compiler warnings for that? GCC can warn about such cases, i don't know what language you are using.
  • 0
    You could try using a linter and explicitly run it and dump the output to a text file or something, attempting to find any rule breakers (assuming this is JavaScript, but probably something like this could work for any language)
  • 0
    Typing wrong one character and the compiler not catching it because the statement is valid (and just doesn't do what you wanted it to do) is common even after 25 years of coding. The issue is that you need to be super-specific with machines. An "interpreter" doesn't actually interpret either, it keeps to the writing of the law and not the spirit thereof.

    The one thing that changes is that you'll learn to check for your usual mistakes first.
Add Comment