The good: Nice exercises for beginners. Tab-completion, accepts readline characters like ctrl-u.
The bad:
You don't see the (wrong) output if you don't get it right the first time, making it hard to work iteratively and having to guess what the question actually intended.
E.g. 'Seven files that start with "Santa"' actually wants file names that start with Santa, after some questions that had you use "grep" to search file contents. Where I actually struggled with what's expected is Day 11.
I've recently reached a point where I feel I've reached an upper limit with how much efficiency I can extract from my usual toolset/editors. So I've gone on a journey where I'm finally exploring tools that make living in the command line a productive and pleasant experience for me.
I've long put off learning or even exploring tmux or learning more than a few handful of vim keybinds. So I started digging into configuring them and learning them well enough to be able to regularly use them for work and personal computers.
It's been very pleasant, to say the least. There's still a few ways I need to go where I do everything from the command line and the keyboard, but I think it's worth training your muscles to be comfortable with doing things purely using the keyboard.
I've switched to vim mode for a few tools that offer it. I started seriously using vimium on chrome and firefox (a friend had introduced me to it about 7 years ago but I never cared enough to learn it well).
Another reason I finally made the jump was that I've been having RSI pain on my right hand due to using mouse too much and in un-ergonomic positions. While I've taken measures to improve ergonomic use of the mouse and keyboard, I'm just totally impressed with the capabilities of keyboard navigation and how much value you can extract out of your keyboard.
My friends have been egging on me about the bell curve meme, but I think it's important for me to figure out the limits and then maybe I will finally go back to defaults and simpler tools. The only way to be on the right side of the bell curve is through the middle.
I learnt the basics of vim navigation through it. I'm yet to finish it since I dropped it after the first chapter to start using it as a daily driver and picking things as I need. I will probably come back and go through it again at some point and by then it will be another mind-blown situation
For learning vim, I recommend searching for a "vim cheat sheet" that has an image of a keyboard layout with vim commands in it and printing that. Makes it easier to check and learn more, little by little.
Another one is online tutorials that make you practice interactively. Haven't used those much but the little I did, it was helpful.
I have an odd suggestion for learning more of vim: Check out gvim.
It's vim with a GUI, dropdowns for nice discoverability and most importantly the shortcuts on each menu item are the commands to use it in regular vim. It's how I found out vim even had folding waaay back.
For Firefox, I use Tridactyl. After Vimperator died I tried several replacements and found Vimium very limited (IIRC it was the one that was just hotkeys and didn't have modes like vim, no idea how it's grown since then). I have Tridactyl configured to open gvim with the contents of any text input when I hit ctrl+i so I can use vim for them.
Shameless shill - I found Tridactyl and Vimium to be frustratingly limited due to the security restrictions imposed on web extensions, so I've been working on https://glide-browser.app/ for a while; It's a fork of Firefox with (some) vim motions and a TypeScript based config.
Not commenting on the larger gist of the comment, only:
> I've been having RSI pain on my right hand due to using mouse too much and in un-ergonomic positions
If you can, try using a left-hand vertical mouse. I use an Evoluent but there are a million brands. Get a cheapo and try it out. I figure it took me about a week to adjust and my wrists have been happier ever since.
I went back and forth over the years with vim. Lazyvim plus the ebook (lazyvim for ambitious devs or something like that, it’s free online) is what allowed me to stick.
I can’t be doing real work and suddenly realize I don’t know the way to do a certain basic action. Lazyvim makes it so that for everything you want to do, there’s an already configured way, and then you have all the time in the world to fiddle for a better alternative if you don’t like it.
GNU Screen + dvtm/mtm + Vim (with some minimal plugins; especially for buffer mgmt) on a large Monitor is what you need to live on the command line :-)
Just have some minimal configs for the above and learn more of the default key bindings/behaviour etc. That way you can easily take the above setup to any machine that you move to.
Hey this doesn’t work : first solution “ls -al” which I use all the time to list directories was rejected in the second question I used awk and was rejected it expected grep
I think a beginner could be doing it right but then be told they are wrong as you aren’t evaluating actual commands
Best would be to like actually run it* and then check solutions out with awk that it pattern matches
* aka give me a shell ok worth a try lol xD
Edit: also I was expecting something a bit more challenging (also that is correct) to like exercise the brain for those of us that use shell (this is hacker news) something that takes a few minutes and isn’t just commands used all the time
"ls" shows only visible files whereas "ls -a" also displays those starting with a dot. Given the question doesn't that make your answer the correct one?
'Seven files that start with Santa' is actually about filenames. That's pretty confusing especially since users are primed with file contents from the previous exercises already.
And from pipers piping description I had no idea what was wanted of me.
I think that may be the point, the subtlety of "lines of pipers piping" got me for a second - as opposed to the 11 pipers piping files (which is what I thought it wanted).
I thought there was too much ambiguity to several of the challenges:
I gave up after the following exercise:
On the eighth day of Shell my true love gave to me
Eight elves in Santa's Workhop/ ...
Hint: Try finding files named after Elves and moving them to the Workshop/ directory.
It turns out, all they want is the files in the ./Elves directory to the ./Workshop directory. But I didn't figure that out.
Failing to understand the basic requirement is not, IMHO, overthinking it.
I will admit, as I reread the question and the hint just now, that I just didn't read carefully the first time through. It's actually pretty clear. Sigh.
People's minds work quite differently ... As evidenced by people that have strong reactions to particular languages (love or hate), or, as another example, people that love or hate syntax coloring in code. (Yes, it gets in the way for some). The fact that the instructions didn't make the problem clear to me is not an overthinking problem on my part. It would be better for me if the problems were expressed in different ways.
When trying to communicate, saying the same thing two different ways is a big step towards helping deal with the variance in people's minds. I wish they'd done that with some of the questions.
The bad: You don't see the (wrong) output if you don't get it right the first time, making it hard to work iteratively and having to guess what the question actually intended.
E.g. 'Seven files that start with "Santa"' actually wants file names that start with Santa, after some questions that had you use "grep" to search file contents. Where I actually struggled with what's expected is Day 11.
The ugly: Actually a very nice design.
Just the lines from the files are wanted, not the files names. It took me a little while to cotton on to that.
Semi-spoiler follows.
So you need to use the appropriate flag with grep to suppress the file names.
Deleted Comment
1. It's difficult to know that it is following from the previous problem, and then on some problems it changes the workspace.
2. It's not always easy to know what it wants.
3. The question about finding a line starting with "The" I successfully cheated:
4. Likewise the ending "!": 5. On the eighth day I get a "runner error" with the command: I'm globbing for the filename match, I'm not sure if it's "elve" or "Elve" and then trying to move to the target directory.Otherwise it's quite fun - the instant feedback is great.
I've long put off learning or even exploring tmux or learning more than a few handful of vim keybinds. So I started digging into configuring them and learning them well enough to be able to regularly use them for work and personal computers.
It's been very pleasant, to say the least. There's still a few ways I need to go where I do everything from the command line and the keyboard, but I think it's worth training your muscles to be comfortable with doing things purely using the keyboard.
I've switched to vim mode for a few tools that offer it. I started seriously using vimium on chrome and firefox (a friend had introduced me to it about 7 years ago but I never cared enough to learn it well).
Another reason I finally made the jump was that I've been having RSI pain on my right hand due to using mouse too much and in un-ergonomic positions. While I've taken measures to improve ergonomic use of the mouse and keyboard, I'm just totally impressed with the capabilities of keyboard navigation and how much value you can extract out of your keyboard.
My friends have been egging on me about the bell curve meme, but I think it's important for me to figure out the limits and then maybe I will finally go back to defaults and simpler tools. The only way to be on the right side of the bell curve is through the middle.
I learnt the basics of vim navigation through it. I'm yet to finish it since I dropped it after the first chapter to start using it as a daily driver and picking things as I need. I will probably come back and go through it again at some point and by then it will be another mind-blown situation
Another one is online tutorials that make you practice interactively. Haven't used those much but the little I did, it was helpful.
It's vim with a GUI, dropdowns for nice discoverability and most importantly the shortcuts on each menu item are the commands to use it in regular vim. It's how I found out vim even had folding waaay back.
For Firefox, I use Tridactyl. After Vimperator died I tried several replacements and found Vimium very limited (IIRC it was the one that was just hotkeys and didn't have modes like vim, no idea how it's grown since then). I have Tridactyl configured to open gvim with the contents of any text input when I hit ctrl+i so I can use vim for them.
> I've been having RSI pain on my right hand due to using mouse too much and in un-ergonomic positions
If you can, try using a left-hand vertical mouse. I use an Evoluent but there are a million brands. Get a cheapo and try it out. I figure it took me about a week to adjust and my wrists have been happier ever since.
I can’t be doing real work and suddenly realize I don’t know the way to do a certain basic action. Lazyvim makes it so that for everything you want to do, there’s an already configured way, and then you have all the time in the world to fiddle for a better alternative if you don’t like it.
Just have some minimal configs for the above and learn more of the default key bindings/behaviour etc. That way you can easily take the above setup to any machine that you move to.
I think a beginner could be doing it right but then be told they are wrong as you aren’t evaluating actual commands
Best would be to like actually run it* and then check solutions out with awk that it pattern matches
* aka give me a shell ok worth a try lol xD
Edit: also I was expecting something a bit more challenging (also that is correct) to like exercise the brain for those of us that use shell (this is hacker news) something that takes a few minutes and isn’t just commands used all the time
I prefer that way in theory but a capital "A" is not as quick/easy to type.
> awk '/^laugh/ { print $0 }' night-before-christmas.txt
And from pipers piping description I had no idea what was wanted of me.
I gave up after the following exercise:
On the eighth day of Shell my true love gave to me Eight elves in Santa's Workhop/ ... Hint: Try finding files named after Elves and moving them to the Workshop/ directory.
It turns out, all they want is the files in the ./Elves directory to the ./Workshop directory. But I didn't figure that out.
I will admit, as I reread the question and the hint just now, that I just didn't read carefully the first time through. It's actually pretty clear. Sigh.
People's minds work quite differently ... As evidenced by people that have strong reactions to particular languages (love or hate), or, as another example, people that love or hate syntax coloring in code. (Yes, it gets in the way for some). The fact that the instructions didn't make the problem clear to me is not an overthinking problem on my part. It would be better for me if the problems were expressed in different ways.
When trying to communicate, saying the same thing two different ways is a big step towards helping deal with the variance in people's minds. I wish they'd done that with some of the questions.