Python for air traffic control?

Peter Milliken peter.milliken at gtech.com
Tue Jul 3 17:42:51 EDT 2001


"Thomas Wouters" <thomas at xs4all.net> wrote in message
news:mailman.994154525.14580.python-list at python.org...
> On Tue, Jul 03, 2001 at 07:34:54AM +1000, Peter Milliken wrote:
>
> > Python is a fine language for quick and dirty prototyping. For banging
out
> > applications that are going to run in an environment where it isn't
going to
> > matter if the program crashes, but it is certainly not something I would
put
> > forward for something like Air Traffic Control.
>
> > This is a joke, right?
>
> Nope. The only way to make sure a program works is by testing each and
every
> line in each and every circumstance, regardless of which programming
> language you use. For something like ATC, you *do not* want to rely on
> anything else. Using Python would at least allow you to find and fix
> problems a lot faster -- you won't be carrying around NULL or undef values
> without noticing it.
>
> Do you check the return value of every fprintf()/fclose() function call
you
> make ? You should!

Well, you show your inexperience/ignorance in two places here Thomas :-)

1. No program EVER has 100% coverage during testing (unless it is trivial -
this for the nitpickers :-)). The bigger the program the less likely full
coverage has been achieved, ATC's are big programs. Anyone who claims they
have 100% tested an ATC are either fools or liars - "every line and every
circumstance" are NOT POSSIBLE, if you think they are then I don't have
anything more to say other than get a few more years real world experience
:-). So, if you plan to 100% test a python ATC "each line and every
circumstance" then my original confidence that it would never be put into
production holds (that's one of the reason languages have exception
handlers - to catch the error that the programmer didn't foresee) :-).

2. Strongly typed languages don't include C/C++, so your example is
meaningless i.e. a strongly typed language would at least FORCE you to
assign/test the return value of an function - not like C/C++ which allows
you to ignore any return values. This is not to say that an application
written in a such a language wouldn't still ignore the return value after
the assignment - that is a function of programmer ability (another point in
my original email) - to fix that is up to testing and code review.

Peter





More information about the Python-list mailing list