674
you are viewing a single comment's thread
view the rest of the comments
[-] StudioLE@programming.dev 32 points 1 year ago

A useful tip I picked up was to use ii instead of j for an inner loop. It's far more distinct than j.

If for some terrible reason you have even more inner loops you can easily continue the trend i, ii, iii, iiii, iiiii - or iv, v if you're feeling roman

[-] hstde@lemmy.fmhy.ml 36 points 1 year ago

If you have the need to nest 5 levels of for-loops, I suggest taking a step back and rethinking your approach, my friend.

Even if that other approach is just refactoring it into separate methods.

load more comments (5 replies)
this post was submitted on 09 Jul 2023
674 points (100.0% liked)

Programmer Humor

31251 readers
848 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS