Live data from Hacker News

Learn the Command Line

codecademy.com

41–50 of 110 posts

Re: Learn the Command Line

#41
Lately I've been butting heads with some seriously anti-command line people. I'm not sure if this is a growing sentiment, or I'm just advocating CLI usage more as time goes on.

Anyway, glad to see this. I'll be sure to recommend it to whomever I'm preaching.

Re: Learn the Command Line

#42
post #16

What do people think about wrapping a Natural Language Processing interface around the command line (for educational purposes)? For example: "Show me all of my files, including my hidden ones" --> "ls -a". Good idea or not?

A good NLP interface for files would look as different from a command-line as it would from a graphical file manager. You'd want something context-sensitive, with the ability to use pronouns and iterative refinement, some of which would take the place of simple scripting. You'd need to replace many commands with phrases, and many variations on phrases.

Whether you'd get any users is another question.

You might also consider what a command-line interface based on Dasher would look like. Probably not just a simple typing interface. You could extract a great deal of useful information from completion mechanisms, for instance.

Re: Learn the Command Line

#43
post #8

Earlier quoted context omitted.

We teach things like bash by assigning each user to a virtualized Linux server. That gets really expensive and hard to manage when you give one to every anonymous user who hits the site (especially when our courses pop up on sites like HN). With that said, I have been wanting to change the UI to be less intrusive, so you can better see what you're signing up for.

Seems like a good use-case for docker

I assumed it _was_ docker? I don't know much about it, so I'm genuine when I ask what about "virtualized [sic ;)] Linux server" means "not Docker"?

Re: Learn the Command Line

#44
post #41

Lately I've been butting heads with some seriously anti-command line people. I'm not sure if this is a growing sentiment, or I'm just advocating CLI usage more as time goes on. Anyway, glad to see this. I'll be sure to recommend it to whomever I'm preaching.

I can often navigate to a file in a GUI faster than I can "cd users/Nadya/documents/work/2015/08/24/important/file.txt" [0]

Or I could open up my GUI, click "work" from my side nav selections and navigate through 2015/08/24/important/ and click my file to open it. I can even open two directories and ^x^v into another directory. Or drag/drop to move. Rather than "mv file.txt ../../25/file.txt"

I think it's important to show the more "cool" stuff you can do from CLI. Once you have them interested, explain the building blocks for how they can get there.

Explaining the building blocks to someone who doesn't see the benefits of the CLI will have them thinking about trivial problems and wonder why anyone would ever choose to use the CLI when the GUI is so much faster/easier/less memorization. When I was taught pwd/ls/cp/mv all I could ask myself is "....why? GUI is faster/easier/less memorization/no typos wasting time".

[0] To be fair, I can autocomplete a lot of that command. GUI is still faster though. "cd/us[tab]/N[tab]/doc[tab]/wo[tab]/2015/08/24/i[tab]/fi[tab].txt"

Re: Learn the Command Line

#45
post #44
post #41

Lately I've been butting heads with some seriously anti-command line people. I'm not sure if this is a growing sentiment, or I'm just advocating CLI usage more as time goes on. Anyway, glad to see this. I'll be sure to recommend it to whomever I'm preaching.

I can often navigate to a file in a GUI faster than I can "cd users/Nadya/documents/work/2015/08/24/important/file.txt" [0] Or I could open up my GUI, click "work" from my side nav selections and navigate through 2015/08/24/important/ and click my file to open it. I can even open two directories and ^x^v into another directory. Or drag/drop to move. Rather than "mv file.txt ../../25/file.txt" I think it's important t…

Your GUI often includes shortcuts (e.g. to your "work" folder) and that functionality is accessed from the command line via symlinks. Your comparison is not really fair.

It's significantly faster (at least for me and most people I know) to type "cd ~/relevant-symlink" than it is to take my hands off the keyboard, switch to the mouse, and then go back to home row.

Re: Learn the Command Line

#46
post #44
post #41

Lately I've been butting heads with some seriously anti-command line people. I'm not sure if this is a growing sentiment, or I'm just advocating CLI usage more as time goes on. Anyway, glad to see this. I'll be sure to recommend it to whomever I'm preaching.

