
Learn the Command Line - margotcodes
https://www.codecademy.com/en/courses/learn-the-command-line?utm_campaign=lcl_release&utm_source=hackernews
======
r3bl
I finished it last night and wrote a "review" in a mailing list, so I'm just
gonna copy that "review" I sent last night if anyone's trying to figure out
whether or not they should take this course:

I just finished it. It took me less than half an hour.

It was OK until I finished the 75% of the course. The last 25% were pretty
repetitive: use nano to edit your bash config (they used .bash_profile as a
config file), type something in it, close nano and use source to set the
source of your bash config. I had to execute that same process at least five
times and every single time the terminal session restarted so I couldn't use
up and down keys to navigate between previous commands, so I had to type them
again every single time. Plus there were constant bugs in the interface so I
had to manually scroll the left sidebar to see the next task in like every
challenge.

All in all, you're right, very basic, thorough, and a bit repetitive at the
end. Nothing really left a wow effect to me, but I knew how to use 95% of
those commands. Others might find it more useful.

P.S. I'm kind of surprised that they chose nano as a text editor. I expected
vi, but I'm guessing they chose nano because it's more beginner-friendly.

~~~
bphogan
Just putting this out there - as a teacher, I have seen the importance of
repetition. My students would benefit from the repetition at the end of this.

Whether they know they'd benefit or not.

Like scales on a piano.

~~~
ndrscr
The very reason that I became interested in programming is the ability to
eliminate repetition. Instead of solving math problems, I could make a
calculator program. Instead of typing something out many times, the computer
would do it for me. Type once, run forever. That was an amazing revalation.

If I had learned programming through mindless repetition, through typing the
same thing over and over again (As codecademy has students doing here), I
would have quit early on.

Instead, I learned through solving problems. Diverse problems forced me to
apply my newfound bits and pieces of knowledge in different ways. I always
focused on eliminating repetition whenever I could. I had no interest in
typing a lot.

There are different kinds of repetition. Practicing the elimination of
repetition is the best repetition there is.

Finally, of all the computer-related tools out there, the command line is
perhaps the best at aiding users in the elimination of repetition. With the
ease of adding new commands, with programs like vi and cron at one's
fingertips, there is so much even a beginning user can do to start eliminating
his/her repetition. So to TEACH this tool as one of mindless typing is utterly
abominable.

~~~
bphogan
Everyone seems to be missing this bit - it is about those fundamentals first.
The end goal is eliminating repetition. But it takes repetition to get to that
point because that's how the human brain works.

I observe this with students who use IDEs in the beginning. Some "experienced"
developer tells them they need to use an IDE because it "saves time."

Then the students tab-complete their way through code and don't really
understand, or remember, what it is. The connections, the pathways to memory,
aren't as great.

And not everyone learns this way. If your first program out of the gate was a
program to do math for you, before previously learning anything about
programming, then based on my experience you are an outlier, someone with a
gift and natural affinity for this field.

Bottom line: if this was too repetitive for you, you weren't the target
audience.

------
kazinator
They should say, right on the landing page, _what_ command line.

This is revealed in grayed out text under a login/signup dialog when you click
on Start.

~~~
listic
Windows?

~~~
knightaz
Unix based systems

