r/ProgrammerHumor • • Sep 23 '22

Refactoring "Just working solution ".

Post image
54.8k Upvotes

355 comments sorted by

View all comments

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.

2

u/[deleted] Sep 23 '22

I feel this :')