From will keleher · · 1m 40s
Small Programming Tricks Matter
Everyday engineering productivity comes from accumulating small, high-leverage tricks that don't require deep expertise.
In brief
Everyday engineering productivity comes from accumulating small, high-leverage tricks that don't require deep expertise. Master small, specific techniques in your tools and languages. They compound into significant time savings and should be shared with your team. Originally reported by will keleher.
Small knowledge compounds fast
Engineering productivity comes from accumulating small nuggets: knowing a language feature exists, understanding TCP_NO_DELAY, or remembering the right git command.
“small bits of knowledge are powerful! and fun! and approachable!!”
Search shell history better
Install fzf to upgrade ctrl+r to fuzzy search, or use atuin to replace your shell history with a searchable SQLite database with per-directory filtering.
Database queries without tables
Use SELECT without a FROM clause to test database functions or understand behavior like how SELECT TRUE not equal to NULL works. PostgreSQL and MySQL both support EXPLAIN ANALYZE to run queries and see detailed performance data.
Regex and metrics shortcuts
Use the word boundary assertion \b to find word beginnings or ends in regex. Use logarithms with metrics to bucket value distributions, like Math.floor(Math.log10(userInGroupCount)).
Modern JavaScript and Node tricks
Modern JS supports Array.flatMap, Object.entries, and Promise.withResolvers. In Node, create an https.Agent and pass it to fetch requests to keep connections open and dramatically reduce latency.
Git and shell power moves
Use git log -S pattern (git pickaxe) to find all commits that added or removed a string. Use git checkout - to switch to your previous HEAD, just like cd -. Enable bash globstar with shopt -s globstar to use **/*.md instead of find.
“git log -S pattern can give you all commits that added or removed a string in a codebase”
Share tricks with your team
At companies, high-leverage knowledge includes debugging data sources, who knows what, where docs live, and when to scale. Share one trick per day with your team to build collective knowledge without overwhelming people.
The short version
Master small, specific techniques in your tools and languages. They compound into significant time savings and should be shared with your team.

