Hacker News new | past | comments | ask | show | jobs | submit login

it feels like this is the 1.23E23th time I've read this - wouldn't it be time for HN to fix the css to make code-tags more readable (especially on mobile)?!



Sounds nice in theory, but the intention of code block is to capture how code looks--including where the lines break. That aspect of code blocks isn't broken.

The problem is people who use code blocks for what it wasn't intended to do-display quoted content.

Perhaps HN can add support for quotes, but even now there's nothing difficult with indicating a quote by adding a ">" to the start of the paragraph. Most, if not all, of HN readers will know what that means.


The problem is people who use code blocks for what it wasn't intended to do-display quoted content.

The problem is that it doesn't work, even on mobile, whether you're posting code or the Declaration of Independence.

At its heart, this web site is about communicating information. The current state of the code block fails at that mission.

Would you use an IDE without word wrap?


> Would you use an IDE without word wrap?

I wasn't aware it was controversial to use an IDE without word-wrap. I do not have it enabled on any of my editors.


"Enabled" is one thing. But it should be available. In HN's code blocks, it's not even an option.


How do you read code from codebases that don’t respect the arbitrary column limit?


I am flexible about how wide my editor is. Pretty much all code I read bounds itself to some sort of limit around 80-120 characters. If there are a few individual lines that exceed the current editor width, I can scroll. I don't have to work with any codebases that have ridiculously long lines.


To be honest, I don't often read such code, or I try to run it through a formatter prior to reading. I guess I should have said that I _generally_ don't have soft wraps enabled. Sometimes I just have to plug my nose and soft-wrap.


I just suck it up and scroll like a normal person.


A normal person has word wrap toggled


> Would you use an IDE without word wrap?

Yes? I find word wrap in code really weird.


Long lines are just annoying, wrap or no wrap.

I don't want to hit 'j' and drop down two 'lines' because what I thought was the next line was actually the end of this line.

I also don't want to hit '$' and go not to the end of the 'line' but somewhere below (and potentially left) because of the same.

But I also don't want to hit '$' and go out into space to the right and lose context from the surrounding reasonably-lengthed lines.

Just use the return key and nobody has to worry about whether to wrap or not to wrap.


We know what it means, but it’s still hard to distinguish at a glance what is quoted and what is not. It works in (plaintext) email because emails are traditionally word-wrapped and “>” is inserted at the start of each line – not once at the start of an arbitrarily long paragraph. And even then, email clients often color quoted blocks to further visually distinguish them.


Never had an issue with it on HN. 99% of quotes occur at the start of the post and the rest of the post is a reply.

Posts that interleave their content with quoted bits are rarely as constructive as they think (almost always just point-by-point bickering) that I find impossible to follow no matter what formatting they could've used for the quotes.

Also a single ">" prefix on a long wrapped line is a bit of internet convention with younger crowds probably thanks to 4chan. I doubt most people using it these days even remember seeing it in emails.

If anything, HN should post-process lines that start with ">" to indent them.


Code tags should not mess with line length. Instead you should quote formatting (`>`) for quotes (which HN doesn't support so it's all a bit moot).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: