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.
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.