summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-08-20 23:42:53 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-08-20 23:42:53 +0800
commit59c421aee70a6cafb8c79517f28d2d8923850d02 (patch)
tree656bbf446b793e92535c1e64692833c5d8a6419a /docs
parent5bf914860d64670f3160331cdbb30f2a4c9b8861 (diff)
New post: random/tab_gang
Diffstat (limited to 'docs')
-rw-r--r--docs/random/img/tab_gang/braille_display.jpgbin0 -> 88717 bytes
-rw-r--r--docs/random/index.md1
-rw-r--r--docs/random/tab_gang.md44
3 files changed, 45 insertions, 0 deletions
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
--- /dev/null
+++ b/docs/random/img/tab_gang/braille_display.jpg
Binary files 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`.