auto-check good API ?

Philippe Fremy pfremy at
Wed Aug 25 14:38:53 BST 2004

	Hi all,

I just listened to Mathias's akademy presentation (I wish I were there) 
about Qt API. There was a question about whether checking for a good API 
design could be automated. The answer of Mathias was that it is not 
possible but actually, I think it can.

Let's take the QProgressBar of the presentation. In the correct version, we 
see that a lot of methods have a common root in their name, while in the 
bad version, many different names are used and one can not speak of a root.

An automated tool could take a class, and compare each method names to 
eachother. If they match a lot, then the API looks consistent. If the names 
are completely different, then there is probably something wrong with the 
class. There is a metric to be found to report that but one can definitely 
do something.

The same name comparison could be done with class to class comparisons. If 
lot of classes share the same names and methods, then the whole API is 
consistent. Else, the API is not.

One could also automatically check for methods that use a lot of bool too.

Even if such a tool could not be trusted blindly, it could certainly help to 
find places where the KDE API is not so good, and to measure its progress.

So, who wants to write that to help for KDE 4 ?




An open source OS for contactless Smart Cards - Jayacard 

More information about the kde-core-devel mailing list