Live data from Hacker News

Learn the Command Line

codecademy.com

61–70 of 110 posts

Re: Learn the Command Line

#61
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…

I don't think speed is the best argument pro the command line. If you're used to and proficient in a gui or cli, then it's going to feel like you're getting more done in your familiar environment.

To me the killer argument for cli is composability, combined with the cli history.

Most of us do a lot of things repeatedly, day in day out. For example I have to download one of the last files from an ftp server, open it, process it in some way, and possibly get some other files based on what's in the first file.

It's reasonable enough from the command line. But some of the operations are chainable with pipes, and all of them can be in a short shell script, so I only have to enter the one script name to get the whole thing done.

And it's in my cli history, so I only have to recall it, and change usually just one parameter.

I think I'd be hard pressed to do that from a gui. for one, I don't think there's a gui history. And how do you chain gui commands together? And then alter them with parameters?

"Write a $LANGUAGE script that you can double click on." Yes, but that's a higher barrier to entry, and it's in a completely different "language" than the gui language that you were working in when you discovered a series of tasks that you repeat. With a shell script you just pull together what you've already been doing, in the format that you've been doing it.

And then compose the shell script you wrote with other shell scripts that you wrote. Etc.

I double click on things too, and somethings it's merely a matter of whether I have my hand on the mouse or the keyboard. Not bashing gui's (pun intended).

Composability.

Composability.

Re: Learn the Command Line

#62

Or, learn the Bourne shell (which is on every UNIX) with this: http://www.grymoire.com/Unix/Sh.html Even better, it doesn't require registration and passing a CAPTCHA Turing test.

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?

Re: Learn the Command Line

#65
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?

To me and a lot of people, the commandline is already natural language. `ls -a` is just a contraction for "list all" Your nine words aren't any more expressive than my two, and that's the problem. There's not much value in being able to express simple commands with long sentences (with often many interpretable meanings) There _could be_ value in natural language processing for some very complicated commands, but it w…

>$ fix network > Your currently specified nameserver, 104.105.10.11, is pingable but not responding to DNS requests. Try putting in 8.8.8.8.

or

>$ detect usb

>You recently plugged in a device with an ACME-1000 chip. You need to install the acme kernel module and try again.

Re: Learn the Command Line

#66
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.

Re: Learn the Command Line

#67

If you're interested in more, I recently wrote a short book about learning Bash scripting: 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

No bitcoin payment option? I'd take one right now! Get a free pay button there (https://goo.gl/QRtxwb)

*Edit, just noticed is some checkout system. Here is the payment http://ckte.me/wy7x3drq2ke PM me on twitter (@nvk) for the PIN with the link to PDF :)

Re: Learn the Command Line

#68

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

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!"

Re: Learn the Command Line

#69
post #14

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), ty…

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.

Re: Learn the Command Line

#70
post #53

Earlier quoted context omitted.

I'm actually shocked to see such a massive number of coders on HN (a skill that still somewhat eludes me) can't use the command line, which I consider a Step #0 type prerequisite. It just hadn't even occurred to me that this might be a possibility. I'm not even sure how folks get started in the hobby/skill without the CLI background. I'd be interested in hearing more about the skills progression of these folks, and h…

The classic Mac OS did not even have a command line interface, so people who began their programming careers in the Apple world between 1984 and 2001-2002 would only have had reason to learn how to use one out of curiosity, or if they happened to be doing cross-platform work with a Unix system. I had a wee bit of Apple II experience prior to the Macintosh, and I suppose you could call the various BBS interfaces I use…

> While I've never been part of the Windows world myself, it has always seemed to me that the DOS command line plays a much smaller role there than the shell does in the Unix world.

Indeed. It was possible to meaningfully use the command line up through, say, Windows 98 SE or so, once Windows XP hit, it became a relic, stuck in the command.com era while the actual OS kernel moved away from the DOS-hybrid of the Windows 95 era with the shift to Windows NT-derived OSes.

Power Shell (or however that's branded... CamelCase? Alloneword? Hyphenated?) promises to make the Windows command line relevant again, but I honestly don't know if you can meaningfully use a Windows system from only the command line these days. You probably can't use a desktop Windows system that way, which means the command line is still effectively frozen out from the real world.

Post reply on HN