Small programming tricks

Many programmers still find shell shortcuts, editor macros, and small CLI tricks invaluable for day‑to‑day productivity, even as AI coding tools become more common. Commenters contrast “hand coding” and deep tool fluency with delegating to LLMs, arguing that while AI is great for search, scaffolding, and learning new commands by example, it doesn’t replace understanding code, architecture, or low-level optimization. A recurring theme is that these micro‑skills compound over time—especially in debugging, navigation, and performance work—though some note they’re easier to forget or devalue now that AI can often generate or recall them on demand.

Hand-coding vs AI-assisted coding

  • Many commenters still “hand code” most or all of their work, using LLMs mainly as:
    • A smarter reference / search engine for syntax, APIs, or library choices.
    • A code reviewer or rubber duck to catch silly mistakes.
  • Some report that LLM-generated code requires as much time to understand and verify as writing it themselves, so productivity gain is limited.
  • A few describe deep, performance-critical or highly idiosyncratic work where LLMs are unhelpful or actively wrong; they prefer uninterrupted flow and direct coding.
  • Others have largely moved to AI-assisted or agentic workflows, especially for boilerplate and personal projects, but still keep manual control at work.

Are small tricks still relevant in the “AI era”?

  • Several say shell/editor tricks still pay off daily, especially for navigation, history, and quick edits where prompting an LLM would be slower.
  • Others feel such tricks matter less now that AI can generate commands or scripts on demand.
  • Some see AI as a new way to discover tricks—e.g., watching agents’ commands and options teaches tools they didn’t know.
  • There is concern that offloading too much to AI erodes skills and reduces opportunities to internalize techniques.

Branchless and reduced-branch code

  • One thread argues for “avoiding branches” when possible, suggesting:
    • Simplifying code by removing unnecessary ifs.
    • Using lookups, early returns, specialized routines, or fuzzy logic.
  • Pushback:
    • Branchless code is often less readable and modern compilers already optimize many patterns.
    • True “branchless” optimization (e.g., conditional moves, vectorized blends) is niche and should only follow profiling.

Shell usage, history, and navigation

  • Heavy praise for advanced history and directory tools:
    • Ctrl-R with fuzzy search, history | grep, zsh substring search, fish’s history-by-prefix, and third-party tools like Atuin and zoxide.
    • Some move repeated ad-hoc commands into Makefiles/justfiles for reproducibility instead of relying on history.
  • Various navigation tricks: aliases for .., small scripts for jumping between related directories, SSH helpers that preserve working directories.

Knowledge sharing and culture

  • Mixed views on daily “tips” in team chat:
    • Some see it as valuable mentoring and culture-building.
    • Others find daily, broad-audience tips noisy or performative, preferring opt-in channels or curated docs/cheatsheets.
  • General agreement that tiny, well-timed tricks (like the right CLI tool or shortcut) can decisively solve hard real-world problems.