From: Mike H <postmaster@ada-augusta.demon.co.uk>
Subject: Re: Debugging Problem with Gnatbench under Eclipse
Date: Tue, 12 Nov 2013 14:40:33 +0000
Date: 2013-11-12T14:40:33+00:00 [thread overview]
Message-ID: <45AGpDFh3jgSFwmZ@ada-augusta.demon.co.uk> (raw)
In-Reply-To: 3d734e02-f7eb-4a32-86ca-0d56e059e276@googlegroups.com
In message <3d734e02-f7eb-4a32-86ca-0d56e059e276@googlegroups.com>,
Fritz von Braun <fritzvonbraun@gmail.com> writes
>LOL yes, well I am a messed up person, coming from 20 years of C and
>C++ programming, Ok, I used to do Pascal and Modula2 before, thats the
>reason I want to see if I can use Ada now because I missed those, but
>working without a debugger feels to me like a blind man in a tunnel
>during a power outage. For now, I am using Adacore's GPS, the same
>program debugs there without a problem, although I think the IDE is a
>bit more confusing than Eclipse. Maybe I will use some sort of hybrid
>model where I edit the program in Eclipse and then debug in GPS, that
>works too.
>
Hi Fritz,
I started in the late 1960's when I was a school teacher (Maths and
Physics) and my first real experience of computing was (courtesy of a
parent) taking a class of 17/18-year-olds to see an Elliot 803. Among
the happier memories of my being a pedagogue is dealing with very bright
youngsters, they and I learned Algol 60 together. In those days, it was
a case of, "In the land of the blind the one-eyed man is king" and I
talked my way into a job with a major insurance group. There it was
COBOL! Later it was adult education teaching at undergraduate level.
Those were my Algol 68, Pascal and Modula2 days and, since I was
attracted by ideas of programming as an engineering discipline, when Ada
83 arrived it came as a gift from heaven.
In the UK education provision and politics are inextricably mixed and,
in my opinion, education has suffered from too many ill-advised reforms
coming too quickly. So when the opportunity arose, I took early
retirement and turned a medium pension into a good one by using my Ada
skills as a contract programmer. Nearly all my experience in industry
was working on safety-related projects (nuclear power, air defence,
heavy weaponry, etc.). Not once did I use a debugger! If an Ada program
is well written (and I use that phrase advisedly) the compiler becomes a
first line of defence. One assumes that if the program compiles, it will
do what the source code says, nothing more and nothing less. If it does
not do what you believe it should do, the source code must be wrong. At
that point you have to swallow your pride and seek help from a colleague
(peer review!). I have never thought of that as debugging, perhaps it
means that Ada debugging is more usually done at source code level?
I hope you do not think that I am trying to teach my grandmother how to
suck an egg when I say that I think the biggest change of thought
processes when moving to Ada is starting to use the strict typing rules
as a tool to one's advantage. An obvious example is a "bug" arising from
arithmetic on a pair measurements one of which is metric and the other
imperial. Another would be having a submarine dive to a depth above
sea-level. One aims to ensure that such potential bugs can and should
killed as compilation errors (at best) or trapped as non-propagated
run-time exceptions (at worst). But it goes much deeper than that. In my
teaching days I would throw a class the question of whether time and
duration are interchangeable. The "lesson objective" was to convince
them that they are not. For example, the difference between two times is
not a time, it is a duration. The sum of two times is a meaningless
error but the sum of two durations is a duration. A time plus or minus a
duration is a time, and so it goes on. Coding such a set of rules into a
package may be a bit tedious but it is simple and routine. More
importantly, not to do so in a safety related system it would be
unprofessional (and potentially extremely expensive for one's employer).
--
Time flies like an arrow. Fruit flies like a banana.
Mike
next prev parent reply other threads:[~2013-11-12 14:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 2:27 Debugging Problem with Gnatbench under Eclipse Fritz von Braun
2013-11-11 5:40 ` Jeffrey Carter
2013-11-11 16:20 ` Mike H
2013-11-12 0:46 ` Fritz von Braun
2013-11-12 14:40 ` Mike H [this message]
2013-11-12 17:43 ` Bill Findlay
2013-11-13 1:12 ` Adam Beneschan
2013-11-13 8:18 ` Georg Bauhaus
2013-11-13 9:11 ` Dmitry A. Kazakov
2013-11-13 10:17 ` Simon Wright
2013-11-13 17:37 ` Jeffrey Carter
2013-11-13 9:14 ` Mike H
2014-02-10 17:40 ` john
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox