4 ms·
I know it's normally a good idea to avoid code duplication, but in this case I would have copied the function inside kms_functions into both kmsn and kmsp, sinc
by tspiteri 12y ago
I know it's normally a good idea to avoid code duplication, but in this case I would have copied the function inside kms_functions into both kmsn and kmsp, since this removes the dependency on readlink and also makes it possible to move the executables around without care.
- alanfranzoni 12y agoI have been thinking at alternatives modes of operation that don't require an explicit install (it's in the TODOs), I'll probably improve the whole in the next days. Thanks for your suggestion.
- icebraining 12y agoYeah, and you can always use a build tool to generate the two scripts from a DRY codebase.
- wdewind 12y agoOne of the best things I learned from a very senior engineer was "There are far worse things in life than duplicating code." Dependencies are frequently one of those things.
- khrf 12y agoOh thank you, these are gold words. I was amused recently when my collegues wanted to avoid code duplication of one small library and ended up with creating a new repository, learning awful Python packaging and releasing a new package for every small change. Much more pain gained IMHO.