While randomaly browsing goolge I stumbled upon this project:
The Two-Tier Programming Toolkit is a software design and re-engineering (or round-trip engineering) tool which supports forward and reverse engineering of object-oriented programs. The current prototype supports authoring visual specifications (‘modelling’), verifying these specifications against Java 1.4 programs, and the visualization of native (plain source code) of Java 1.4 programs (read more). Also available is a video demonstration of the TTP Toolkit.
I found the idea interesting so I sent a mail to the project leader to check if and how can I contribute.
After a short discussion we decided that I’ll start working on a system that analyze the design and it’s efficiency.
The purpose of my research is to empirically or statistically measure the design’s efficiency according to the goals of the designer.
The problem is that every design has different goals according to the problem.
If the designer makes a fundamental mistake concerning the goals of the design then TTPT will lead him to the wrong design. The question is how do we lead the designer into the right place while checking back if other goals are more appropriate.
As explained by Artem Barger on stackoverflow.com the rating’s calculation can be basically calculated as the following:
I don’t think you can find an ultimate formula for computing design efficiency, since it’s very subjective. But you can adopt some statistic techniques, define the metrics which really important for you in the design. Afterward define for each metric its weight. Now find different use cases and check how does your design fit them in each metric and give them a grade. After all this you can normalize and compute the value with V= Sum(W_i*G_i)/Sum(W_i), where W_i is weight and G_i is a grade. This way you can specify whatever is important for you in the design and calculate accordingly.
Each metric’s weight will be ranked by the user by importance but the toolkit should detect as the design progresses if the grades meet the goals of the system.
I haven’t found all the metrics to be considered yet but there are the ones I thought about:
- Coupling
- Design Patterns use
- Language idioms use.
- Scalability.
- High-viability.
- Code Reuse.
- Flexibility.
- Robustness to errors.
- Testability.
- Design implications on resource use and memory.
- Portability.
- Usage of the correct programming paradigm.
- Design implications on run-time efficiency.
- Encapsulation.
What else do you have in mind?
I’ll provide a FreeMind graph that describes the metrics.
Have a nice day, everyone