Live data from Hacker News

Become Shell Literate

drewdevault.com

331–340 of 341 posts

Re: Become Shell Literate

#331
post #211

Earlier quoted context omitted.

> You only learn the tool once. Every subsequent time you visit the man page, the information you're probably looking for is frontloaded. Just scroll to the bottom if you want examples? This is false for most tools we don't use daily. It's false even for tools we do use daily, in some cases (I have to google git commands every month or so for commands I use rarely). Most people are and remain perpetual intermediates:…

I bristled just now at the opportunity to have my first strong disagreement with Mr. Spolsky. Then I read the article you linked. I don’t think it means what you think it means. He’s talking about users of the software, not developers. And I know, I know, developers are users of software too, perhaps more than the average user. But then he links to this article about homo logicus [0] in which he begins: > Of all the…

> I wouldn’t want a lazy, mediocre carpenter to build my house either. I’m perfectly content to let them build a ramshackle residence for themselves where nobody has to suffer because of it.

This is kind of funny since I'm European and we view most US houses as low quality McMansions :-))

Re: Become Shell Literate

#332
Can we at least agree on one thing? That sticking with the keyboard is faster than using the mouse.

Use keyboard shortcuts in your IDE, type commands into your shell. The killer idea that will make you more efficient is scripting (or creating macros in your IDE) for your own common tasks and assigning them a good name (or a shortcut in your IDE.)

Re: Become Shell Literate

#333

Earlier quoted context omitted.

You're right. I often think the man page should begin with a few examples, then launch into the neverending list of options. That is no way to learn. In foreign language 101, they start you off with a small group of examples. "Como estas?" "Muy bien. Y tu?" Afterward, they explain the rules of the language (this is a noun, this is a verb, this is how you conjugate for first-person singular, etc.). In fact, this is ho…

>The Linux man pages are upside down. Examples don't come till the very end, if at all. You only learn the tool once. Every subsequent time you visit the man page, the information you're probably looking for is frontloaded. Just scroll to the bottom if you want examples?

It takes a long time to scroll to the bottom of bash man page.

Re: Become Shell Literate

#334
post #211

Earlier quoted context omitted.

> You only learn the tool once. Every subsequent time you visit the man page, the information you're probably looking for is frontloaded. Just scroll to the bottom if you want examples? This is false for most tools we don't use daily. It's false even for tools we do use daily, in some cases (I have to google git commands every month or so for commands I use rarely). Most people are and remain perpetual intermediates:…

I bristled just now at the opportunity to have my first strong disagreement with Mr. Spolsky. Then I read the article you linked. I don’t think it means what you think it means. He’s talking about users of the software, not developers. And I know, I know, developers are users of software too, perhaps more than the average user. But then he links to this article about homo logicus [0] in which he begins: > Of all the…

If the carpenter does everything correctly I don't care if he doesn't keep everything in memory.

Re: Become Shell Literate

#335

Earlier quoted context omitted.

I always thought someday I would become a hardcore Linux hacker and know all the commands and flags but the reality is I have to relearn every time. Who spends that much time just in the command line these days? I’m sure some people do but I don’t know what they do unless its CTFs or security related.

Devops-style workload means a lot of the time spent in the console. Even then, I lookup the quoting difference between $* and $@ every single time, and how to use `read`. Or more likely decide it's time to drop bash at that point...

docker save | xz is about the longest pipeline I used, and since compression doesn't provide any meaningful advantage there (except for maybe checksum), I reduced it to just docker save.

Re: Become Shell Literate

#336
post #274
post #50

Earlier quoted context omitted.

I think a misunderstood part of Emacs is that this is exactly what it is—-it’s just glue, but instead of being in a command-oriented environment, it’s in an editor-oriented environment. You run the same Unix tools but glue their results together into a text buffer with a full programming language that then lets you programmatically edit the results. People joke about Emacs being an OS but it’s really just a different…

Without commenting on substance, Emacs is an application that rehomed itself on unix, but isnt a genetic unix application, Emacs was developed on ITS.

Definitely originally. I suspect that a modern emacs has more unix under the hood than it has ITS under the hood.

I am not sure if we should care about the differentiation between TECO-Emacs on one hand and Elisp-Emacs on the other.

Re: Become Shell Literate

#337
post #312

Earlier quoted context omitted.

But now you require gnu awk, it no longer works under posix (so for example busybox). Which sucks a bit.

It'll work with more than gawk (e.g. mawk as well) but yeah, it will not work with busybox awk. In the context of an interactive shell command I doubt many people care much about posix; indeed I struggle to recall any context in which I ever cared about posix compliance as such. Unless you have an personal or professional interest in fringe operating systems posix compliance is mostly of interest as an imperfect prox…

Ugh, should of course have been

    git status -s | awk 'gsub(/^ D /,"")' | tr \\n \\0 | ...

Re: Become Shell Literate

#338

I used to think this way as well, but out of necessity, had to work specifically with a commercial IDE for some time. Turns out, if you are confident learning the keybindings of a robust IDE is worthwhile (e.g. you know that you must use it for some particular project for a decent amount of time) the investment pays off just as well as learning shell commands. A good IDE can do everything a cobbled together shell pip…

Does your IDE run inside a 500MB linux container ? After cloud adoption, I would have difficulty finding software developers whose work does not entail running across multiple machines and environments. (Ok, the community of scientific researchers is probably exempt from this but they are a minority).

Re: Become Shell Literate

#339

I used to think this way as well, but out of necessity, had to work specifically with a commercial IDE for some time. Turns out, if you are confident learning the keybindings of a robust IDE is worthwhile (e.g. you know that you must use it for some particular project for a decent amount of time) the investment pays off just as well as learning shell commands. A good IDE can do everything a cobbled together shell pip…

If you work with mechanical or electrical engineers, then you're going to run into Windows machines pretty quick, and then you need to convince them to install minGW to run your shell scripts. Sure, shell scripts are portable between Mac and *nix, but you're leaving out a large elephant.

Git bash is something that nearly every engineer installs nowadays on windows.

Re: Become Shell Literate

#340
post #312

Earlier quoted context omitted.

But now you require gnu awk, it no longer works under posix (so for example busybox). Which sucks a bit.

It'll work with more than gawk (e.g. mawk as well) but yeah, it will not work with busybox awk. In the context of an interactive shell command I doubt many people care much about posix; indeed I struggle to recall any context in which I ever cared about posix compliance as such. Unless you have an personal or professional interest in fringe operating systems posix compliance is mostly of interest as an imperfect prox…

> Unless you have an personal or professional interest in fringe operating systems posix compliance

I mostly hit things like these with alpine containers and openwrt. OpenWRT I guess could be considered "fringe operating system", but alpine (at least for containers) seems reasonably mainstream?

Post reply on HN