(Replying to PARENT post)
In my experience writing reusable code, unless you're writing a library, is usually a waste of time. Must code, even when written with intent to be reusable -- isn't. Maintainability and readability almost always trump reusability. Refactoring fast the point where reuse is needed typically is the better approach.
McIlroys approach is the less common approach of library/framework writers while Knuth is the approach of app devs.
(Replying to PARENT post)
Additionally, I can't help but think that this essay (and others in this style) and subsequent reflections would make for a perfect seminar targeted towards final year CS students, as it merges perfectly academic reflection and real world engineering considerations, which is what many CS programs across the world sorely need.
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
... can someone please point out what the problem is? I don't see it :-|
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
The shell script is the same for disk and cpu, however, it is O(1) of RAM, and therefor can operate on input of size limited to disk, not RAM
(Replying to PARENT post)
(Replying to PARENT post)
http://www.leancrew.com/all-this/2011/12/more-shell-less-egg...
(Replying to PARENT post)
If you had asked Knuth to solve this problem using any means in the whole world and do it within 10 minutes, I don't think he would have any trouble doing it.
And honestly, if the lesson is to teach us some really basic lesson of code reuse, not reinventing the wheel, or some such like that, I think this was a pretty convoluted way to deliver sort of a common sense lesson.