HN DigestHacker Newsletter, digested

Issue #808#Design

“I just chose words carefully”

TL;DR

Fully justified monospace text looks bad because spaces can't be split evenly and hyphens stand out. In the late 1990s, rs1n avoided both in a Super Metroid guide by picking words so every line ended exactly at the margin. He did it by hand, for 17,000 words.

The article

  • Monospace handles left and right alignment fine. Centering has no half space to work with. Full justification leaves gaps too wide to spread evenly.
  • Hyphenation is the usual fix in print. In monospace the hyphens stand out and break copy and paste. So plain-text files rarely use full justification.
  • The remaining option is to rewrite the text until each line adds up to the exact width. rs1n did this through a 17,000-word Super Metroid guide, with no doubled spaces anywhere.
  • His FAQ says no program was involved. He chose words so everything lined up, working in an ASCII editor.
  • Marcin Wichary notes that book editors already rewrite text to avoid widows and orphans. UI writers do a smaller version of this when they trim a button label or tooltip to fit a fixed width.

Why it matters

The post is two minutes long and mostly pictures. Open it to see the rendered examples of each alignment, set in a VGA-style bitmap font, and a screenshot of the guide itself. The prose alone doesn't show how odd the bad cases look.

The discussion

Most commenters were delighted by the feat, and many admitted they reword their own code comments, commit messages and papers to tidy the right edge. Side threads covered an X-Files anecdote, equal-length variable names and whether LLMs could do this. The guide's misspelling of "missiles" set off a long argument about English phonetics.

Chris Carter's widowless X-Files scripts

The biggest thread started from Gillian Anderson's account of Chris Carter writing dialogue with no widows, which she linked to the show's slightly backwards cadence. Skeptics found nothing in fan-retyped scripts, but tobr found nearly every dialogue block ending near the margin in a scanned I Want to Believe script. rectang said avoiding widows is a page-break fix that can't produce a cadence; others said bending speech to fit a shape did. Asked what "widow" even means, the author of a TUGboat article on the terms said there are dozens of conflicting definitions.

Just scroll through and look. In almost every paragraph or dialogue block, the last line ends very close to the right margin.

— @tobr

the distinctive cadence is not a direct consequence from eliminating widows but from the mental process used to achieve this efficiently. language goes from natural fluidity to stacking Lego bricks.

— @raffael_de

People who already do this

People confessed to reflowing doc comments until the edge looks clean, and to trimming grant applications and abstracts to win back a line. Examples included Laravel's three-line comments, each three characters shorter, the procps top maintainer's justified commit messages, and Michael Hart's equal-length emails. lproven justifies his replies by hand and says it adds about 10% to his typing time. A conference reviewer said messy first-page alignment usually meant the whole paper was rushed.

I justify (heh) it to myself by catching unclear wording on this last cleanup pass -- and not taking it too far, obstrusifying for the aesthetic.

— @boothby

when I was reviewing I always saw messy alignment on the first page as a sign the paper was probably rushed, and usually I could see that elsewhere in the paper too.

— @syllogism

Constraint as a creative tool, or a tax on clarity

Many read the guide as constrained writing in the tradition of Oulipo, Perec's novel without the letter "e", and Eno's Oblique Strategies. Someone posted Douglas Hofstadter's account of rewriting passages for page breaks and word spacing until the layout shaped the ideas themselves. Others said the constraint forces length over readability, adds or drops commas to make lines fit, and makes every later edit expensive. One reader of procps found the justified help text clunky enough that he patches it out of his builds.

In the course of such rewritings — here extracting a word, there using a shorter or a longer one, elsewhere inserting a word where none was — words and phrases that I would otherwise not have thought of pop to mind, suggesting ideas I would not have thought of

— @quuxplusone

The good thing about this is that it forces you to think about what to write. The bad thing is that it doesn't force you to think about how to write it so it's easy to read and understand, just so it's exactly the right length...

— @rokkamokka

Equal-length names in code

One commenter mourned that true/false and left/right differ in length and praised pairs like old/new, head/tail and src/dst that line up vertically. Readers added more: OK/NG in Japan, OK/KO in France and Spain, row/col, min/max, get/put, and a GitHub list of justified variable names. A proportional-font user said nobody ever complained about his unaligned assignments. Others answered that alignment matters in Haskell, Terraform and F#, and some suggested elastic tabstops or editors that align visually without inserting spaces.

Maybe semantically “okay” and “not good” are not great opposites, but I always liked how having textual alignment makes the contrast immediately obvious

— @Kootle

Could an LLM do it?

Several pointed to Tom7's BoVeX and its "Badness 0" video, where a language model rewrites text for justification. One commenter said models see tokens, not columns, and suggested masking any token that would overflow; their reply was itself justified. Others noted that LLM watermarking also steers word choice toward a hidden target. gkoberger worried that once this is cheap, nobody can tell whether a writer cared or ran a prompt.

The model never sees columns. It sees tokens, and a token can be one character or nine, so "make this line 80 wide" asks it to run a hidden tally over pieces it cannot count by looking at them.

— @urams

can we distinguish between "they cared" and "they spent 30 seconds on a prompt".

— @gkoberger

Consensus

The guide is an impressive, slightly obsessive piece of craft, and a lot of technical writers quietly do smaller versions of the same thing.

Dissent

A sizable minority think full justification hurts reading in the first place, since ragged edges help the eye keep its place. They argued that word choice bent to fit a width gives clunkier prose. In software, they added, localization and accessibility zoom wreck any hand-fitted text anyway.