Hacker News new | past | comments | ask | show | jobs | submit login

Just like apples and oranges can be compared as foods (and fruits), bespoke vs. reused solutions can be compared so software. The reused parts are of higher quality than their corresponding bespoke implementations and can be composed to accomplish the same task as well as many others. It's a powerful lesson.



I believe another poster earlier reported that knuths solution was 140 times faster besides being applicable to building tools like the Unix tools.


> The reused parts are of higher quality than their corresponding bespoke implementations ….

I think that stating this as an inevitable and uncontested fact might be pushing the point.


Most of the components are multi-platform, partly or fully POSIX-standardized, battle-tested, blazing, fast, etc. It's some of the most widely-used and arguably greatest software ever written.


And some of it is absolutely terrible with several tools overlapping in use cases along with unclear perfornance hints. Even worse is the combination performing worse which may not matter on small inputs but has a huge impact when you crank up the size. Then there's the issue of understanding why performance suffers and in what cases it's better to roll your own custom solution that better fits the problem.

Reuse saves work when your problem maps perfectly to existing tools while what may seem like a minor difference will propagate down your program to end in countless issues from a codebase you don't know.


It takes real stones to suggest Unix utility code is better quality than Knuth's handicraft. And, not having looked into much of it. Unix code usually works well enough on unchallenging input.


> Unix utility code is better quality

What's your index of "better quality"?

By some indices (simplicity, documented-ness, accessibility {as in: I can read and understand it without learning more than one language's behavior vs. bash/C/several others}), Knuth wins hands-down.

By others (generality, speed of implementation) he does not.


It is normal to point out at this point that if correctness is not important to you, an overwhelmingly more quickly produced implementation is possible.

But my comment was on remarks claiming superior reliability for the Unix utilities, which you have not addressed.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: