开发者

Things you look for when trying to understand new software

I wonder what sort of things you look for when you start working on an existing, but new to you, system? Let's say that the system is quite big (whatever it means to you).

Some of the things that were identified are:

  1. Where is a particular subroutine or procedure invoked?
  2. What are the arguments, results and predicates of a particular function?
  3. How does the flow of control reach a particular location?
  4. Where is a particular variable set, used or queried?
  5. Where is a particular variable declared?
  6. Where is a particular data object accessed, i.e. created, read, updated or deleted?
  7. What are the inputs and outputs of a particular module?

But if you look for something more specific or any of the above questions is particularly开发者_如何转开发 important to you please share it with us :)

I'm particularly interested in something that could be extracted in dynamic analysis/execution.


I like to use a "use case" approach:

  1. First, I ask myself "what's this software's purpose?": I try to identify how users are going to interact with the application;
  2. Once I have some "use case", I try to understand what are the objects that are more involved and how they interact with other objects.

Once I did this, I draw a UML-type diagram that describe what I've just learned for further reference. What happens after depends on the task I've been assigned, i.e. modify the code, document the code etc.


There is the question of what motivation do I have for learning the new system:

  1. Bug fix/minor enhancement - In this case, I may focus solely on that portion of the system that performs a specific function that needs to be altered. This is a way to break down a huge system but also is a way to identify if the issue is something I can fix or if it is something that I have to hand to the off-the-shelf company whose software we are using,e.g. a CRM, CMS, or ERP system can be a customized off-the-shelf system so there are many pieces to it.

  2. Project work - This would be the other case and is where I'd probably try to build myself a view from 30,000 feet or so to know what are the high-level components and which areas of the system does the project impact. An example of this is where I'd join a company and work off of an existing code base but I don't have the luxury of having the small focus like in the previous case. Part of that view is to look for any patterns in the code in terms of naming conventions, project structure, etc. as this may be useful once I start changing some code in the system. I'd probably do some tracing through the system and try to see where are the uglier parts of the code. By uglier I mean those parts that are kludge-like and may have some spaghetti code as this was rushed when first written and is now being reworked heavily.

To my mind another way to view this is the question of whether I'm going to be spending days or weeks wrapping my head around a system like in the second case or should this be a case where it hopefully takes only a few hours, optimistically that is, to get my footing to make the necessary changes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