←back to thread

412 points conanxin | 1 comments | | HN request time: 0s | source
Show context
mg ◴[] No.41085093[source]
The command line is still king.

Whenever I see new coders struggle, it usually is because they:

    - Don't know the context of what they are executing

    - Don't know about the concept of input and output
On the command line, the context is obvious. You are in the context. The working dir, the environment, everything is the same for you as it is for the thing you execute via ./mything.py.

Input and output are also obvious. Input is what you type, output is what you see. Using pipes to redirect it comes naturally.

Not being natively connected to context, input and output is often at the core of problems I see even senior programmers struggle with.

replies(16): >>41085138 #>>41085178 #>>41085239 #>>41085304 #>>41085362 #>>41085446 #>>41085493 #>>41085513 #>>41085614 #>>41085677 #>>41085897 #>>41086268 #>>41086743 #>>41086819 #>>41087168 #>>41097209 #
at_a_remove ◴[] No.41085614[source]
The command line is king, but sometimes the king is mad. Which is to say, it can be difficult to work with the monarchy when the syntax is shit. And there's a lot of bad syntax out there: overly cute, so terse as to be cryptographic, the straight-up baffling ...

Outside of the syntax (which seems to live forever), you have things like non-sane defaults, obscurantist man pages ... the list goes on.

replies(2): >>41085950 #>>41086020 #
skydhash ◴[] No.41086020[source]
> the syntax is shit

When you’re typing a lot, you really don’t want to do a lot of typing for each step. And the shell scripts were for automating some process, not solving a particular problem (you use a programming language for that). The workflow is to have the references ready in case you forgot something.

That brings up the man pages, which can varies in quality, but, for most software I’ve used, tend to be comprehensive. But they assume that you’re knowledgeable. If you’re not, take some time to read a book about system administration (users, processes, files permissions,…).

replies(1): >>41086077 #
1. at_a_remove ◴[] No.41086077{3}[source]
I'm not sure if I have O'Reilly's System Administration book. I used to get pre-prints back in the early nineties when they were still quite new. In any case, yes, I have read and I have Been Around.

And I still think that we can improve. More over, we ought to improve.