7 ms·
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
by AgentOrange1234 1mo ago
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.
- CarVac 1mo agoRow/col works but width/height doesn't, alas.
- thaumasiotes 1mo ago> It's sad that pairs like true/false, good/bad, first/rest, and left/right are unequal length. You're just matching them wrong. On/off and yes/no may look unequal, but what about yes/off or on/no?
- nullsanity 1mo ago[dead]
- pmontra 1mo agoAh, but I use a normal proportional font in my editor so same and diff have different widths. That was the fun comment. The serious ones: 1. I'm trading the ability to align statements on consecutive lines for a more pleasant reading experience. 2. Nobody ever complained that my source code is a = 1 ab = 2 abc = 3 instead of a = 1 ab = 2 abc = 3 3. No tables or diagrams in comments of course but I think that I could configure my editor (emacs) to use a monospaced font there. I do use a monospaced font for the ``` ``` blocks of md files. 4. I'm using Atkinson Hyperlegible Next https://www.brailleinstitute.org/freefont/ https://www.brailleinstitute.org/freefont/
- mb2100 1mo ago2. You must have never written Haskell.
- qwerty1793 1mo agoOr terraform.
- onion2k 1mo agoThey would complain if it's: a = 1 ab = 2 abc = 3
- 1718627440 1mo ago> I'm trading the ability to align statements on consecutive lines for a more pleasant reading experience. I'm the opposite, I prefer non-proportional fonts even for prose.
- hiccuphippo 1mo agoCode editors should do this visually without adding actual space characters to the file.
- nasso_dev 1mo agowhy not go even further? store the source minified without any extraneous whitespace and let the editor display a properly indented view in your preferred style...
- marton78 1mo agoYou caught my OCD. I like to use upper / lower a lot.
- Kootle 1mo agoIn Japan they have the abbreviation “NG” (“not good”) that’s often used as the opposite of “OK”. I always liked how, when I worked for a Japanese machine learning company, classifiers would be between “OK” and “NG”. Maybe semantically “okay” and “not good” are not great opposites, but I always liked how having textual alignment makes the contrast immediately obvious
- kqp 1mo agoSeems like “not okay” would be the cleanest antonym. I can’t see anything that could go wrong with using it. > Meeting at 4 pm today? > NO
- lou1306 1mo agoNorway (Yes this is a YAML pun)
- lloeki 1mo agoLog levels have me screaming internally https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger....
- seszett 1mo agoIt's not unusual in France to use OK and KO. I never liked it much because it's too easy to confuse and no semantically a good opposite either, but visually it does look very balanced.
- andrelaszlo 1mo agoIs it because KO and chaos are both pronounced /ka.o/?
- seszett 1mo agoI've always just understood it as in knockout, chaos wouldn't fit in the way OK and KO are used (as predicate adjectives, if I understand English grammar classes correctly) but it is part of why some people like to use "KO", I'm not sure.
- eps 1mo agoAlso have/want if old/new is already taken.
- internet_points 1mo ago> old/new, head/tail, fast/slow, same/diff, and right/wrong also some abbreviations work fine: min max row col beg (vs start) end key val src dst pos len and we have public_key secret_key (vs private) from till push pull load save init done inner outer ----- and if you speak Norwegian you have two options: ja yes no nei but that may trigger a different kind of OCD :-)
- mananaysiempre 1mo agoHere’s a larger stash: https://github.com/timvieira/justified-variables https://github.com/timvieira/justified-variables (via https://news.ycombinator.com/item?id=31138306 https://news.ycombinator.com/item?id=31138306).
- abcd_f 1mo agoForgot the ever succinct get put
- buttercraft 1mo agoThere's also aye/nay but I don't think I've ever seen those in code
- internet_points 1mo agoMuckle thanks tae ye, ah'm stealing thae richt noo
- edanm 1mo agoI wonder if that was part of the reason that some programming languages use constructs like "if / fi" "do / od" etc. (Note: After writing the above, I checked with ChatGPT, it claims that the main motivation was to make it unambiguous which which "opening word" a "closing word" belonged to.)
- dbdr 1mo agoThis tracks with an old convention in languages like Pascal, which uses begin / end keywords for all blocks, where people would add "end (* if *)" as a comment to make it more explicit which block is being closed.
- moffkalast 1mo agoThere's only two things I hate in this world: people who do column alignment for vars and function params, and the Dutch.
- latexr 1mo agoDoesn’t work that well without the context. https://www.goodreads.com/quotes/379482-there-s-only-two-things-i-hate-in-this-world-people https://www.goodreads.com/quotes/379482-there-s-only-two-thi... Someone who is unfamiliar with the quote will just be confused.
- kmoser 1mo agoConsistency of abbreviation style is important, too. It drives me crazy that the Google Maps API uses lat/lng rather than lat/lon.
- zem 1mo agoup/dn is cute