←back to thread

412 points conanxin | 2 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 #
1. steve1977 ◴[] No.41085677[source]
Oh believe me, I wish what you wrote was true, but it isn't.

I've seen people think they have a specific Python environment active just because they were in their project's directory on the command line.

I've seen people not understand that "python -m pip" is a command and even if they are in a directory which has "python" in its name, they still have to type "python" for that command.

PS: The command line might even be an emperor. And the emperor could be naked...

replies(1): >>41085894 #
2. fragmede ◴[] No.41085894[source]
> I've seen people think they have a specific Python environment active just because they were in their project's directory on the command line.

I wrote python-wool as a simple wrapper to python to make that true because it's just easier that way. Direnv can also be configured to do that as well.

http://GitHub.com/fragmede/python-wool