J
jacob navia
1: Consider this code:
void dowork(char *buffer,size_t siz)
{
for (int i=0; i<siz;i++) {
buffer=0;
}
}
Not any amount of code review will catch the case where
siz is wrong because the calling procedure had a memory
overwrite. And standard C doesn't have ANY way of telling
if a pointer is OK or not.
2: Code review is an EXCELLENT technique for getting the
bugs out BEFORE they enter the code base. This, combined
with reflexion about the code when writing it, and when
testing it, is a VERY GOOD technique for *avoiding*
long debugging sessions.
3: Debugging is a different activity than code review/code reading
since it tries to catch the bugs when they ALREADY ARE INSIDE
the code base.
And here a debugger is essential.
----------------------------------------------------------------
Many people here argue that they have ported a lot of
software without debuggers, just with code review, etc.
This CAN be done, and it is STILL being done, but most of that
software is completely buggy but neither the customers nor the
developers *know* about it!
I remember when ANSI introduced prototypes into the C89/90 standard,
and HOW MANY BUGS WE CATCHED in the development team I worked at
that time. We just never knew about those bugs!!!
void dowork(char *buffer,size_t siz)
{
for (int i=0; i<siz;i++) {
buffer=0;
}
}
Not any amount of code review will catch the case where
siz is wrong because the calling procedure had a memory
overwrite. And standard C doesn't have ANY way of telling
if a pointer is OK or not.
2: Code review is an EXCELLENT technique for getting the
bugs out BEFORE they enter the code base. This, combined
with reflexion about the code when writing it, and when
testing it, is a VERY GOOD technique for *avoiding*
long debugging sessions.
3: Debugging is a different activity than code review/code reading
since it tries to catch the bugs when they ALREADY ARE INSIDE
the code base.
And here a debugger is essential.
----------------------------------------------------------------
Many people here argue that they have ported a lot of
software without debuggers, just with code review, etc.
This CAN be done, and it is STILL being done, but most of that
software is completely buggy but neither the customers nor the
developers *know* about it!
I remember when ANSI introduced prototypes into the C89/90 standard,
and HOW MANY BUGS WE CATCHED in the development team I worked at
that time. We just never knew about those bugs!!!