From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.58.18.204 with SMTP id y12mr5130161ved.36.1384267466977; Tue, 12 Nov 2013 06:44:26 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!i2no22170034qav.0!news-out.google.com!9ni24633qaf.0!nntp.google.com!npeer03.iad.highwinds-media.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!peer03.am1!peering.am1!npeersf04.am4!fx18.fr7.POSTED!not-for-mail Message-ID: <45AGpDFh3jgSFwmZ@ada-augusta.demon.co.uk> From: Mike H Reply-To: Mike Hopkins Newsgroups: comp.lang.ada Subject: Re: Debugging Problem with Gnatbench under Eclipse References: <5384e37a-764a-4368-8834-0de4c7d7998c@googlegroups.com> <46F25mG2OQgSFw2s@ada-augusta.demon.co.uk> <3d734e02-f7eb-4a32-86ca-0d56e059e276@googlegroups.com> MIME-Version: 1.0 User-Agent: Turnpike/6.07-M (<8c+$+zb077Pti5diXa8NqJs7Yt>) NNTP-Posting-Host: 83.104.138.185 X-Complaints-To: abuse@demon.net X-Trace: 1384267466 83.104.138.185 (Tue, 12 Nov 2013 14:44:26 UTC) NNTP-Posting-Date: Tue, 12 Nov 2013 14:44:26 UTC Date: Tue, 12 Nov 2013 14:40:33 +0000 X-Received-Body-CRC: 1233869431 X-Received-Bytes: 4931 Content-Type: text/plain;charset=us-ascii;format=flowed X-Original-Bytes: 5197 Xref: number.nntp.dca.giganews.com comp.lang.ada:183833 Date: 2013-11-12T14:40:33+00:00 List-Id: In message <3d734e02-f7eb-4a32-86ca-0d56e059e276@googlegroups.com>, Fritz von Braun 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