Live data from Hacker News

When I stopped trying to self-optimize, I got better

nytimes.com

61–70 of 110 posts

Re: When I stopped trying to self-optimize, I got better

#61
post #24

Over the past year, I’ve made a deliberate effort to improve my “personal computing”, which for me is about how I use the shell. I start by trying to notice when I’m doing the same task multiple times and getting tripped up on the specific syntax or sequence of commands (i.e. what’s the Git command again to split certain files out of a previous commit into a separate one?) I will then create an alias, a shell script…

Everyone does this. Otherwise you'd go bat sh*t crazy trying to remember every intricate details of common tools. also using ctrl+r and filter through older commands (ctrl+r to cycle) is also necessary for good mental health. for example alias ll="lsd --icon never -l" alias lla="lsd --icon never -l -a" # all alias llr="lsd --icon never -l -r -a" # reversed alias lls="lsd --icon never -l -r -a -S" #by size alias llt="…

> Everyone does this. Otherwise you'd go bat sh*t crazy trying to remember every intricate details of common tools.

I've got some bad news for you...

Re: When I stopped trying to self-optimize, I got better

#62
post #26
post #24

Earlier quoted context omitted.

Everyone does this. Otherwise you'd go bat sh*t crazy trying to remember every intricate details of common tools. also using ctrl+r and filter through older commands (ctrl+r to cycle) is also necessary for good mental health. for example alias ll="lsd --icon never -l" alias lla="lsd --icon never -l -a" # all alias llr="lsd --icon never -l -r -a" # reversed alias lls="lsd --icon never -l -r -a -S" #by size alias llt="…

I actually find it easier to memorize the flags than to memorize the commands I created myself, because they're a lot more descriptive than short commands like in your examples. The few times I do come up with my own stuff, it's a 2+ line function (or full shell script) that can't be duplicated in a single command and can't be done as an alias.

Except for tar. But there I use the mnemonic “xtrackt ze files”

Re: When I stopped trying to self-optimize, I got better

#64
post #47
post #24

Earlier quoted context omitted.

Everyone does this. Otherwise you'd go bat sh*t crazy trying to remember every intricate details of common tools. also using ctrl+r and filter through older commands (ctrl+r to cycle) is also necessary for good mental health. for example alias ll="lsd --icon never -l" alias lla="lsd --icon never -l -a" # all alias llr="lsd --icon never -l -r -a" # reversed alias lls="lsd --icon never -l -r -a -S" #by size alias llt="…

> alias ss="git status" ss is actually a 'socket stats' and will list all active connections while resolving their reverse dns name, be careful

Is there any harm in that?

Re: When I stopped trying to self-optimize, I got better

#65

Earlier quoted context omitted.

Working from home really helped me. I use the Tomato/Pomodoro technique, but backwards. I let myself be distracted for 10 minutes first, then I work for 20 mins after. Distractions such as laundry, reading news come first, which relieves the feeling that I need to do something else, calms me down. Then I can do 1 work task for 20 mins. Then when I feel restless again I spend another 10 mins doing what my mind wants (…

> For me the point of the timer is to snap me out of the distraction or I’ll be on Hacker News for an hour. Timers are such a big deal with ADHD. It's not news to anyone that people with ADHD suffer from time blindness, but even knowing that I'm constantly underestimating how much it affects me. Even if I'm not doing a scheduled task, having something that regularly beeps or vibrates to shake me out of whatever I'm f…

I live and die by the timers on my watch (whenever I can remember to set them).

Re: When I stopped trying to self-optimize, I got better

#66
post #48

Earlier quoted context omitted.

Must be nice being able to work in the same shell every day, and one you have complete control over no less. For those of us ssh-ing into uncountable remote servers all day with unprivileged accounts, it's not really a practical option unfortunately.

If your utilities are written as self-contained exported Bash functions, you could concatenate them all in a single file (say, `utils.sh`), with a single line at the end: exec /bin/bash Then you could do something like: ssh hostname@address -tt bash -s And have all your utilities available on the remote machine :)

Does this work for aliases?

Re: When I stopped trying to self-optimize, I got better

#67

Earlier quoted context omitted.

I memorize the flags because it means I'm comfortable on any machine. Issue in production, and your aliases aren't there? No problem.

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 ref…

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.

Re: When I stopped trying to self-optimize, I got better

#68
post #47

Earlier quoted context omitted.

> alias ss="git status" ss is actually a 'socket stats' and will list all active connections while resolving their reverse dns name, be careful

Is there any harm in that?

If you're not a sysadmin or debugging your netork, no. However if you're using it for any reason, you lose a command. This is why I start my local commands with a comma (,) [0].

[0]: https://rhodesmill.org/brandon/2009/commands-with-comma/

Re: When I stopped trying to self-optimize, I got better

#69
post #38
post #26

Earlier quoted context omitted.

I actually find it easier to memorize the flags than to memorize the commands I created myself, because they're a lot more descriptive than short commands like in your examples. The few times I do come up with my own stuff, it's a 2+ line function (or full shell script) that can't be duplicated in a single command and can't be done as an alias.

alias lsa=“grep ^alias $HOME/.zshrc | sort”

Just the “alias” command will list all your aliases, there’s no need to define a separate alias apart from convenience.
Post reply on HN