5 ms·
Nice write up. I'm surprised there is so much use of shell scripts. I usually do my best to avoid writing them and use them for little more then "stringing comm
by doesnt_know 13y ago
Nice write up. I'm surprised there is so much use of shell scripts. I usually do my best to avoid writing them and use them for little more then "stringing commands together". I guess not everyone shares my dislike for shell scripting and it's syntax.
Going back to the introduction, this comment:
"Linux kernel 3.10 release had 15,803,499 lines of code !"
This is probably a stupid question, but what's going to happen to the large low level projects in the future when these devs have retired. Is the industry creating enough young talent to take over the low level stuff?
I personally went through Uni without having to write a single line of C. Even with those that go through a Computer Science (instead of Development focused) degree, how many actually leave and choose C for their personal projects or use it in the industry?
- MetaCosm 13y agoC isn't popular at colleges... and why should be it? So many more interesting, fun, crazy languages to play with... lisp, haskell, rust, ocaml, etc. That said, once you are in the real world and you bump into your first real hard problems, the answer is often C. Need to speed up some Python, use C. Need to pour rocket fuel on your Erlang, use C. Need to run on an embedded device, use C. C tends to be low on surprises and most of them are exceptionally well documented and understood at this point. C tends to have decent libraries for whatever you need. In certain open source communities -- you will use C because the stuff you depend on uses it. It is that simple. I suspect the number of C developers is still relatively high, and while it won't be a primary / favorite of many -- it is the lingua franca if you will... lots of times stuff can be framed as a comparison to C, because everyone understands the context.
- why-el 13y ago"C++ and Java, say, are presumably growing faster than plain C, but I bet C will still be around." (Dennis Ritchie)
- RogerL 13y ago"and why should be it?" I think you answer your own question. I was going to reply to the the parent post, but I'll say it here. I find it barking mad that you can get a 4 year degree without using C or close equivalent. How else you do really understand how the machine works, how do you debug difficult hardware problems, how do you.. you get the idea. The counter argument is that University is not trade school. Sure, but you need to understand the fundamentals. While I intensely dislike how Knuth uses a made up assembly language for his books, he has an important point - we really do need to understand how things are implemented under the hood, either because we are the ones implementing what is under the hood, or we have to understand which of many choices to use, and/or to debug problems when they come up. And that is not a detail, it is a fundamental aspect of being an engineer. I witness people, when I ask them "why is X happening", respond with guesses. I don't mean they say "since Y and Y, I suspect Q", which is a reasonable utterance for an engineer. I just get "Q". You press as to why, and like startled birds they flush and you get "well, maybe R, or it could be P. Yes, it's P". Whether it is a "science" degree or "engineering", we need to understand systems, and have experience with them. Reading a book about heaps only takes you so far. If you haven't implemented, say, a simple file allocation system, debugged some pointers, stepped through the allocation and deallocation of memory, looked at the assembly generated from your code, and so on (these can reasonably be replaced with other, equivalent experiences of course), how can you really understand computers?
- brudgers 13y agoThe shell can be a disproportionately powerful programming environment. $> foo bar & $> foo baz & parallelizes `foo` with a minimum of technical debt compared to a lower level approach. Perhaps the most famous example in all hackerdom llustrating the power of the shell was the Knuth-Mcillroy affair. http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ http://www.leancrew.com/all-this/2011/12/more-shell-less-egg...
- yp_maplist 13y ago"The shell can be a disproportionately powerful programming environment." Then how do you explain why other languages are so much more popular? Not only that, but how do you explain why the market for software developers compensates those with experience in these other languages more than those few developers who are highly competent in writing portable shell scripts? Relative to what I have seen written by other developers, I consider myself a competent shell user. Practice helps. On average I write or revise more than one new script per day. And I've been doing this for years. The number of shell scripts I have written numbers in the thousands. Is there a place where shell scripting is valued on par with the trendy languages like Python, Ruby, etc.?
- pjc50 13y agoPower is ill-defined and not related to popularity, which is in turn only lightly linked to market value. (Arguably the most powerful language by weight is APL, which has a tiny but dedicated community) Shell is very good at a narrow range of tasks involving text and file manipulation, but a couple of crippling limitations: whitespace in filenames (especially, god help you, newlines) destroys many casually written scripts, and the only structure really supported by the shell utils is newline-delimited.
- yp_maplist 12y agoI love APL! I am a student of k and now q. The biggest problem of the shell is the rules around quoting. That includes whitespace but also many other snafus. As for all the utilities being geared toward line-by-line (newline delimited), this is true. But quoting can be learnt with practice; I rarely have problems because it is second nature. And, there's a shell utility called lex. It lets you design your own utilities (filters). And you can create filters that read multiple lines, easy as pie. (Easier than mastering awk.) You can even create your own programming language by combining lex with another standard utility: yacc. This is how C was created. Do they still force CS students to learn about these utilities?
- panzi 13y agoYou didn't have an exercise in building compilers using yacc/bison or similar, generating assembler code? It was a required exercise on my university (uni. of tech. Vienna). Though it was the only time when I wrote assembler (and it wasn't x86 assembler but 64bit alpha assembler, because this instruction set is simpler to teach - it's RISC).