Misha Nefedov <mnefedov@qnx.com> wrote:
I agree with what you have said, but you skipped an important part of your
case. That is: The software your try to fix was/is written by you. Your
statement sounds rather like: “I’m working along!, because this way I don’t
need to use a debugger”.
By taking an average company with at least 10 software guys, we can say with
very high probability that there is no project that is taken care of by one
or two guys. And very often the people that wrote/re-wrote the initial code
That’s a possible scenario, on the other hand, with proper abstraction you
could argue that the modules should be small and maintained by a small
team. How many people wrote the QNX kernel? How many people wrote the
QNX filesystem? Ethernet Driver? io-net? You’ll find the answer to these
questions to be on the order of “one”, “two”, or “three”.
Now, I’m not saying that a high-end telecom switch is written by three people,
but each component could be written by a small team…
are not in the company any more. What happens next ? YOU end up with fifteen
Hopefully someone understood the concept of “documentation” <gasp!>
Requirements specifications. Functional specifications. High-level architecture
documentation.
(at least I guess) thousand lines of code and again, as very often happens,
the code is not written in your style (for some known reason;-[). In this
case use of the printf() debugging style becomes a difficult task and time
is definitely not on your side.
Just rewrite it. The original author was probably an idiot
(I say that comment half tounge-in-cheek because so often that’s what happens
in real life. “I can’t understand this module, so I rewrote it.”) Unfortunately.
OTOH, if the module is properly documented, it means that you can debug it.
I once ported a properly document 300k line system from Windoze to QNX in approximately
a weekend. Why? because of three words: abstraction, abstraction, and abstraction.
Now, granted, we’re talking about maintainability and not portability, but the
two are at least marginally related…
Debuggers are tools, to use a tool we need knowledge and experience
(TIME!).
I’ll agree with you on that point – if it’s the right tool for the job, I’ll use it.
Often, in my experience, it has not been the right tool for the job, and instead
resulted in wasted effort.
Debuggers change, and they are very useful. We, software guys, very often
tend to pre-judge things. If we had a bad experience with a beta tool, we
will maintain our opinion, so that it is negative (especially if we don’t
need this tool).
Self-debugging is a good thing, but it needs programmers with experience and
“skill”.
This also raises a few concerns:
- overall performance
- you need a file system for logging
- size >
Don’t get me wrong > > I am on your side!
I’m just playing devil’s advocate here partly
Cheers,
-RK
-Misha.
“Bill Caroselli” <> qtps@earthlink.net> > wrote in message
news:a46mge$54$> 1@inn.qnx.com> …
New thread time.
“Robert Krten” <> nospam90@parse.com> > wrote in message
news:a44mlj$h6f$> 1@inn.qnx.com> …
it’s sad that the “product” turned out by our universities and
commercial
institutions doesn’t realize that “vi” and “make” and the “printf
debugger”
are just about all you need. I blame government cutbacks >
What!
Don’t get me wrong. I can work wonders with a few well placed printf()s.
When in a bind I often need to use a debugger to find out what led up to
the
point where you are now executing that line that’s commented:
// this should never happen
However,
I’m also a strong believe that software should debug itself. I have
developed many of my own software tools over the years that I can
incorporate into my software development projects. These features just
lurk
quietly in the background using very little (but some) overhead. And
then,
BANGZOOM! On that rare occasion (yeah right!) when a bug does raise it’s
ugly head in my software I can just go back and look at the logs to see
how
it got there.
I believe that (almost) as much time should go into the design of
debugging
software as goes into the software itself.
–
Bill Caroselli – 1(626) 824-7983
Q-TPS Consulting
QTPS@EarthLink.net
\
–
Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.