For Programmers: Free Programming Magazines  


Home > Archive > Software Engineering > August 2007 > Project Reverse Engineering









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Project Reverse Engineering
ravi.k.sinha@gmail.com

2007-08-27, 10:02 am

Hi,

We have just got the task of going through an open source project and
possibly enhance it. This project does not have lot of documentation
and as such we have no direct way to learn about the product. It is
open source so we have code. Now I am interested in some guidance
regarding where do we start learning about the project. Whether to do
it brute-force way or there are some good tools available that will
read the source code and generate some documents to help understand
things like code flow, class structure, etc.

The above said project is a done with Java.

Cheers
Ravi

Phlip

2007-08-27, 10:02 am

ravi.k.sinha wrote:

> We have just got the task of going through an open source project and
> possibly enhance it. This project does not have lot of documentation
> and as such we have no direct way to learn about the product. It is
> open source so we have code. Now I am interested in some guidance
> regarding where do we start learning about the project. Whether to do
> it brute-force way or there are some good tools available that will
> read the source code and generate some documents to help understand
> things like code flow, class structure, etc.
>
> The above said project is a done with Java.


The best way to rapidly learn a design's quality is to attempt to add unit
tests to it.

(You _were_ going to write unit tests for this project, weren't you?)

I would select the library based on its existing tests, for example. If you
can't, whip out your JUnit and start writing new unit tests. If you can't
construct classes to test without their dependencies, then the design has
runaway coupling, which is the hallmark of bad design.

--
Phlip
http://www.oreilly.com/catalog/9780596510657/
"Test Driven Ajax (on Rails)"
assert_xpath, assert_javascript, & assert_ajax


H. S. Lahman

2007-08-27, 8:03 pm

Responding to Ravi.k.sinha...

> We have just got the task of going through an open source project and
> possibly enhance it. This project does not have lot of documentation
> and as such we have no direct way to learn about the product. It is
> open source so we have code. Now I am interested in some guidance
> regarding where do we start learning about the project. Whether to do
> it brute-force way or there are some good tools available that will
> read the source code and generate some documents to help understand
> things like code flow, class structure, etc.


There are a number of tools that will provide UML models of the code.
Just google for "reverse engineering". Those models will be very low
level and it will be difficult to determine what elements reflect
customer requirements and which reflect design decisions. But if there
is no other documentation, that is probably the only game in town.
Unfortunately, unless there is good project oversight open source code
tends to be pretty ugly and difficult to maintain because so many
different fingers were in the pot. That would make working from the code
to infer requirements even more difficult.

So the first thing I would try is contacting the original open source
group and see if they have any functional documentation or requirements
specifications. You might even consider hiring one of the key open
source developers to come in and provide some mentoring if it is a
fairly large system.


*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
hsl@pathfindermda.com
Pathfinder Solutions
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
"Model-Based Translation: The Next Step in Agile Development". Email
info@pathfindermda.com for your copy.
Pathfinder is hiring:
http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH



Alexei Polkhanov

2007-08-28, 7:10 pm

> We have just got the task of going through an open source project and
> possibly enhance it. This project does not have lot of documentation
> and as such we have no direct way to learn about the product. It is
> open source so we have code. Now I am interested in some guidance
> regarding where do we start learning about the project. Whether to do
> it brute-force way or there are some good tools available that will
> read the source code and generate some documents to help understand
> things like code flow, class structure, etc.


Most of open source projects but not all use DocGen tags so that
documentation can be generated on demand directly from source code. It
it is C++ or Java project look for comments that start from "//<!" or
"/**", class comments with "@class" tags embedded in them - that would
indicate that DocGen can be used to generate documentation.

If not then you can try to use other products such as "Understand for
Java" to navigate through source code.

Alexei.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com