Scope of a Variable
Recently I watch a piece of code that does not work properly. I reviewed the code, run it but the execution does not works as I expected. I checked the variable that was the issue.
I did not updating the value of one of the variable (an iterator). So my code crashed because the loop was locked in the same position.
So I renamed the name of this variable and voilà, now it works properly!
What I have learned about it? The scope of a variable is really important and I need to take care naming the variables.
The most important thing of this is: learn from my error. The issue is not fail, the issue is not learn from your own mistakes.
It is the only way to improve your skills and growth as professional.
“Never surrender”