How do you understand a large chunk of code?

前端 未结 5 633
梦谈多话
梦谈多话 2021-02-04 09:51

I am a fresh college grad student that just started my job. In my ramp up period, I need to learn a lot of product code. There are some design docs but they do not help much.

5条回答
  •  隐瞒了意图╮
    2021-02-04 10:00

    Run it through doxygen. This will generate html documentation which will be helpful even if the code does not have proper doxygen-style comments.

    Another good advice is to look through the unit tests, if there are any. If there are no unit tests, a good way to understand the code is to write your own unit tests. The effort to do this will pay for itself many times over.

提交回复
热议问题