Small programming tricks that quietly supercharge your productivity
Engineering productivity often hinges on small, self-contained nuggets of knowledge—like using fzf for fuzzy history search, SELECT without FROM, or git log -S to find when a string was added or removed. The author shares a collection of such tricks and argues that sharing one per day on Slack can be a high-leverage habit for senior engineers.
I think there are some nuggets of knowledge that are particularly valuable and don’t require a lot of supporting mental infrastructure.
- phforms
The thing with a lot of these tricks is that you have to get into the habit of using them. I knew `Ctrl+r` for history since I learned about the command line. I even have a nice shell integration with fzf. But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command, because I never remembered the shortcut and just took the path of least resistance to find something.
Usually what I do is writing these tricks down to a document that is easily accessible at a place where I know that I will look for when failing to remember them. I have a directory of docs where I write stuff like this down by language/tool/etc., so I can quickly look it up without having to search the internet. But I also have to actively remind myself that these things exist whenever I have a problem, stop me from just doing the inefficient thing.
- ozim
Those were not programming tricks, but computing tricks or command line/sql tricks.
Anyways I find it mind boggling how many useful actions are not known by „normal people”. Most people are really using computers in a very inefficient way.
My idea is if we would spend time making people learn computers or software they use daily better - we wouldn’t need AI agents and we would triple GDP.
- kccqzy
A lot more tricks can be learned from just watching AI work. Instead of allowing AI to work autonomously, go back to the old days where you manually approve every command the AI runs. Just recently while doing performance optimization work, I found Opus using the `perf` command in ways I didn’t know possible. Just give AI a real task and carefully read what commands are used by the AI to solve the problem; most likely the AI uses a trick or two that you didn’t know existed.
- GNOMES
Simple trick I use almost daily for navigating backwards to an exact directory:
https://gist.github.com/GNOMES/6bf65926648e260d8023aebb9ede9...
I use this often instead of chaining together multiple '../..'.
Also nice for when I use Zoxide to CD into a deep nested directory. I quickly found out unless you manually CD each hop, the different parent directories aren't added to your Zoxide DB. (I have come across snippits to recursively CD into all directories in a path to "prepopulate" Zoxide).
I made this to jump directly from say `/foo/bar/batz/abc/123` to `/foo/bar/batz`.
- gnoack
I can recommend https://www.oreilly.com/library/view/unix-power-tools/059600...
The "Unix Power Tools" book is an excellent source for Unix and shell usage tricks
- NegativeLatency
> At a previous company, I shared a trick on slack every day with the engineering team, both technical and company-specific, and folks found them pretty useful.
I would find that annoying, however to not be seen as a jerk I wouldn't say anything.
- jwpapi
In Jetbrains I do secondary shortcuts and I name them as what they are in my hand:
Alt M + V = Move
Alt E + C = Extract Component
Alt S + E = Search Everywhere
_
many more.
Or just vim combos.. with ideavim
- disinterred
The most useful shell trick I've used to date is mapping the 'cd' command to 'zoxide', which is a more powerful version of cd that remembers folders you've been to.