Hacker News new | ask | show | jobs
by zenhack 2149 days ago
I think grep is a compelling example of when it makes sense to do the extra work here. But I'm more dubious of the idea that carefully optimising yes was a good use of engineering time.
1 comments

> But I'm more dubious of the idea that carefully optimising yes was a good use of engineering time.

I literally can make no sense of that. Why do you think widely used pieces of software should not be well made.

There's an opportunity cost. There has to have been a better use of that person's time than taking a tool designed to say yes to repetitive "are you sure?" prompts, and get it to keep up with memory throughput. The throughput of a tool like that does not matter.
Here's the code for it https://github.com/coreutils/coreutils/blob/master/src/yes.c

The core is about 70 lines. As for over-optimising it, I think chesterton's fence needs mentioning https://fs.blog/2020/03/chestertons-fence/

I don't think this is a useful avenue of debate for me.