Live data from Hacker News

Write HTML Right

lofi.limo

1–10 of 212 posts

Re: Write HTML Right

#2
I appreciate that this blog post itself is written in the exact same style! I really miss being able to read the view-source: version of websites easily, but this blog post does it well :)

Re: Write HTML Right

#5
Regarding writing "one-sentence-per-line", I've noticed that style before in LaTeX. While I don't use that style, one advantage that I like is the ability to include comments on the sentence level in LaTeX.

So instead of this:

  First sentence. Second sentence. % Comment on first sentence.
I can write:

  First sentence. % Comment on first sentence.
  Second sentence.
(Of course, one could define a new TeX macro that doesn't display anything to add comments anywhere in-line. That's not as readable, though.)

I've also read that one-sentence-per-line works better with diff programs, but I haven't had any problems with the program meld, so this isn't convincing to me. The advantage the linked article mentions in terms of rearranging sentences also is worth considering, though I haven't found the normal way to be that bad so I'm not convinced by that either.

Some other links on this coding/writing style:

https://rhodesmill.org/brandon/2012/one-sentence-per-line/

https://news.ycombinator.com/item?id=4642395

http://www.uvm.edu/pdodds/writings/2015-05-13better-writing-...

Re: Write HTML Right

#7
This works for blog posts, where the body of the document is one long block of paragraphs, but I suspect this style would quickly become untenable for complex apps. Indentation _is_ information, which is lost here.

Re: Write HTML Right

#8

This works for blog posts, where the body of the document is one long block of paragraphs, but I suspect this style would quickly become untenable for complex apps. Indentation _is_ information, which is lost here.

> Indentation _is_ information, which is lost here.

Isn't it a "view" of information? Any sufficiently advanced text editor can recreate it with a simple key combination.

Re: Write HTML Right

#9

This works for blog posts, where the body of the document is one long block of paragraphs, but I suspect this style would quickly become untenable for complex apps. Indentation _is_ information, which is lost here.

Incorrect indentation is therefore misinformation.

Re: Write HTML Right

#10

This works for blog posts, where the body of the document is one long block of paragraphs, but I suspect this style would quickly become untenable for complex apps. Indentation _is_ information, which is lost here.

I've been using this style - with some tweaks - for web apps too. I don't think I have it completely figured out yet, but it's promising so far. You can view the source of http://lofi.limo/ to see how it's working out.
Post reply on HN