4 ms·
Kind of ironic how an article that praises plaintext shows up as absolute garbage on my iPhone with or without reader mode.
by pipeline_peak 5y ago
Kind of ironic how an article that praises plaintext shows up as absolute garbage on my iPhone with or without reader mode.
- jart 5y agoPage scores a 100 on lighthouse. https://pagespeed.web.dev/report?url=https%3A%2F%2Fwww.netmeister.org%2Fblog%2Fthe-art-of-plain-text.html https://pagespeed.web.dev/report?url=https%3A%2F%2Fwww.netme... Although search engines probably won't show this page to mobile users because it doesn't have that meta viewport tag. Also I'm not a mod but welcome to the community https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html I doubt the author is reading but I've had people analyze and talk about every detail of my html when submitting hobby projects I spent years working on and it always makes me sad when it happens.
- dspillett 5y ago> but I've had people analyze and talk about every detail of my html when submitting hobby projects Take it as an unintended complement: if all they can find wrong is little niggles then you core idea must be good & interesting.
- tomxor 5y agoRead the source for plain text mode, not HTML: view-source:https://www.netmeister.org/blog/the-art-of-plain-text.html The page hasn't yet had the necessary viewport metatag added to prevent mobile browsers doing arbitrary and selective auto adjustments to the font sizes in an attempt to make it "better". (I presume this is what you are talking about - I don't do phones, grumble grumble :wq)
- throw0101a 5y agoWrapping everything in a pre block isn't necessary. For example, look at Daring Fireball: [1][2] which is nicely rendered in a web browser, and very simple when you do a View Source. [1] https://daringfireball.net https://daringfireball.net [2] https://daringfireball.net/2022/02/on_the_origin_of_the_iphone https://daringfireball.net/2022/02/on_the_origin_of_the_ipho...
- tomxor 5y agoIt's not bad, but I prefer netmeister's. > Wrapping everything in a pre block isn't necessary. I'm not saying it has to be all or nothing... but I don't see the point in not wrapping in a pre block or equivalent, having a mix is fine, i.e using an anchor or some <b> and <i> tags if you want sure, but if you are going to insert a bunch of LFs in there anyway for your column width, why not also use them for paragraphs separation, it just seems odd to me to use <p> instead and to clutter the source. You can have HTML inside pre, and you can have as much or little as you want.
- christophilus 5y agoYou can use <p> without cluttering. Put </p><p> on its own line and at a different indentation level. I saw someone do this recently, and the plain HTML read just as well as any plaintext doc I ever saw while also rendering perfectly on the phone (which this article doesn’t do thanks to its use of pre).
- tomxor 5y agowhat exactly is happening on phones with pre?
- giantrobot 5y agoOr mobile browsers just set a viewport width of 960px if no viewport settings are specified. This is a sane assumption since if a viewport width isn't explicitly set the page was probably designed for desktops.
- mrob 5y agoIt's because the article isn't plain text; it's pre-formatted text. Real plain text is great because your browser can re-flow it. Here the author has added hard linebreaks to disable this useful feature. I can't think of any good reason to do this.
- MaxBarraclough 5y agoCounterpoint from Linus Torvalds regarding wrapping text for git commit messages: [0] > Word-wrapping is a property of the text. And the tool you use to visualize things cannot know. End result: you do word-wrapping at the only stage where you can do it, namely when writing it. Not when showing it. > Some things should not be word-wrapped. They may be some kind of quoted text - long compiler error messages, oops reports, whatever. Things that have a certain specific format. > The tool displaying the thing can't know. The person writing the commit message can. End result: you'd better do word-wrapping at commit time, because that's the only time you know the difference. [0] https://github.com/torvalds/linux/pull/17#issuecomment-5661185 https://github.com/torvalds/linux/pull/17#issuecomment-56611... edit I realise there's some irony in the malformed '>' quotation notation I'm using here. The alternative would be to use a paragraph per line to force the HackerNews formatting to present each quoted line on its own line (i.e. its own paragraph) but that would leave nothing to indicate the end of each paragraph.
- mrob 5y ago>They may be some kind of quoted text - long compiler error messages, oops reports, whatever. Things that have a certain specific format. In the contexts where it matters, the display software can mark each linebreak it inserts with a special symbol that's not found in plain text (possible even in terminal apps, e.g. by using inverted color) to indicate it wasn't found in the original text. Unlike pre-formatting text, this does not lose information.
- MaxBarraclough 5y agoWhat you've described isn't plain text.
- rhn_mk1 5y agoFrom the article: > End your lines at between 60 and 75 characters, or so. (There's a reason[3] that newspapers and magazines do not use the whole width of their page and instead create much shorter columns.) The author forgot that the reason is that newspapers and magazines control the medium on which their text will be read, and know how wide the reader's page is. There's nothing more annoying in the programmer's world than the assumption that the reader will prefer to read prose in monospaced font, in an area that's 80 characters wide.