In a similar vein, Taylor Otwell from Laravel writes his comment blocks exactly three lines long and each line is three characters shorter than the line above, e.g.
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
There's a similar anecdote Gillian Anderson recently revealed during an interview on the X-Files, saying Chris Carter had an OCD-like habit to write dialog to conform to certain text layout preferences (no widows[1]) in the script, which made for the show's distinctive style of dialog cadence.
In programming certain word choices are valuable in this way. It's sad that pairs like true/false, good/bad, first/rest, and left/right are unequal length. But there are nice pairs like old/new, head/tail, fast/slow, same/diff, and right/wrong, which can help with create natural vertical alignment throughout a function.
AgentOrange1234
I wonder if at any point during writing, the heroic author of that Super Metroid guide learned that "missiles" are not spent "missles", and decided to own the mistake rather than reword the entire guide.
This might potentially
rejuvenate the writing
by disrupting habitual
patterns, which forces
more original choices.
card_zero
> At the same time, who among us didn’t nod in recognition at least, having once spent hours massaging a button UI string or a tooltip just to get it to fit under the certain width in a densely packed interface?
I did, and then I got a customer email about how they were using a display-zoom OS accessibility feature and things were truncated on their device. :')
See also: localizing your interface to German
gyomu
suckerpinch has a great video where he uses an LLM to do this same thing automatically
Pretty sure Laravel source code comments above functions were always something like 3 lines, with each line slightly less length than the previous one. Not sure if this is still done or enforced at all, but it was always neat to see.
I like the idea that arbitrary constraints can actually improve writing. Without a constraint, it's easy to fall back on familiar phrasing, while having to work around something unusual forces you to reconsider each word. I wonder if this applies to programming and other creative work too.
unicorn_platfor
Two definitions that I had to look up.
* Widow: a short final line of a paragraph that gets stranded at the top of the next page or column.
* Orphan: a first line of a paragraph stranded at the bottom of a page or column.
comments (10)
easydidit
1 = https://en.wikipedia.org/wiki/Widows_and_orphans
sho_hn
AgentOrange1234
Also, the font used for the monospace examples in the post is a great kick to the nostalgia. Which one is it? It reminds me of https://int10h.org/oldschool-pc-fonts/fontlist/font?ibm_vga_...
_jackdk_
card_zero
I did, and then I got a customer email about how they were using a display-zoom OS accessibility feature and things were truncated on their device. :')
See also: localizing your interface to German
gyomu
https://tom7.org/bovex/
ivw
Here is an example - https://github.com/illuminate/database/blob/master/Connectio... - looks like each one is 3 characters shorter.
howToTestFE
unicorn_platfor
* Widow: a short final line of a paragraph that gets stranded at the top of the next page or column.
* Orphan: a first line of a paragraph stranded at the bottom of a page or column.
fhub