How do you understand a large chunk of code?

前端 未结 5 638
梦谈多话
梦谈多话 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:10

    Some people will tell you to start with the data structures, but in a large system even that's not terribly helpful much of the time. I can think of four major points:

    • Take your time. Often, it's more like a whole series of gestalt shifts than it is a single, linear, gradual understanding. So be patient.

    • No matter how big it is, you should be able to put a breakpoint in and walk it in a debugger. Even in a large, complicated, multi-threaded system, you should be able walk through and see what's happening.

    • Ask for bugs, and start fixing them, no matter how crazy they seem. It's akin to dropping yourself into a foreign country; you'll pickup the language eventually.

    • Find a mentor. A jungle guide is invaluable.

提交回复
热议问题