4 ms·
It does a poor job with code... but I would contend that most of the terrible job that it does is because people don't know how to (or refuse to) pay reasonable
by shagie 5y ago
It does a poor job with code... but I would contend that most of the terrible job that it does is because people don't know how to (or refuse to) pay reasonable attention to what the format of their code is when one looks at the page.
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."
- Wowfunhappy 5y agoWhy should everyone have to spend time formatting code for reddit that looked perfectly fine in whatever editor it was copied from? Why can’t reddit just display code properly?
- Jtsummers 5y agoEven HN requires some minimal effort if you want to post code in a way that looks decent. Prefixing lines with 2-4 extra spaces is easy in most decent text editors, and if you don't have a decent text it's not hard to do manually.
- IggleSniggle 5y agoI find it painful, since I do most of my HN and Reddit from my phone. I write code this way directly from mobile with enough frequency…the main feature I long for is to be able to type code fences with backtick. 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.
- yen223 5y agoI found it interesting that Reddit supports ``` 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.
- Jtsummers 5y agoIt also does the formatting differently between old and new Reddit. So people on new Reddit don't realize that their post looks like garbage for old Reddit users.
- Gunax 5y agoReddit has 2 ways of formatting code (4 spaces and triple backticks) but for some reason the triple backtick only works on new-reddit and each reportedly have spotty results on mobile. 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.