Very short introduction (this is quite a context-heavy question):
I'm a 17 year old programmer, doing some projects, usually netting around 20 files of 200 lines each. I usually don't program very low-level, more high-level with battery included API's like Python + pygame and Lua + WoW API. Nevertheless I've written quite some code in the lower levels of the computer too (mostly C/C++).
Now, I read a lot of programmer discussion and a common returning argument is preventing pesky bugs, for example in "reusing variable names". I always nodded and thought that it was a valid argument, but just now I wondered, how valid is it?
To be honest, after thinking for a while, I figured I have no idea what they mean with pesky bugs. We all heard stories about phenomenal impossible-to-debug bugs, we all have spent useless evenings on that one annoying bug, but apart from a few cases I have never been busy with a programming-related bug for longer than a few hours.
Though on the other hand, the projects I work(ed) on aren't huge 10 million line projects like the linux kernel, and are quite simple... scripts. I have a good understanding of them (or at least my part in collaborations) and are not very error-prone.
So I'm wondering, do these pesky bugs occur exponentially more as the amount of code increases, or ...?