← Back to context

Comment by laserlight

3 hours ago

> remember how it was introduced

The problem is that many times I have not read the definition to remember. Debugger puts me into a context where I have to figure out what `p` stands for. I go up the call stack and now there's `s` to be deciphered. Worse is the reuse of `p` for person, product, part, etc. in different contexts.

Debugging is not the only problem. Code is read rarely linearly. Many times I browse different uses of a function, or see how a data structure is modified in different contexts. Looking up single letter variables is just a waste of time.

> Debugger puts me into a context where I have to figure out what `p` stands for.

`p` stands for "the process in question".

I like to think of single-character vars as idea or topic headers that track the single thing I'm currently up to. I'm rarely working with more than one at a time, frequently it's the only variable, and there are contexts where I wouldn't use them at all.

IMHO if you're in a situation where `p` isn't obvious to you, "something has gone wrong".