------
raboukhalil
If you're interested in more, I recently wrote a short book about learning
Bash scripting:
[https://gumroad.com/l/datascience](https://gumroad.com/l/datascience)

In the book, I use "adventures" to demonstrate Bash concepts, where I guide
the reader through using the command line to answer questions such as: What's
the average tip of a NYC cab driver? Is there a correlation between a
country's GDP and life expectancy? etc

~~~
jeroenjanssens
Awesome! I wrote something related:
[http://datascienceatthecommandline.com](http://datascienceatthecommandline.com)

~~~
raboukhalil
Hey Jeroen! I really enjoyed reading your book, and highly recommend it for
everyone.

------
izolate
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.

~~~
Nadya
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"

~~~
phaemon
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.

~~~
Nadya
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.

------
teach
Do you really have to create an account to even see the first exercise?

How times have changed at CodeCademy.

~~~
artursapek
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.

~~~
moondev
Seems like a good use-case for docker

~~~
lewiseason
At a previous job, we had a "technical task" which formed part of the
interview process for junior sysadmins. It involved setting up a couple of
servers, VPNing them together, and configuring appropriate routing so VPN
clients could access a server on a remote network.

We used LXC for this, but that or docker is probably a sane approach. You get
some (not all) of the separation you do from VMs with all the scarce resource
requirements of different users. If you consider the implications carefully,
you can even give users root inside these containers in certain circumstances.

------
snake117
I love using the command line on my Mac. I had to learn it when I decided to
learn Rails. You really do feel like you have more power and control during
development. Now I didn't use Codecademy, but I did learn from reading
tutorials and watching a Lynda series taught by Kevin Skoglund. If you're in
the process of learning the command line, definitely give it a whirl.

------
djd3141
It's great to see a course to teach basic command line use, I tried this back
when it was in beta and it was great. At the time I had also emailed their
support team about some security concerns regarding the course and never heard
back(I'm not infosec expert but I was surprised at a few things they allowed
that would seem like security issues).

~~~
artursapek
The servers are all sandboxed and isolated to you as an individual learner.
What problems did you find? Feel free to email me at artur@codecademy.com.

~~~
ino
This is not about security but since you're from codecademy, I'm having
trouble with the font on the console, on chrome on OSX.

I'm having trouble with - and = which look almost the same to my not so great
vision.

[https://www.dropbox.com/s/dtyrq7jlao350br/Screenshot%202015-...](https://www.dropbox.com/s/dtyrq7jlao350br/Screenshot%202015-08-24%2021.52.34.PNG?dl=0)

By the way, thanks to the codecademy team. Cool stuff.

------
anonuser910
Not a fan of CodeCademy. Other than the obvious (look who's backing them)
though unacknowledged objective of flooding the market with low-quality devs
to suppress wages, I've seen too many complaints from users to the effect of
"I completed all of the exercises, but I feel like I haven't really learned
anything."

Too much hand-holding. A good book, a comprehensive tutorial, or even just
reading the documentation still probably works best.

In fact, this training wheels-tutorial system, regardless of its
effectiveness, fits perfectly with their goal of devaluing software engineers
(whom they deign only to describe as coders); after all, if "Coding is sooo
Easy!!!" it shouldn't require one to read dozens of thick books, right? Just
playing a sort of game and "leveling up" every now and then should suffice.
Then you too will be a coder - and Zuck will be richer.

~~~
butwhy
tl;dr "omg I'm scared of new people learning how to program because it
threatens my job. I learned the hard way looking through old textbooks and new
entrants shouldn't get to use a nice new service to learn because I didn't
have that available to me when I started!"

~~~
anonuser910
Also, as I stated in my post, I don't think CodeCademy actually works that
well at all, so your suggestion that I'm envious of new people because they
have access to CC when starting out while I didn't is groundless. I tried one
of their courses two years ago and found it extremely shallow. If someone
asked me today how to learn JavaScript, I would probably direct them to
Mozilla's tutorial or to the Rhino book and wouldn't even mention CC.

The glut of free programming books and tutorials on the internet along with
open source operating systems and development tools and the Stack Overflow and
other Stack Exchange websites have collectively done much more programming and
CS education than CC has done and likely ever will do.

~~~
butwhy
So you don't personally like CC based on your experience of it 2 years ago, so
what? You don't have to use it. It just so happens that a lot of people really
like their service.

If it outputs bad candidates, as you claim, then you should have no problem
beating them in job interviews.

------
huherto
Which command line ? Unix or Windows/DOS ?

~~~
Pyrodogg
From the first step, "This course is for unix-based systems such as Linux and
Mac OS X."

------
pbhjpbhj
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.

------
nonprogrammable
I completed this a few days ago. Good enough to make me want to put Linux on
my Macbook again. How I missed thee.

~~~
hsitz
Doesn't your Macbook already have a unix command line?

~~~
Fradow
It does, and most of Unix command line tools can be installed painlessly via
brew or port (Mac package managers).

There are reasons to install Linux on a Mac, but general purpose unix command
line isn't one of them.

------
anonuser910
Or, learn the Bourne shell (which is on every UNIX) with this:
[http://www.grymoire.com/Unix/Sh.html](http://www.grymoire.com/Unix/Sh.html)

Even better, it doesn't require registration and passing a CAPTCHA Turing
test.

~~~
anonuser910
The tutorial I linked to is of very high quality. Who, based on the
information content of my post or the obviously disposable nature of my
account, would waste downvotes on it?

------
nyc_cyn
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?

~~~
kerkeslager
Just from the perspective of mapping sentence meanings to bash commands,
that's a difficult thing to do. But going beyond that, I think there are
issues having to do with the ambiguity of language that just aren't solvable,
period.

Take your example: "Show me all my files, including my hidden ones". That, to
me, should show all the files on the entire system where I am the owner. Even
as someone who ostensibly knows some bash, you missed that you dropped some
pieces of data which are relevant in bash terms. "my" indicates ownership, and
nowhere in your sentence did you say to limit the function to the current
directory. If you're making that mistake as an experienced user, what hope
does a beginner have?

`ls -a` actually encodes a fairly complex query, which only becomes apparent
when you attempt to really nail down what it does in a natural language. To
produce `ls -a`, you would really have to type something like "List the names
of all the files, folders, and symbolic links in the current directory that
are visible to the current user." You could, of course, start making
assumptions about certain parts of this, similar to how `ls` does, but then
you get into users guessing which part of the sentences they can elide (why
wouldn't we assume that "List the names of the files, folders, and symbolic
links in the current directory" _wouldn 't_ show us _all_ the files, folders,
and symbolic links?). At that point, the user must learn the idiosyncrasies of
which exact sentence they have to type in to get what they want: i.e. when
they have to say "all", when saying "my" matters instead of saying "the", etc.
At that point the natural language stuff is no longer a learning tool, it's a
separate, very complicated thing for the student to learn _in addition_ to
what they are trying to learn.

As another example of this: if you're willing to accept some ambiguity, why
did you choose `ls -a` instead of `find .`? Recognizing that `ls -a` and `find
.` do very different things.

To summarize: I don't think it's a bad idea, just an impossible one. :)

~~~
userbinator
_I think there are issues having to do with the ambiguity of language that
just aren 't solvable, period._

This, absolutely. Once you've used a programming language enough, you'll find
that natural languages are disturbingly ambiguous; it only works (most of the
time, at least) for communicating with other humans because of implied
context.

------
Houshalter
An error occurs when trying to sign up:
[https://i.imgur.com/lp6Ty0y.png?1](https://i.imgur.com/lp6Ty0y.png?1)

------
cpursley
Great, now the missing link is SQL. Why are none of the online code schools
teaching such an essential skill required for web development?

~~~
Touche
Is knowing SQL still important for web development? I haven't used it in 5
years and feel I can land jobs regardless.

~~~
lewiseason
In many large web applications writing queries in your DBAL/whatever without
being able to dive into the underlying query and understand what's going on,
I'd say it's pretty crucial. For anything small (complexity or expected
traffic) you can probably get by without?

------
aorth
Annoying that the URL is using several tracking parameters:

?utm_campaign=lcl_release&utm_source=hackernews

Can't you just read your server logs, people?

------
iam_hamsandwich
Last I used it, it had quite a few bugs. Even with work abounds to the bugs I
only was able to get to 75%

~~~
artursapek
Yeah, we have fixed quite a few bugs in the past week. We are pretty proud of
the result, maybe give it another go!

------
gchokov
Very good beginners course! Thanks guys.

