How do I create and maintain a code reuse library?

后端 未结 9 1664
渐次进展
渐次进展 2021-02-02 01:29

I am trying to setup a repository of reusable code. I was thinking about having each reusable code module have a certain “Maturity Level” rating. The rating would be defined a

9条回答
  •  南旧
    南旧 (楼主)
    2021-02-02 02:14

    I think a great code repository would include a CM tool and a Wiki tool. The CM tool should be structured using the level idea (as you proposed), since it structures the code by quality. The wiki should act as an "advertisement" of what the software can do and how it can help you out. This wiki could also keep information like, which projects are using the code, rating of how usable it is, and examples of how to use it. If anyone is worried about the development team following the level guidelines, it should be pointed out how self policing works and give the example of how well it works with wikis.

    Now, the structuring of the CM tool is important. It is designed to convey the quality of the code, so you know what you get into when you use it. For example, if you write a simple class with barely any comments and it doesn't really uphold to coding standards (maybe a prototype) then it would be entered into \sw_repository\level0\ExamplePrototype.

    Maybe someone then takes that piece of code and added comments and brings it up to standards. Then that person would place it in \sw_repository\level1\ExamplePrototype.

    Then that same person, a while later, creates unit tests for the ExamplePrototype. This would then go to level2 and so on.

    Defining the levels should take some thought. They really should be somewhat sequential and even if for example, you had written unit tests for the prototype code but it didn't satisfy the comments and coding standard then it is placed in level0 anyway. However, it would be easy to go to level2 if those comments and standards were satisfied.

提交回复
热议问题