今天才知道
|最后更新: 2026-9-10
Status
Like
Saved
Sep 10, 2026 01:21 AM
链接
notion image

SNAFU

I always thought “snafu” was just a fun made up word. It’s actually an acronym: Situation Normal: All Fucked Up. The term originated from the US Army during World War II to describe bureaucratic inefficiency.

WIMP

in human–computer interaction, WIMP stands for “windows, icons, menus, pointer,” describing the classic desktop style of user interface. It was first developed at Xerox PARC and later popularized by the Apple Macintosh, which added things like the menu bar and more advanced window management. WIMP interfaces standardize how programs receive input, making it easier for users to transfer skills between applications. Learn more

Pygmalion Effect

The Pygmalion effect is the idea that people perform better when others expect more of them, and worse when expectations are low, because expectations subtly change how they are treated and how they see themselves.

TOCTOU

A TOCTOU (Time-of-Check to Time-of-Use) race condition is a software vulnerability occurring when a program checks a resource's state (e.g., file existence) but the resource changes before it is used. Attackers exploit this tiny timing gap to manipulate the resource, causing unauthorized actions or privilege escalation.

Veblen good

A Veblen good is a type of luxury good where demand increases as the price increases, contradicting the law of supply and demand, resulting in an upward-sloping demand curve. Higher prices make them desirable as a status symbol, like expensive watches and cars.
Not all luxury goods are Veblen goods. Some luxury items do in fact provide a premium experience or feature. Veblen goods typically are purchased as a sign that someone can afford to purchase it.
Veblen goods are named after American economist Thorstein Veblen who first wrote about the phenomenon.

Cargo cult

The phrase was coined by Western observers in the 1940s to describe religious movements in Melanesia that formed after contact with Allied forces in World War II. Indigenous people saw large amounts of manufactured goods (“cargo”) arrive via military logistics, and after the troops left they built symbolic airstrips, mock planes, and other rituals in hopes of attracting similar cargo again.
The label was applied by outsiders, not by the communities themselves, and later broadened metaphorically (e.g., Feynman’s “cargo cult science”) to describe imitating form without understanding substance.

⌘⇧1

Everyone knows ⌘⇧3 for taking screenshots on a Mac, or ⌘⇧4 for screenshotting a region. But I never thought to ask: what happened to ⌘⇧1 or ⌘⇧2? Turns out: they were originally designed for ejecting floppy disks. I guess people did a lot of ejecting back in the day.
I’ve since remapped ⌘⇧1 with Cleanshot to take OCR screenshots (copy and text in the image directly to my keyboard, rather than saving the image directly).
I learned this computer fun fact, and many others, from Marcin Wichary’s delightful website and article that everyone should subscribe to.

cd -

cd - takes you back to your previous directory, like a navigation undo in the terminal.
No more spamming cd .. or retyping full paths.
Same pattern works with git checkout -—switches to your previous branch.

SIMD

SIMD (Single Instruction, Multiple Data) lets a CPU do the same math on multiple numbers at once. If you have a list of 1,000 numbers and need to double each one, a normal CPU does it one at a time. SIMD does 4 or 8 at a time in a single step.
Where it matters: video codecs, game engines, ML inference, image processing—bulk numeric work on uniform data. Libraries like numpy and ffmpeg use SIMD under the hood.
Why not use it everywhere?
  • Only works for the same operation on independent data—most logic is sequential or branching
  • Memory is usually the bottleneck, not compute
  • SIMD hates if statements
  • Data must be packed contiguously in memory
You benefit from SIMD without touching it. It's plumbing—good to know it exists, rarely something you write yourself.

Sumo oranges

