Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Why do you prefer non-wrapping lines in code examples?
1 point by 0des on June 11, 2022 | hide | past | favorite | 2 comments
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?



I've never stubbed my toe on a wrapped line of numbered code. Why is this so common?


Because people sometimes make poor choices.




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

Search: