Hacker News new | ask | show | jobs
by dehrmann 992 days ago
I memorize the flags because it means I'm comfortable on any machine. Issue in production, and your aliases aren't there? No problem.
4 comments

I'm curious, how much time would you say you spend on a set of personal machines, versus connecting to random hosts?

My conceptualization of "personal computing" is something more akin to a home or a garden. It's a place where I should feel comfortable and relaxed. Familiar. It's a refuge of sorts, a place where I will inevitably spend an inordinate amount of time, and actually have a lot of real life experiences reflected (through the form of personal writing). Whether working, reading or writing, I tend to think of these machine contexts really as extensions of and foils for my mind. A discoverable mind palace, if you will.

I'm not the OP, but I'm on the same boat with the OP.

For me it's 50/50. The good thing is, when you memorize the commands, and not customize your "base stations" extensively, the difference melts away.

My brain works in "contexts". I remember my native keyboard layout and US one, and I operate in one of these contexts. Same for the spoken/written language. When I switch completely, the mental load disappears, however it's not completely free in terms of brainpower.

So, removing a context is highly beneficial. When I connect to a remote system, I don't care about the commands, aliases, even the place I'm in. Look to the hostname, remember the task I need to do and let my brain loose on the subject.

There are no roadblocks, errors or anything to think about while working. As a result the whole fleet is my home base. I change machines like I change directories. Completely effortless, invisible in fact.

Also, extensive aliasing is limiting. When I know the flags to a command, I can compose and flex on the fly, which I do a lot, as the circumstances and needs arise.

One could see it as the opposite:

Forcing yourself to memorize flags, means you're just equally uncomfortable on any machine: that is, you haven't optimized any particular machine, especially the 1-2-3 machines you use 90% of the time with your aliases.

Not to mention in 2023 on doesn't have to memorize anything to have aliases on "any machine". Have your aliases on a file (or GitHub) and just download it and source it to whether you are.

Optimising the addition of a few flags to a command is alin to optimising the length of variable names. I find that typing out flags gives me plenty of time to think about what I am doing anyway.
Yes, nothing says productivity like spending half and hour to find the right flags every time you need to use something outside the most common unix userland...

or getting them subtly wrong in some production shell script...

So what you're saying that you're putting your own home-grown script wrappers from local machine to production deployment scripts?
Eshell in Emacs let's you use TRAMP to access remote systems as simply as cd'ing to the remote directory. By doing that, you have all of the features of your local shell to work on the remote system.
Awww, you can put the aliases inside your script and source it, then you can keep the aliases in prod!

You could even have your script automatically add the line to source itself to the profile, so you source it once and then it happens automatically!