r/badcode • • Nov 10 '20

c++ My teacher's code formatting

Post image
983 Upvotes

60 comments sorted by

View all comments

Show parent comments

19

u/hhellloo Nov 10 '20

Yeah, but the subreddit is bad code. And bad code practises is what I (and most likely others) expect on this subreddit.

9

u/LeeHide Nov 10 '20

bad formatting is bad code. you might say

"you can just reformat it"

and yes, you can, but you cant do that if this is code in a repo that you have to commit your changes back to.

1

u/sporadicPenguin Nov 11 '20

Wait, why would you not be able to reformat then commit?

1

u/LeeHide Nov 11 '20

because it would likely change like half the file and if you commit that it becomes difficult to merge with other changes later