Yeah, this is why I have learned to comment my code profusely, use long and descriptive variable names, split out declarations and assignments, avoid too many inline expressions when multi-line conditionals are more readable, make sure methods have one purpose, scope my variables appropriately, avoid magic numbers, always write unit tests (in my dreams), etc. etc.
6
u/[deleted] Sep 23 '22 edited Sep 23 '22
Yeah, this is why I have learned to comment my code profusely, use long and descriptive variable names, split out declarations and assignments, avoid too many inline expressions when multi-line conditionals are more readable, make sure methods have one purpose, scope my variables appropriately, avoid magic numbers, always write unit tests (in my dreams), etc. etc.
Past me has burned future me too many times.