this post was submitted on 20 Nov 2024
877 points (97.6% liked)

Programmer Humor

20039 readers
1889 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
877
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[–] AusatKeyboardPremi 1 points 2 months ago

Ignoring whitespace can simplify diffs, but I prefer to keep it visible to see exactly how the code has changed.

I also try to minimize whitespace changes by relegating formatting adjustments to the final stage of a code check-in, after all approvals. It is even better when the project or team uses Git hooks with a linter and formatter to take away this rote work altogether.

Thank you too for sharing your workflow. It is always interesting to read how everyone approaches the same problem in their own way. :-)