Sumo oranges (dekopon) are a Japanese cultivar from 1972—a cross between kiyomi tangor and ponkan mandarin. The distinctive bump was initially considered ugly and they flopped commercially for two decades. In the late 90s, a growers' cooperative figured out a curing process that ensured consistent sweetness.
The easy peel trait is genetic. The albedo (white pith) naturally separates from the flesh, so the rind practically falls off. The segment membranes are also thinner than most mandarins—less fiber, more juice release.
Sumo oranges arrived in the US in 2011, marketed as "Sumo Citrus" by a California grower who licensed the cultivar. They have a short season (January–April), are usually hand-harvested, individually wrapped, fragile, and don’t ship well—hence, $3-4 per fruit.

Noisy Neighbor problem

In software development, a noisy neighbor refers to a situation in multi-tenant environments (like cloud infrastructure or shared servers) where one tenant consumes a disproportionate amount of shared resources—CPU, memory, network bandwidth, disk I/O—degrading performance for other tenants on the same system.
It's borrowed from the apartment analogy: one loud neighbor ruins the experience for everyone else in the building.

x86

x86 is a design language for computer processors—the chip that acts as your computer's brain. If processors are engines, x86 is one particular engine design philosophy that's dominated personal computers for 40+ years.
When someone says "x86," they're referring to processors that understand a specific set of instructions. It's like how some cars run on gasoline and others on diesel—x86 processors "run on" x86 instructions.
The weird name comes from Intel's chip model numbers in the late 70s and 80s:
  • 8086 (1978)
  • 80286
  • 80386
  • 80486
