LobstersWill Keleher3 min readintermediate
Small Programming Tricks
Summary
A grab‑bag of command‑line, SQL, and JavaScript shortcuts – from fuzzy‑searching shell history with fzf to using `SELECT` without a `FROM` in Postgres, `git log -S`, and keeping an HTTPS agent alive in Node. The author argues that such bite‑size tips boost daily productivity and suggests sharing one per day on a team channel.
- Install fzf (or atuin) to turn `Ctrl‑R` into a fuzzy history search; per‑directory history is also possible.
- `SELECT` can be used without a `FROM` clause in Postgres/MySQL for quick expression evaluation.
- `EXPLAIN ANALYZE` runs the query and returns detailed runtime metrics, useful for tuning.
- Use `` word‑boundary in regex to match start/end of words.
These shortcuts shave seconds to minutes off routine tasks, reduce context‑switching, and lower the cognitive load of remembering obscure commands. In large codebases or on‑call rotations, a single tip (e.g., `git log -S`) can dramatically speed up root‑cause analysis.
4/10
