2

I have traditionally not utilized much of other peoples code libraries in my code, but now I am starting to use open source projects more, and am needing an efficient way to understand quickly how to utilize their methods, classes, and objects. What are the best practices used to accomplish this most efficiently?

Lately, development has been transitioning from being focusing on in-house coding (where the developer becomes acquainted with what he/she coded over the time they coded it) to now making extensive usage of other code-sets / components like (open-source libraries and/or other commercial libraries). What are some ways that I can easy adjust to understanding how to utilize others code quickly (any things that have helped anyone in the past)?

Any help with the question is appreciated. Thank you.

CodingRiot
  • 41
  • 3
  • 2
    Possible duplicate of [What is the most effective way to add functionality to unfamiliar, structurally unsound code](http://softwareengineering.stackexchange.com/questions/135311/what-is-the-most-effective-way-to-add-functionality-to-unfamiliar-structurally) – Doc Brown Mar 17 '17 at 14:08
  • 1
    While Doc Brown's reference is useful, it might be better to avoid the library altogether if it is not well documented, or unsound. – Frank Hileman Mar 18 '17 at 00:09
  • I am looking for best practices to easy read through code and functionally understand it to understand what is implementable, expendable, and inheritable for the existing code set, so that I can more effectively and quickly work with others code and extend its current functionality without rewriting the core structure of it. – CodingRiot Mar 18 '17 at 00:32
  • 2
    Can't you use a DOC generator, like SandCastle for example, to generate the class diagrams and basic information for you ? That's something I usually do with code I don't own and doesn't have any documentation. Also, Resharper has some tools that'll help generating Dependencies graphs that also help. – Machado Mar 20 '17 at 15:19
  • Lately, software development has been transitioning from being focusing on in-house coding to making extensive usage of binary components like (open-source libraries and/or other commercial libraries). What are some ways that I can easy adjust to understanding how to utilize others code quickly (any things that have helped anyone in the past)? – CodingRiot Mar 23 '17 at 20:55

1 Answers1

0

To find out the best ways to use source code that lacks documentation or sometimes just-not-good-enough documentation, is to look at the unit tests of the project. Unit tests often show you exactly how a function was meant to be used with sample data. If the code is a REST api, I find Swagger helpful for generating docs on how to use the api.