Hacker News new | ask | show | jobs
by Firehed 4877 days ago
Are you writing this for yourself or to share? If the latter, optimize readability for people who don't understand regexes.

As for commenting the end of loops - that too just improves readability, especially in long functions. If your editor doesn't show invisible characters, it can be easy to lose track if some indent is part of the 'i' loop or the 'j' loop, for example (yes, that can indicate a bigger problem, but that's not the point. I'm talking about real-world code, not idealistic academic nonsense)

1 comments

Why? So my grandma can read my code? That's not the way to enlightenment if you program in a professional setting.