r/ProgrammerHumor • • Jun 06 '20

It's the law!

Post image
38k Upvotes

1.1k comments sorted by

View all comments

2

u/[deleted] Jun 06 '20

Pro tips: Use ii instead of a single i. makes finding them so much easier if you e.g. would need to rename your variable.

7

u/wookiee42 Jun 06 '20

No one else on your team is going to stick to that. Plus your code might not throw an error if you accidentally use 'i' or 'iii'. Search for 'for' or 'for (' or ' for ' etc - whatever makes sense in your language. Use the RegEx or boolean logic that your search provides if needed.

2

u/Akiraktu-dot-png Jun 06 '20

time to use roman numerals for variables, after "iii" comes "iv" then "v" etc.

1

u/TENTAtheSane Jun 06 '20

Idk why but that sounds so cursed

5

u/LIGHTNINGBOLT23 Jun 06 '20 edited Sep 21 '24

   

1

u/[deleted] Jun 06 '20

Personal preferences. I don’t like digits in variable names for readability. It’s faster typing two of the same character Normally a block of code doesn’t use more than three or four iterations so ii, jj, kk would suffice. And declare all variables.

2

u/russellvt Jun 06 '20

Use ii instead of a single i. makes finding them so much easier

Because, those who don't know vim or good regular expressions know nothing about "\s+" and related search patterns.

Notepad++ for Windoze users is also highly recommended, if that's your coding platform of choice... though there are good IDEs out there, too.

2

u/Denziloe Jun 06 '20

Pro tip: don't.