They all ended in "86." So people just started calling the whole family "x86."
The main alternative today is ARM (used in your phone, Apple's M-series Macs, and increasingly in servers). The car analogy: x86 is like a big V8 engine—powerful, proven, but thirsty. ARM is like a modern turbo-4—efficient, increasingly powerful, better for battery life.
x86 advantages:
  • Massive software library (everything just works)
  • Mature tooling and developer knowledge
  • Still dominates servers and high-performance computing
x86 disadvantages:
  • Carries 40 years of design baggage for backwards compatibility
  • Less power-efficient than ARM
  • Harder to innovate because you can't break old software
The core tension: x86's greatest strength (compatibility) is also its greatest weakness (complexity and power consumption). ARM started fresh with mobile constraints, which is why it's more efficient.

Ubuntu and macOS VMs

I always kinda knew what Ubuntu is, but not really. And I certainly have no idea how it relates to virtualization (a relevant topic these days).
So here’s what I learned:
Ubuntu is a Linux distribution (distro) built on top of the Linux kernel (the thing that manages hardware, memory and core processes). It is responsible for the desktop environment and has strong opinions about how the computer’s default settings should be configured.
Ubuntu can not run simultaneously on a Mac unless you use virtualization. Back in the Intel Mac days, you might use VMWare or Parallels (I remember using this to run Windows on macOS in middle school, if I remember correctly).
But on the latest Apple Silicon Macs, you can run Ubuntu on Apple’s Hypervisor framework. This is a low level API that lets apps create VMs without resorting to emulation (emulation is slow).
So when people want to run a Linux VM on macOS, they might reach for the Ubuntu distro by default because it has great defaults, works out of the box, has a big community, and has predictable support/upgrade cycles (although services like Docker do not use Ubuntu by default, instead opting for Debian or Alpine).
Ubuntu is the Honda Civic of Linux distros.
Ubuntu's name comes from a South African philosophy meaning "humanity to others.”

Web Speech API

The Web Speech API is a browser-native interface for voice. It has two parts: SpeechRecognition (voice to text) and SpeechSynthesis (text to speech). Recognition routes audio to Google's servers in Chrome; synthesis uses your OS's built-in voices and works offline.
Use cases: voice commands, dictation, accessibility, having your app talk back to users. People have built voice-controlled 3D scenes, karaoke games that match speech to lyrics, and browser extensions that read selected text aloud.
The tradeoff vs. dedicated speech models (Whisper, AssemblyAI, etc.): Web Speech API is free and works in minutes, but accuracy drops with accents, noise, or specialized vocabulary. It's Chrome/Edge only for recognition. Good for prototypes and simple features, but you should reach for a speech model when transcription quality matters.

How copy + paste works

Copy + paste seems obvious: copying puts a thing in a box, pasting retrieves the thing from the box.
But that’s not what’s happening under the hood.
When you copy something from an app, the source app registers the possible formats for that data it could provide. It might instantly serialize basic formats (like plain text), but it does not serialize every possible format since to preserve memory and performance.
When you paste something, the destination app looks at the promises from the source app and requests its preferred format. At this point the source app fulfills the promise and provides the data in the required format.
This explains why copy + paste works different depending on the destination of the paste event: the destination app (email, spreadsheet, document, etc) chooses the format it wants to receive from the set of available promises.
macOS does a lot of work under the hood to attempt serialization of common data types when the source app is closed. But there may still be edge cases where if you copy something, close the source app, and then attempt to paste elsewhere, the source can not fulfill its request and the pasted content will be corrupted.
Copy and paste is not putting things into a box and pulling them out later. It’s brokering promises between apps.

Grep, sed, awk

grep sed and awk are command line utilities designed in the mid-1970s. They are all designed to process text streams and descended from ed (the original Unix text editor).
  • grep — find lines matching a pattern
  • sed — transform a stream, line by line
  • awk — arbitrary computation on structured text
awk is interesting because it’s essentially a self-contained programming language. It has variables, arithmetic, conditionals, loops, and more. For example, when awk sees amy,lawer,1000, it automatically splits it into $1=amy, $2=lawyer, $3=1000.
From there you could say $3 > 1000 { print $1 } and you've written a filter for people over 1000.
awk is still around but was extended by Perl in 1987. Python eventually replaced Perl for most people’s day to day use. But awk still finds niche use cases for writing tiny programs in the CLI without having to import dependencies or write python files.
I expect I will never use this.

What happens when your rm -rf ~

  • r is recursive, which means the rm command can descend into directories. It will do a depth-first search, deleting children directories before parents, crawling its way back up to the root of the Home directory. Sibling order is roughly arbitrary.
  • f means force, so it won’t prompt you and will suppress most errors.
  1. Dotfiles get deleted quickly, breaking new shell sessions.
  1. Applications that are already running might start failing if important configuration files are deleted.
  1. The files you have open will stay open, interestingly enough. The file’s data is safe until it closes, since the directory where files are saved may not exist.
  1. Certain OS behaviors will break (Finder preferences, Dock settings, window positions, etc. all live in ~/Library.
The OS itself will be fine.
Installed applications would be fine (aside from configuration files).
Running processes would still be fine (pending requirements on any files that lives in the Home directory).
macOS protects against removing your Home directory to a certain point: special folders like Documents or Desktop won’t get deleted unless your terminal already has permission to modify those directories.
It’s harder to actually brick a computer through rm -rf because macOS has additional protections for directories like /System or /usr or /Applications.
Because SSDs are so fast, most of your important files may be deleted before it’s physically possible to press ctrl+c to cancel.

Base64 basics

Base64 encoding converts binary data (like image bytes) into a text string using 64 "safe" ASCII characters (A-Z, a-z, 0-9, +, /). It's essentially a reversible text encoding—it lets you stuff any binary blob into a string, and the browser knows how to decode it back.
Base64 is now mostly useful for edge cases—email assets, single-file exports, or tiny assets where the simplicity of encoding outweighs the costs of serving an actual file.

POSIX (Portable Operating System Interface)

POSIX is a standard that defines a common interface for operating systems, especially Unix-like ones. It matters because it lets programs written for one POSIX system (say, Linux) run with minimal changes on another (like macOS). It reduces porting pain and keeps core OS behavior predictable across platforms.

Open CLI command

Use open in the CLI can be used to open a file (using the default application) or directory. Use open . to open the current directory in Finder. There are many more shortcuts that I am unlikely to remember behind open -h.
notion image
Loading...