I can often navigate to a file in a GUI faster than I can "cd users/Nadya/documents/work/2015/08/24/important/file.txt" [0] Or I could open up my GUI, click "work" from my side nav selections and navigate through 2015/08/24/important/ and click my file to open it. I can even open two directories and ^x^v into another directory. Or drag/drop to move. Rather than "mv file.txt ../../25/file.txt" I think it's important t…

You can't 'cd' to a file :-)

Seriously, if you have 'work' as a side nav, then you could have it as a symlink, which makes it about the same. But it's really the stuff like looping over operations, or rsync over ssh, etc that make reading & writing a bit more awesome than point & grunt.

Re: Learn the Command Line

#47
In the past I've recapped some of these sorts of things but to me this is tediously slow - it's almost CLI for non-computer users. I'd like to check the later material to see that I'm au fait with all of it - sometimes one gets a gap in knowledge when learning piecemeal by oneself but it won't let me skip to the later lessons.

Ideally IMO there would be a simple test one could take that would open up the later lessons, like a short recap for each chapter rather than working through the whole ls, pwd, cd, ls, pwd, cd, cd .., mkdir, ls -a, ls -l ... at the start.

Re: Learn the Command Line

#48
post #46
post #44

Earlier quoted context omitted.

I can often navigate to a file in a GUI faster than I can "cd users/Nadya/documents/work/2015/08/24/important/file.txt" [0] Or I could open up my GUI, click "work" from my side nav selections and navigate through 2015/08/24/important/ and click my file to open it. I can even open two directories and ^x^v into another directory. Or drag/drop to move. Rather than "mv file.txt ../../25/file.txt" I think it's important t…

You can't 'cd' to a file :-) Seriously, if you have 'work' as a side nav, then you could have it as a symlink, which makes it about the same. But it's really the stuff like looping over operations, or rsync over ssh, etc that make reading & writing a bit more awesome than point & grunt.

Arrgh, you caught me! ;) Replace cd with nano and I'll try to avoid the text editing via GUI vs text editing via CLI debate.

As for symlinks, it's a fair point. But even typing the rest of that example it would be faster for me to use a GUI.

I agree on that point. CLI is much better for less trivial tasks - or making a trivial task possible. On Windows renaming files is bad, ending with an (n) structure. Where I want "file_1.txt, file_2.txt I get file (1).txt, file (2).txt. Or if I save a bunch of .jpf instead of .jpg I have to use the CLI to fix the extensions because it isn't possible in Windows otherwise.

But you won't convince a lot of people to use CLI if you're introducing them to pwd/ls/mv/cp instead of |'s, grep, scripting, etc.

Re: Learn the Command Line

#49

Earlier quoted context omitted.

We teach things like bash by assigning each user to a virtualized Linux server. That gets really expensive and hard to manage when you give one to every anonymous user who hits the site (especially when our courses pop up on sites like HN). With that said, I have been wanting to change the UI to be less intrusive, so you can better see what you're signing up for.

IMHO, A Linux VM for every user sounds like overkill. A separate *NIX user account should be sufficient for teaching things like "Navigating the Filesystem", "Configuring the Environment" etc.

Securing multiuser linux is not an easy thing. Even if you set process limits, restrict permissions, etc. you can still be very easily hit with a priv escalation bug in a utility you allow users to run or even in bash itself.

Re: Learn the Command Line

#50
post #46
post #44

Earlier quoted context omitted.

I can often navigate to a file in a GUI faster than I can "cd users/Nadya/documents/work/2015/08/24/important/file.txt" [0] Or I could open up my GUI, click "work" from my side nav selections and navigate through 2015/08/24/important/ and click my file to open it. I can even open two directories and ^x^v into another directory. Or drag/drop to move. Rather than "mv file.txt ../../25/file.txt" I think it's important t…

You can't 'cd' to a file :-) Seriously, if you have 'work' as a side nav, then you could have it as a symlink, which makes it about the same. But it's really the stuff like looping over operations, or rsync over ssh, etc that make reading & writing a bit more awesome than point & grunt.

> You can't 'cd' to a file :-)

I'm routinely tempted to alias `cd` to something that will open the file in $EDITOR, if I type `cd `.

Post reply on HN