News for hackers. Stuff that matters.
Re:All software sucks by weinzierl on Saturday April 19, 2014 @03:03PM (#7614343)
Why is head considered harmful?

>Here is a hint: complexity is the bane of all software, simplicity is the most important quality.

Isn't head one of the simplest tools one can imagine? Certainly simpler than sed.

Re:All software sucks by bbanyc on Saturday April 19, 2014 @03:12PM (#7614374)
Because it wasn't made in Murray Hill. grep is also a single command in sed, but since it was in Unix v6 it's okay. There's an extreme case of NIH syndrome that pervades the Plan 9 community.
Re:All software sucks by eekee on Saturday April 19, 2014 @05:54PM (#7614872)
Sed existed for many years before head, and head only exists for symmetry with tail. There's no other reason for it to exist. It's not that sed is complex, sed isn't nearly complex enough to matter. The more you look into Plan 9 and Bell Labs Unix, the more you'll find the decisions made in Bell Labs 1152 were all very carefully reasoned. They didn't do things out of an artistic need for symmetry or because it felt good, they made the best decisions they could and they wrote no more software than they judged necessary. (Games excepted, of course.)

To answer bbanyc too, grep existed before sed. Grep showed off the power of pipes, but sed came along after pipes were well-established and people thought "Wouldn't it be great to use ed between pipes?"

The argument in harmful.cat-v.org seems to be "don't add pointless junk," but for my part I'd be happy to use a unix with sed but no grep. I plan to look a little deeper than that though. For one thing, although I like the Plan 9 shell and shell tools, when writing scripts I often find myself dipping into awk because it's a more normal programming language and as such it's just easier for so many tasks. I also respect Rob Pike's opinion; when asked what happened to unix's tool-oriented approach, he replied, "That approach is dead and the eulogy was delivered by Perl." I guess like many others I want a language which also happens to function as a decent shell.