From: Pavel C. <pc...@us...> - 2002-07-03 11:02:24
|
Hi all, Code audit is just a form of Peer Review. But while peer review as described in separate message address only code changes and small parts of codebase that's being work on, Code audit extends the peer review to the whole codebase. Pro's and Con's: This technique is not used regularly (except for critical systems) because is very expensive in terms of human labour and required knowledge. But we're in unusual situation, because we inherited aprox. 35MB of source code, where most of it was not touched by Firebird developers. There are large portions of code that only few (if anyone at all) knows in detail, and this knowledge is mostly a by-product of learning, so these developers read it to just decipher what's it supposed to do, not to check it's correctness. Of course, some bugs were found that way (like famous politically correct security hole), but it's mostly an exception. So, with Code audit we can: 1) Learn more about engine internals, and DOCUMENT IT !!! The famous secret "Interbase internals" document is a little bit outdated and not complete. It's a nice opportunity to finish it. 2) We may find some bugs 3) Identify potential flaws in design (at least optimizer come to mind here) Implementation: Every source file in _Firebird2_ module (29MB) would be reviewed. It would be nice if these files would be also _documented_. That mean both, in-line comments and separate FB internals document, where major data structures and subsystems would be documented, including their mutual relations. Current status: This technique was not used (at all AFAIK), except as a by-product of learning. Questions for you: 1) Do you think that we should do Code review as is explained here ? 2) If yes, what should be the primary purpose: code correctness or documentation ? 3) What do you think / recommend re. Code audit ? Your comments would be greatly appreciated. Best regards Pavel Cisar http://www.ibphoenix.com For all your upto date Firebird and InterBase information |
From: John B. <bel...@cs...> - 2002-07-03 16:57:59
|
Hi, On Wednesday, July 3, 2002, at 04:04 AM, Pavel Cisar wrote: > Hi all, > > Code audit is just a form of Peer Review.[...] > > Implementation: > Every source file in _Firebird2_ module (29MB) would be reviewed. It > would be nice if these files would be also _documented_. That mean both, > in-line comments and separate FB internals document, where major data > structures and subsystems would be documented, including their mutual > relations. > > Current status: > This technique was not used (at all AFAIK), except as a by-product of > learning. > > Questions for you: > 1) Do you think that we should do Code review as is explained here ? Not exactly. I think we don't have the resources to do a full "stop everything" code review. We should do them incrementally as the various engine subsystems are examined in detail. For example, I just spent a fair amount of time in the intl module and could have done a review then without too much additional burden. > > > 2) If yes, what should be the primary purpose: code correctness or > documentation ? Right now, documentation. I would like to see deoxygen become a standard part of the FB build process, and engine internal information placed in deoxygen comments in the code. Once we have determined how the code is functioning now we can talk about how it is supposed to function. That will help us identify bugs. For the time being the only bugs we can really catch (in most subsystems) are small typos. > > 3) What do you think / recommend re. Code audit ? get deoxygen involved and stress the importance of adding internal documentation. -John |
From: Pavel C. <pc...@us...> - 2002-07-03 19:48:30
|
Hi John, On 3 Jul 2002 at 9:57, John Bellardo wrote: > get deoxygen involved and stress the importance of adding internal > documentation. Do you have an URL to deoxygen ? As I'm not an C developer, I don't know it (but I expect that it's some sort of JavaDoc/PasDoc, right ?) Best regards Pavel Cisar http://www.ibphoenix.com For all your upto date Firebird and InterBase information |
From: John B. <bel...@cs...> - 2002-07-03 21:19:15
|
On Wednesday, July 3, 2002, at 12:49 PM, Pavel Cisar wrote: > Hi John, > > On 3 Jul 2002 at 9:57, John Bellardo wrote: > >> get deoxygen involved and stress the importance of adding internal >> documentation. > > Do you have an URL to deoxygen ? http://www.stack.nl/~dimitri/doxygen/ I guess I messed up the spelling before. > As I'm not an C developer, I don't know > it (but I expect that it's some sort of JavaDoc/PasDoc, right ?) correct. -John |