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

Programmer Humor

19699 readers
103 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 1 year ago
MODERATORS
906
submitted 3 days ago* (last edited 3 days ago) by [email protected] to c/programmer_humor
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 day 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. :-)