comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Introductory Presentations, especially aimed at C++ programmers!
Date: Wed, 7 Dec 2016 17:03:22 -0600
Date: 2016-12-07T17:03:22-06:00	[thread overview]
Message-ID: <o2a4fn$jdk$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: o29kmm$mt7$1@dont-email.me

"Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> wrote in message 
news:o29kmm$mt7$1@dont-email.me...
> On 12/07/2016 10:44 AM, Luke A. Guest wrote:
>>
>> And shoot down the bullshit argument if "any good Programmer wouldn't 
>> make
>> that mistake" because it can happen to anyone.
>
> Examine the change logs of long-lived, open-source, C++ projects, 
> especially those that communicate over the internet, like Firefox, and 
> you'll find lots of fixes for buffer overflows and signed integer 
> overflows, same as with C: things that are impossible in a well designed 
> language. The proportion of such errors doesn't seem to decrease with 
> time, either, so they are continuing to create new errors even as they 
> patch the old ones. We have decades of experience with these languages 
> that show beyond the shadow of a doubt that it is impossible for humans to 
> write code in them without making such errors.

To be fair, though, such things can happen in Ada, too. Case in point: 
something that happened to me today.

A customer had what appears to be a permissions problem installing 
Janus/Ada, so before contacting us, they tried an uninstall. The uninstaller 
crashed. I asked them to send me the exact message, and it proved to be 
overflow error in Claw.Registry. Tracking that down showed that the buffer 
for reading a registry variable (so stuff could be removed from it) wasn't 
big enough. Of course, Ada detected the error and crashed, but that's only 
an iota better than what would have happened in C (the uninstaller didn't do 
its job either way).

The problem seemed familar, and it turns out that I had a similar problem in 
the installer a few years back. And I had increased the buffer size in the 
installer program back then. But I failed to increase the buffer size in the 
separate uninstaller program. A rookie mistake. After 35 years of Ada 
programming. (You may argue precisely what the rookie mistake was, but 
surely there is one here.)

Yet another data point that no one is immune from making silly errors, in 
any language. It at least helps to have a language where the culture is to 
detect rather than ignore errors (and especially when customers think the 
same way, allowing a more rapid squashing of bugs).

                                           Randy.



  reply	other threads:[~2016-12-07 23:03 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 12:24 Introductory Presentations, especially aimed at C++ programmers! John McCabe
2009-07-10 21:49 ` jimmaureenrogers
2009-07-10 23:37   ` wwilson
2009-07-11  0:07     ` jimmaureenrogers
2009-07-12  4:00       ` wwilson
2009-07-11  8:15 ` Stephen Leake
2009-07-15  6:43 ` Jean-Pierre Rosen
2016-12-07 17:06 ` john
2016-12-07 17:44   ` Luke A. Guest
2016-12-07 18:35     ` Jeffrey R. Carter
2016-12-07 23:03       ` Randy Brukardt [this message]
2016-12-07 23:47         ` Jeffrey R. Carter
2016-12-08  0:08           ` Paul Rubin
2016-12-09 22:01             ` Randy Brukardt
2016-12-09 22:18               ` Jeffrey R. Carter
2016-12-13  0:53                 ` Randy Brukardt
2016-12-13  3:21                   ` Jeffrey R. Carter
2016-12-13 21:15                     ` Robert A Duff
2016-12-13 22:05                       ` Jeffrey R. Carter
2016-12-13 22:52                         ` Robert A Duff
2016-12-14  0:02                           ` Jeffrey R. Carter
2016-12-13 23:05                         ` Randy Brukardt
2016-12-14  0:13                           ` Jeffrey R. Carter
2016-12-14 22:48                             ` Randy Brukardt
2016-12-15  0:00                               ` Jeffrey R. Carter
2016-12-15 10:46                                 ` Maciej Sobczak
2016-12-16  7:37                                   ` Paul Rubin
2016-12-15 20:14                                 ` Niklas Holsti
2016-12-15 20:27                                   ` Jeffrey R. Carter
2016-12-15 21:04                                     ` Niklas Holsti
2016-12-15 21:40                                       ` Jeffrey R. Carter
2016-12-16  7:41                                     ` Paul Rubin
2016-12-13 22:50                     ` Randy Brukardt
2016-12-14  0:08                       ` Jeffrey R. Carter
2016-12-14  1:01                         ` Shark8
2016-12-08  8:08           ` Maciej Sobczak
2016-12-08  8:38             ` Dmitry A. Kazakov
2016-12-08 10:25             ` Paul Rubin
2016-12-08 13:39               ` Maciej Sobczak
2016-12-09  1:30                 ` Paul Rubin
2016-12-09  8:31                   ` J-P. Rosen
2016-12-09  8:58                     ` Paul Rubin
2016-12-09  9:18                       ` J-P. Rosen
2016-12-09  9:27                         ` Paul Rubin
2016-12-09 10:49                           ` J-P. Rosen
2016-12-09 19:58                             ` Jeffrey R. Carter
2016-12-09  8:35                   ` G.B.
2016-12-09  8:57                     ` Paul Rubin
2016-12-09 22:15                     ` Randy Brukardt
2016-12-09 21:58           ` Randy Brukardt
2016-12-08  8:23     ` Maciej Sobczak
2016-12-08 18:54   ` Adam Jensen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox