From 59c421aee70a6cafb8c79517f28d2d8923850d02 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 20 Aug 2022 23:42:53 +0800 Subject: New post: random/tab_gang --- docs/random/img/tab_gang/braille_display.jpg | Bin 0 -> 88717 bytes docs/random/index.md | 1 + docs/random/tab_gang.md | 44 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 docs/random/img/tab_gang/braille_display.jpg create mode 100644 docs/random/tab_gang.md diff --git a/docs/random/img/tab_gang/braille_display.jpg b/docs/random/img/tab_gang/braille_display.jpg new file mode 100644 index 0000000..ada96b4 Binary files /dev/null and b/docs/random/img/tab_gang/braille_display.jpg differ diff --git a/docs/random/index.md b/docs/random/index.md index 427415d..13810a0 100644 --- a/docs/random/index.md +++ b/docs/random/index.md @@ -14,3 +14,4 @@ Nevertheless, occasionally I leave a permanent trace along the way. - [My Life Goals](life_goals) - [I Respect Furries](i_respect_furries) - [I'm Using a Trackball (Logitech ERGO M575)](ergo_m575) +- [I Joined The Tab Gang](tab_gang) diff --git a/docs/random/tab_gang.md b/docs/random/tab_gang.md new file mode 100644 index 0000000..8c40cd2 --- /dev/null +++ b/docs/random/tab_gang.md @@ -0,0 +1,44 @@ +# I Joined The Tab Gang + +2022-08-20 | CC BY-SA 4.0 + +If you've done a considerable amount of programming, you must have heard +of the Space vs. Tab battle, and perhaps picked a side. In personal hobby +projects, this is mostly a choice of aesthetics. Ever since 13 or +something I had been using 4 spaces, but on 2022-08-12, I am announcing my +departure from this style for the tab character. (With the notable +exception of Python) + +For too long have I been fooled by the Space Gang. Portable? Yes, but so +are tabs. Configurable? Yes, but tabs more so. Compared to 4 spaces, tab +has three advantages that won me over: + +1. 3 fewer bytes each indentation level; +2. No need to worry about accidental 3- and 5-space indents; +3. 3 fewer characters on a Braille display. + +1 and 2 are good reasons, yes, but the third one really moved me the way +a truck tows a car in the disabled spot. Per Wikipedia, a Braille display +looks like this: + +![A refreshable Braille display](img/tab_gang/braille_display.jpg) + +This one is 40 characters wide but 80-character models are sold. Screen +space is precious. Imagine dragging your finger across the line of code, +only to find the first 16 characters wasted on indentation using 4 levels +of 4 spaces. It would be different if you used tabs. A tab is a single +character, so 4 tabs would only use 4 braille cells, leaving the remaining +36 cells for code. (Note that, however, I do not know any visually +disabled person to testify this claim.) + +The lesson? When you find yourself weighing two options over an issue you +think makes little difference to you, try considering how it affects +people who live a different life from yours. Like how you design your +"Accept/Decline call" UI on a mobile phone so that a senior person knows +instantly what to do, instead of wondering if they should click, drag, or +swipe. This kind of decision should not be made in a condescending manner. +Instead, you and I should pay attention to the lives of different people: +the technologically illiterate, the homeless, the disabled, and everyone +you think deserves a better life than they have, and make informed +decisions when you have the chance. Sometimes it's as simple as `set +noexpandtab`. -- cgit v1.2.3