[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: KMail is seriously in need of a code audit
From: Alan Chandler <alan () chandlerfamily ! org ! uk>
Date: 2001-07-27 23:38:47
[Download RAW message or body]
On Saturday 28 July 2001 12:10 am, Marc Mutz wrote:
> On Friday 27 July 2001 23:02, Alan Chandler wrote:
> > On Friday 27 July 2001 5:48 pm, Ingo Klöcker wrote:
> > > There are for sure a lot of bugs we are not aware of. So please
> > > don't count the known bugs.
> >
> > <humour>
> > What would you like us to do? Read all the other lines (ie the ones
> > without the known bugs) and count the number of bugs there
> > </humour>
>
> In fact that's not humorous at all.
> You just defined what "audit" is all about :-0
Sorry - Just my sense of humour then :-(
I have this vision in my mind of a little gnome (or should it be knome )
sitting at a desk and working through the code line by line (without regard
the logic of the function but just considering what he sees on that line) and
ticking those which he thinks are correct.. [This weird impression stems
from a story told to me in the early 1970's about a manager who wanted to
find out how far through a software development project his team were. So he
asked the team to mark the lines of code that had bugs in them]
Seriously, to conduct a code audit you need to understand the bigger picture
- have a view on the design understand what each functions purpose is and
then review whether the code meets that purpose. My biggest critisism of
kmail (although I am not singling out kmail in particular, much of the source
code of open source projects that I have looked at is the same) is how little
use is made of comments, and therefore how hard it is to get that bigger
picture of what is going on.
I learnt my craft in the 1970's programming in PDP 11 assembler. The
necessary practice there was that every 10 lines or so of code had a block
comment explaining what that block of code did, and more or less every line
of code had also had a comment. Now with high level languages such as C or
C++ a comment on every line is overkill, but a comment of every block of
lines is useful.
One of the best books about overall coding style that I have ever read was
called "Code Complete" (published by Microsoft Press). It has a whole
chapter on comments.
--
Alan - alan@chandlerfamily.org.uk
http://www.chandlerfamily.org.uk
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic