A lot of it is a "copy and paste the code and walk away" - not really caring about how it looks when the page is rendered.
With Discord (and slack and even teams) the ability to paste a code is easier because rich text gets pasted as rich text and there's also even more advanced "collapsible code snippets".
And so... out of the "reddit's terrible job with code" I only attribute 25% of that to Reddit itself and 75% to the "people aren't caring about their post."
Monofaced fonts would be nice, too, so that you could be sure that you’re on the right indentation level as you tap something in.
``` triple backtick-style code blocks ```
and `inline code`, but HN doesn't.
This is particularly interesting because Reddit has less of a reason to support those than HN does. Code-related markdown generally don't see a lot of use outside of programming subreddits.
It's a literal trap: you can format the code correctly per reddits documentation, but inadvertently fail to format it for old-reddit users.
For this reason most coding subs recommend the 4 spaces even though it's a pain-in-the-butt to format it that way manually.
Kind of new with Discord I admit.