Secure Coding mailing list archives

Re: Variable comparisons


From: Bob Toxen <bob () verysecurelinux com>
Date: Thu, 04 Dec 2003 02:14:01 +0000

On Wed, Dec 03, 2003 at 01:31:10PM +1000, Danny Smith wrote:
Even worse than that:

At one software engineering seminar I attended a *long* time ago, indicated 
that bugs occur when the complexity of the problem being solved exceeds the 
ability of the programmer solving it.  They went on to say that if the 
problem was too complex for the writer, then anyone that comes along to 
patch the bug will also continue to find it too complex, and hence will 
likely introduce more bugs into the equation.
Quite so.

The two solutions to this are:

. design simpler systems
This is what "higher level" languages, structured programming techniques,
and excessive abstraction are intended to solve.

. employ the highest calibre coders you can find, and stick them onto bug 
fixing (yeah, right!).
Employ the best programmers from the start.  After the project is a
disaster, it is too late.  Many times I've been hired to "fix" a problem
system created by programmers operating beyond their experience and
abilities.

Usually, the best solution was to start from scratch and do plenty of
"up-front work" in the analysis, architecture, and overall design areas.
The "here's what we want it to do, start coding" is a recipe for failure
for all but simple problems.


We continue to create increasingly complex systems.  Is it even possible 
anymore for one person to understand all the implications throughout the 
whole system?
With a good design and good person, yes.  If you don't have this then
you set yourself for systemic failure for "mysterous" reasons.  By
carefully segmenting the system into well-defined, well-specified,
and well-designed interfaces, most (but not all) of the "system"
thinking can be for each of these sections.

Failure analysis tends to be lacking in most design efforts.  "How can
this break?" should be a question constantly asked.

danny

Bob Toxen, CTO
Fly-By-Day Consulting, Inc.
"Your expert in Firewalls, Virus and Spam Filters, VPNs,
Network Monitoring, and Network Security consulting"
http://www.verysecurelinux.com       [Network & Linux/Unix Security Consulting]
http://www.realworldlinuxsecurity.com [My 5* book: "Real World Linux Security"]
[EMAIL PROTECTED] (e-mail)

Author,
"Real World Linux Security: Intrusion Detection, Prevention, and Recovery"
2nd Ed., Prentice Hall, (C) 2003, 848 pages, ISBN: 0130464562
Also available in Japanese, Chinese, and Czech.






Current thread: