←back to thread

412 points conanxin | 4 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 #
delusional ◴[] No.41085362[source]
I agree with you, but I think there's a caveat. The command line is king in Linux, BSD, MacOS, AIX, and to a lesser extent Windows. These operating systems were crafted from the bottom up with the commandline as a foundational layer. The idea of the context, of the "working directory", the "environment", were concepts that were lifted from that commandline centric world, into what we run now.

I think Windows very much wanted to be something different with COM. Instead of starting a shell in the context of the program, you'd connect some external "shell" into the very object graph if your program to inspect it. It turns out to be very difficult, and Windows has largely retreated to commandline centric architecture, but I think there was some essential attempt at foundational innovation there.

I would argue that the commandline has very much proven to be the best trade-off between being useful and being simple, but there is no saying if there exists some alternative.

replies(2): >>41085684 #>>41086059 #
steve1977 ◴[] No.41085684[source]
> The command line is king in Linux, BSD, MacOS, AIX, and to a lesser extent Windows. These operating systems were crafted from the bottom up with the commandline as a foundational layer.

This is definitively not true for macOS.

replies(1): >>41086036 #
1. skydhash ◴[] No.41086036{3}[source]
MacOS is a very complete, very well funded desktop environment targeted towards the general user. You want anything extras and you land in applications using private apis and the command line.
replies(1): >>41086065 #
2. steve1977 ◴[] No.41086065[source]
The command line is not a "foundational layer" in macOS, that was my point. It exists on the same layer as the GUI does.
replies(1): >>41086477 #
3. thesuperbigfrog ◴[] No.41086477[source]
The foundation of MacOS is a fully-compliant Unix:

https://www.opengroup.org/openbrand/register/apple.htm

The GUI is built on top of the Unix foundation and does not stand alone or work without it.

The 'FoxTrot' comic made a big deal about this not long after Mac OS X was released:

https://www.gocomics.com/foxtrot/2002/02/25

replies(1): >>41086883 #
4. steve1977 ◴[] No.41086883{3}[source]
The foundation of macOS contains elements of UNIX (or rather BSD) and the OS is UNIX certified, I‘m fully aware of that. But these are two different things.

For one thing, UNIX != command line.

In the same vein, Windows NT is not based on DOS anymore, even if it has a command line which resembles (parts of) DOS.