5 ms·
> As for the "memory leaks" --- I haven't looked at the source, but something whose runtime is very short-lived, like pkg-config, may be very well justified in
by bch 9y ago
> As for the "memory leaks" --- I haven't looked at the source, but something whose runtime is very short-lived, like pkg-config, may be very well justified in allocating and never freeing, letting the process exit itself be the "ultimate free". I've seen and done this many times myself.
This makes sense, and then somebody has a vision for a use case beyond the original imagination, goes to turn the code into a library and spends countless hours smartening up lazy resource management. Whether the original author should be "more responsible" is open for debate, but I've personally run into the above situation, and only mention for another perspective on The Life of Code.
Edit: s/coffee/code/
- userbinator 9y agoThat's the classic KISS/YAGNI vs. (not sure if there is an initialism for it) robust extensible modular best practices etc. debate, for which there has been much bikeshed from both sides.
- lmitchell 9y agoYou might be looking for the term 'SOLID' ;) e: it may be worth noting that I can't for the life of me remember what the I and D stand for... clearly I am much more of a KISS kind of programmer.
- coldtea 9y ago>This makes sense, and then somebody has a vision for a use case beyond the original imagination, goes to turn the code into a library and spends countless hours smartening up lazy resource management. That's THEIR problem then. Why should the original author care for that?
- bch 9y ago> That's THEIR problem then. It is their problem, clearly. > Why should the original author care for that? That's the question. Don't you think it's easy to think of reasons, though? What if the person porting the code to a library was a later version of the original author?
- astrobe_ 9y agoWill you also call them lazy because they didn't care about being thread safe or UTF8-ready?
- bch 9y ago> Will you also call them lazy because... I said it's lazy resource management. I'm really not trying to condemn, here, just provoke questions.
- coldtea 9y ago>What if the person porting the code to a library was a later version of the original author? Then they know what they need to add, and can add it now that they need it -- instead of having it slowing them down when they didn't need it