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.
top: attempt once again to allow help text translation
Back when our release 4.0.1 was being readied, sources
were sent to the TP (Translation Project). However one
person named Benno Schulenberg refused to release them
for translation. His stated reason was the top command
line help text which then finally included long forms.
He demanded that the help text be broken into separate
strings instead of a single large string. But, all the
top text (some much more complex) has just one string.
So that stated reason was, at the least, inconsistent.
[ I suspect the real reason was that Mr. Schulenberg ]
[ thought that the carefully right-justified English ]
[ wording would also be required of translations too ]
The bottom line was that Benno took it upon himself to
change the TP motto from "you code, we translate" into
"first we tell you how to code and then we translate".
Rather than bend a knee to that despot, I disabled the
text entirely, admittedly denying users a translation.
Now, with this commit we enable translatable help text
but with a hint included to ignore the justified text.
Reference)s):
. Oct, 2022 - finalized translation exclusion
commit ab05a3785f29cc4b754e17c53bfb3d8ba054563e
Signed-off-by: Jim Warner <james.warner@comcast.net>
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
commit e6f22569e9db16dbef7d9bdee5bb41b8cb7a03ca
Author: Jim Warner <james.warner@comcast.net>
Date: Tue Jul 23 00:00:00 2024 -0500
benji-york