I may understand that instead of x,y it may be better to use px,py for positions and vx,vy for speed. Perhaps xx,xy for position. But I'd never use yy.
Searching for `i' requires learning the local editor's way of marking word boundaries, otherwise it'll highlight every instance of the letter `i' which is useless.
Searching for `ii' has less noise because very few words have that sequence in them, and `jj' is even rarer.
Or you can make your life easier, and use tools which helps you.
Once again, regardless of codebase.
So then you get back to the LSP question -- but for larger codebases I can tell you, those don't always work as well as you'd hope. I don't use 'ii' but it's admittedly much easier to just `rg` for variables than hope my editor plugin decides to work today.
Whatever the case, is it really that hard to use a two-letter loop counter? Try it sometime. When building at scale, it just makes sense to be considerate of diversity and do the little things to that make life easier for others.
It's not inconsiderate, we are doing a job. If you can't do your job, you don't have place in my team. And properly using an IDE is definitely part of the job. What are you using that can't open web VSCode that has all these features?
You click a button and get a web browser based IDE where you have everything ready, connected to a cloud computer with a full dev env that mirrors our prod env; that from any branch and the button is right there in pull request UI. There is no reason why someone in this org should require everyone to write double letter iterator var names just because they couldn't be bothered to play the video where I taught how to use the advanced code search and the feature could be available to them in less than a minute of fooling around if they tried.
On this scale, following standards is absolutely necessary. If my engineer has to stop and think "but wait, in this company they do it differently" - this times 150 people I currently manage - then I failed at my job.
Some devs hated me when I came into this (much smaller back then) company few years ago and the first step I did was to put a global linter and formatter there. They were angry about how they would format it better than the formatter. Well that's nice - but that doesn't scale to hundreds of people. People make mistakes, stop caring, have different opinions... And all these questions in their minds are again my failure at my job. It's my job to answer these once and forever and to make it easy to follow the rule.
While this is a personal anecdote, I was a large corporate principal engineer for many years and I am mirroring what I saw working there. I can't say this approach to making software engineering work at scale is uncommon.
Please note that here I'm talking about working at a job, usually for very good money. Nothing of this applies to personal projects, most open source projects and so on. In these cases I'm very much on your side.
Some editors like Kate highlight whole words by just selecting them (and it will not highlight letters in words). Some also do that just by placing the cursor on a word.
This is kind of basic stuff that was around in the 90s, possibly even 80s.
Some software, such as Matlab, have those letters reserved for the common case of imaginary roots of a polynomial, and “ii” and “jj” as variables is a common coding convention. Whether “i” or “j” is your letter for imaginary numbers depends on if you’re an electrical engineer or not.
If your array is named cars then you can safely assume i will be a car, but depending on the complexity of the code it just adds another step for me to parse, when I could have just named it car to begin with.
That's a simple case where the data being iterated over is clear. When the data is complex, it becomes even more useful to descriptively name i so that you can more easily see what you're working with.
A variable with big enough scope you'd be searching for it should have a full real name, no i or ii. Even when it's a loop counter, if it's present for more than a page, please tell me what you're counting.
The first place I worked had a soft-but-hard rule (enforced by ridicule) that single-letter variable names not be used. Loop counters like i, j, and k were frowned upon. However, counters like ii, jj, and kk were fine for matrix operations, xx and yy for image loops, etc.
There were a couple of key guidelines to follow:
1. If it can have more meaning than sample, pixel, or matrix position, give it more meaning, but two characters repeated is fine for loop counters (again, with meaning).
2. Whatever you use should be quickly findable with text search tools of the era (the late ‘90’s).
Someone shouldn’t have to use source inspection assistive coding tools to parse the code you write. When someone else (or you, in a few months) comes upon this code and needs to understand it, they should be able to use find to do it.