How do you decide whether to use a library or write your own implementation

后端 未结 7 2159
栀梦
栀梦 2021-01-31 18:40

Inspired by this question which started out innocently but is turning into a major flame war.

Let\'s say you need to a utility method - reasonably straightforward but no

7条回答
  •  不要未来只要你来
    2021-01-31 19:07

    10 questions ...

    +++ (use library) ... --- (write own library)

    1. Is the library exactly what I need? Customizable in a few steps? +++
    2. Does it provide almost all functionality? Easily extensible? +++
    3. No time? +++
    4. It's good for one half and plays well with other? ++
    5. Hard to extend, but excellent documentation? ++
    6. Hard to extend, yet most of the functionality? +
    7. Functionality ok, but outdated? -
    8. Functionality ok, .. but weird (crazy interface, not robust, ...)? --
    9. Library works, but the person who needs to decide is in the state of hybris? ---
    10. Library works, manageable code size, portfolio needs update? ---

    Some thoughts ...

    If it is something that is small but useful, probably for others, too, then why now write a library and put it on the web. The cost publishing this kind of small libraries decreased, as well as the hurdle for others to tune in (see bitbucket or github). So what's the criteria?

    Maybe it should not exactly replicate an existing already known library. If it replicates something existing, it should approach the problem from new angle, or better it should provide a shorter or more condensed* solution.

    */fun

提交回复
热议问题