I’ll lead with the fact that I know pretty much nothing about NASCAR. However, I’m sure you’ve stumbled on clips of professional racing pit-crews. Every fiber of that team is about shaving off fractions of a second. Each member, tool, and procedure specialized to get their vehicle back onto the road. Four tires, a full tank, and 14 seconds later burning rubber again.
What does this have to do with coding? What can we learn from this? Maybe more than we realize. Think about the process that goes into refining such a system. The constant attention to detail. Relentlessly surveying the status quo.
How much time does it take you to stop typing, grab your mouse, highlight something, right-click, select copy, pan over, right-click again, select paste, and then finally return to the keyboard and hit enter. Five seconds? Maybe ten? If that was done 20 times a day that means anywhere from 100-200 seconds. In one month that adds up to 50-100 minutes! (Also, how many time do you really copy/cut and paste in day?)
Alright, sure, but even if we cut that time in half using some keyboard shortcuts what’s 40 minutes in a month right? That’s only one action though. Calculate time lost between keys and mouse when you throw in:
- Changing windows
- Changing tabs in your browser
- Searching for a file/directory
- Shuffling a window
- Skipping a song
- Scrolling
As I’ve mentioned in a prior post. Bartending has made me very conscious of what my hands are doing. When I notice that something becomes repetitive I try to find some type of shortcut around it. There’s so many a post note that has taken permanent residence on my monitor wearing the latest shortcut yet to be commited to memory. Whether it’s for slack, chrome, bash shortcuts.
It’s about more than useful shortcuts however. For example, I’m fairly particular about my go-to layout as well. Until I find something else that suites me. I used to prefer a plain old bash terminal for most of my work, reserving the VS Code terminal for holding up a server. Just today though, I learned you can click spec file produced by a failed test and have it open right up. So, I made some changes, and added a keybinding to fit that into my scheme. Because it turn out sometimes the mouse is faster than ALT + TAB, CTRL + P, “spec_i_need”, ENTER.
If you find none of these ideas attractive I suggest you reconsider your definition of efficiency. Just like a program your productivity can be bits and pieces duct taped together to make an extremely functional product. Kinda like NASCAR pit-crews in those funny uniforms. Even while writing this I made the decision that I am, in fact, extremely tired of typing squids and ice-cream cones. 25 seconds of searching produced this find. With a little time and effort it is very possible to give yourself an extra few hours of actual coding each week.