Tuesday, May 12, 2009

How to Evaluate / Audit someone else's source code

Its very normal in a developer's life to be handed over someone else's source code and asked to work on it. The first thing you notice is the fact that the previous developer(s) have not put enough (or any) comments in the code. Then you realize there is no documentation left by the developer(s) regarding the code. You sit there thinking "Where do I start??"

Being faced with this dilemma yet once again I realized that the best thing to do would be to convert the code to UML diagrams so I can get an eye view of the mess.. uh, I mean the code.

I cam across a nice list of UML tools on Wikipedia where I found BOUML.



Its a free UML tool that can reverse engineer C++, Java and PHP (plus some others) code to UML diagrams.

Even if you are not a coder, you could use it to Audit the code. If the diagrams that are generated do not make sense to you, chances are that they will not make any sense to another developer either.

Of course there are many other metrics for evaluation of code quality and performance. But this is where I would start if I had no documentation at all for the code in front of me.

1 comment:

Abdul Ahad said...

BOUML do not open your other projects, it only opens the projects which you have created using BOUML.