HACKER Q&A
📣 0des

Why do you prefer non-wrapping lines in code examples?


I'm reading documentation and noticing that a lot of blogs use non wrapping lines for code examples despite also using numbered lines.

Example: https://stripe.com/docs/development/quickstart/go

I am not a UI expert, so I'm genuinely asking for those of you who prefer to horizontally scroll content, why is this better?

What aggravates me is that I can't simply zoom out more to get it all on one page, I end up with a 2 inch strip of content down the middle of the page. This suggests, to me, that assuming all things are done for good reason that the author is asserting some type of choice on my behalf.

My only question is why?


  👤 0des Accepted Answer ✓
I've never stubbed my toe on a wrapped line of numbered code. Why is this so common?

👤 lisper
Because people sometimes make poor choices.