comp.lang.ada
 help / color / mirror / Atom feed
* Re: if statements
  2000-11-03 16:09 ` Larry Kilgallen
@ 2000-11-03  0:00   ` tmoran
  2000-11-03  0:00     ` David Starner
                       ` (2 more replies)
  0 siblings, 3 replies; 168+ messages in thread
From: tmoran @ 2000-11-03  0:00 UTC (permalink / raw)


> > can anyone show me an if statement that will swap the values of A and B,
> > if A is the greater value
>
> Probably not without violating our policy of not doing people's homework.
  Are there really programming classes that, in early November, have
only just started discussing "if" statements!?




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00   ` tmoran
  2000-11-03  0:00     ` David Starner
@ 2000-11-03  0:00     ` Larry Kilgallen
  2000-11-06  0:00       ` Brian Orpin
  2000-11-07  0:00     ` John English
  2 siblings, 1 reply; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-03  0:00 UTC (permalink / raw)


In article <t1CM5.385302$i5.6461252@news1.frmt1.sfba.home.com>, tmoran@acm.org writes:
>> > can anyone show me an if statement that will swap the values of A and B,
>> > if A is the greater value
>>
>> Probably not without violating our policy of not doing people's homework.
>   Are there really programming classes that, in early November, have
> only just started discussing "if" statements!?

There are schools that allow it to be turned in late by those who are behind.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03 14:42 if statements sc297
@ 2000-11-03  0:00 ` David Starner
  2000-11-07  0:00   ` John English
  2000-11-13  0:00   ` Dale Pontius
  2000-11-03 16:09 ` Larry Kilgallen
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 168+ messages in thread
From: David Starner @ 2000-11-03  0:00 UTC (permalink / raw)


On Fri, 03 Nov 2000 14:42:28 +0000, sc297 wrote:
>can anyone show me an if statement that will swap the values of A and B,
>if A is the greater value

Yes. I can, and I bet your teacher can too.

-- 
David Starner - dstarner98@aasaa.ofe.org
http://dvdeug.dhis.org
As centuries of pulp novels and late-night Christian broadcasting have taught 
us, anything we don't understand can be used for the purposes of Evil.
	-- Kenneth Hite, Suppressed Transmissions




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00   ` tmoran
@ 2000-11-03  0:00     ` David Starner
  2000-11-05  0:00       ` tmoran
  2000-11-03  0:00     ` Larry Kilgallen
  2000-11-07  0:00     ` John English
  2 siblings, 1 reply; 168+ messages in thread
From: David Starner @ 2000-11-03  0:00 UTC (permalink / raw)


On Fri, 03 Nov 2000 16:50:33 GMT, tmoran@acm.org wrote:
>> > can anyone show me an if statement that will swap the values of A and B,
>> > if A is the greater value
>>
>> Probably not without violating our policy of not doing people's homework.
>  Are there really programming classes that, in early November, have
>only just started discussing "if" statements!?

Sure. Aren't there half-semester 'intense' programming classes? Or schools 
that don't run on the American semester system? Anyway, even if he isn't
an active student, it still isn't going to help him trying to learn 
programming via cla.

-- 
David Starner - dstarner98@aasaa.ofe.org
http://dvdeug.dhis.org
As centuries of pulp novels and late-night Christian broadcasting have taught 
us, anything we don't understand can be used for the purposes of Evil.
	-- Kenneth Hite, Suppressed Transmissions




^ permalink raw reply	[flat|nested] 168+ messages in thread

* if statements
@ 2000-11-03 14:42 sc297
  2000-11-03  0:00 ` David Starner
                   ` (4 more replies)
  0 siblings, 5 replies; 168+ messages in thread
From: sc297 @ 2000-11-03 14:42 UTC (permalink / raw)


can anyone show me an if statement that will swap the values of A and B,
if A is the greater value




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03 14:42 if statements sc297
  2000-11-03  0:00 ` David Starner
@ 2000-11-03 16:09 ` Larry Kilgallen
  2000-11-03  0:00   ` tmoran
  2000-11-06  0:00 ` Daniel Allex
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-03 16:09 UTC (permalink / raw)


In article <3A02CED4.520C2768@brighton.ac.uk>, sc297 <sc297@brighton.ac.uk> writes:
> can anyone show me an if statement that will swap the values of A and B,
> if A is the greater value

Probably not without violating our policy of not doing people's homework.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00     ` David Starner
@ 2000-11-05  0:00       ` tmoran
  2000-11-06  0:00         ` David Starner
  2000-11-07  0:00         ` John English
  0 siblings, 2 replies; 168+ messages in thread
From: tmoran @ 2000-11-05  0:00 UTC (permalink / raw)


>Sure. Aren't there half-semester 'intense' programming classes? Or schools
>that don't run on the American semester system? Anyway, even if he isn't
>an active student, it still isn't going to help him trying to learn
>programming via cla.
  If it's an 8-hour/day intense programming class, it should be past "if"
statements by the time he gets home and uses the Internet.  In any case,
c.l.a. is going to be much too slow a source of answers.  Certainly
there exist other time schedules than Sept-Dec semesters, but I'd be
surprised to hear of any that start at the beginning of November.  The
"American semester system" is not a totally random set of times like the
date of someone's birthday or something.  If he isn't taking a class, but
is trying to learn by himself, and can't see the answer from his
available texts, and can't get answers from c.l.a., then just how is he
supposed to find such answers?  If he's an RPG programmer trying to
expand his repertoire, perhaps he'll find a different language than Ada
where c.l.x. is more helpful.  If he is in fact taking a (slow) class
and someone answered a homework question on "if" statements, how
serious is the damage that would be done to others than himself?
  Perhaps I'm just hopelessly naive in imagining innocence until
proven guilty.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00     ` Larry Kilgallen
@ 2000-11-06  0:00       ` Brian Orpin
  0 siblings, 0 replies; 168+ messages in thread
From: Brian Orpin @ 2000-11-06  0:00 UTC (permalink / raw)


On 3 Nov 2000 12:35:37 -0500, Kilgallen@eisner.decus.org.nospam (Larry
Kilgallen) wrote:

>In article <t1CM5.385302$i5.6461252@news1.frmt1.sfba.home.com>, tmoran@acm.org writes:
>>> > can anyone show me an if statement that will swap the values of A and B,
>>> > if A is the greater value
>>>
>>> Probably not without violating our policy of not doing people's homework.
>>   Are there really programming classes that, in early November, have
>> only just started discussing "if" statements!?
>
>There are schools that allow it to be turned in late by those who are behind.

From the headers 

From: sc297 <sc297@brighton.ac.uk>
Newsgroups: comp.lang.ada
Subject: if statements
Date: Fri, 03 Nov 2000 14:42:28 +0000

Is this one of David's (he is still there is he not?) students <VBG>

-- 
Brian Orpin    BAE SYSTEMS, Edinburgh
"If you really know C++, there isn't much you can't do with it, though it may 
not always be what you intended!"  Tucker Taft 1998 




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-05  0:00       ` tmoran
@ 2000-11-06  0:00         ` David Starner
  2000-11-08  0:14           ` Alejandro R. Mosteo
  2000-11-07  0:00         ` John English
  1 sibling, 1 reply; 168+ messages in thread
From: David Starner @ 2000-11-06  0:00 UTC (permalink / raw)


On Sun, 05 Nov 2000 23:37:57 GMT, tmoran@acm.org wrote:
>  If it's an 8-hour/day intense programming class, it should be past "if"
>statements by the time he gets home and uses the Internet.  In any case,
>c.l.a. is going to be much too slow a source of answers.  Certainly
>there exist other time schedules than Sept-Dec semesters, but I'd be
>surprised to hear of any that start at the beginning of November.  

I know of American universities with 15-18 hour semesters, but serial instead
of parellel classes, i.e. 3 hours a day of class with (in theory) 3 hours
a day of homework, with one starting about every three weeks.

>If he isn't taking a class, but
>is trying to learn by himself, and can't see the answer from his
>available texts, and can't get answers from c.l.a., then just how is he
>supposed to find such answers?  If he's an RPG programmer trying to
>expand his repertoire, perhaps he'll find a different language than Ada
>where c.l.x. is more helpful.  

When I first read the question, I wondered which university was teaching
basic programming with Ada. I remember when I first looked at Ada knowing
QBasic, and C (with no formal programming training), I would have regarded
that question as trivial. If he is learning Ada by himself, I fear that 
more questions like this will follow and few groups can accept the many
basic questions of a beginner who has found someone who can answer his
questions for him.

I am curious why, if you disagree with our approach, why you did not
just answer him yourself?

-- 
David Starner - dstarner98@aasaa.ofe.org
http://dvdeug.dhis.org
As centuries of pulp novels and late-night Christian broadcasting have taught 
us, anything we don't understand can be used for the purposes of Evil.
	-- Kenneth Hite, Suppressed Transmissions




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03 14:42 if statements sc297
  2000-11-03  0:00 ` David Starner
  2000-11-03 16:09 ` Larry Kilgallen
@ 2000-11-06  0:00 ` Daniel Allex
  2000-11-07  0:00   ` dmitry6243
                     ` (4 more replies)
  2000-11-07  0:00 ` John English
  2000-11-10  6:09 ` DJack143
  4 siblings, 5 replies; 168+ messages in thread
From: Daniel Allex @ 2000-11-06  0:00 UTC (permalink / raw)


procedure Swap ( A,     B : in out Integer ) is
      Temp : Integer := 0;
   begin
      if A <= B then
         Temp := A;
         A := B;
         B := Temp;
      end if;
   end;


sc297 wrote:

> can anyone show me an if statement that will swap the values of A and B,
> if A is the greater value





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00 ` Daniel Allex
  2000-11-07  0:00   ` dmitry6243
  2000-11-07  0:00   ` Robert Dewar
@ 2000-11-07  0:00   ` Wes Groleau
  2000-11-08  0:00     ` John English
  2000-11-07  0:00   ` John English
  2000-11-07  0:00   ` Ken Garlington
  4 siblings, 1 reply; 168+ messages in thread
From: Wes Groleau @ 2000-11-07  0:00 UTC (permalink / raw)


> procedure Swap ( A,     B : in out Integer ) is
>       Temp : Integer := 0;
>    begin
>       if A <= B then
>          Temp := A;
>          A := B;
>          B := Temp;
>       end if;
>    end;

Well, if we're going to do the guy's homework
for him, we might as well do it elegantly:

Temp := B;
B    := Integer'Min (A, B)
A    := Integer'Max (A, Temp);

Oops, the "if" he wanted is missing.  :-)


-- 
Wes Groleau for President of the U.S.A.
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00 ` Daniel Allex
  2000-11-07  0:00   ` dmitry6243
@ 2000-11-07  0:00   ` Robert Dewar
  2000-11-07  0:00     ` Larry Kilgallen
                       ` (2 more replies)
  2000-11-07  0:00   ` if statements Wes Groleau
                     ` (2 subsequent siblings)
  4 siblings, 3 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-07  0:00 UTC (permalink / raw)


In article <3A078B6F.D34B024B@erols.com>,
  Daniel Allex <dallex@erols.com> wrote:
> procedure Swap ( A,     B : in out Integer ) is
>       Temp : Integer := 0;
>    begin
>       if A <= B then
>          Temp := A;
>          A := B;
>          B := Temp;
>       end if;
>    end;


Finally he gets someone to do his homework for him, though
not very competently (this looks like another student
tackling the excercise for the first time :-)



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00     ` John English
@ 2000-11-07  0:00       ` Robert Dewar
  2000-11-08  0:00         ` John English
  2000-11-08  5:29       ` Ken Garlington
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-07  0:00 UTC (permalink / raw)


In article <3A0824BB.14ACCA12@bton.ac.uk>,
  John English <je@bton.ac.uk> wrote:
> Unfortunately this sort of question gets marked by an
> automated system, so the robotic instructor in question will,
> I'm afraid, be deeply unimpressed. ;-)

It's a shame when only a dumb answer is accepted. In particular
I assume your robot would not know about the xor solution,
which is in some sense the best. There are of course
interesting solutions at the machine language level that
do not require any jumps which are always fun :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00 ` John English
@ 2000-11-07  0:00   ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-07  0:00 UTC (permalink / raw)


In article <3A080A66.2AEB25D2@bton.ac.uk>,
  John English <je@bton.ac.uk> wrote:
> sc297 wrote:
> > can anyone show me an if statement that will swap the values
of A and B,
> > if A is the greater value
>
> You could always ask your lecturers (either myself, or Richard
Byrne)
> if you're having trouble... ever thought of that?


Maybe next time one of your students asks CLA to do their
homework, you should provide an answer yourself, specially
identified so that your robot corrector will spit it out
with a complaint about getting CLA to do your homework :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00   ` Robert Dewar
@ 2000-11-07  0:00     ` Larry Kilgallen
  2000-11-08  0:00     ` Alejandro Villanueva
  2000-11-08  0:00     ` Ada student homework ? Nicolas Brunot
  2 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-07  0:00 UTC (permalink / raw)


In article <8ua3m1$bru$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> writes:
> In article <3A078B6F.D34B024B@erols.com>,
>   Daniel Allex <dallex@erols.com> wrote:
>> procedure Swap ( A,     B : in out Integer ) is
>>       Temp : Integer := 0;
>>    begin
>>       if A <= B then
>>          Temp := A;
>>          A := B;
>>          B := Temp;
>>       end if;
>>    end;
> 
> 
> Finally he gets someone to do his homework for him, though
> not very competently (this looks like another student
> tackling the excercise for the first time :-)

Maybe the student's strength is spelling "exercise" :-)




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00 ` Daniel Allex
@ 2000-11-07  0:00   ` dmitry6243
  2000-11-07  0:00     ` Jean-Pierre Rosen
  2000-11-07  0:00   ` Robert Dewar
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 168+ messages in thread
From: dmitry6243 @ 2000-11-07  0:00 UTC (permalink / raw)


In article <3A078B6F.D34B024B@erols.com>,
  Daniel Allex <dallex@erols.com> wrote:
> procedure Swap ( A,     B : in out Integer ) is
>       Temp : Integer := 0;
>    begin
>       if A <= B then
>          Temp := A;
>          A := B;
>          B := Temp;
>       end if;
>    end;

A funny version that does not require a temp variable:

procedure Swap (A, B : in out Integer) is
begin
   if A <= B then
      A := A + B;
      B := A - B;
      A := A - B;
   end if;
end Swap;

It works better if A, B are modular (:-))

--
Regards,
Dmitry Kazakov


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00 ` Daniel Allex
                     ` (3 preceding siblings ...)
  2000-11-07  0:00   ` John English
@ 2000-11-07  0:00   ` Ken Garlington
  2000-11-07  0:00     ` John English
  4 siblings, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-07  0:00 UTC (permalink / raw)


"Daniel Allex" <dallex@erols.com> wrote in message
news:3A078B6F.D34B024B@erols.com...
: procedure Swap ( A,     B : in out Integer ) is
:       Temp : Integer := 0;
:    begin
:       if A <= B then
:          Temp := A;
:          A := B;
:          B := Temp;
:       end if;
:    end;
:
:
: sc297 wrote:
:
: > can anyone show me an if statement that will swap the values of A and B,
: > if A is the greater value

Now *I* feel like a beginning Ada student! Doesn't the proposed solution
swap A and B if A is *not* the greater value? And why is Temp assigned an
initial value of 0?

Personally, I would have gone with something more along the lines of

generic
   type Value is private;
   with function ">"(A, B : Value) return Boolean is <>;
procedure Homework_Assignment(A, B : in out Value);

-- Exchange is defined in the Ada Reference Manual
with Exchange;
procedure Homework_Assignment(A, B : in out Value) is
   procedure Swap is new Exchange(Value);
begin
   if A > B then
      Swap(A,B);
   end if;
end Homework_Assignment;

Can't you imagine how pleased the instructor will be to find out that the
student has already mastered generics?






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03 14:42 if statements sc297
                   ` (2 preceding siblings ...)
  2000-11-06  0:00 ` Daniel Allex
@ 2000-11-07  0:00 ` John English
  2000-11-07  0:00   ` Robert Dewar
  2000-11-10  6:09 ` DJack143
  4 siblings, 1 reply; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


sc297 wrote:
> can anyone show me an if statement that will swap the values of A and B,
> if A is the greater value

You could always ask your lecturers (either myself, or Richard Byrne)
if you're having trouble... ever thought of that?

:-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00   ` tmoran
  2000-11-03  0:00     ` David Starner
  2000-11-03  0:00     ` Larry Kilgallen
@ 2000-11-07  0:00     ` John English
  2000-11-08  5:22       ` Ken Garlington
  2 siblings, 1 reply; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


tmoran@acm.org wrote:
> 
> > > can anyone show me an if statement that will swap the values of A and B,
> > > if A is the greater value
> >
> > Probably not without violating our policy of not doing people's homework.
>   Are there really programming classes that, in early November, have
> only just started discussing "if" statements!?

The original post was presumably in response to this:
  "Exercise 4.1: Write an if statement which will swap the values of
   variables A and B if necessary so that the smaller value ends up in
   A and the larger value ends up in B."

The closing date for this was the 3rd of November; the question had
been made available at least 2 weeks earlier.

A similar question was also set 2 weeks prior to that:
  "Exercise 2.6: Write a set of assignment statements which will swap
   the values of two variables called A and B."

Presumably he didn't manage to solve that, or hadn't noticed the
similarity... :-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-05  0:00       ` tmoran
  2000-11-06  0:00         ` David Starner
@ 2000-11-07  0:00         ` John English
  1 sibling, 0 replies; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


tmoran@acm.org wrote:
> Certainly
> there exist other time schedules than Sept-Dec semesters, but I'd be
> surprised to hear of any that start at the beginning of November.

Our semesters have been retrofitted around the existing UK academic
year, so the first week of the course was October 9th. The question
originally posed was set at the end of week 2 of the course as part
of a set of questions with a submission deadline of the end of week
4 (Nov 3rd).

For the curious, our 1st semester cunningly breaks after 10 weeks
for a few weeks at Christmas, resumes for 3 weeks, stops for another
3 weeks (the "inter-semester gap") to allow time for marking, exams
and so on. Semester 2 then runs for 5 weeks before Easter, stops for
another 3 weeks, then starts up again for another 8 weeks. This is
what you get when you take a perfectly good working system of three
10-week terms and retrofit an American-inspired set of 2 semesters
within them... :-(

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00 ` David Starner
@ 2000-11-07  0:00   ` John English
  2000-11-13  0:00   ` Dale Pontius
  1 sibling, 0 replies; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


David Starner wrote:
> 
> On Fri, 03 Nov 2000 14:42:28 +0000, sc297 wrote:
> >can anyone show me an if statement that will swap the values of A and B,
> >if A is the greater value
> 
> Yes. I can, and I bet your teacher can too.

I certainly could if he bothered to ask... :-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00 ` Daniel Allex
                     ` (2 preceding siblings ...)
  2000-11-07  0:00   ` if statements Wes Groleau
@ 2000-11-07  0:00   ` John English
  2000-11-07  0:00   ` Ken Garlington
  4 siblings, 0 replies; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


Daniel Allex wrote:
> 
> procedure Swap ( A,     B : in out Integer ) is
>       Temp : Integer := 0;
>    begin
>       if A <= B then
>          Temp := A;
>          A := B;
>          B := Temp;
>       end if;
>    end;
> 
> sc297 wrote:
> 
> > can anyone show me an if statement that will swap the values of A and B,
> > if A is the greater value

Too late, the deadline was last Friday... :-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00   ` Ken Garlington
@ 2000-11-07  0:00     ` John English
  2000-11-07  0:00       ` Robert Dewar
  2000-11-08  5:29       ` Ken Garlington
  0 siblings, 2 replies; 168+ messages in thread
From: John English @ 2000-11-07  0:00 UTC (permalink / raw)


Ken Garlington wrote:
> Personally, I would have gone with something more along the lines of
> 
> generic
>    type Value is private;
>    with function ">"(A, B : Value) return Boolean is <>;
> procedure Homework_Assignment(A, B : in out Value);
> 
> -- Exchange is defined in the Ada Reference Manual
> with Exchange;
> procedure Homework_Assignment(A, B : in out Value) is
>    procedure Swap is new Exchange(Value);
> begin
>    if A > B then
>       Swap(A,B);
>    end if;
> end Homework_Assignment;
> 
> Can't you imagine how pleased the instructor will be to find out that the
> student has already mastered generics?

Unfortunately this sort of question gets marked by an automated
system, so the robotic instructor in question will, I'm afraid,
be deeply unimpressed. ;-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00   ` dmitry6243
@ 2000-11-07  0:00     ` Jean-Pierre Rosen
  2000-11-08  0:00       ` dmitry6243
  0 siblings, 1 reply; 168+ messages in thread
From: Jean-Pierre Rosen @ 2000-11-07  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]


<dmitry6243@my-deja.com> a �crit dans le message news: 8u8j99$2rk$1@nnrp1.deja.com...
> A funny version that does not require a temp variable:
>
> procedure Swap (A, B : in out Integer) is
> begin
>    if A <= B then
>       A := A + B;
>       B := A - B;
>       A := A - B;
>    end if;
> end Swap;
>
> It works better if A, B are modular (:-))
>
But then, you have :
   A:= A xor B;
   B := B xor A;
   A := A xor B;






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Ted Dennison
@ 2000-11-08  0:00             ` Nicolas Brunot
  2000-11-08  0:00               ` Jerry Petrey
  2000-11-08  0:00             ` Lao Xiao Hai
  2000-11-09  0:00             ` Marin David Condic
  2 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-08  0:00 UTC (permalink / raw)


Ted Dennison Wrote

> I don't think so. If I can be brutally honest here, anyone who has that
> much trouble figuring out how an "if" statement works will *never* be a
> programmer, Ada or otherwise.
>
> This might be a reasonable issue to bring up in one of those "You don't
> do bit masking in Ada, you dummy you." threads. But this is not one of
> those threads. In fact, the tone there generally seems to be more like
> what you are looking for.

I think this is like advertising.
Excellent advertising for quite bad product can be very profitable.
Poor advertising for an excellent product leads usually to spectacular
failure.

You'll never make the most stupid student programmer become a good one
being aggressive or despising, but doing that you can give a bad image and
make potential good one go away.
There no benefit, and potential loss.

If you ever have to promote something to somebody, it's not a good idea to
tell him he is stupid, even if that is true.

It's quite well known in software development (but may be not enough in Ada
community) that Ada advertising is not especially a success story.







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00             ` Nicolas Brunot
@ 2000-11-08  0:00               ` Jerry Petrey
  0 siblings, 0 replies; 168+ messages in thread
From: Jerry Petrey @ 2000-11-08  0:00 UTC (permalink / raw)




Nicolas Brunot wrote:
> 
> Ted Dennison Wrote
> 
> > I don't think so. If I can be brutally honest here, anyone who has that
> > much trouble figuring out how an "if" statement works will *never* be a
> > programmer, Ada or otherwise.
> >
> > This might be a reasonable issue to bring up in one of those "You don't
> > do bit masking in Ada, you dummy you." threads. But this is not one of
> > those threads. In fact, the tone there generally seems to be more like
> > what you are looking for.
> 
> I think this is like advertising.
> Excellent advertising for quite bad product can be very profitable.
> Poor advertising for an excellent product leads usually to spectacular
> failure.
> 
> You'll never make the most stupid student programmer become a good one
> being aggressive or despising, but doing that you can give a bad image and
> make potential good one go away.
> There no benefit, and potential loss.
> 
> If you ever have to promote something to somebody, it's not a good idea to
> tell him he is stupid, even if that is true.
> 
> It's quite well known in software development (but may be not enough in Ada
> community) that Ada advertising is not especially a success story.


Good point.  I think we, in this group, should do everything we can to 
promote Ada and give it a good image.  If someone ask a question that
we think (or even know) is a homework assignment, we should be happy
that
someone is trying to learn Ada.  Give him hints and references without
actually doing the work for him but don't bash him either.  That way he
will hopefully learn something and we, who represent Ada, won't look bad
either. 


Jerry
-- 
-----------------------------------------------------------------------------
-- Jerry Petrey                                                
-- Senior Principal Systems Engineer - Navigation, Guidance, & Control
-- Raytheon Missile Systems          - Member Team Ada & Team Forth
-- NOTE: please remove NOSPAM in email address to reply                  
-----------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00     ` John English
@ 2000-11-08  0:00       ` Wes Groleau
  2000-11-09  3:43         ` Ken Garlington
  0 siblings, 1 reply; 168+ messages in thread
From: Wes Groleau @ 2000-11-08  0:00 UTC (permalink / raw)


J
> > Temp := B;
> > B    := Integer'Min (A, B)
> > A    := Integer'Max (A, Temp);
> >
> > Oops, the "if" he wanted is missing.  :-)
> 
> Hmm. I'll change the test program to use a hidden record type
> instead of an Integer with smart people like you around... ;-)

But then you'd also have to change the words that say
"swap A and B if B is _larger_"

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00           ` Brian Rogoff
  2000-11-08  0:00           ` Lao Xiao Hai
@ 2000-11-08  0:00           ` Chad R. Meiners
  2000-11-08  0:00             ` Ted Dennison
  2000-11-09  5:04           ` Robert Dewar
  3 siblings, 1 reply; 168+ messages in thread
From: Chad R. Meiners @ 2000-11-08  0:00 UTC (permalink / raw)



"Nicolas Brunot" <n.brunot@cadwin.com> wrote in message
news:3A0952B9.34BE19D1@cadwin.com...
> Nobody forces you to answer them.
> I personally wouldn't like to ride on an airplane programmed by R.Dewar
who would certainly
> explained he expected the plane to crash because the compiler behaves as
he expects ...

This seems to be a completely unwarranted attack on Robert Dewar.  From my
observation,
Dr. Dewar appears to have a very critical eye for detail and a genuine
concern for correctness.
Both of these qualities seem to me to be very important when developing
critical software.

-Chad R. Meiners






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00             ` Alejandro Villanueva
@ 2000-11-08  0:00               ` Georg Bauhaus
  2000-11-09  3:50               ` Ken Garlington
  1 sibling, 0 replies; 168+ messages in thread
From: Georg Bauhaus @ 2000-11-08  0:00 UTC (permalink / raw)


Alejandro Villanueva (190921@cepsz.unizar.es) wrote:

: please, we are here to help other people... isn't it????

But how?

I remember seeing a = a + 1 in a desk calculator's
BASIC and I was desperate, because I could not see
that this was not a declaration of equality, until
I found out that "=" was actually ":=". Now if
the problem had been "Swap"ping (like in this thread,
partly), and I had not yet
heard that you can't just exchange the values of
two variables in some programming language, ie without
a helper variable or one of the other ingenuities
presented earlier in this thread, I think I would have
found a reformulation of the problem that used more
familiar 'objects' quite useful to gain an understanding.
Something along:

"If, late at night at some party, you mistakenly put the rest
 of the beer into a glass suitable for wine, and the rest of
 the wine into a glass suitable for beer, what can you do
 to exchange the fluids?"

I can't say if this will actually help someone, but
it might, i think, help their imagination;
most people have two hands and can take up A and B in
either and are quite ready to say, 

A :=: B;

as is at least the x86. Isn't having to introduce additional
memory or calculation part of the new unfamiliar way of thinking
when programming, and isn't this much better explained 
with words (before formal training) than with
T: = A; A:= B; B:= T; alone?

I'm still thankful for exactly this happening on c.l.a with
"more advanced" data structures and tricks. (And should I
add that I do not think that John English doesn't
explain?)




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Chad R. Meiners
@ 2000-11-08  0:00             ` Ted Dennison
  2000-11-09  5:11               ` Robert Dewar
  2000-11-18  0:00               ` John Magness
  0 siblings, 2 replies; 168+ messages in thread
From: Ted Dennison @ 2000-11-08  0:00 UTC (permalink / raw)


In article <3a095057.0@silver.truman.edu>,
  "Chad R. Meiners" <crmeiners@hotmail.com> wrote:
>
> "Nicolas Brunot" <n.brunot@cadwin.com> wrote in message
> news:3A0952B9.34BE19D1@cadwin.com...
> > Nobody forces you to answer them.
> > I personally wouldn't like to ride on an airplane programmed by
> > R.Dewar who would certainly
> > explained he expected the plane to crash because the compiler
> > behaves as he expects ...
>
> From my observation,
> Dr. Dewar appears to have a very critical eye for detail and a genuine
> concern for correctness.

I'm with Chad on this one. Pedantic people may be an aggrevation to deal
with in personal conversation. We certianly wouldn't choose Dr. Dewar to
be the chief Arab-Israeli negotiator.

But if I had my life on the line, I'd want to use code written by the
most mind-numbingly pedantic person I could find. So even if *I* was a
choice, I'd pick Dewar.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
@ 2000-11-08  0:00           ` Brian Rogoff
  2000-11-09  0:00             ` Nicolas Brunot
  2000-11-08  0:00           ` Lao Xiao Hai
                             ` (2 subsequent siblings)
  3 siblings, 1 reply; 168+ messages in thread
From: Brian Rogoff @ 2000-11-08  0:00 UTC (permalink / raw)


On Wed, 8 Nov 2000, Nicolas Brunot wrote:
> I personally wouldn't like to ride on an airplane programmed by R.Dewar
> who would certainly explained he expected the plane to crash because
> the compiler behaves as he expects ...

It's this kind of post that makes me think this newsgroup is a waste of
time. Do you so rapidly descend into personal attacks with your colleagues 
at work too? Can I infer from this post that I don't want to use any piece
of software written by Nicolas Brunot because he's so wrapped up in some 
personal vendetta against Robert Dewar that he obviously can't think
straight, and goes off posting insults on a technical newsgroup? Are you
one of those people who thinks nothing of littering or newsgroup spam? 

Moderation would make this a better group I think, but as I recall there
has been little interest in doing it. 

-- Brian







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Ada student homework ?
  2000-11-07  0:00   ` Robert Dewar
  2000-11-07  0:00     ` Larry Kilgallen
  2000-11-08  0:00     ` Alejandro Villanueva
@ 2000-11-08  0:00     ` Nicolas Brunot
  2000-11-08  0:00       ` Robert Dewar
  2000-11-08  0:00       ` Larry Kilgallen
  2 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-08  0:00 UTC (permalink / raw)


> <Finally he gets someone to do his homework for him ...>

Does everybody here making a student homework hunting ?
There is often despising and rude posts towards supposingly 'students
homework'

I don't think most people take really the time to check if it is really
a homework or not before answering like that (commenting is more
appropriate than answering)
Experienced programmers starting Ada are likely to ask homework like
questions (not so bad after all to learn Ada)
Have this kind of people, giving lessons to everybody, tried a language
they absolutely don't know, and how would they take this kind of
reaction ?

Even if this is a homework, are you their teachers ?

More of concern, if Ada is not more widely used, this has certainly
something to do with some Ada users attitude.
I think the despising and ironical way Ada homework questions are
treated (when they are really homework ...) is an excellent way to keep
Ada a confidential language.
If I were a student, not really interested in Ada, and asking help for a
undesired homework, after such answers, I would certainly think that
it's perfectly normal than a Ada it's almost unknown and would turn
towards more popular languages like C or Java

I don't follow a lot of forums, but I never see this kind of reaction on
forums dealing with more widely used programming.






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00     ` Jean-Pierre Rosen
@ 2000-11-08  0:00       ` dmitry6243
  0 siblings, 0 replies; 168+ messages in thread
From: dmitry6243 @ 2000-11-08  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

In article <8u9r96$jmb$1@wanadoo.fr>,
  "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr> wrote:
>
> <dmitry6243@my-deja.com> a �crit dans le message news:
8u8j99$2rk$1@nnrp1.deja.com...
> > A funny version that does not require a temp variable:
> >
> > procedure Swap (A, B : in out Integer) is
> > begin
> >    if A <= B then
> >       A := A + B;
> >       B := A - B;
> >       A := A - B;
> >    end if;
> > end Swap;
> >
> > It works better if A, B are modular (:-))
> >
> But then, you have :
>    A:= A xor B;
>    B := B xor A;
>    A := A xor B;

It will work too, but for modulus 2**n only. +/- variant should work
always (:-))

--
Regards,
Dmitry Kazakov


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00     ` Ada student homework ? Nicolas Brunot
@ 2000-11-08  0:00       ` Robert Dewar
  2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00       ` Larry Kilgallen
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-08  0:00 UTC (permalink / raw)


In article <3A0916BB.584C6C60@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:

> I don't think most people take really the time to check if it
> is really a homework or not before answering like that

Nicolas, really, of *course* this was an assignment, that
was truly obvious (actually if you read the rest of the thread
then in fact we know the exact school and the due date!)

It really is very inappropriate for people to ask someone
on the net to do their homework for them. It happens
frequently, indeed, and sad to say, I have had several
students fail courses because they handed in work from
the net pretending it was their own.

It is reasonable to ask for pointers, but it is NOT appropriate
for students to ask for solutions, as was clearly the case
here. In fact we did the student a favor, if someone had
simply sent the solution off, and the student turned it in
as their own work, then they could *really* be in trouble!

The honest way for a student to proceed here is to send a
question like the following

"I am working on an assignment to fontasize an ostritch
in Ada, and I wondered if someone could point me in the
right direction, since I am having trouble figuring out
how to get started with fontasization in Ada."

If you look at past threads, you will see that a request
like this almost always gets helpful responses.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00       ` Robert Dewar
@ 2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00           ` Ted Dennison
  2000-11-08  0:00           ` Ada student homework ? Larry Kilgallen
  0 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-08  0:00 UTC (permalink / raw)


I don't think you have any lessons to give to students which are not
yours.
Most of the time, Ada lessons are given to students old enough to be
responsible for their behavior.
The main point here is how Ada programmers are considered by non Ada
programmers.
If Ada wants to be promoted, some of Ada programmers should try to
consider what the real world looks like.
The purpose of comp.lang.ada is in my opinion not to rule the world and
decide what is wrong or not.
More than that, this shows Ada as a language of scholar people judging
the rest of the world, and not as an efficient language for software
industry.

Robert Dewar a �crit :

> In article <3A0916BB.584C6C60@cadwin.com>,
>   Nicolas Brunot <n.brunot@cadwin.com> wrote:
>
> > I don't think most people take really the time to check if it
> > is really a homework or not before answering like that
>
> Nicolas, really, of *course* this was an assignment, that
> was truly obvious (actually if you read the rest of the thread
> then in fact we know the exact school and the due date!)
>
> It really is very inappropriate for people to ask someone
> on the net to do their homework for them. It happens
> frequently, indeed, and sad to say, I have had several
> students fail courses because they handed in work from
> the net pretending it was their own.
>
> It is reasonable to ask for pointers, but it is NOT appropriate
> for students to ask for solutions, as was clearly the case
> here. In fact we did the student a favor, if someone had
> simply sent the solution off, and the student turned it in
> as their own work, then they could *really* be in trouble!
>
> The honest way for a student to proceed here is to send a
> question like the following
>
> "I am working on an assignment to fontasize an ostritch
> in Ada, and I wondered if someone could point me in the
> right direction, since I am having trouble figuring out
> how to get started with fontasization in Ada."
>
> If you look at past threads, you will see that a request
> like this almost always gets helpful responses.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00     ` Ada student homework ? Nicolas Brunot
  2000-11-08  0:00       ` Robert Dewar
@ 2000-11-08  0:00       ` Larry Kilgallen
  2000-11-08  0:00         ` Nicolas Brunot
  1 sibling, 1 reply; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-08  0:00 UTC (permalink / raw)


In article <3A0916BB.584C6C60@cadwin.com>, Nicolas Brunot <n.brunot@cadwin.com> writes:
>> <Finally he gets someone to do his homework for him ...>
> 
> Does everybody here making a student homework hunting ?
> There is often despising and rude posts towards supposingly 'students
> homework'
> 
> I don't think most people take really the time to check if it is really
> a homework or not before answering like that (commenting is more
> appropriate than answering)
> Experienced programmers starting Ada are likely to ask homework like
> questions (not so bad after all to learn Ada)
> Have this kind of people, giving lessons to everybody, tried a language
> they absolutely don't know, and how would they take this kind of
> reaction ?
> 
> Even if this is a homework, are you their teachers ?

No, I am their victim if they learn Ada poorly.

When I see a "homework" question, the issue of whether they are in a
degree-granting program or not is rather minor.

I don't want to end up maintaining code written by somebody who did
not try to understand the underlying principles of the language.

But I _really_ don't want to ride on an airplane they programmed.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00           ` Ted Dennison
@ 2000-11-08  0:00           ` Larry Kilgallen
  2000-11-08  0:00             ` Nicolas Brunot
  1 sibling, 1 reply; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-08  0:00 UTC (permalink / raw)


In article <3A09416E.4C9BE1C8@cadwin.com>, Nicolas Brunot <n.brunot@cadwin.com> writes:
> I don't think you have any lessons to give to students which are not
> yours.
> Most of the time, Ada lessons are given to students old enough to be
> responsible for their behavior.

In society in general, adults do not always act responsibly,
so age is no automatic guarantee.  (Likewise, we should not
discriminate against younger people solely on the basis of
age.)

> The main point here is how Ada programmers are considered by non Ada
> programmers.
> If Ada wants to be promoted, some of Ada programmers should try to
> consider what the real world looks like.
> The purpose of comp.lang.ada is in my opinion not to rule the world and
> decide what is wrong or not.
> More than that, this shows Ada as a language of scholar people judging
> the rest of the world, and not as an efficient language for software
> industry.

Some of us are not "scholars" in any sense of the word.  While
I am an Ada fan/zealot/fanatic, it is not just the language as
defined in the standard that attracts me, but the _spirit_ of
striving for correctness.  It is possible to write Fortran* in
any language, goes the saying.  If this newsgroup were devoted
to finding new ways to compete with C's "obscure coding" contests,
I would not be participating.

Some of the people in this newsgroup are involved in safety
critical software.  My efforts are much more mundane, so for
personal purposes I am interested in the highest quality Ada
programming just so ordinary computer programs do not fail.
But when I am not working and I take a plane, train or
medical treatment, I have a sudden stake in all that
safety-critical stuff being done right.

I hope there are pockets of people doing computer-irrelevant
work with concerns for doing the job right similar to those
in this group. 

Larry Kilgallen

* If people choose to write Fortran they should do it honestly,
  using a Fortran compiler.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00       ` Larry Kilgallen
@ 2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00           ` Brian Rogoff
                             ` (3 more replies)
  0 siblings, 4 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-08  0:00 UTC (permalink / raw)


Nobody forces you to answer them.
I personally wouldn't like to ride on an airplane programmed by R.Dewar who would certainly
explained he expected the plane to crash because the compiler behaves as he expects ...
Now some people have the right to believe that they are your victim, when Ada remains
nearly unused in comparison with C or Java, due to Ada world reputation.

Larry Kilgallen wrote :

> In article <3A0916BB.584C6C60@cadwin.com>, Nicolas Brunot <n.brunot@cadwin.com> writes:
> >> <Finally he gets someone to do his homework for him ...>
> >
> > Does everybody here making a student homework hunting ?
> > There is often despising and rude posts towards supposingly 'students
> > homework'
> >
> > I don't think most people take really the time to check if it is really
> > a homework or not before answering like that (commenting is more
> > appropriate than answering)
> > Experienced programmers starting Ada are likely to ask homework like
> > questions (not so bad after all to learn Ada)
> > Have this kind of people, giving lessons to everybody, tried a language
> > they absolutely don't know, and how would they take this kind of
> > reaction ?
> >
> > Even if this is a homework, are you their teachers ?
>
> No, I am their victim if they learn Ada poorly.
>
> When I see a "homework" question, the issue of whether they are in a
> degree-granting program or not is rather minor.
>
> I don't want to end up maintaining code written by somebody who did
> not try to understand the underlying principles of the language.
>
> But I _really_ don't want to ride on an airplane they programmed.





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Ada student homework ? Larry Kilgallen
@ 2000-11-08  0:00             ` Nicolas Brunot
  2000-11-14  0:00               ` Ronald Cole
  0 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-08  0:00 UTC (permalink / raw)


> In society in general, adults do not always act responsibly,
> so age is no automatic guarantee.  (Likewise, we should not
> discriminate against younger people solely on the basis of
> age.)

And software people are no exception ... and Ada programmers even less ...
The question of age is that the discrimination is to treat them like 5 years old kids,
while a student is responsible for the way he wants to work.
If you think you are asked for a homework, I find more tolerant not to answer, than being
part of some Ada fanatics trying to rule the world, and giving them lessons about how they
should work.

> Some of us are not "scholars" in any sense of the word.

Fortunately, and I hope being one of them

> I am an Ada fan/zealot/fanatic, it is not just the language as
> defined in the standard that attracts me, but the _spirit_ of
> striving for correctness.

I'm not software fan, I use Ada professionally to write software which unique goal should
be satisfying the user, and not forget that goal to satisfy programmer's proud and theory
correctness.
In software industry, efficicency and user satisfaction should always prevail any
consideration about theory and correctness.
I'm quite sorry to see such an excellent language like Ada given bad reputation because
some Ada programmers, (to be fair, this is also true for most languages, but those language
are used in 99% of software industry) are fanatics to justify poor user satisfaction by
unquestionable theory.
The 'bit manipulation' thread is quite a good example ...
There are a lot of example where using existing components or maintain old C algorithm is
far more useful, efficient, and satisfying for the user than trying to rebuild the world
because your theory find it more elegant, and forget that it's will not possible in given
time and cost.
Some of the best programmers I worked with, didn't study computers at school, and were so
poorly interested in computers than they didn't have one at home.
Believe it or not, they wrote software far better than very good programmers, because they
were more concerned by the user, and were not polluted by the correctness of the theory.
That's why they sometimes wrote things extremely useful and satisfying for the user, just
because they didn't listen to theory fanatics who said : that's forbidden.


> * If people choose to write Fortran they should do it honestly,
>   using a Fortran compiler.

If it's their pleasure to do otherwise, I'm not sure to have the right to forbid it and put
their honesty in question







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00         ` John English
@ 2000-11-08  0:00           ` Ken Garlington
  0 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-08  0:00 UTC (permalink / raw)


"John English" <je@bton.ac.uk> wrote in message
news:3A094717.AAF0EB30@bton.ac.uk...

: >   "Exercise 4.1: Write an if statement which will swap the values of
: >    variables A and B if necessary so that the smaller value ends up in
: >    A and the larger value ends up in B."

: The only problem with your solution is that the question asks for
: a bare statement; your solution would be embedded inside a block,
: so it would fail to compile without some extra work...

If the "question" is the one above, I don't see the word "bare" (or
"fragment", etc.) anywhere. You asked for an if statement, I gave you an if
statement. The fact that I put it in a complete (and more expressive)
solution should be worth extra credit, not a failing grade!

P.S. I always like the Bohr story, no matter how many times I hear it:

http://www.snopes.com/college/exam/barometr.htm

P.P.S. Notice that I didn't even comment before on the difficulties in
putting the smaller value in A (via if statement or otherwise) if A = B....






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00         ` John English
@ 2000-11-08  0:00           ` Georg Bauhaus
  2000-11-09  4:58           ` Robert Dewar
  1 sibling, 0 replies; 168+ messages in thread
From: Georg Bauhaus @ 2000-11-08  0:00 UTC (permalink / raw)


John English (je@bton.ac.uk) wrote:
: the robot being unimpressed is merely to do with the fact that I
: haven't yet managed to program a sense of aesthetics into it. If
: anyone has a solution to that, *I'd* be deeply impressed... :-)

Probably not that much to the point but still interesting:
http://www.cs.berkeley.edu/~aiken/moss.html




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
@ 2000-11-08  0:00           ` Ted Dennison
  2000-11-08  0:00             ` Nicolas Brunot
                               ` (2 more replies)
  2000-11-08  0:00           ` Ada student homework ? Larry Kilgallen
  1 sibling, 3 replies; 168+ messages in thread
From: Ted Dennison @ 2000-11-08  0:00 UTC (permalink / raw)


In article <3A09416E.4C9BE1C8@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> The main point here is how Ada programmers are considered by non Ada
> programmers.

I don't think so. If I can be brutally honest here, anyone who has that
much trouble figuring out how an "if" statement works will *never* be a
programmer, Ada or otherwise.

This might be a reasonable issue to bring up in one of those "You don't
do bit masking in Ada, you dummy you." threads. But this is not one of
those threads. In fact, the tone there generally seems to be more like
what you are looking for.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00       ` Robert Dewar
@ 2000-11-08  0:00         ` John English
  2000-11-08  0:00           ` Georg Bauhaus
  2000-11-09  4:58           ` Robert Dewar
  0 siblings, 2 replies; 168+ messages in thread
From: John English @ 2000-11-08  0:00 UTC (permalink / raw)


Robert Dewar wrote:
> 
> In article <3A0824BB.14ACCA12@bton.ac.uk>,
>   John English <je@bton.ac.uk> wrote:
> > Unfortunately this sort of question gets marked by an
> > automated system, so the robotic instructor in question will,
> > I'm afraid, be deeply unimpressed. ;-)
> 
> It's a shame when only a dumb answer is accepted. In particular
> I assume your robot would not know about the xor solution,
> which is in some sense the best. There are of course
> interesting solutions at the machine language level that
> do not require any jumps which are always fun :-)

You misunderstand. The robot embeds submitted assignment statements
in a test program, runs the result against a set of test cases, and
checks that the output is correct wrt a standard solution. So it
would be quite happy with the xor solution, too. The reference to
the robot being unimpressed is merely to do with the fact that I
haven't yet managed to program a sense of aesthetics into it. If
anyone has a solution to that, *I'd* be deeply impressed... :-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  5:29       ` Ken Garlington
@ 2000-11-08  0:00         ` John English
  2000-11-08  0:00           ` Ken Garlington
  0 siblings, 1 reply; 168+ messages in thread
From: John English @ 2000-11-08  0:00 UTC (permalink / raw)


Ken Garlington wrote:
> 
> "John English" <je@bton.ac.uk> wrote in message
> news:3A0824BB.14ACCA12@bton.ac.uk...
> : Ken Garlington wrote:
> : > Personally, I would have gone with something more along the lines of
> : >
> : > generic
> : >    type Value is private;
> : >    with function ">"(A, B : Value) return Boolean is <>;
> : > procedure Homework_Assignment(A, B : in out Value);
> : >
> : > -- Exchange is defined in the Ada Reference Manual
> : > with Exchange;
> : > procedure Homework_Assignment(A, B : in out Value) is
> : >    procedure Swap is new Exchange(Value);
> : > begin
> : >    if A > B then
> : >       Swap(A,B);
> : >    end if;
> : > end Homework_Assignment;
> : >
> : > Can't you imagine how pleased the instructor will be to find out that
> the
> : > student has already mastered generics?
> :
> : Unfortunately this sort of question gets marked by an automated
> : system, so the robotic instructor in question will, I'm afraid,
> : be deeply unimpressed. ;-)
> 
> Would it mark it as correct? If the original question was
> 
>   "Exercise 4.1: Write an if statement which will swap the values of
>    variables A and B if necessary so that the smaller value ends up in
>    A and the larger value ends up in B."
> 
> I actually think my solution is a more excruciatingly correct answer,
> compared to the "obvious" solution. In particular, the types of the
> variables are not specified, so the solution shouldn't assume one - right?

The robot embeds the submitted solution in a skeletal test program
and runs it against a set of test data. The test program happens
to declare A, B and T as Integer, but that's irrelevant (any non-limited
type would do as well).

The only problem with your solution is that the question asks for
a bare statement; your solution would be embedded inside a block,
so it would fail to compile without some extra work...

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00   ` if statements Wes Groleau
@ 2000-11-08  0:00     ` John English
  2000-11-08  0:00       ` Wes Groleau
  0 siblings, 1 reply; 168+ messages in thread
From: John English @ 2000-11-08  0:00 UTC (permalink / raw)


Wes Groleau wrote:
> Well, if we're going to do the guy's homework
> for him, we might as well do it elegantly:
> 
> Temp := B;
> B    := Integer'Min (A, B)
> A    := Integer'Max (A, Temp);
> 
> Oops, the "if" he wanted is missing.  :-)

Hmm. I'll change the test program to use a hidden record type
instead of an Integer with smart people like you around... ;-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:14           ` Alejandro R. Mosteo
@ 2000-11-08  0:00             ` Alejandro Villanueva
  2000-11-08  0:00               ` Georg Bauhaus
  2000-11-09  3:50               ` Ken Garlington
  0 siblings, 2 replies; 168+ messages in thread
From: Alejandro Villanueva @ 2000-11-08  0:00 UTC (permalink / raw)


Alejandro R. Mosteo wrote:

> Hello. Here in Spain, my university (in Zaragoza) uses Ada as the
> programming languaje in several subjects (all of them half academic
> year duration):
>

Well, if you see my address you will see that I'm from the same Uni that you...

My final project is also with Ada95 running under RTEMS (the degree is
industrial engineering, 5-year long)

And now...

procedure Swap (A, B: in out Integer) is
   C: Integer;
begin
   if A > B then
      C := B;
      B := A;
      A := C;
   end if;
end Swap;

please, we are here to help other people... isn't it????

>
> Introducction to programming.
> Algorithm schemes. (Perhaps bad translating here...)
> Data structures and algorithms.
> Concurrent programming.
> Real time systems.
>
> Perhaps I forget even more (the career is computing engineering, five
> years long).
>
> Cheers,
>
> A. Mosteo.
>
> > When I first read the question, I wondered which university was teaching
> > basic programming with Ada. I remember when I first looked at Ada knowing
> > QBasic, and C (with no formal programming training), I would have regarded
> > that question as trivial. If he is learning Ada by himself, I fear that
> > more questions like this will follow and few groups can accept the many
> > basic questions of a beginner who has found someone who can answer his
> > questions for him.

--
------------------------------------------------------
�Quieres Cobrar por Navegar en Internet?
Visita: http://www.navegana.com/dinero/flintstone.html
------------------------------------------------------
Alejandro Villanueva
190921@cepsz.unizar.es
------------------------------------------------------







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00   ` Robert Dewar
  2000-11-07  0:00     ` Larry Kilgallen
@ 2000-11-08  0:00     ` Alejandro Villanueva
  2000-11-08  0:00       ` Daniel Allex
                         ` (2 more replies)
  2000-11-08  0:00     ` Ada student homework ? Nicolas Brunot
  2 siblings, 3 replies; 168+ messages in thread
From: Alejandro Villanueva @ 2000-11-08  0:00 UTC (permalink / raw)


Robert Dewar wrote:

> In article <3A078B6F.D34B024B@erols.com>,
>   Daniel Allex <dallex@erols.com> wrote:
> > procedure Swap ( A,     B : in out Integer ) is
> >       Temp : Integer := 0;
> >    begin
> >       if A <= B then
> >          Temp := A;
> >          A := B;
> >          B := Temp;
> >       end if;
> >    end;
>
> Finally he gets someone to do his homework for him, though
> not very competently (this looks like another student
> tackling the excercise for the first time :-)
>

Robert, you do always the same... why do you have to say that?
It IS a valid solution, and not the solution a geek will give after all.
And MOST important: it WORKS!

> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
------------------------------------------------------
�Quieres Cobrar por Navegar en Internet?
Visita: http://www.navegana.com/dinero/flintstone.html
------------------------------------------------------
Alejandro Villanueva
190921@cepsz.unizar.es
------------------------------------------------------







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00     ` Alejandro Villanueva
@ 2000-11-08  0:00       ` Daniel Allex
  2000-11-09  3:54       ` Ken Garlington
  2000-11-09  5:24       ` Robert Dewar
  2 siblings, 0 replies; 168+ messages in thread
From: Daniel Allex @ 2000-11-08  0:00 UTC (permalink / raw)
  To: Alejandro Villanueva

Thanks!  The guy asked for help.  I gave a solution.  Period.  This group
sure spends a lot of time going in circles.

Alejandro Villanueva wrote:

> Robert Dewar wrote:
>
> > In article <3A078B6F.D34B024B@erols.com>,
> >   Daniel Allex <dallex@erols.com> wrote:
> > > procedure Swap ( A,     B : in out Integer ) is
> > >       Temp : Integer := 0;
> > >    begin
> > >       if A <= B then
> > >          Temp := A;
> > >          A := B;
> > >          B := Temp;
> > >       end if;
> > >    end;
> >
> > Finally he gets someone to do his homework for him, though
> > not very competently (this looks like another student
> > tackling the excercise for the first time :-)
> >
>
> Robert, you do always the same... why do you have to say that?
> It IS a valid solution, and not the solution a geek will give after all.
> And MOST important: it WORKS!
>
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> --
> ------------------------------------------------------
> �Quieres Cobrar por Navegar en Internet?
> Visita: http://www.navegana.com/dinero/flintstone.html
> ------------------------------------------------------
> Alejandro Villanueva
> 190921@cepsz.unizar.es
> ------------------------------------------------------





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Ted Dennison
  2000-11-08  0:00             ` Nicolas Brunot
@ 2000-11-08  0:00             ` Lao Xiao Hai
  2000-11-09  0:00             ` Marin David Condic
  2 siblings, 0 replies; 168+ messages in thread
From: Lao Xiao Hai @ 2000-11-08  0:00 UTC (permalink / raw)




Ted Dennison wrote:

> In article <3A09416E.4C9BE1C8@cadwin.com>,
>   Nicolas Brunot <n.brunot@cadwin.com> wrote:
> > The main point here is how Ada programmers are considered by non Ada
> > programmers.
>
> I don't think so. If I can be brutally honest here, anyone who has that
> much trouble figuring out how an "if" statement works will *never* be a
> programmer, Ada or otherwise.

I have to agree with Nicolas with regard to what seems to be his plea
for courtesy, even toward lowly students.    While the problem may
seem trivial to those of us experienced in programming ( in whatever
language),  we often forget that some newcomers to programming don't
instantly grok simple concepts.

Indeed, one only need examine the variety of solutions submitted for
our entertainment to note that more than one approach to the
problem is possible.   I, an intellectual plodder,  can dimly recall
some of my early days in programming where ideas I now accept
as easily as breathing caused me enough trouble that I wondered if
I would ever learn this stuff.  Perhaps there are other plodders out
there for whom new ideas are also absorbed slowly.

A person with a question, whether  a student in a school setting or
a beginning programmer trying to learn without benefit of a teacher,
should be treated  with respect.   I have certainly asked enough
stupid questions in my time, and hope to ask more stupid questions
before I bask in the reflection from the white satin lining an open casket.

Is the student cheating on his/her homework by asking the question?
Perhaps it depends on what we want them to learn.   I am not sure
if it was Stravinsky who said, "Good musicians borrow, but great
musicians steal."   If the inquiring student finally gains an understanding

through asking a question, perhaps that is a breakthrough.

I do agree that posting the actual solution short-circuits the opportunity
for learning.  However, instead of handing that student the answer
directly, we might consider, respectfully, posing some useful questions
or giving guidance useful to him/her in solving the problem.

My view is that we treat everyone who chooses to enter this
forum with respect, even those who aren't as smart or experienced
as we might think we are. *

Sorry if this seems harsh.

Richard Riehle

    * Unless, of course, they are programming in some language we don't
like. :-)





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
  2000-11-08  0:00           ` Brian Rogoff
@ 2000-11-08  0:00           ` Lao Xiao Hai
  2000-11-09  0:00             ` Nicolas Brunot
  2000-11-08  0:00           ` Chad R. Meiners
  2000-11-09  5:04           ` Robert Dewar
  3 siblings, 1 reply; 168+ messages in thread
From: Lao Xiao Hai @ 2000-11-08  0:00 UTC (permalink / raw)




Nicolas Brunot wrote:

> Nobody forces you to answer them.
> I personally wouldn't like to ride on an airplane programmed by R.Dewar who would certainly
> explained he expected the plane to crash because the compiler behaves as he expects ...
> Now some people have the right to believe that they are your victim, when Ada remains
> nearly unused in comparison with C or Java, due to Ada world reputation.

Whoaaaaaaaaaa!   Just when I finished agreeing with Nicolas, I crash into this comment.  It
is rather disappointing.

1)  Robert Dewar is a man of great intellectual honesty.  He can defend himself, but
     probably will not respond directly to this unwarranted deprecation.

2)  Ada continues to be used for a wide range of safety-critical software and remains the
     correct choice for the very application cited:  avionics and other airborne software
     in which real people are at risk.   The C family of languages, including Java, do not
     come close when one examines them closely.

3)  I would prefer to have Dr. Dewar write the programs for the software on which my
     airplane depends than many other engineers I know.

4)  I thought your original post on this subject was about respect for the individuals
     in the forum.  I guess I thought wrong.

Richard Riehle





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-06  0:00         ` David Starner
@ 2000-11-08  0:14           ` Alejandro R. Mosteo
  2000-11-08  0:00             ` Alejandro Villanueva
  0 siblings, 1 reply; 168+ messages in thread
From: Alejandro R. Mosteo @ 2000-11-08  0:14 UTC (permalink / raw)


Hello. Here in Spain, my university (in Zaragoza) uses Ada as the 
programming languaje in several subjects (all of them half academic 
year duration):

Introducction to programming.
Algorithm schemes. (Perhaps bad translating here...)
Data structures and algorithms.
Concurrent programming.
Real time systems.

Perhaps I forget even more (the career is computing engineering, five 
years long).

Cheers,

A. Mosteo.

> When I first read the question, I wondered which university was teaching
> basic programming with Ada. I remember when I first looked at Ada knowing
> QBasic, and C (with no formal programming training), I would have regarded
> that question as trivial. If he is learning Ada by himself, I fear that 
> more questions like this will follow and few groups can accept the many
> basic questions of a beginner who has found someone who can answer his
> questions for him.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00     ` John English
@ 2000-11-08  5:22       ` Ken Garlington
  0 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-08  5:22 UTC (permalink / raw)


"John English" <je@bton.ac.uk> wrote in message
news:3A081648.8E6FF536@bton.ac.uk...
: tmoran@acm.org wrote:
: >

: A similar question was also set 2 weeks prior to that:
:   "Exercise 2.6: Write a set of assignment statements which will swap
:    the values of two variables called A and B."

Given that this answer is in the Ada Reference Manual, I hope someone gave
the ARM paragraph as the answer :)





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-07  0:00     ` John English
  2000-11-07  0:00       ` Robert Dewar
@ 2000-11-08  5:29       ` Ken Garlington
  2000-11-08  0:00         ` John English
  1 sibling, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-08  5:29 UTC (permalink / raw)


"John English" <je@bton.ac.uk> wrote in message
news:3A0824BB.14ACCA12@bton.ac.uk...
: Ken Garlington wrote:
: > Personally, I would have gone with something more along the lines of
: >
: > generic
: >    type Value is private;
: >    with function ">"(A, B : Value) return Boolean is <>;
: > procedure Homework_Assignment(A, B : in out Value);
: >
: > -- Exchange is defined in the Ada Reference Manual
: > with Exchange;
: > procedure Homework_Assignment(A, B : in out Value) is
: >    procedure Swap is new Exchange(Value);
: > begin
: >    if A > B then
: >       Swap(A,B);
: >    end if;
: > end Homework_Assignment;
: >
: > Can't you imagine how pleased the instructor will be to find out that
the
: > student has already mastered generics?
:
: Unfortunately this sort of question gets marked by an automated
: system, so the robotic instructor in question will, I'm afraid,
: be deeply unimpressed. ;-)

Would it mark it as correct? If the original question was

  "Exercise 4.1: Write an if statement which will swap the values of
   variables A and B if necessary so that the smaller value ends up in
   A and the larger value ends up in B."

I actually think my solution is a more excruciatingly correct answer,
compared to the "obvious" solution. In particular, the types of the
variables are not specified, so the solution shouldn't assume one - right?





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
@ 2000-11-09  0:00           ` Robert A Duff
  2000-11-09  0:00             ` Robert Dewar
                               ` (2 more replies)
  2000-11-09  0:00           ` Robert Dewar
  1 sibling, 3 replies; 168+ messages in thread
From: Robert A Duff @ 2000-11-09  0:00 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@gecm.com> writes:

> Thanks for highlighting this one - I've been bleeting on about this locally
> (and even in c.l.a. once!) for ages to collegues.

Me, too.  IMHO, constant should be the *default*, and you should have to
say "var" or something to declare a variable; then people would be less
likely to make this mistake.  In fact, that *is* the way parameters work
("in" is the default).  It seems inconsistent that object declarations
work differently.

>...I've noticed that apart
> from the analysis-of-the-problem meaning (i.e. it shows that the value has
> been determined to be the same thoughout its scope) there are also
> efficiency benefits, at least on one of our target compilers (in
> non-optimising mode, untried when optimising).

Well, it seems kind of pointless to worry about efficiency if you have
optimization turned off.

> My question is - can these efficiencies be expected from a compiler, by the
> way the ARM defines variables v constants, or is this just because of the
> particular compiler we were using. Will any 'decent' compiler spot when a
> 'variable' should actually have been declared as a constant?

A good compiler will probably be able to spot this if the variable is
local (if you turn on the highest optimization level!).  For globals
(library-package-level), the compiler probably needs the "constant" to
tell it the thing is constant.

- Bob




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00           ` Robert A Duff
  2000-11-09  0:00             ` Robert Dewar
  2000-11-09  0:00             ` Florian Weimer
@ 2000-11-09  0:00             ` Martin Dowie
  2 siblings, 0 replies; 168+ messages in thread
From: Martin Dowie @ 2000-11-09  0:00 UTC (permalink / raw)


well it would be if it weren't that turning it in was 'forbidden'! (apex
3.0.2b for tornado optimizations 'don't work')

Robert A Duff <bobduff@world.std.com> wrote in message
news:wccd7g5f52s.fsf@world.std.com...
> "Martin Dowie" <martin.dowie@gecm.com> writes:
>
> Well, it seems kind of pointless to worry about efficiency if you have
> optimization turned off.







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00           ` Robert A Duff
  2000-11-09  0:00             ` Robert Dewar
@ 2000-11-09  0:00             ` Florian Weimer
  2000-11-10  2:13               ` Ken Garlington
  2000-11-09  0:00             ` Martin Dowie
  2 siblings, 1 reply; 168+ messages in thread
From: Florian Weimer @ 2000-11-09  0:00 UTC (permalink / raw)


Robert A Duff <bobduff@world.std.com> writes:

> > Thanks for highlighting this one - I've been bleeting on about this locally
> > (and even in c.l.a. once!) for ages to collegues.
> 
> Me, too.  IMHO, constant should be the *default*, and you should have to
> say "var" or something to declare a variable; then people would be less
> likely to make this mistake.  In fact, that *is* the way parameters work
> ("in" is the default).  It seems inconsistent that object declarations
> work differently.

Following these lines, you probably should mandate proper tail
recursion as well. ;-)




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00             ` Nicolas Brunot
@ 2000-11-09  0:00               ` Robert Dewar
  2000-11-10  0:08                 ` Ehud Lamm
  2000-11-10  0:00               ` Brian Rogoff
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  0:00 UTC (permalink / raw)


In article <3A0A682E.7BA4D36B@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:

(talking about Dewar)

> from Ada, he is surely a good theory guy.
> But if you have to deal with time, costs and efficiency, its
> way of thinkin  leads to disaster.

Well it's always nice to have a busy day (full of dealing
with time costs, and efficiency, it is hard to run a company
without having to do that), and have it lightened up by
something that makes me smile.

This is surely the first time ever that anyone has accused
me of being a "theory guy"

Robert Dewar

:-) :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
  2000-11-09  0:00           ` Robert A Duff
@ 2000-11-09  0:00           ` Robert Dewar
  1 sibling, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  0:00 UTC (permalink / raw)


In article <3a0a6f6c$1@pull.gecm.com>,
  "Martin Dowie" <martin.dowie@gecm.com> wrote:
> Thanks for highlighting this one - I've been bleeting on about
> this locally (and even in c.l.a. once!) for ages to collegues.

I have found it very instructive to ask students to write
a large Ada program without any assignments at all. It is
quite possible to do this! Indeed the language is fully
powerful without assignments. Now I am not saying that all
programs SHOULD be written at this extreme level, of course
not, but it is good to understand that assignments are just
a convenience not a necessity :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00           ` Robert A Duff
@ 2000-11-09  0:00             ` Robert Dewar
  2000-11-09  0:00             ` Florian Weimer
  2000-11-09  0:00             ` Martin Dowie
  2 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  0:00 UTC (permalink / raw)


In article <wccd7g5f52s.fsf@world.std.com>,
  Robert A Duff <bobduff@world.std.com> wrote:

> Me, too.  IMHO, constant should be the *default*, and you
> should have to say "var" or something to declare a variable;
> then people would be less likely to make this mistake.

In Algol-68, we make a constant by doing

    int a = 32;

and an initialized variable by

    int a := 32;

(the latter is a short hand for

    ref int a = loc int := 32;

and there are those who think the shorthand should not
have been permitted (it was there to make things easier
for Fortran programmers :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00         ` if statements Ken Garlington
@ 2000-11-09  0:00           ` Robert Dewar
  2000-11-10  0:12             ` Ehud Lamm
                               ` (2 more replies)
  0 siblings, 3 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  0:00 UTC (permalink / raw)


In article <KsxO5.9249$pq3.738457@news.flash.net>,
  "Ken Garlington" <Ken.Garlington@computer.org> wrote:
> "Robert Dewar" <robert_dewar@my-deja.com> wrote in message
> news:8udce8$1qi$1@nnrp1.deja.com...
>
> : I would write the above as:
> :
> :    procedure Conditional_Swap (A, B : in out Integer) is
> :    begin
> :       if A < B then
> :          declare
> :             Temp : constant Integer := A;
> :          begin
> :             A := B;
> :             B := Temp;
> :          end;
> :       end if;
> :    end Conditional_Swap;
>
> This causes the *smaller* value to end up in A and the
*larger* value to end
> up in B? Now I REALLY feel like a beginning student!


Well this anomoly had already been pointed out, so there was
no point in repeating it, note that the above is advertised
as a rewriting of "the above code", and I did not want to
fix this problem since it would have confused the style
points I was making.

> Actually, I would also nitpick the choice of "Temp," when
> better options are available (Initial_A, or the really
> expressive Initial_Value_of_A).

I disagree, this is long-nameitis carried to absurd extremes.
Rewritten the way I had it the life time of Temp is three
lines and it is obvious that it is initialized with the value
of A. It merely obfuscates code to use long names where they
do not help the reader. I actually think a more appropriate
choice of name would have been T :-)



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00         ` Marin David Condic
@ 2000-11-09  0:00           ` Robert Dewar
  2000-11-10  0:00             ` Larry Kilgallen
  2000-11-10  1:58           ` Ken Garlington
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  0:00 UTC (permalink / raw)


In article <3A0ABE18.24CACAFB@acm.org>,
  Marin David Condic <mcondic.nospam@acm.org> wrote:
> I'd agree with the "Necessary/Not-Sufficient" part of this
> statement, but to say that "It Works" is not the MOST
> important thing, I think is a mistake.

Your pickup truck example is actually instructive, but you
mispresent it. Sure the pickup truck must run, but must it
work 100%? If you say yes, I am sorry to tell you that in
practice all trucks and cars are delivered with defects.
Hopefully not serious enough to stop them running, but
certainly they are not 100% "correct".

And that is an apt analogy. Software is almost never 100%
correct if it is of any complexity, it works well enough on
an initial delivery, but will undergo a long and labor
intensive history of bug fixing, modification and improvement.

Sure, the software must work reasonably well, but to focus on
correct function to the exclusion of maintainability will result
in software that does not necessarily work any better on initial
delivery, and for SURE will start to work worse as it is
maintained.

OK, if we are talking safety-critical certified software, then
correct function does indeed become paramount, but in most
applcations this is definitely a distortion.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Brian Rogoff
@ 2000-11-09  0:00             ` Nicolas Brunot
  2000-11-09  0:00               ` Robert Dewar
  2000-11-10  0:00               ` Brian Rogoff
  0 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-09  0:00 UTC (permalink / raw)


That's right, sorry to have said that.

I had often the opportunity to 'discuss' with R.Dewar and there is obviously a
very different point of view from people using Ada without having any
responsability in time and costs for develoments, and those who have.
If you have huge freedom in time available and costs, and nothing to report to
anybody about that, and no concerns about making a lot of people going away
from Ada, he is surely a good theory guy.
But if you have to deal with time, costs and efficiency, its way of thinking
leads to disaster.
I mentionned his name because the 'bit manipulation thread' was illustrating
that quite well, and because I think that talking about advertising, it's
important to let people know that a lot of Ada users are strongly against its
unquestionable approach of programming which is absolutely unrealistic
economically speaking.

That should have been explained without mentioning names.

Brian Rogoff wrote:

> On Wed, 8 Nov 2000, Nicolas Brunot wrote:
> > I personally wouldn't like to ride on an airplane programmed by R.Dewar
> > who would certainly explained he expected the plane to crash because
> > the compiler behaves as he expects ...
>
> It's this kind of post that makes me think this newsgroup is a waste of
> time. Do you so rapidly descend into personal attacks with your colleagues
> at work too? Can I infer from this post that I don't want to use any piece
> of software written by Nicolas Brunot because he's so wrapped up in some
> personal vendetta against Robert Dewar that he obviously can't think
> straight, and goes off posting insults on a technical newsgroup? Are you
> one of those people who thinks nothing of littering or newsgroup spam?
>
> Moderation would make this a better group I think, but as I recall there
> has been little interest in doing it.
>
> -- Brian





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Lao Xiao Hai
@ 2000-11-09  0:00             ` Nicolas Brunot
  2000-11-09  0:00               ` Lao Xiao Hai
  0 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-09  0:00 UTC (permalink / raw)


Sorry for having mentionned names, I shouldn't have, and that indeed goes against what I said
concerning students.
I so often read endless and pointless explanations (in my opinion) from him that I easily feel
like saying I disagree, and those few words escaped from me ....

Concerning the use of Ada, just pick up some papers about software development, and count the
words :
C, Fortran, Cobol, Java and Ada ...etc ...

Do you know that some companies gave up Ada because the difficulties and costs to maintain a team
of Ada programmers ruined the benefits of the language itself ?

Lao Xiao Hai Wrote:

> Nicolas Brunot wrote:
>
> > Nobody forces you to answer them.
> > I personally wouldn't like to ride on an airplane programmed by R.Dewar who would certainly
> > explained he expected the plane to crash because the compiler behaves as he expects ...
> > Now some people have the right to believe that they are your victim, when Ada remains
> > nearly unused in comparison with C or Java, due to Ada world reputation.
>
> Whoaaaaaaaaaa!   Just when I finished agreeing with Nicolas, I crash into this comment.  It
> is rather disappointing.
>
> 1)  Robert Dewar is a man of great intellectual honesty.  He can defend himself, but
>      probably will not respond directly to this unwarranted deprecation.
>
> 2)  Ada continues to be used for a wide range of safety-critical software and remains the
>      correct choice for the very application cited:  avionics and other airborne software
>      in which real people are at risk.   The C family of languages, including Java, do not
>      come close when one examines them closely.
>
> 3)  I would prefer to have Dr. Dewar write the programs for the software on which my
>      airplane depends than many other engineers I know.
>
> 4)  I thought your original post on this subject was about respect for the individuals
>      in the forum.  I guess I thought wrong.
>
> Richard Riehle





^ permalink raw reply	[flat|nested] 168+ messages in thread

* constants v variables (was Re: if statements)
  2000-11-09  5:24       ` Robert Dewar
@ 2000-11-09  0:00         ` Martin Dowie
  2000-11-09  0:00           ` Robert A Duff
  2000-11-09  0:00           ` Robert Dewar
  2000-11-09  0:00         ` if statements Ken Garlington
  2000-11-09  0:00         ` Marin David Condic
  2 siblings, 2 replies; 168+ messages in thread
From: Martin Dowie @ 2000-11-09  0:00 UTC (permalink / raw)


Robert Dewar <robert_dewar@my-deja.com> wrote in message
news:8udce8$1qi$1@nnrp1.deja.com...
[snip]
> Fifth, Temp is a variable, when it should be a constant. People
> very much overuse variables.

Thanks for highlighting this one - I've been bleeting on about this locally
(and even in c.l.a. once!) for ages to collegues. I've noticed that apart
from the analysis-of-the-problem meaning (i.e. it shows that the value has
been determined to be the same thoughout its scope) there are also
efficiency benefits, at least on one of our target compilers (in
non-optimising mode, untried when optimising).

My question is - can these efficiencies be expected from a compiler, by the
way the ARM defines variables v constants, or is this just because of the
particular compiler we were using. Will any 'decent' compiler spot when a
'variable' should actually have been declared as a constant?








^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  4:58           ` Robert Dewar
@ 2000-11-09  0:00             ` Ken Garlington
  2000-11-09  0:00               ` Designing test suites (was: if statements) Larry Kilgallen
  2000-11-09  0:00             ` if statements John English
  1 sibling, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-09  0:00 UTC (permalink / raw)


"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:8udasq$kn$1@nnrp1.deja.com...

: I suppose one could at least introduce SOME notion of
: aesthetics, e.g. evaluate layout against precanned style
: rules, or evaluate complexity using established metrics.

Given the presumed use of Ada to support highly reliable systems, I'd
especially like to see a robot of this type attempt to "break" the solution
by feeding it invalid inputs, etc. It might not be possible for something
this simple, but once you get up to more complete solutions, I think bonus
points should be awarded to solutions that implement error recovery, etc.






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Designing test suites (was: if statements)
  2000-11-09  0:00             ` Ken Garlington
@ 2000-11-09  0:00               ` Larry Kilgallen
  0 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-09  0:00 UTC (permalink / raw)


In article <mjxO5.9218$pq3.738093@news.flash.net>, "Ken Garlington" <Ken.Garlington@computer.org> writes:
> "Robert Dewar" <robert_dewar@my-deja.com> wrote in message
> news:8udasq$kn$1@nnrp1.deja.com...
> 
> : I suppose one could at least introduce SOME notion of
> : aesthetics, e.g. evaluate layout against precanned style
> : rules, or evaluate complexity using established metrics.
> 
> Given the presumed use of Ada to support highly reliable systems, I'd
> especially like to see a robot of this type attempt to "break" the solution
> by feeding it invalid inputs, etc. It might not be possible for something
> this simple, but once you get up to more complete solutions, I think bonus
> points should be awarded to solutions that implement error recovery, etc.

One approach that has struck me lately (in my real work) is striving
to get a test suite that achieves 100% code path coverage on some
_different_ implementation, and then running that test suite against
the implementation under test.

For the student problem case (as you say, something not so simple),
it might be possible to refine the test each year to achieve 100%
code path coverage on every solution that has ever been submitted
(perhaps even the incorrect ones).




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  5:24       ` Robert Dewar
  2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
@ 2000-11-09  0:00         ` Ken Garlington
  2000-11-09  0:00           ` Robert Dewar
  2000-11-09  0:00         ` Marin David Condic
  2 siblings, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-09  0:00 UTC (permalink / raw)


"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:8udce8$1qi$1@nnrp1.deja.com...

: I would write the above as:
:
:    procedure Conditional_Swap (A, B : in out Integer) is
:    begin
:       if A < B then
:          declare
:             Temp : constant Integer := A;
:          begin
:             A := B;
:             B := Temp;
:          end;
:       end if;
:    end Conditional_Swap;

This causes the *smaller* value to end up in A and the *larger* value to end
up in B? Now I REALLY feel like a beginning student!

Here's the problem statement as I understand it:

: >   "Exercise 4.1: Write an if statement which will swap the values of
: >    variables A and B if necessary so that the smaller value ends up in
: >    A and the larger value ends up in B."

I always thought that a test such as "A < B" was true only if A was
*already* smaller than B (in which case you shouldn't do a swap, right?).

: I don't think that will make the plane crash :-)

Well, if my requirement is to deploy a spin chute if the spin rate is larger
than X degrees/sec, and I write

  if Spin_Rate < X then
    Deploy_Chute;
  end if;

I certainly *might* crash a plane! :)

: Though it
: may be considered pedantic. As I say, bringing out the full
: weight of careful style considerations for such a simple
: program is overkill, but you have to start somewhere.

Actually, I would also nitpick the choice of "Temp," when better options are
available (Initial_A, or the really expressive Initial_Value_of_A).






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  4:58           ` Robert Dewar
  2000-11-09  0:00             ` Ken Garlington
@ 2000-11-09  0:00             ` John English
  1 sibling, 0 replies; 168+ messages in thread
From: John English @ 2000-11-09  0:00 UTC (permalink / raw)


Robert Dewar wrote:
> I do wonder if we go about things the right way by emphasizing
> that the only criterion for a good program is that it works.
> I realize that grading programs is a huge pain, but imagine
> if we taught people to play the piano, and graded them merely
> by using a robot that figured out if they pressed the right
> keys :-)

Mmm. The reason we're doing it this way is to force the students
to do some work before the assignment deadline (after previous
painful instances where people have apparently opened a textbook
for the first time the night before -- ultimately their own problem,
but painful nevertheless) but without the avalanche of marking that
this would cause. The bulk of the marks are still awarded on the
basis of a manually-assessed submission at the end of the course.
It's not perfect, but dealing with groups of up to 200 never is.
Oh for the time to give one-to-one tuition... :-(

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00           ` Ted Dennison
  2000-11-08  0:00             ` Nicolas Brunot
  2000-11-08  0:00             ` Lao Xiao Hai
@ 2000-11-09  0:00             ` Marin David Condic
  2000-11-10  2:15               ` Ken Garlington
  2000-11-18  0:00               ` John Magness
  2 siblings, 2 replies; 168+ messages in thread
From: Marin David Condic @ 2000-11-09  0:00 UTC (permalink / raw)


This looked so ridiculously simple a task that I began to wonder if maybe
someone out there isn't just jerking our collective chain. Some version of
"Lets see if I can start the customary homework chastisement thread..."

OTOH, here in Palm Beach County, we seem to have a large number of people
who are TOO STUPID to figure out how to punch a ballot - or even ask for
help. So maybe the same people take programming classes and are TOO STUPID
to open the textbook which undoubtedly has at least one example of an "if"
statement in it somewhere. I'll bet there is even an index entry in the
back of the book that would take you right to the page. Maybe even a Table
Of Contents entry. Maybe even an example of a "Swap" program? That *is* a
rather popular example to put in textbooks, isn't it?

Or have they dropped the requirement that you be able to read in order to
get into college? It is rather "exclusive" and not very "diverse" to
require literacy, isn't it?

(Maybe I should attach a smiley here somewhere - but I'm not sure that I'm
joking. :-)

MDC

Ted Dennison wrote:

> I don't think so. If I can be brutally honest here, anyone who has that
> much trouble figuring out how an "if" statement works will *never* be a
> programmer, Ada or otherwise.
>

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  5:24       ` Robert Dewar
  2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
  2000-11-09  0:00         ` if statements Ken Garlington
@ 2000-11-09  0:00         ` Marin David Condic
  2000-11-09  0:00           ` Robert Dewar
  2000-11-10  1:58           ` Ken Garlington
  2 siblings, 2 replies; 168+ messages in thread
From: Marin David Condic @ 2000-11-09  0:00 UTC (permalink / raw)


Robert Dewar wrote:

> If there is one thing in the Ada world that one expects it is
> to get away from th idea that the MOST important thing about
> code is that "it WORKS". Ada is about building reliable,
> maintainable software, and the fact that it works is necessary
> but no where *near* sufficient.

I'd agree with the "Necessary/Not-Sufficient" part of this statement,
but to say that "It Works" is not the MOST important thing, I think is a
mistake. There are a lot of important qualities I excpect from my
pick-up truck. If I go out front, stick the key in it and it doesn't
start, then there isn't much point in having it take up all that space
in my driveway that could be occupied by nice, useful, air. "Works" is
the only excuse for having bothered to build it at all. Along the way,
we probably add things like "Looks Sharp", "Safe To Operate", "More
Power (argh! argh! argh!)" "Hold A Ton Of Bricks" as other valuable and
important requirements, but take away any of those things and having the
truck might still be justifiable.

I've seen lots of *REAL CRAP* software that had the quality of "Works"
and found it could still be profitable to use it. I've picked up
unbelievably (well, maybe believably) bad C code that reliably performed
some function and incorporated it into a product with the eye towards
freezing it there, never to be touched again - under penalty of law.
Should the programmer be spanked? Yup. Real hard and real often. "Bad
Programmer! No Cookie!" But the quality of "Works" was still there.

MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00             ` Nicolas Brunot
@ 2000-11-09  0:00               ` Lao Xiao Hai
  2000-11-10  0:00                 ` Nicolas Brunot
                                   ` (2 more replies)
  0 siblings, 3 replies; 168+ messages in thread
From: Lao Xiao Hai @ 2000-11-09  0:00 UTC (permalink / raw)




Nicolas Brunot wrote:

> Concerning the use of Ada, just pick up some papers about software development, and count the
> words :
>              C, Fortran, Cobol, Java and Ada ...etc ...
>
> Do you know that some companies gave up Ada because the difficulties and costs to maintain a team
> of Ada programmers ruined the benefits of the language itself ?

HmmmMMMMMmmmm.    Are you suggesting that the "cost to maintain a team
of Ada programmers"  is a function of the language?      The final part of your
sentence leads me to suspect you understand the benefits of Ada.   The stupidity
of many program managers, especially some in the DoD, regarding Ada is not
the fault of the language.    The preference to build a resume with a more
commercial flavor (e.g., the C family of languages) is not the fault of Ada.

I am currently watching with amusement as hordes of otherwise intelligent
programmers are forced to learn C++, when Ada is already in place.  One
prominent member of the DoD software community said to me recently, "We have
all this legacy Ada code that we need to port to Java technology."   He is
making his decision on the recommendation of someone who, in my opinion,
is not experienced enough in Ada or C++ to make such a judgement.   Another
said, "In my last command they told me that Ada was pretty much dead since
the mandate went away."

Meanwhile, C++, a language which can best be characterized as "its own
virus,"  is being stuffed down the intellectual maw of a lot of programmers
who already know Ada 83 and need only to be updated on the technology
of the current standard.   Transitioning good Ada to C++ is so silly that it
defies belief.

The result will be more incidents such as the USS Yorktown, dead in the water
from a software flaw originating in code written in C.    I find it scary that we
plan to send our young men into battle depending on software created with the
most error-prone programming language ever invented. Who will take the final
responsibility for this folly once the finger-pointing begins?

Richard Riehle








^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
@ 2000-11-09  0:00 James Hassett
  2000-11-10  0:02 ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: James Hassett @ 2000-11-09  0:00 UTC (permalink / raw)
  To: comp.lang.ada

Ken Garlington <Ken.Garlington@computer.org> wrote:
> "Robert Dewar" <robert_dewar@my-deja.com> wrote in message
> news:8udce8$1qi$1@nnrp1.deja.com...
> 
> : I would write the above as:
> :
> :    procedure Conditional_Swap (A, B : in out Integer) is
> :    begin
> :       if A < B then
> :          declare
> :             Temp : constant Integer := A;
> :          begin
> :             A := B;
> :             B := Temp;
> :          end;
> :       end if;
> :    end Conditional_Swap;
> 
> This causes the *smaller* value to end up in A and the *larger* value to end
> up in B? Now I REALLY feel like a beginning student!
> 
> Here's the problem statement as I understand it:
> 
> : >   "Exercise 4.1: Write an if statement which will swap the values of
> : >    variables A and B if necessary so that the smaller value ends up in
> : >    A and the larger value ends up in B."
> 
> I always thought that a test such as "A < B" was true only if A was
> *already* smaller than B (in which case you shouldn't do a swap, right?).

This defect has been carried forward in a surprising number of
posts, so I'm glad Ken caught it.  I believe it originated with
Daniel Allex, who wrote

> procedure Swap ( A,    B : in out Integer ) is
>      Temp : Integer := 0;
>    begin
>      if A <= B then
>          Temp := A;
>          A := B;
>          B := Temp;
>      end if;
>    end;

When I saw this "solution" offered, I thought maybe Daniel had
deliberately introduced the bug to ensure that if the student
simply handed in the offered solution, it would be wrong, but if he
bothered to try to understand it, he would likely find and correct
the error.  I thought about posting a correction, but decided that
maybe the correction was best left as an exercise for the student.

I was surprised that Robert didn't catch this defect, but the
discussion has drifted far from the original problem posed, and
it is easy to lose sight of such (critical) details as which way
the test ought to go.  We rarely need to forgive Robert for
technical errors, so I'm willing to cut him some slack here.

Another problem (as noted by some already) is that the original
problem asked for an if statement, not a procedure, so we would
need to trim Robert's solution down to the if statement.  (The
solution offered by Daniel doesn't trim down as neatly, because
the Temp declaration gets lost.)

Otherwise, I certainly agree with Robert's critique of Daniel's
solution.

- Jim Hassett





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00       ` Wes Groleau
@ 2000-11-09  3:43         ` Ken Garlington
  0 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-09  3:43 UTC (permalink / raw)


"Wes Groleau" <wwgrol@ftw.rsc.raytheon.com> wrote in message
news:3A098A36.BEAB956A@ftw.rsc.raytheon.com...
: J
: > > Temp := B;
: > > B    := Integer'Min (A, B)
: > > A    := Integer'Max (A, Temp);
: > >
: > > Oops, the "if" he wanted is missing.  :-)
: >
: > Hmm. I'll change the test program to use a hidden record type
: > instead of an Integer with smart people like you around... ;-)
:
: But then you'd also have to change the words that say
: "swap A and B if B is _larger_"

Not if he defines ">"!





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00             ` Alejandro Villanueva
  2000-11-08  0:00               ` Georg Bauhaus
@ 2000-11-09  3:50               ` Ken Garlington
  1 sibling, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-09  3:50 UTC (permalink / raw)


"Alejandro Villanueva" <190921@cepsz.unizar.es> wrote in message
news:3A09A13F.CE7DF6EF@cepsz.unizar.es...
: Alejandro R. Mosteo wrote:
:
: > Hello. Here in Spain, my university (in Zaragoza) uses Ada as the
: > programming languaje in several subjects (all of them half academic
: > year duration):
: >
:
: Well, if you see my address you will see that I'm from the same Uni that
you...
:
: My final project is also with Ada95 running under RTEMS (the degree is
: industrial engineering, 5-year long)
:
: And now...
:
: procedure Swap (A, B: in out Integer) is
:    C: Integer;
: begin
:    if A > B then
:       C := B;
:       B := A;
:       A := C;
:    end if;
: end Swap;

Of course, this would violate the implied requirement that no code surround
the "if" statement. How about (assuming A and B are Integer):

if A > B then
  declare
    Original_B : constant Integer := B;
  begin
    B := A;
    A := Original_B;
  end;
end if;





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00     ` Alejandro Villanueva
  2000-11-08  0:00       ` Daniel Allex
@ 2000-11-09  3:54       ` Ken Garlington
  2000-11-09  5:24       ` Robert Dewar
  2 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-09  3:54 UTC (permalink / raw)


"Alejandro Villanueva" <190921@cepsz.unizar.es> wrote in message
news:3A09A39F.2822C01B@cepsz.unizar.es...
: Robert Dewar wrote:
:
: > In article <3A078B6F.D34B024B@erols.com>,
: >   Daniel Allex <dallex@erols.com> wrote:
: > > procedure Swap ( A,     B : in out Integer ) is
: > >       Temp : Integer := 0;
: > >    begin
: > >       if A <= B then
: > >          Temp := A;
: > >          A := B;
: > >          B := Temp;
: > >       end if;
: > >    end;
: >
: > Finally he gets someone to do his homework for him, though
: > not very competently (this looks like another student
: > tackling the excercise for the first time :-)
:
: Robert, you do always the same... why do you have to say that?
: It IS a valid solution, and not the solution a geek will give after all.
: And MOST important: it WORKS!

Well, actually, it *doesn't* work for the stated problem:

: >   "Exercise 4.1: Write an if statement which will swap the values of
: >    variables A and B if necessary so that the smaller value ends up in
: >    A and the larger value ends up in B."

It also does one or more unnecessary things (this will be left as an
exercise for the student :)





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00         ` John English
  2000-11-08  0:00           ` Georg Bauhaus
@ 2000-11-09  4:58           ` Robert Dewar
  2000-11-09  0:00             ` Ken Garlington
  2000-11-09  0:00             ` if statements John English
  1 sibling, 2 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  4:58 UTC (permalink / raw)


In article <3A09456E.D1F1D3A2@bton.ac.uk>,
  John English <je@bton.ac.uk> wrote:
> You misunderstand. The robot embeds submitted assignment
> statements in a test program, runs the result against a set of
> test cases, and checks that the output is correct wrt a
> standard solution. So it would be quite happy with the xor
> solution, too. The reference to the robot being unimpressed is
> merely to do with the fact that I haven't yet managed to
> program a sense of aesthetics into it. If anyone has a
> solution to that, *I'd* be deeply impressed... :-)

OK, yes, I did misunderstand. I thought "deeply unimpressed"
was a code phrase for "completely confused" :-)

I do wonder if we go about things the right way by emphasizing
that the only criterion for a good program is that it works.
I realize that grading programs is a huge pain, but imagine
if we taught people to play the piano, and graded them merely
by using a robot that figured out if they pressed the right
keys :-)

I suppose one could at least introduce SOME notion of
aesthetics, e.g. evaluate layout against precanned style
rules, or evaluate complexity using established metrics.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00         ` Nicolas Brunot
                             ` (2 preceding siblings ...)
  2000-11-08  0:00           ` Chad R. Meiners
@ 2000-11-09  5:04           ` Robert Dewar
  2000-11-10  0:27             ` Subsetting Ada Ted Dennison
  3 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  5:04 UTC (permalink / raw)


In article <3A0952B9.34BE19D1@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> Nobody forces you to answer them.
> I personally wouldn't like to ride on an airplane programmed
by R.Dewar who would certainly
> explained he expected the plane to crash because the compiler
behaves as he expects ...
> Now some people have the right to believe that they are your
victim, when Ada remains
> nearly unused in comparison with C or Java, due to Ada world
reputation.

Well if you have ever been on a 777, you have in fact already
ridden on an airplane partly programmed by R. Dewar, and no,
he did not expect the plane to crash, he did however know
what he was doing when he wrote the code. In particular,
I always like to 100% understand the semantics and syntax
of a language I am writing in so that there is never any
experimental dependence on what a given compiler happens
to do.

In Ada I achieve that by writing in a rather simple subset
of the language (I am always amazed by the fearless behavior
of some Ada programmers in using the most complex parts of
the language without hesitation :-)



Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00             ` Ted Dennison
@ 2000-11-09  5:11               ` Robert Dewar
  2000-11-18  0:00               ` John Magness
  1 sibling, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  5:11 UTC (permalink / raw)


In article <8ucfqf$a56$1@nnrp1.deja.com>,
  Ted Dennison <dennison@telepath.com> wrote:
> I'm with Chad on this one. Pedantic people may be an
> aggrevation to deal with in personal conversation. We
> certianly wouldn't choose Dr. Dewar t be the chief
> Arab-Israeli negotiator.

Actually you might be surprised. I have had a lot of experience
in very difficult diplomatic negotations in my roles as
chair-person at NYU, and other administrative positions,
and with that kind of hat on, I am actually pretty effective
as a negotiator.

But when it comes to software, there is no room for wooly
negotation and vague experimentation in my book. Computers
and compilers are not people whose feelings need to be
carefully considered :-)

For me, one of the many criteria for a strong programmer is
that you totally understand the tools you are using. As I
said in an earlier thread, when it comes to a complex language
like C++ or F90 or Ada, or Java for that matter, the way to
achieve this is to keep things simple, so that you *do* clearly
understand what you are doing at all times.

I often find people who are so accustomed to writing approximate
code and bashing it into shape, that they simply cannot imagine
the clean room approach in which developers are never allowed
to run their code, and even less can they believe that this
approach works well with programmers who know what they are
doing.

So if insisting on this kind of awareness of details of the
language you are using is pedantry (it's not quite the way
I would use the word), then I consider a pedantic viewpoint
essential


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-08  0:00     ` Alejandro Villanueva
  2000-11-08  0:00       ` Daniel Allex
  2000-11-09  3:54       ` Ken Garlington
@ 2000-11-09  5:24       ` Robert Dewar
  2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
                           ` (2 more replies)
  2 siblings, 3 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-09  5:24 UTC (permalink / raw)


In article <3A09A39F.2822C01B@cepsz.unizar.es>,
  Alejandro Villanueva <190921@cepsz.unizar.es> wrote:
> Robert Dewar wrote:
>
> > In article <3A078B6F.D34B024B@erols.com>,
> >   Daniel Allex <dallex@erols.com> wrote:
> > > procedure Swap ( A,     B : in out Integer ) is
> > >       Temp : Integer := 0;
> > >    begin
> > >       if A <= B then
> > >          Temp := A;
> > >          A := B;
> > >          B := Temp;
> > >       end if;
> > >    end;
> >
> > Finally he gets someone to do his homework for him, though
> > not very competently (this looks like another student
> > tackling the excercise for the first time :-)
> >
>
> Robert, you do always the same... why do you have to say that?
> It IS a valid solution, and not the solution a geek will give
> after all. And MOST important: it WORKS!

If there is one thing in the Ada world that one expects it is
to get away from th idea that the MOST important thing about
code is that "it WORKS". Ada is about building reliable,
maintainable software, and the fact that it works is necessary
but no where *near* sufficient.

Let's look at the example above and see what's wrong with it

> > > procedure Swap ( A,     B : in out Integer ) is
> > >       Temp : Integer := 0;
> > >    begin
> > >       if A <= B then
> > >          Temp := A;
> > >          A := B;
> > >          B := Temp;
> > >       end if;
> > >    end;

First, the big chunk of white space between A, and B seems
quite gratuitous, I cannot think of any good excuse for it.

Second, the initialization of Temp is confusing and unnecessary.

Third, the indentation is non-standard. The RM suggests a
standard indentation, it should be used almost always.

Fourth, it is good practice to always put end labels for
procedures.

Fifth, Temp is a variable, when it should be a constant. People
very much overuse variables.

Sixth, Temp is defined too globally, you want to be easily
able to see that Temp is just a local variable for the Swap
and that its value is dead on exit.

Seventh, the name Swap is a very poor choice for the procedure,
since this is not what it does.

Eighth, why on earth swap the elements if they are equal, that
seems silly!

I would write the above as:

   procedure Conditional_Swap (A, B : in out Integer) is
   begin
      if A < B then
         declare
            Temp : constant Integer := A;
         begin
            A := B;
            B := Temp;
         end;
      end if;
   end Conditional_Swap;

I actually would prefer as a matter of style to introduce
a separate procedure called Swap, so that the guts of the
procedure would look like

    if A < B then
       Swap (A, B);
    end if;

Well all this is of course overkill for such a trivial
statement (one must wonder why anyone who finds it less
trouble to write a message to CLA than to solve such a
trivial problem themselves), but in fact the lesson to
be learned even at a very trivial level is precisely the
sort of attitudes to correct style that can then hopefully
scale up to larger examples.

So there you are, Robert's complete solution to the problem
first posed (after the deadline unfortunately :-)

I don't think that will make the plane crash :-) Though it
may be considered pedantic. As I say, bringing out the full
weight of careful style considerations for such a simple
program is overkill, but you have to start somewhere.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                   ` Marin David Condic
@ 2000-11-10  0:00                     ` Randy Brukardt
  2000-11-11  0:00                       ` Marin David Condic
  2000-11-10  0:00                     ` Nicolas Brunot
  2000-11-10  0:00                     ` Ole-Hjalmar Kristensen
  2 siblings, 1 reply; 168+ messages in thread
From: Randy Brukardt @ 2000-11-10  0:00 UTC (permalink / raw)


Marin David Condic wrote in message <3A0C0BEE.347F659C@acm.org>...
>You are correct about the Windows/PC/C situation. While you *can*
develop apps in Ada for this platform,
>you are swimming against the tide in many respects. The OS interface is
C, there are tons of C/C++ oriented
>development tools, etc. From a market standpoint, you can't afford to
ignore the Windows environment. If
>you're going to develop there, you'll have to know C (to some extent)
just to use the OS.

Well, that's the point of Claw: to allow people to develop for Windows
without needing to know C. (And, I'd expect that various other people
working on GUI tools would say the same.)

I would say that we've failed if C knowledge is still necessary.

(Before someone complains, I would probably agree in some ways that we
have failed. One of the original pillars for Claw was a Petzold-like
book with all of the examples in Ada 95 using Claw. But we never found
anyone capable enough in Ada 95, Windows, and writing to create it. [Two
out of three isn't enough.] And, if you have to extend beyond the
boundaries of Claw, you'll end up needing to know C. But certainly such
knowledge is not necessary for many applications.)

                Randy Brukardt
                (R.R. Software, Inc. For more info on Claw, see
www.rrsoftware.com)








^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                     ` Nicolas Brunot
@ 2000-11-10  0:00                       ` David Starner
  2000-11-11  0:00                       ` Robert Dewar
  1 sibling, 0 replies; 168+ messages in thread
From: David Starner @ 2000-11-10  0:00 UTC (permalink / raw)


On Fri, 10 Nov 2000 15:04:43 GMT, Nicolas Brunot wrote:
>I would just add that fighting against that is not 'hard'. It simply makes your company disappear in short
>time.
>We would like to see more Ada users understand that.

Any proof of that? I can't see Ada making that much difference. I 
seriously doubt it will make more than a 20% difference on time to 
market either way, which means at worst it will be a contributing 
factor to the failure. Anyway, looking at stuff like Abiword, if 
you want to write crossplatform, most of the code will be platform-
independent, which means you're using a style of C ("portable C" + 
wrappers) that will probably mirrors what an Ada programmer will have 
to do. 

-- 
David Starner - dstarner98@aasaa.ofe.org
http://dvdeug.dhis.org
As centuries of pulp novels and late-night Christian broadcasting have taught 
us, anything we don't understand can be used for the purposes of Evil.
	-- Kenneth Hite, Suppressed Transmissions




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00               ` Lao Xiao Hai
@ 2000-11-10  0:00                 ` Nicolas Brunot
  2000-11-10  0:00                   ` Larry Kilgallen
  2000-11-10  0:00                 ` Nicolas Brunot
  2000-11-10  0:00                 ` mjsilva
  2 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Lao Xiao Hai wrote :

> HmmmMMMMMmmmm.    Are you suggesting that the "cost to maintain a team
> of Ada programmers"  is a function of the language?

No it is just a concern of the company it is to much difficult to find programmers and if their cost is
too high.
The company has to deal with the entire development cost, and availability of programmers and their
turnover has a cost.
It is quite easy and cheap to find a C++ team in comparison with an Ada team, just before you'll find a
bunch of C programmers for just one Ada programmer.

>    The final part of your
> sentence leads me to suspect you understand the benefits of Ada.

We have been developping 99,9 % in Ada for more than 10 years to develop complex CAD and database
applications.
So, yes we know something about Ada qualities and we have extensively used or at least tested nearly
every Ada compiler for DOS, Windows and Unix that existed for the last 10 years
We have about 1 000 000 lines Ada code for our products ...

> I am currently watching with amusement as hordes of otherwise intelligent
> programmers are forced to learn C++, when Ada is already in place.  One
> prominent member of the DoD software community said to me recently, "We have
> all this legacy Ada code that we need to port to Java technology."   He is
> making his decision on the recommendation of someone who, in my opinion,
> is not experienced enough in Ada or C++ to make such a judgement.   Another
> said, "In my last command they told me that Ada was pretty much dead since
> the mandate went away."

The history of computers is full of excellent products, far better than their competitors, which
disappeared because their users and promoters , however excellent they were, behaved nearly like Ada
community is doing by now.
We hope to go on with Ada in the future, but sometimes you have to fear that sames causes lead to same
effects ...

> Meanwhile, C++, a language which can best be characterized as "its own
> virus,"  is being stuffed down the intellectual maw of a lot of programmers
> who already know Ada 83 and need only to be updated on the technology
> of the current standard.   Transitioning good Ada to C++ is so silly that it
> defies belief.

If you want to convince C++ programmers to try Ada, It's not a good idea to tell them
"your language is silly, change it"
they would answer, if they take time to answer
"All right, so why do I have less than 1% of job offers in Ada ?, when it will reach 10%, may be I'll
start to think about learning it"

> The result will be more incidents such as the USS Yorktown, dead in the water
> from a software flaw originating in code written in C.    I find it scary that we
> plan to send our young men into battle depending on software created with the
> most error-prone programming language ever invented. Who will take the final
> responsibility for this folly once the finger-pointing begins?

Excellent software can be written in C, and very bad ones can be written in Ada.
If we want to see Ada more widely used, the first thing is to consider it as what it is : nothing more
than a TOOL
It is not realistic to say : this was a disaster because of C, and would not have been with Ada
And no tool is perfect for every purpose
Java is far easier to use for certain purposes than Ada
The biggest mistake of Ada 83 was to forget that it should have an "export" feature instead of thinking
the world would switch it Ada
I don't know if Ada 95 was not too late to correct that.





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00               ` Lao Xiao Hai
  2000-11-10  0:00                 ` Nicolas Brunot
@ 2000-11-10  0:00                 ` Nicolas Brunot
  2000-11-10  0:00                   ` Marin David Condic
  2000-11-11  0:00                   ` Robert Dewar
  2000-11-10  0:00                 ` mjsilva
  2 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Lao Xiao Hai wrote :

> I am currently watching with amusement as hordes of otherwise intelligent
> programmers are forced to learn C++, when Ada is already in place.

Just one little example. Most of software development companies provide software for Windows
This is because if you don't know anything about computers, it is still easier to use a Windows PC than
any other system, and because what you will find in your supermarket has 99% chances being a Windows
PC.
Even if it crashes 10 times a day, it's annoying but not dramatic, and most of them would do worse, or
would do nothing with an OS they don't know how to use.

As far as I know (we use it quite a lot) Win32 components are C components, and even using Ada
interface for Win32, you'd better have some knowledge of C to understand what it's all about.
That's true for any C based software component, and today few companies have no C based software
components to use.
Gnat need gcc ...

So C knowledge is not an option. Most programmers really have to know C.
While most programmers don't know anything about Ada, and are satisfied so far.

Ada users often forget that almost all of them know C as well, and would have a lot problems if they
should'nt.
Telling people than C should be abandonned, and that they don't have to know it is so unrealistic that
it's a good way to make them run from Ada.

For software companies like ours, 99% of our applications world is Windows and C components.
If we want to go on writing 99% of our code in Ada, Ada must bring great benefits (It does),
but it cannot suffer any weakness in any field towards C, and unfortunately there are still some, and
they have to disappear.

That's also true for Linux versus Windows.







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                 ` Nicolas Brunot
@ 2000-11-10  0:00                   ` Larry Kilgallen
  2000-11-10  0:00                     ` Nicolas Brunot
  2000-11-20  0:00                     ` Wes Groleau
  0 siblings, 2 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-10  0:00 UTC (permalink / raw)


In article <3A0BB50B.96F77015@cadwin.com>, Nicolas Brunot <n.brunot@cadwin.com> writes:
> Lao Xiao Hai wrote :
> 
>> HmmmMMMMMmmmm.    Are you suggesting that the "cost to maintain a team
>> of Ada programmers"  is a function of the language?
> 
> No it is just a concern of the company it is to much difficult to find
> programmers and if their cost is too high.
> The company has to deal with the entire development cost, and availability
> of programmers and their turnover has a cost.
> It is quite easy and cheap to find a C++ team in comparison with an Ada
> team, just before you'll find a bunch of C programmers for just one Ada
> programmer.

If you find a C programmer who cannot learn Ada, you have not found a good
programmer.

The economies of staffing up with bad programmers escape me.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00           ` Robert Dewar
@ 2000-11-10  0:00             ` Larry Kilgallen
  0 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-10  0:00 UTC (permalink / raw)


In article <8ufde1$ogf$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> writes:
> In article <3A0ABE18.24CACAFB@acm.org>,
>   Marin David Condic <mcondic.nospam@acm.org> wrote:
>> I'd agree with the "Necessary/Not-Sufficient" part of this
>> statement, but to say that "It Works" is not the MOST
>> important thing, I think is a mistake.
> 
> Your pickup truck example is actually instructive, but you

> Sure, the software must work reasonably well, but to focus on
> correct function to the exclusion of maintainability will result
> in software that does not necessarily work any better on initial
> delivery, and for SURE will start to work worse as it is
> maintained.

Don't worry, Robert.  Marin will no longer take an absolutist
position regarding maintainability being of secondary interest
once he finds that he has to remove the engine from the truck
to refill the fuel tank :-)




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                   ` Larry Kilgallen
@ 2000-11-10  0:00                     ` Nicolas Brunot
  2000-11-10  0:00                       ` Dan Nagle
  2000-11-20  0:00                     ` Wes Groleau
  1 sibling, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Larry Kilgallen wrote :

> If you find a C programmer who cannot learn Ada, you have not found a good
> programmer.
>
> The economies of staffing up with bad programmers escape me.

Every C programmer can learn Ada. More than that, every valuable programmer in any language
can learn Ada.
The problem is to find one wants to ...
If you have to be responsible for development and staff costs in a company,
this problem should quite quickly show its evidence ...






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                       ` Dan Nagle
@ 2000-11-10  0:00                         ` Nicolas Brunot
  2000-11-10  0:00                           ` Larry Kilgallen
  2000-11-11  0:00                           ` Robert Dewar
  0 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Dan Nagle wrote:

> Is there any other _engineering_ decision which is allowed to be
> made by HR?

In software development everything is tightly related.
Bill Gates and Larry Ellison are ingeneers who knew how to combine everything.
I think quite a lot of companies would like to have their success whatever you
think of their products.
If you want companies to use Ada, don't tell them that Microsoft or Oracle are
failures
(Unless you prove you can make better than them, but in that case you would be as
famous as them ...)





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                         ` Nicolas Brunot
@ 2000-11-10  0:00                           ` Larry Kilgallen
  2000-11-10  0:00                             ` Nicolas Brunot
  2000-11-11  0:00                           ` Robert Dewar
  1 sibling, 1 reply; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-10  0:00 UTC (permalink / raw)


In article <3A0C03BE.C3216454@cadwin.com>, Nicolas Brunot <n.brunot@cadwin.com> writes:
> Dan Nagle wrote:
> 
>> Is there any other _engineering_ decision which is allowed to be
>> made by HR?
> 
> In software development everything is tightly related.
> Bill Gates and Larry Ellison are ingeneers who knew how to combine everything.
> I think quite a lot of companies would like to have their success whatever you
> think of their products.
> If you want companies to use Ada, don't tell them that Microsoft or Oracle are
> failures
> (Unless you prove you can make better than them, but in that case you would be as
> famous as them ...)

I think few in this newsgroup equate "good" with "famous".




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                           ` Larry Kilgallen
@ 2000-11-10  0:00                             ` Nicolas Brunot
  2000-11-11  0:00                               ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Larry Kilgallen wrote :

> I think few in this newsgroup equate "good" with "famous".

I think you are quite right.
Unfortunately, I also think that notion of good is not necessarily the same for a software
engineer and a software user.
That is certainly part of the explanation.
If you want Ada to be used by companies, it's better to follow the notion of good according
to users who are not computers fans, but are companies customers.
Personally I think that Oracle products and not really bad ones ...
I must also aknowledge that my small home computer which is an old Pentium 150 which I
never tur on more than 15mns a day is under Win98
For the use I make of it, It works well enough, and using another OS would make me loose
time for things I'm not interested in.
I'm the first convinced of the qualities of Linux or others, but for me this PC is a tool
and not a toy, and I won't spent even half an hour to change something on it since I'm
satisfied with it.
May be that's why Bill Gates is so rich ...






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                   ` Marin David Condic
  2000-11-10  0:00                     ` Randy Brukardt
  2000-11-10  0:00                     ` Nicolas Brunot
@ 2000-11-10  0:00                     ` Ole-Hjalmar Kristensen
  2 siblings, 0 replies; 168+ messages in thread
From: Ole-Hjalmar Kristensen @ 2000-11-10  0:00 UTC (permalink / raw)


Marin David Condic <mcondic.nospam@acm.org> writes:

> You are correct about the Windows/PC/C situation. While you *can* develop apps in Ada for this platform,
> you are swimming against the tide in many respects. The OS interface is C, there are tons of C/C++ oriented

This is also the case with Unix, of course. It's pity that the
compiler vendors in general do not deliver a more complete OS
interface in Ada. And I don't buy the idea that it's just as easy to
to roll your own or use some Posix interface which (hopefully) does
what you need. It may not be a major obstacle to the use of Ada, but
it IS an obstacle.

> development tools, etc. From a market standpoint, you can't afford to ignore the Windows environment. If
> you're going to develop there, you'll have to know C (to some extent) just to use the OS. If you want to
> get to market ahead of your competition, you will need all the leverage you can get - which is generally
> C/C++ tools. Its hard to fight against that.
> 
> MDC
> 
> Nicolas Brunot wrote:
> 
> > For software companies like ours, 99% of our applications world is Windows and C components.
> > If we want to go on writing 99% of our code in Ada, Ada must bring great benefits (It does),
> > but it cannot suffer any weakness in any field towards C, and unfortunately there are still some, and
> > they have to disappear.
> >
> 
> --
> ======================================================================
> Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
> Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
> Visit my web site at:  http://www.mcondic.com/
> 
>     "Giving money and power to Government is like giving whiskey
>     and car keys to teenage boys."
> 
>         --   P. J. O'Rourke
> ======================================================================
> 
> 

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                   ` Marin David Condic
  2000-11-10  0:00                     ` Randy Brukardt
@ 2000-11-10  0:00                     ` Nicolas Brunot
  2000-11-10  0:00                       ` David Starner
  2000-11-11  0:00                       ` Robert Dewar
  2000-11-10  0:00                     ` Ole-Hjalmar Kristensen
  2 siblings, 2 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-10  0:00 UTC (permalink / raw)


Marin David Condic wrote :

> You are correct about the Windows/PC/C situation. While you *can* develop apps in Ada for this platform,
> you are swimming against the tide in many respects. The OS interface is C, there are tons of C/C++ oriented
> development tools, etc. From a market standpoint, you can't afford to ignore the Windows environment. If
> you're going to develop there, you'll have to know C (to some extent) just to use the OS. If you want to
> get to market ahead of your competition, you will need all the leverage you can get - which is generally
> C/C++ tools. Its hard to fight against that.

I would just add that fighting against that is not 'hard'. It simply makes your company disappear in short
time.
We would like to see more Ada users understand that.






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00             ` Nicolas Brunot
  2000-11-09  0:00               ` Robert Dewar
@ 2000-11-10  0:00               ` Brian Rogoff
  1 sibling, 0 replies; 168+ messages in thread
From: Brian Rogoff @ 2000-11-10  0:00 UTC (permalink / raw)


Good, I'm glad we can behave like professionals, and it restores a bit of 
my faith in human nature that you apologized. 

-- Brian

On Thu, 9 Nov 2000, Nicolas Brunot wrote:

> That's right, sorry to have said that.
> 
> I had often the opportunity to 'discuss' with R.Dewar and there is obviously a
> very different point of view from people using Ada without having any
> responsability in time and costs for develoments, and those who have.
> If you have huge freedom in time available and costs, and nothing to report to
> anybody about that, and no concerns about making a lot of people going away
> from Ada, he is surely a good theory guy.
> But if you have to deal with time, costs and efficiency, its way of thinking
> leads to disaster.
> I mentionned his name because the 'bit manipulation thread' was illustrating
> that quite well, and because I think that talking about advertising, it's
> important to let people know that a lot of Ada users are strongly against its
> unquestionable approach of programming which is absolutely unrealistic
> economically speaking.
> 
> That should have been explained without mentioning names.
> 
> Brian Rogoff wrote:
> 
> > On Wed, 8 Nov 2000, Nicolas Brunot wrote:
> > > I personally wouldn't like to ride on an airplane programmed by R.Dewar
> > > who would certainly explained he expected the plane to crash because
> > > the compiler behaves as he expects ...
> >
> > It's this kind of post that makes me think this newsgroup is a waste of
> > time. Do you so rapidly descend into personal attacks with your colleagues
> > at work too? Can I infer from this post that I don't want to use any piece
> > of software written by Nicolas Brunot because he's so wrapped up in some
> > personal vendetta against Robert Dewar that he obviously can't think
> > straight, and goes off posting insults on a technical newsgroup? Are you
> > one of those people who thinks nothing of littering or newsgroup spam?
> >
> > Moderation would make this a better group I think, but as I recall there
> > has been little interest in doing it.
> >
> > -- Brian
> 
> 





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00               ` Lao Xiao Hai
  2000-11-10  0:00                 ` Nicolas Brunot
  2000-11-10  0:00                 ` Nicolas Brunot
@ 2000-11-10  0:00                 ` mjsilva
  2 siblings, 0 replies; 168+ messages in thread
From: mjsilva @ 2000-11-10  0:00 UTC (permalink / raw)


In article <3A0B68EF.A06B276D@ix.netcom.com>,
  Lao Xiao Hai <laoxhai@ix.netcom.com> wrote:
>
> I am currently watching with amusement as hordes of otherwise
intelligent
> programmers are forced to learn C++, when Ada is already in place.
One
> prominent member of the DoD software community said to me
recently, "We have
> all this legacy Ada code that we need to port to Java technology."
He is
> making his decision on the recommendation of someone who, in my
opinion,
> is not experienced enough in Ada or C++ to make such a judgement.
Another
> said, "In my last command they told me that Ada was pretty much dead
since
> the mandate went away."
>
> Meanwhile, C++, a language which can best be characterized as "its own
> virus,"  is being stuffed down the intellectual maw of a lot of
programmers
> who already know Ada 83 and need only to be updated on the technology
> of the current standard.   Transitioning good Ada to C++ is so silly
that it
> defies belief.
>
> The result will be more incidents such as the USS Yorktown, dead in
the water
> from a software flaw originating in code written in C.    I find it
scary that we
> plan to send our young men into battle depending on software created
with the
> most error-prone programming language ever invented. Who will take
the final
> responsibility for this folly once the finger-pointing begins?

As someone looking at all this from the outside I am just amazed.
Moving critical projects from one of the safest languages available to
some of the most unsafe languages is progress?!  There are plenty of
warnings in e.g. NASA's and DoD's own literature against using these
unsafe languages in critical work, but the march goes on.  Is anybody
minding the store?  Are we heading for another critical-systems
software crisis as these systems get delivered, modified and variously
hammered on?

Mike


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                     ` Nicolas Brunot
@ 2000-11-10  0:00                       ` Dan Nagle
  2000-11-10  0:00                         ` Nicolas Brunot
  0 siblings, 1 reply; 168+ messages in thread
From: Dan Nagle @ 2000-11-10  0:00 UTC (permalink / raw)


Hello,

Nicolas Brunot wrote:
> 
<snip requoted discussion>

> If you have to be responsible for development and staff costs in a company,
> this problem should quite quickly show its evidence ...

Is there any other _engineering_ decision which is allowed to be
made by HR?

-- 

Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  2:15               ` Ken Garlington
@ 2000-11-10  0:00                 ` Marin David Condic
  0 siblings, 0 replies; 168+ messages in thread
From: Marin David Condic @ 2000-11-10  0:00 UTC (permalink / raw)


I'm wondering now if there is an introductory programming text for any language
that *doesn't* use the "Swap" example somewhere. It does illustrate some basic
concepts, like what it means to use a variable for storage of data.

MDC

Ken Garlington wrote:

> Never mind the textbook - look up the definition of Exchange in the generics
> chapter of the ARM!

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                 ` Nicolas Brunot
@ 2000-11-10  0:00                   ` Marin David Condic
  2000-11-10  0:00                     ` Randy Brukardt
                                       ` (2 more replies)
  2000-11-11  0:00                   ` Robert Dewar
  1 sibling, 3 replies; 168+ messages in thread
From: Marin David Condic @ 2000-11-10  0:00 UTC (permalink / raw)


You are correct about the Windows/PC/C situation. While you *can* develop apps in Ada for this platform,
you are swimming against the tide in many respects. The OS interface is C, there are tons of C/C++ oriented
development tools, etc. From a market standpoint, you can't afford to ignore the Windows environment. If
you're going to develop there, you'll have to know C (to some extent) just to use the OS. If you want to
get to market ahead of your competition, you will need all the leverage you can get - which is generally
C/C++ tools. Its hard to fight against that.

MDC

Nicolas Brunot wrote:

> For software companies like ours, 99% of our applications world is Windows and C components.
> If we want to go on writing 99% of our code in Ada, Ada must bring great benefits (It does),
> but it cannot suffer any weakness in any field towards C, and unfortunately there are still some, and
> they have to disappear.
>

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00 if statements James Hassett
@ 2000-11-10  0:02 ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-10  0:02 UTC (permalink / raw)


In article <200011091641.KAA05352@alonzo.tds-eagan.lmco.com>,
  comp.lang.ada@ada.eu.org wrote:

> We rarely need to forgive Robert for
> technical errors, so I'm willing to cut him some slack here.

Ahem! Message 22/77 in my newsreader (posted by Ken Garlington
two days ago, first pointed out this obvious error). Not only
do I of course notice an error like this, but I also read the
entire thread before answering :-) :-)

As I made clear, I was showing how to rewrite the offered
solution (I quoted the original, and referred to the "above").
Since I was talking about style changes, I did not want to
confuse things by making a substantive change since I assumed
that everyone reading the thread was fully aware of it given
Ken's post!

By the way, you started a new thread (at least that's what
my newsreader says) instead of following up the previous
thread with this title (perhaps you are trying to foil those
of us who do use threaded newsreaders, and are careful to
read all messages in a thread before replying .... :-)

So, no slack needed!

> Another problem (as noted by some already) is that the
> original problem asked for an if statement, not a procedure,
> so we would need to trim Robert's solution down to the if
> statement.

Again, I was not trying to convince the doubting CLA hoardes
that Robert Dewar could have successfully handed in a correct
solution to this complex assignment, but rather I was making
style comments on the particular procedure previously posted :-)


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00               ` Robert Dewar
@ 2000-11-10  0:08                 ` Ehud Lamm
  0 siblings, 0 replies; 168+ messages in thread
From: Ehud Lamm @ 2000-11-10  0:08 UTC (permalink / raw)


Robert Dewar <robert_dewar@my-deja.com> wrote in message news:8ufcg9> This
is surely the first time ever that anyone has accused
> me of being a "theory guy"
>

Perhaps in theory you are a "theory guy", and in practice a "practice guy"

In theory, I believe, there is not much of a difference....

(Good excuse to practice the "use/mention" distinction).


--
Ehud Lamm   mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm <==  Me!








^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00           ` Robert Dewar
@ 2000-11-10  0:12             ` Ehud Lamm
  2000-11-10  2:09             ` Ken Garlington
  2000-11-20  0:00             ` Wes Groleau
  2 siblings, 0 replies; 168+ messages in thread
From: Ehud Lamm @ 2000-11-10  0:12 UTC (permalink / raw)



Robert Dewar <robert_dewar@my-deja.com> wrote
> I disagree, this is long-nameitis carried to absurd extremes.
> Rewritten the way I had it the life time of Temp is three
> lines and it is obvious that it is initialized with the value
> of A. It merely obfuscates code to use long names where they
> do not help the reader. I actually think a more appropriate
> choice of name would have been T :-)
>

Sometimes I just love you!

Please help us get rid of names like
long_name_instead_of_temp_which_R_Dewar_would_have_called_T

What's important is readbility. Meaningful names are important. Long length
is really not a substitute for good names. Most often, the reverse.


--
Ehud Lamm   mslamm@mscc.huji.ac.il
http://www.cafepress.com/ehudlamm <==  Some art








^ permalink raw reply	[flat|nested] 168+ messages in thread

* Subsetting Ada
  2000-11-09  5:04           ` Robert Dewar
@ 2000-11-10  0:27             ` Ted Dennison
  0 siblings, 0 replies; 168+ messages in thread
From: Ted Dennison @ 2000-11-10  0:27 UTC (permalink / raw)


Robert Dewar wrote:

> In Ada I achieve that by writing in a rather simple subset
> of the language (I am always amazed by the fearless behavior
> of some Ada programmers in using the most complex parts of
> the language without hesitation :-)

Do you have a paper published somewhere on this? I'm interested because
it sounds like you've gone over this with others before, and I'd be
interested in reading the specifics.

I do seem to remember some old posts where you mentioned that you took
this approach with Gnat. But I always thought that was just so you could
bootstrap it as early as possible.

--
T.E.D.

Home - mailto:dennison@telepath.com  Work - mailto:dennison@ssd.fsi.com
WWW  - http://www.telepath.com/dennison/Ted/TED.html  ICQ  - 10545591





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00         ` Marin David Condic
  2000-11-09  0:00           ` Robert Dewar
@ 2000-11-10  1:58           ` Ken Garlington
  2000-11-10  3:53             ` Robert Dewar
  1 sibling, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-10  1:58 UTC (permalink / raw)


"Marin David Condic" <mcondic.nospam@acm.org> wrote in message
news:3A0ABE18.24CACAFB@acm.org...
: Robert Dewar wrote:
:
: > If there is one thing in the Ada world that one expects it is
: > to get away from th idea that the MOST important thing about
: > code is that "it WORKS". Ada is about building reliable,
: > maintainable software, and the fact that it works is necessary
: > but no where *near* sufficient.
:
: I'd agree with the "Necessary/Not-Sufficient" part of this statement,
: but to say that "It Works" is not the MOST important thing, I think is a
: mistake. There are a lot of important qualities I excpect from my
: pick-up truck. If I go out front, stick the key in it and it doesn't
: start, then there isn't much point in having it take up all that space
: in my driveway that could be occupied by nice, useful, air.

What if your choice was

(a) Occasionally doesn't work (i.e. doesn't start on cold days)
(b) Works (starts) every time, but occasionally the tires fail, you flip
over and die?

: "Works" is
: the only excuse for having bothered to build it at all. Along the way,
: we probably add things like "Looks Sharp", "Safe To Operate", "More
: Power (argh! argh! argh!)" "Hold A Ton Of Bricks" as other valuable and
: important requirements, but take away any of those things and having the
: truck might still be justifiable.
:
: I've seen lots of *REAL CRAP* software that had the quality of "Works"
: and found it could still be profitable to use it. I've picked up
: unbelievably (well, maybe believably) bad C code that reliably performed
: some function and incorporated it into a product with the eye towards
: freezing it there, never to be touched again - under penalty of law.
: Should the programmer be spanked? Yup. Real hard and real often. "Bad
: Programmer! No Cookie!" But the quality of "Works" was still there.
:
: MDC
: --
: ======================================================================
: Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
: Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
: Visit my web site at:  http://www.mcondic.com/
:
:     "Giving money and power to Government is like giving whiskey
:     and car keys to teenage boys."
:
:         --   P. J. O'Rourke
: ======================================================================
:
:





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00           ` Robert Dewar
  2000-11-10  0:12             ` Ehud Lamm
@ 2000-11-10  2:09             ` Ken Garlington
  2000-11-20  0:00               ` Wes Groleau
  2000-11-20  0:00             ` Wes Groleau
  2 siblings, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-10  2:09 UTC (permalink / raw)


"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:8ufd4n$obj$1@nnrp1.deja.com...

: > Actually, I would also nitpick the choice of "Temp," when
: > better options are available (Initial_A, or the really
: > expressive Initial_Value_of_A).
:
: I disagree, this is long-nameitis carried to absurd extremes.
: Rewritten the way I had it the life time of Temp is three
: lines and it is obvious that it is initialized with the value
: of A. It merely obfuscates code to use long names where they
: do not help the reader. I actually think a more appropriate
: choice of name would have been T :-)

However, it's obvious it's "temporary" (i.e. has a limited scope) just from
where it's declared. The name doesn't add any value. I think what you may
actually be saying is that "everyone understands the pattern for swapping
two variables, so there's no point in worrying about the name." I would have
agreed with this, EXCEPT for the earlier post in this thread* that indicated
that beginning students DIDN'T always grasp the "obviousness" of this
pattern. Therefore, for those people, Initial_A may be worth the five extra
keystrokes.

* I'm referring to the discussion about wine and beer, which for some reason
I was able to remember :)

P. S. Here's how I would explain the swap pattern: "Imagine picking up two
very large steins of beer. Now, think about having to exchange the two
steins between your left and right hands. You probably have to put one of
the steins on the table, move the other stein from one hand to the
(now-empty) other hand, then pick back up the first stein from the table.
'A' and 'B' are your hands, 'Temp' is the table."





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-09  0:00             ` Florian Weimer
@ 2000-11-10  2:13               ` Ken Garlington
  2000-11-10  5:59                 ` Brian Rogoff
  0 siblings, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-10  2:13 UTC (permalink / raw)


"Florian Weimer" <fw@deneb.enyo.de> wrote in message
news:87em0ley6l.fsf@deneb.enyo.de...
: Robert A Duff <bobduff@world.std.com> writes:
:
: > > Thanks for highlighting this one - I've been bleeting on about this
locally
: > > (and even in c.l.a. once!) for ages to collegues.
: >
: > Me, too.  IMHO, constant should be the *default*, and you should have to
: > say "var" or something to declare a variable; then people would be less
: > likely to make this mistake.  In fact, that *is* the way parameters work
: > ("in" is the default).  It seems inconsistent that object declarations
: > work differently.
:
: Following these lines, you probably should mandate proper tail
: recursion as well. ;-)

Oddly enough, I'm learning Erlang, where assignments (bindings) do produce
constants, and there are no variable declarations per se. The Erlang book
also promotes (but does not require) tail recursion. Once you get used to
it, there's a certain elegance to a functional language of this type.





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00             ` Marin David Condic
@ 2000-11-10  2:15               ` Ken Garlington
  2000-11-10  0:00                 ` Marin David Condic
  2000-11-18  0:00               ` John Magness
  1 sibling, 1 reply; 168+ messages in thread
From: Ken Garlington @ 2000-11-10  2:15 UTC (permalink / raw)


"Marin David Condic" <mcondic.nospam@acm.org> wrote in message
news:3A0AB8A1.A4C42C90@acm.org...
: Maybe even an example of a "Swap" program? That *is* a
: rather popular example to put in textbooks, isn't it?

Never mind the textbook - look up the definition of Exchange in the generics
chapter of the ARM!





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-10  1:58           ` Ken Garlington
@ 2000-11-10  3:53             ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-10  3:53 UTC (permalink / raw)


In article <RCIO5.9726$pq3.778108@news.flash.net>,
  "Ken Garlington" <Ken.Garlington@computer.org> wrote:

> What if your choice was
>
> (a) Occasionally doesn't work (i.e. doesn't start on cold
>     days)
> (b) Works (starts) every time, but occasionally the tires
>     fail, you flip over and die?

to choose a far-fetched example :-) :-)

very nice Ken!



Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: constants v variables (was Re: if statements)
  2000-11-10  2:13               ` Ken Garlington
@ 2000-11-10  5:59                 ` Brian Rogoff
  0 siblings, 0 replies; 168+ messages in thread
From: Brian Rogoff @ 2000-11-10  5:59 UTC (permalink / raw)


On Fri, 10 Nov 2000, Ken Garlington wrote:
> "Florian Weimer" <fw@deneb.enyo.de> wrote in message
> : Robert A Duff <bobduff@world.std.com> writes:
> : > Me, too.  IMHO, constant should be the *default*, and you should have to
> : > say "var" or something to declare a variable; then people would be less
> : > likely to make this mistake.  In fact, that *is* the way parameters work
> : > ("in" is the default).  It seems inconsistent that object declarations
> : > work differently.
> :
> : Following these lines, you probably should mandate proper tail
> : recursion as well. ;-)
> 
> Oddly enough, I'm learning Erlang, where assignments (bindings) do produce
> constants, and there are no variable declarations per se. The Erlang book
> also promotes (but does not require) tail recursion. Once you get used to
> it, there's a certain elegance to a functional language of this type.

Yes, Erlang is nice, though as an Ada fan you should also consider learning 
a (mostly) functional language with strong typing and a module system. You 
may (or may not) be surprised to learn that strong static typing does not 
imply "lots of type declarations". 

With regards to tail recursion, or last call optimization, I don't think
Erlang provides iterative constructs so it had better damned well
optimize tail calls! 

If you'd really like to blow your mind (without drugs that is) then read
Chris Okasaki's "Purely Functional Data Structures". 

Its an amazingly stupid world that we live in, that accepts languages like 
Java as great advances in the state of the art...

-- Brian





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03 14:42 if statements sc297
                   ` (3 preceding siblings ...)
  2000-11-07  0:00 ` John English
@ 2000-11-10  6:09 ` DJack143
  2000-11-11  0:00   ` Here we go again (Was: if statements) Frank Christiny
  4 siblings, 1 reply; 168+ messages in thread
From: DJack143 @ 2000-11-10  6:09 UTC (permalink / raw)


if you have not gotten a reply yet:

Make the declaration:

a, b, temp : type -- whatever you type is

begin
   ---your code here
   if  a > b then
      temp =: a;
      a := b; 
      b := temp;
   end if;
... -- more code here
end;

--this will work but a procedure would probably be better.

good luck

don





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                         ` Nicolas Brunot
  2000-11-10  0:00                           ` Larry Kilgallen
@ 2000-11-11  0:00                           ` Robert Dewar
  2000-11-13  0:00                             ` Nicolas Brunot
                                               ` (2 more replies)
  1 sibling, 3 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-11  0:00 UTC (permalink / raw)


In article <3A0C03BE.C3216454@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> If you want companies to use Ada, don't tell them that
> Microsoft or Oracle are failures
> (Unless you prove you can make better than them, but in that
> case you would be as famous as them ...)


No, Microsoft is not successful in terms of quality, but in
terms of quantity. This is a perfectly valid goal, and indeed
is the road to riches. Ford was much more successful than
Bugatti, but I do not think people confuse this with the
quality of the cars.

Just because BMW does not have a 90% market share does not
mean that Ford makes better cars today.

If your goal is to have companies like Microsoft use Ada,
then fine, you can emphasize that Ada can hold its own just
fine in environments like this from a technical point of view,
but realistically, it will be non-technical factors that
govern the choice in an environment like Microsoft, where
software reliability is not a primary goal (time to market
and fancy features are much more important in that market).

Sometimes I wonder whether typical PC software is not a repeat
of the red delicious apple debacle (where the suppliers thought
that what consumers wanted was a nice looking apple and they
succeeded, unfortunately, people are not actually buying them
because they were also looking for a nice tasting apple. You
and I as tax payers are about to lauch one of the biggest
bailouts of its kind in history to rescue that industry).

In the PC World, people are simply accustomed to unrealiable
software that does strange things and breaks all the time. One
of the most remarkable bugs of all time was the bug in Windows
95 that caused it to realiable crash after a few days, but no
one noticed, because this crash just appeared to be normal
operation in the unlikely event that you could keep your
Windows 95 machine running that long.

Where Ada *is* succesful is in large scale projects requiring
high reliability. This is NOT an area in which the supposed
success of Microsoft in the software field is necessarily
such a clear plus :-)

A very interesting view of the future is that high reliability
software will become more important. For example, the ebay
application is certainly not safety critical, but it is worth
literally billions of dollars, in that if it fails, the stock
of ebay can take a hit at this level (and indeed has on more
than one occasion). The resources certainly exist at ebay to
create a completely reliable system. What does not exist is
an awareness that this is achievable.

Now of course Ada is not a magic bullet for achieving
reliability, sufficiently incompetent programmers can create
junk in any language, and sufficiently competent programmers can
create reliable software in absolute machine language (e.g. the
inner core executive of the ICL 1900 series machines).

But Ada, and the philosophy that surrounds Ada *can* be
significant aids in achieving realiability.

I think it is ultimately a more successful path for pushing
Ada use to emphasize the role that Ada can play in improving
reliability, rather than trying to make the point that it can
work well in the current world of get-it-out-the-door,
working-more-or-less-is-all-that-matters software delivery.
(a recent thread on whether "works OK" is the most important
aspect of software performance is relevant here).

Robert Dewar


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                             ` Nicolas Brunot
@ 2000-11-11  0:00                               ` Robert Dewar
  2000-11-12  6:54                                 ` Brian Rogoff
  0 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-11  0:00 UTC (permalink / raw)


In article <3A0C0C98.EB19F7E8@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:

> Unfortunately, I also think that notion of good is not
> necessarily the same for a software engineer and a software
> user.

Good is much too vague a term to use in the marketplace. Instead
you need to look at meeting various needs. If you sell model
trains, they need to work reasonably well, but if every now
and then they bounce off the tracks that's annoying but not
disastrous, and if it only happens once a week, it is not
clear that model train buyers will pay 10 times as much for
complete reliability (as an Marklin Z scale enthusiast, I
certainly wouldn't that stuff is expensive enough already :-)

SO model trains can be "good" without being 100% reliable

But if you now decide to build *real* high speed trains, the
criterion changes, and they had better be orders of magnitude
more reliable. So real trains definitely cannot be "good"
without going to the expense of achieving something close to
absolute reliability.

Some things have even less reliability requirements than
my model trains, somethings more than real trains (e.g. a
nuclear reactor control program).

So "good" has to be qualified by requirements. Ada obviously
has its greatest strengths where high realibility IS a
requirement. There is nothing wrong in Nicolas attempt to
duplicate Microsoft's success in the world of relatively
low reliability requirements, where (at least in Microsofts
case) having thousands of known problems does not inhibit you
from releasing software, but I don't think this is where Ada
can make its biggest strides.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                 ` Nicolas Brunot
  2000-11-10  0:00                   ` Marin David Condic
@ 2000-11-11  0:00                   ` Robert Dewar
  2000-11-13  0:00                     ` gdemont
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-11  0:00 UTC (permalink / raw)


In article <3A0BC243.4A9CFC90@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> Just one little example. Most of software development
companies provide software for Windows
> This is because if you don't know anything about computers, it
is still easier to use a Windows PC than
> any other system, and because what you will find in your
supermarket has 99% chances being a Windows
> PC.
> Even if it crashes 10 times a day, it's annoying but not
dramatic, and most of them would do worse, or
> would do nothing with an OS they don't know how to use.


An interesting assessment, my own observation is that a lot
of people find a Windows PC really *quite* difficult to use.
The success of the Mac (remember it has a significant slice
of a very large market) is certainly based on this, and for
an even better example of what can be achieved by concentrating
on reliability and usability, look at Palm OS vs Win CE.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                     ` Nicolas Brunot
  2000-11-10  0:00                       ` David Starner
@ 2000-11-11  0:00                       ` Robert Dewar
  2000-11-13  0:00                         ` Nicolas Brunot
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-11  0:00 UTC (permalink / raw)


In article <3A0C0E6C.C0218812@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> I would just add that fighting against that is not 'hard'.
> It simply makes your company disappear in short time.
> We would like to see more Ada users understand that.

That's wrong as a generalization. We know many Ada users
who regard Ada as the key to having some chance of producing
realiable software for the NT environment.

Most certainly if Nicolas finds that using Ada is making his
company disappear in short time, he is doing something wrong.
Either Ada is the wrong choice *for him* or the company or
development effort is being otherwise mismanaged, but it is
bogus for him to assume that his experience necessarily
generalizes to all other companies!



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Here we go again (Was: if statements)
  2000-11-10  6:09 ` DJack143
@ 2000-11-11  0:00   ` Frank Christiny
  0 siblings, 0 replies; 168+ messages in thread
From: Frank Christiny @ 2000-11-11  0:00 UTC (permalink / raw)


      Another example of someone who doesn't bother to read a
   thread before posting.  Who said Ada programmers where better
   prepared than other programmers?  How many more of these guys
   exist out there doing profesional work?  Now, I am scared...

-- 
Frank Christiny                       fchris@pdq.net
Sr. Software Engineer                 Lockheed Martin Space Operations
Houston, Texas, USA                   http://freeweb.pdq.net/fchris/



DJack143 wrote:
> 
> if you have not gotten a reply yet:
> 
> Make the declaration:
> 
> a, b, temp : type -- whatever you type is
> 
> begin
>    ---your code here
>    if  a > b then
>       temp =: a;
>       a := b;
>       b := temp;
>    end if;
> ... -- more code here
> end;
> 
> --this will work but a procedure would probably be better.
> 
> good luck
> 
> don




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                     ` Randy Brukardt
@ 2000-11-11  0:00                       ` Marin David Condic
  2000-11-15  0:00                         ` Lao Xiao Hai
  0 siblings, 1 reply; 168+ messages in thread
From: Marin David Condic @ 2000-11-11  0:00 UTC (permalink / raw)


Randy Brukardt wrote:

> Well, that's the point of Claw: to allow people to develop for Windows
> without needing to know C. (And, I'd expect that various other people
> working on GUI tools would say the same.)
>

From what I've seen of CLAW, it is a very good tool for PC development. As
soon as I can find an appropriate project in which to apply it, I intend to
do so. Mostly the problems have to do with existing software, business
decisions, etc., that make it difficult to split from the MSVC++ environment
currently used.

There's also the issue of it being easier for me to sell Ada internally if I
can argue that the same stuff will run on Unix and on the PC. For an app
with little to no GUI interface (CLI oriented or just a background job) this
is easy to do. However, a lot of the tool opportunities we get are going to
need a GUI.

Like I said, what I know of CLAW indicates it will do well for PC
development, but you've got to consider other platforms. Of course, MSVC++
leaves you quite thoroughly bound to the PC anyway, so in this sense, you're
no worse off. But you're still working against history and as new features
are added to the OS, you'd be lagging behind with tools that come from
places other than Micro$oft. (Unless you do your own bindings - and then
you've got to know C++! :-)

>
> I would say that we've failed if C knowledge is still necessary.
>

Not necessarily. For most basic things, you certainly wouldn't have to know
C. However, if you ever want to read the Micro$oft documentation or
otherwise work to understand what is available in the OS, you've got to have
some C knowledge just because that is where it all comes from.

Now if there was an OS written in Ada and documented accordingly, you'd have
everything native for you. Hmmmmmm....... :-)

>
> (Before someone complains, I would probably agree in some ways that we
> have failed. One of the original pillars for Claw was a Petzold-like
> book with all of the examples in Ada 95 using Claw. But we never found
> anyone capable enough in Ada 95, Windows, and writing to create it. [Two
> out of three isn't enough.] And, if you have to extend beyond the
> boundaries of Claw, you'll end up needing to know C. But certainly such
> knowledge is not necessary for many applications.)
>

Yes, a really good book would be a major advantage. Something that drilled
you through the basic "Hello World" on through using all the complex
features available in Windows. That's one of the reasons it is hard to fight
against C++ here. I can buy MSVC++ and have a CD full of documentation &
examples, all hypertexted out. I can go to Barnes & Noble and buy a bunch of
"Intro to programming Windows" and "Advanced programming with Windows" books
and be able to get up to speed doing the job. CLAW - as good as it may be -
just doesn't have that wealth of educational material available :-(

I recall a few years ago picking up the Aonix compiler and trying to fool
around with the GUI builder, etc. I was very new to the Windows programming
scene. Unfortunately, the experience was very rough. What documentation was
available kept referring to MS documents for the explanation of various
features and, unfortunately, that wasn't available to me at the time. I also
didn't understand things like resource files, the window mechanisms, the
message loop, etc., and all this was presumed knowledge. My ignorance is
certainly not the fault of Aonix, but it would have made it easier to use
their product if it came with good tutorials, books and documentation.
Material was there - it just didn't go far enough.

Maybe it would be productive to find a good book oriented towards
programming with MSVC++ and using that as a model for writing a book on
programming with CLAW? At least that way, you'd have a successful outline to
start from and you'd just have to translate the topics into CLAW/Ada
examples?

MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-12  6:54                                 ` Brian Rogoff
@ 2000-11-12  0:00                                   ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-12  0:00 UTC (permalink / raw)


In article
<Pine.BSF.4.21.0011112244470.19089-100000@shell5.ba.best.com>,
  Brian Rogoff <bpr@shell5.ba.best.com> wrote:

> Perhaps, but IMO Ada is no more difficult to use than C or C++
> (quite the  opposite in my case) even when adopting a slapdash
> "hack until it works"  non-methodology.

Sure, I think that most (or in fact pretty much all Ada
enthusiasts contributing to CLA) would agree with that
statement, but that's not what I was talking about. I
was talking about where you can practically expect to
extend the use of Ada.

I certainly am all in favor of any other kinds of efforts
to extend the use and awareness of Ada, because I am in
favor of reliable software (yes, it also corresponds to
my interest (in the other sense) in Ada Core Technologies),
but I think those of you who know me know that my enthusiasm
for Ada long predates my financial interest in ACT :-) :-)

Indeed Ada Core Technologies is doing its best to promote the
spread of Ada at all levels, and our current work on GVD, the
new visual interface for GDB, written by the GtkAda team using
the GtkAda technology, is an exciting opportunity for
introducing more of the world to Ada :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                               ` Robert Dewar
@ 2000-11-12  6:54                                 ` Brian Rogoff
  2000-11-12  0:00                                   ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: Brian Rogoff @ 2000-11-12  6:54 UTC (permalink / raw)


On Sat, 11 Nov 2000, Robert Dewar wrote:
> So "good" has to be qualified by requirements. Ada obviously
> has its greatest strengths where high realibility IS a
> requirement. There is nothing wrong in Nicolas attempt to
> duplicate Microsoft's success in the world of relatively
> low reliability requirements, where (at least in Microsofts
> case) having thousands of known problems does not inhibit you
> from releasing software, but I don't think this is where Ada
> can make its biggest strides.

Perhaps, but IMO Ada is no more difficult to use than C or C++ (quite the 
opposite in my case) even when adopting a slapdash "hack until it works" 
non-methodology. I've found that even if I do that I can lazily rely on
Ada's rigorous type checking to get working code more quickly. So I
wouldn't be so quick to disregard the more mundane world of "lower"
reliability development. Indeed, it may be a selling point that if your
developers are using Ada they get a bit more reliability for free.

-- Brian





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                       ` Robert Dewar
@ 2000-11-13  0:00                         ` Nicolas Brunot
  0 siblings, 0 replies; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar wrote ;

> In article <3A0C0E6C.C0218812@cadwin.com>,
>   Nicolas Brunot <n.brunot@cadwin.com> wrote:
> > I would just add that fighting against that is not 'hard'.
> > It simply makes your company disappear in short time.
> > We would like to see more Ada users understand that.
>
> That's wrong as a generalization. We know many Ada users
> who regard Ada as the key to having some chance of producing
> realiable software for the NT environment.

Which is exactly what we've been doing quite successfully for more than
10 years and we intend to to go on  :-)
I don't know a lot of CAD and Oracle applications as complex as ours
entirely written in Ada
The problem is that among Windows programmers (or every other OS
programmers), Ada users are everything but 'many'

Do Ada users want it to remain a confidential language, or do they want
it to be used by many programmers, which means many companies, because
most programmers write softwares because it's their job, and because
they get paid for that by a company. Otherwise, they would do something
else.

Of course in the first case, some people are very proud to be part of an
'elite' and for that it's far easier to stay in his own small world, and
keep it very small, so you have less chance finding stupid people making
better software than you, and achieving things you claim impossible.

But in the second case, you would be more likely to find easily Ada
components and people to develop.


> Most certainly if Nicolas finds that using Ada is making his
> company disappear in short time, he is doing something wrong.
> Either Ada is the wrong choice *for him* or the company or
> development effort is being otherwise mismanaged, but it is
> bogus for him to assume that his experience necessarily
> generalizes to all other companies!

The wrong choice is denying the fact that Windows and moreover C
components are almost everywhere in software world, and that you can't
ignore it.
Please just take the time to read the posts before answering :-)






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                           ` Robert Dewar
@ 2000-11-13  0:00                             ` Nicolas Brunot
  2000-11-13  0:00                               ` Robert Dewar
  2000-11-15  0:00                             ` Larry Kilgallen
       [not found]                             ` <3A0FCBAD.824095C6@cadwin.cOrganization: LJK Software <5E93Ivxu6GwO@eisner.decus.org>
  2 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar wrote :

> In article <3A0C03BE.C3216454@cadwin.com>,
>   Nicolas Brunot <n.brunot@cadwin.com> wrote:
> > If you want companies to use Ada, don't tell them that
> > Microsoft or Oracle are failures
> > (Unless you prove you can make better than them, but in that
> > case you would be as famous as them ...)
>
> No, Microsoft is not successful in terms of quality, but in
> terms of quantity. This is a perfectly valid goal, and indeed
> is the road to riches. Ford was much more successful than
> Bugatti, but I do not think people confuse this with the
> quality of the cars.

Microsoft is successfull in the sense that they provide softwares that
are not necessarily good, but users choose Microsoft because whatever
you think it's much faster easier and cheaper to get Windows PC, connect
a Printer or everything else and find available software than on any
other OS.
Mac may be an exception, but it crashes a lot too, and software offer is
not so rich and not so cheap.
On a daily utilitary basis, Ford is certainly more satisfactory for the
user than Bugatti, even if you are a dream car lover, and can afford the
tremendous cost ...
Bugatti or Ferrari owners use those cars as toys for the rich adult
people they are, and certainly not as tools, they have 3 or 4 others
cars much more satisfying for daily use, and they know that.
Your comparison is quite explanatory about your concept of developping
software ... and shows that you are far more concerned by the fame and
proudness of the developper, than by the normal user who is not
interested in computers and asks for just a tool and is concerned about
its cost .

> If your goal is to have companies like Microsoft use Ada,

Don't make a fixation on Microsoft, what it's true for them is also true
for all software companies

> Sometimes I wonder whether typical PC software is not a repeat
> of the red delicious apple debacle (where the suppliers thought
> that what consumers wanted was a nice looking apple and they
> succeeded, unfortunately, people are not actually buying them
> because they were also looking for a nice tasting apple. You
> and I as tax payers are about to lauch one of the biggest
> bailouts of its kind in history to rescue that industry).

We don't pay taxes in the same country, but you are right.
People want reliable software developped by smart people, but they also
want them easy to find, easy to use and cheap.
If you cannot (don't want) provide that on Windows, first you have to
develop a new OS better cheaper and easier to use and find than Windows.

After that you have to impose it on the market.
And then only after, get rid of Windows.
Otherwise you are going to develop wonderful software you are very proud
of, but unfortunetaly, users are also looking for software working well
for the PCs they own and won't buy yours softs, even if you tell them :
"You stupid should know that if you are not satisfied, it's Microsoft
fault, not mine .."
Then all tax payers will have to pay for your convictions ...

> In the PC World, people are simply accustomed to unrealiable
> software that does strange things and breaks all the time.

I have no strange devices on my PC (home or professional ..) and use
them only as tools.
I don't find it crashes su much when you don't play too much with it and
do not act like someone who would every day try to change something in
his car's engine.
Macintosh can crash a lot too..
I have Linux and it still requires quite some computer knowledge to use
as easily as windows (hope this is going on to improve)

> of the most remarkable bugs of all time was the bug in Windows
> 95 that caused it to realiable crash after a few days, but no
> one noticed, because this crash just appeared to be normal
> operation in the unlikely event that you could keep your
> Windows 95 machine running that long.

I saw such behavior in Gnat :-)    but of course gnat blames it's not
its fault ... which everybody is doing.
I you are not the standard Windows is, you must be satisfying with
Windows bugs, not blame them. It's your problem, not the user's one.

> But Ada, and the philosophy that surrounds Ada *can* be
> significant aids in achieving realiability.

The first thing to achieve reliability is to consider that Ada is
nothing more than a tool, often very efficient, sometime not the best
one.
Because you make religious opinion about Ada more important than
reliability and efficiency.

> I think it is ultimately a more successful path for pushing
> Ada use to emphasize the role that Ada can play in improving
> reliability, rather than trying to make the point that it can
> work well in the current world of get-it-out-the-door,
> working-more-or-less-is-all-that-matters software delivery.
> (a recent thread on whether "works OK" is the most important
> aspect of software performance is relevant here).

Pushing Ada is not exactly a success until now ....
That should make you ask yourself some questions, and ask yourself if by
chance, users wouldn't be looking for Ford cars instead of Bugatti cars
...
They dream about Bugatti, but even when they have one, they often ride
Ford ...






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                   ` Robert Dewar
@ 2000-11-13  0:00                     ` gdemont
  0 siblings, 0 replies; 168+ messages in thread
From: gdemont @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar:

> An interesting assessment, my own observation is that a lot
> of people find a Windows PC really *quite* difficult to use.
> The success of the Mac (remember it has a significant slice
> of a very large market) is certainly based on this,

Significant ? It has dropped to about 1%. Take a look at any
Web counter statistics... The mistake of targetting only
a part of the market (even 90%) is cumulative over the years.

It is the same for Ada: it is an excellent all-purpose language.
But if compiler makers find it is only made for large-scale projects,
high-safety, avionics and military, the result at the end
will be that even (or especially) those fields thought as
"safe markets nailed to Ada" will drop it. Same reason as
the Mac-PC paradigm: too few users.

It is not too late for realizing that: at the moment there
is a "hole". Even Microsoft finds C++ unsatisfactory for its
needs (the #include was a good things 30 years ago but...),
hence the C# delirium...

______________________________________________________
Gautier  --  http://members.nbci.com/gdemont/gsoft.htm


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                             ` Nicolas Brunot
@ 2000-11-13  0:00                               ` Robert Dewar
  2000-11-13  0:00                                 ` gdemont
                                                   ` (4 more replies)
  0 siblings, 5 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-13  0:00 UTC (permalink / raw)


In article <3A0FCBAD.824095C6@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> Bugatti or Ferrari owners use those cars as toys for the rich
> adult people they are, and certainly not as tools, they have 3
> or 4 others
> cars much more satisfying for daily use, and they know that.
> Your comparison is quite explanatory about your concept of
developping
> software

Oh dear oh dear oh dear! :-)

No, you miss my point entirely, I am not talking about car
collectors who collect Bugatti's today (there are after all
only four roadsters left I believe). There was a past tense
in there that I guess you missed.

At the time that the Bugatti's were developed they most
certainly WERE transportation tools and very effective
ones, far more important than the Fords of the day, but
far more expensive. Now of course, both are collectors
items, though indeed one would prefer to have the former
in your collection.

So, since that example confused you, let's take a modern
example, and compare the BMW with a Ford Pinto. I choose
the latter example deliberately, since it was indeed
seriously unreliable, and the manufacturer knew it, but
did not care. But it was cheap!

> than by the normal user who is not
> interested in computers and asks for just a tool and is
> concerned about its cost .

Cost is a legitimate concern -- sometimes -- but not always.
Ask people if they would accept less reliable software in
a Boeing 777 in return for a $3 discount on their ticket ...

> Don't make a fixation on Microsoft, what it's true for them is
> also true for all software companies.

Not at all, please ... this shows a remarkable narrowness on
your part. Indeed I would be surprised if this attitude was
not a serious component in some software companies failing.

You have to understand your market. The quick-to-market, cheap,
doesn't-really-matter-if-it-is-reliable school of software
production may be appropriate for some situations, but it
is definitely NOT for all. The folks who made the original
software for the luggage system at the new Denver airport
for example found that out, as did Ebay, when failures
in their software system caused a four *BILLION* dollar
loss in the value of the company.

... and shows that you are far more concerned by the fame and
> proudness of the developper

Ah, there you are very wrong. I am very strongly opposed
to the notion of individual fame and pride when it comes
to software. There is a reason why you don't find any
authors names anywhere in the GNAT code :-)

> We don't pay taxes in the same country, but you are right.
> People want reliable software developped by smart people, but
> they also want them easy to find, easy to use and cheap.

Well cheap and reliable are opposing goals at some level, you
have to decide where you want to be on the spectrum. Different
projects require different choices, but making the wrong choice
can kill you (and indeed many software companies have died from
making the wrong choice).

> If you cannot (don't want) provide that on Windows, first you
> have to develop a new OS better cheaper and easier to use and
> find than Windows.

Not all software runs on Windows -- perhaps that fact has
escaped you :-)

> After that you have to impose it on the market.
> And then only after, get rid of Windows.

Palm has done a pretty good job of getting rid of Windows in
the hand held area, an area where indeed Microsoft did not
pay attention to easy-to-use.

> Otherwise you are going to develop wonderful software you are
> very proud of, but unfortunetaly, users are also looking for
> software working well for the PCs they own and won't buy yours
> softs, even if you tell them :
> "You stupid should know that if you are not satisfied, it's
Microsoft
> fault, not mine .."

Could this be auto-biographical? :-)


> I have no strange devices on my PC (home or professional ..)
> and use them only as tools.
> I don't find it crashes su much

Yes well not crashing "so much" is a reasonable criterion
in the Windows world, but in the world of reliable
operating systems (e.g. OS/2) crashes are rare or non-existant
no matter what you are doing. Now not everyone needs this
reliability, but it is not suprising that OS/2 tends to be
the OS of choice for PC driven ATM's over windows for example.

>  when you don't play too much
> with it and
> do not act like someone who would every day try to change
something in
> his car's engine.

Yes, well it is always instructive when Windows fans tell
us that you have to treat it very gently to avoid blowing
it up. That's certainly what we find (indeed even NT and
Win2K are very delicate, we only manage to get semi-reliable
GNAT builds by avoiding running anything else at the same
time).

> > one of the most remarkable bugs of all time was the bug in
Windows
> > 95 that caused it to realiable crash after a few days, but
no
> > one noticed, because this crash just appeared to be normal
> > operation in the unlikely event that you could keep your
> > Windows 95 machine running that long.
>
> I saw such behavior in Gnat :-)

Er .. I think you miss the point I made, I am not just pointing
to some arbitrary bug in Windows, but to one that RELIABLY
would strike ANY user who kept their system up for a few days.
I cannot IMAGINE using my OS/2 system if it crashed every
few days, I expect to be able to keep it up for weeks at a
time, and only ever reboot when *I* want to (e.g. when I
needed to reboot to Windows for some odd thing that I can't
do in OS/2).

> but of course gnat blames it's not
> its fault ... which everybody is doing.

Well I don't know what you are talking about here, since you
are not one of our customers ...

> I you are not the standard Windows is, you must be satisfying
> with Windows bugs, not blame them. It's your problem, not the
> user's one.

Sorry, the random non-english here has defeated my attempts
to understand what you mean here.

> > But Ada, and the philosophy that surrounds Ada *can* be
> > significant aids in achieving realiability.

> Because you make religious opinion about Ada more important
> than reliability and efficiency.

Er, I think there may be another language problem here. My
statement that Ada can be a significant aid is a bit shot
of a religeous opinion (perhaps you should look up significant
and aid in an english dictionary -- they do not mean panacea!)

> Pushing Ada is not exactly a success until now ....

Not if you think the only measure of success is writing
commodity programs for Windows.

> That should make you ask yourself some questions, and ask
> yourself if by chance, users wouldn't be looking for Ford cars
> instead of Bugatti cars.

Well of course users are not looking for antique cars, sorry
I confused you by setting an example in the past. But updated
to the present, yes, relatively few users are looking for
BMW's, and far more users are looking for Fords, but do you
*really* think that is a legitimate argument that BMW should
start making commodity cars -- I don't think so!

> They dream about Bugatti, but even when they have one, they
> often ride Ford ...

You may be in a software industry where your success (assuming
you are in fact successful) depends on generating cheap
commodity Windows software. That's fine, but it is not the
main niche for Ada at the moment. To me it seems that Ada is
being quite successful in the area where it can most likely
play a role -- namely large high reliability systems. Could
it be even more successful there, sure ...

But all I am saying in my message is that if you sole criterion
for success is mass market penetration in the Windows context,
then I think you will be disappointed that Ada will not succeed
here, but I won't be any more disappointed by that than the
CEO of BMW is disappointed in seeing that FOrd sells more cars


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                               ` Robert Dewar
  2000-11-13  0:00                                 ` gdemont
  2000-11-13  0:00                                 ` Ken Garlington
@ 2000-11-13  0:00                                 ` Nicolas Brunot
  2000-11-13  0:00                                   ` Pascal Obry
  2000-11-13  0:00                                 ` gdemont
  2000-11-14  0:00                                 ` Ada student homework ? dmitry6243
  4 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar wrote :

> So, since that example confused you, let's take a modern
> example, and compare the BMW with a Ford Pinto. I choose
> the latter example deliberately, since it was indeed
> seriously unreliable, and the manufacturer knew it, but
> did not care. But it was cheap!

Success often comes from reliable AND cheap ...
Not so long ago a 3D graphic card costed more than 10 000 US$
Now you have better ones for less than 50 US$
That was a big step forward in our market ...

> Cost is a legitimate concern -- sometimes -- but not always.
> Ask people if they would accept less reliable software in
> a Boeing 777 in return for a $3 discount on their ticket ...

There are others things in software develoment than making Boeing
softwares ... I'm not sure you noticed this fact ...
Our market, and a lot of markets have nothing to do with the kind of
software you are talking about.

> Ah, there you are very wrong. I am very strongly opposed
> to the notion of individual fame and pride when it comes
> to software. There is a reason why you don't find any
> authors names anywhere in the GNAT code :-)

Well may be some Gnat (public version) users would like sometimes to
hear somebody else than you.
Well, I know they didn't pay for that, but may be some would be actually
ready to pay just not to hear you :-)
That's a joke, don't take it for real please ... :-) , my concern is Ada
and there is nothing personal about that ....

> Well cheap and reliable are opposing goals at some level, you
> have to decide where you want to be on the spectrum.

That a huge mistake, especially in computers and software world, cheap
and reliable are not opposing goals
Just look at processors and graphic cards market ....

> Not all software runs on Windows -- perhaps that fact has
> escaped you :-)

I know that, but  have you ever try to enumerate the ones that run ONLY
on Windows ? :-)
Talking about Boeing, why do you think that CATIA was ported on WinNT ?
Try also to enumerate how many non Windows existing softwares are ported
to Windows, and how many existing windows softwares are ported to others
OS.

> > "You stupid should know that if you are not satisfied, it's
> Microsoft
> > fault, not mine .."
>
> Could this be auto-biographical? :-)

Actually we met that attitude quite often ... in others companies, ...
like ACT
Well this is a joke again ...

> Yes, well it is always instructive when Windows fans tell
> us that you have to treat it very gently to avoid blowing
> it up. That's certainly what we find (indeed even NT and
> Win2K are very delicate, we only manage to get semi-reliable
> GNAT builds by avoiding running anything else at the same
> time).

That's indeed the problem ... Fortunetaly a lot of software companies
manage to build reliable software on NT
Of course you find very bad ones, may be just because you can find more
software for NT than for any other OS
And of course it's much easier to find poor software on that OS

> Well I don't know what you are talking about here, since you
> are not one of our customers ...

We have been ...

> Sorry, the random non-english here has defeated my attempts
> to understand what you mean here.

Indeed, I often noticed than 80% of the english spoken all over the
world is indeed a very bad english (even worse than mine)
But surprisingly, only people whose english is the native language
cannot understand it, while all others can :-)
I actually saw english discussions where the English or American guy
here was the one who understood nothing

> Well of course users are not looking for antique cars, sorry
> I confused you by setting an example in the past. But updated
> to the present, yes, relatively few users are looking for
> BMW's, and far more users are looking for Fords, but do you
> *really* think that is a legitimate argument that BMW should
> start making commodity cars -- I don't think so!

Tell him about Rover ....

> You may be in a software industry where your success (assuming
> you are in fact successful)

Thanks, we are doing well.

> depends on generating cheap commodity Windows software.

Our applications are mostly professional ones and not exactly cheap ...
which doesn't mean that cost is not a concern

> That's fine, but it is not the main niche for Ada at the moment.

Unfortunately, there are not a lot of niches for Ada since so few
programmers use it.

> To me it seems that Ada is
> being quite successful in the area where it can most likely
> play a role -- namely large high reliability systems. Could
> it be even more successful there, sure ...

If Ada stick to that kind of software, the question is how long will it
last ?

> But all I am saying in my message is that if you sole criterion
> for success is mass market penetration in the Windows context,
> then I think you will be disappointed that Ada will not succeed
> here, but I won't be any more disappointed by that than the
> CEO of BMW is disappointed in seeing that FOrd sells more cars

100 % of car companies are concentrating by now, BMW is no exception.
They failed with Rover and they are quite disappointed with that






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                               ` Robert Dewar
@ 2000-11-13  0:00                                 ` gdemont
  2000-11-13  0:00                                 ` Ken Garlington
                                                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 168+ messages in thread
From: gdemont @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar:

> You have to understand your market. The quick-to-market, cheap,
> doesn't-really-matter-if-it-is-reliable school of software
> production may be appropriate for some situations, but it
> is definitely NOT for all. The folks who made the original
> software for the luggage system at the new Denver airport
> for example found that out, as did Ebay, when failures
> in their software system caused a four *BILLION* dollar
> loss in the value of the company.

Note that it is not forbidden (is it?) to use a safety-friendly tool
(say, completely randomly, an Ada compiler) for quick-to-market
production.
It can help to increase the programmers pool and make the tools even
safer (the more users, the more bugs found - since it seems there
might be, sometimes, hum... bugs even in some Ada compilers).

G.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                               ` Robert Dewar
                                                   ` (2 preceding siblings ...)
  2000-11-13  0:00                                 ` Nicolas Brunot
@ 2000-11-13  0:00                                 ` gdemont
  2000-11-13  0:00                                   ` Ada student homework ?[OS/2 Comments] tjerick
                                                     ` (2 more replies)
  2000-11-14  0:00                                 ` Ada student homework ? dmitry6243
  4 siblings, 3 replies; 168+ messages in thread
From: gdemont @ 2000-11-13  0:00 UTC (permalink / raw)


Robert Dewar:

> Yes well not crashing "so much" is a reasonable criterion
> in the Windows world, but in the world of reliable
> operating systems (e.g. OS/2) crashes are rare or non-existant
> no matter what you are doing.

Maybe there is not enough bad software that make it crash.
Is there something like Norton Antivirus (in "active" mode) that
lowers the system's reliability almost like a real virus ?...

> Now not everyone needs this
> reliability, but it is not suprising that OS/2 tends to be
> the OS of choice for PC driven ATM's over windows for example.

The nice thing for OS/2 would be to add the Win32 compatibility.
A friend told me there is Win-OS/2 that emulates Windows 16-bit
with half the code, but what about Win32 ?

G.



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?[OS/2 Comments]
  2000-11-13  0:00                                 ` gdemont
@ 2000-11-13  0:00                                   ` tjerick
  2000-11-14  0:00                                   ` Ada student homework ? Georg Bauhaus
  2000-11-14  5:16                                   ` Robert Dewar
  2 siblings, 0 replies; 168+ messages in thread
From: tjerick @ 2000-11-13  0:00 UTC (permalink / raw)


On Mon, 13 Nov 2000 15:32:12, gdemont@my-deja.com wrote:

> Robert Dewar:
> 
> > Yes well not crashing "so much" is a reasonable criterion
> > in the Windows world, but in the world of reliable
> > operating systems (e.g. OS/2) crashes are rare or non-existant
> > no matter what you are doing.
> 
> Maybe there is not enough bad software that make it crash.
> Is there something like Norton Antivirus (in "active" mode) that
> lowers the system's reliability almost like a real virus ?...
> 
> > Now not everyone needs this
> > reliability, but it is not suprising that OS/2 tends to be
> > the OS of choice for PC driven ATM's over windows for example.
> 
> The nice thing for OS/2 would be to add the Win32 compatibility.
> A friend told me there is Win-OS/2 that emulates Windows 16-bit
> with half the code, but what about Win32 ?
> 

Ahh, a chance to weigh in, Yes there is work going on to run Win32 
apps on OS/2. This is a user-level effort called Project Odin and is 
being watched but not funded by IBM. There has been some real succes 
such as getting Realplayer 5 to work, Adobe Distiller to work, and 
some others as well. A large effort but one that hopefully will turn 
out a good product for OS/2 users in the end.

Rumour has it that IBM had a similar project that was halted when they
sold their soul to M$.

Interestingly, with the recent merge of the Warp Server Kernel to the 
Client kernel, much of the memory addressing restrictions have been 
lifted. [ie: greater than 512MB]. I would dearly love to know what IBM
has been up to in their back rooms!

Tim Erickson

PS How about a release of GNAT > 3.12 for OS/2?




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                               ` Robert Dewar
  2000-11-13  0:00                                 ` gdemont
@ 2000-11-13  0:00                                 ` Ken Garlington
  2000-11-13  0:00                                 ` Nicolas Brunot
                                                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-13  0:00 UTC (permalink / raw)


"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:8uos3l$q6h$1@nnrp1.deja.com...

: Cost is a legitimate concern -- sometimes -- but not always.
: Ask people if they would accept less reliable software in
: a Boeing 777 in return for a $3 discount on their ticket ...

Well, I would accept the deletion of the "last-gasp" direct actuator backup
mode, and I'd also accept having all three branches use the same processor
and compiler, so I guess I'm one of the oddball people :)

On the other hand, there's some people (Dr. Leveson, for example) who
wouldn't fly on a modern Airbus at *any* price...






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-03  0:00 ` David Starner
  2000-11-07  0:00   ` John English
@ 2000-11-13  0:00   ` Dale Pontius
  1 sibling, 0 replies; 168+ messages in thread
From: Dale Pontius @ 2000-11-13  0:00 UTC (permalink / raw)


In article <8tup70$9281@news.cis.okstate.edu>,
        dvdeug@x8b4e516e.dhcp.okstate.edu (David Starner) writes:
> On Fri, 03 Nov 2000 14:42:28 +0000, sc297 wrote:
>>can anyone show me an if statement that will swap the values of A and B,
>>if A is the greater value
>
> Yes. I can, and I bet your teacher can too.
>
Over in comp.arch they treat 'homework' questions a little differently
than here. It seems to be an invitation to come up with the most
reasonable, yet outlandish answers possible. Makes for fun reading.

Dale Pontius
NOT speaking for IBM




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                                 ` Nicolas Brunot
@ 2000-11-13  0:00                                   ` Pascal Obry
  0 siblings, 0 replies; 168+ messages in thread
From: Pascal Obry @ 2000-11-13  0:00 UTC (permalink / raw)



Nicolas Brunot <n.brunot@cadwin.com> writes:

> Robert Dewar wrote :
> 
> > So, since that example confused you, let's take a modern
> > example, and compare the BMW with a Ford Pinto. I choose
> > the latter example deliberately, since it was indeed
> > seriously unreliable, and the manufacturer knew it, but
> > did not care. But it was cheap!
> 
> Success often comes from reliable AND cheap ...
> Not so long ago a 3D graphic card costed more than 10 000 US$
> Now you have better ones for less than 50 US$
> That was a big step forward in our market ...
> 
> > Cost is a legitimate concern -- sometimes -- but not always.
> > Ask people if they would accept less reliable software in
> > a Boeing 777 in return for a $3 discount on their ticket ...
> 
> There are others things in software develoment than making Boeing
> softwares ... I'm not sure you noticed this fact ...
> Our market, and a lot of markets have nothing to do with the kind of
> software you are talking about.

Nicolas,

Robert did not say that there is only Boeing 777 in the world. You seem to
turn every single Robert's claim as an absolute and uniq choice! This was just
an example...

Anyway, I think that this endless (there is no possible way to end this thread
as it goes) thread should be stoped at this point. Maybe you could exchange
your point of view via e-mail ? But as always you are of course completly
free to continue just in case you misunderstood me :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-14  0:00                                     ` John English
@ 2000-11-14  0:00                                       ` gdemont
  2000-11-14  0:00                                       ` Ole-Hjalmar Kristensen
  1 sibling, 0 replies; 168+ messages in thread
From: gdemont @ 2000-11-14  0:00 UTC (permalink / raw)


John English:

> I used to have a little DOS program that would kill OS/2 stone-cold
> dead... ;-)

Maybe the famous 3-bytes "cli; jmp 101" that works perfectly under
Windows 9x ? Here is a variant with only 7-bit bytes (portable ASCII!)
here in .COM or .BAT formats. Have fun! Feedback welcome.

________________________________________________________PC_CRASH.COM__
h01X-00P_jXX)E0)E1)E25c_5r_5a_5s_5h_5__5_m5_e5_!RDW

________________________________________________________PC_CRASH.BAT__
@echo off
echo *** Warning: even Windows 9x will crash now - last chance!
pause
echo h01X-00P_jXX)E0)E1)E25c_5r_5a_5s_5h_5__5_m5_e5_!RDW>%TEMP%.\
crash_it.com
%TEMP%.\crash_it.com

______________________________________________________
Gautier  --  http://members.nbci.com/gdemont/gsoft.htm


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                               ` Robert Dewar
                                                   ` (3 preceding siblings ...)
  2000-11-13  0:00                                 ` gdemont
@ 2000-11-14  0:00                                 ` dmitry6243
  4 siblings, 0 replies; 168+ messages in thread
From: dmitry6243 @ 2000-11-14  0:00 UTC (permalink / raw)


In article <8uos3l$q6h$1@nnrp1.deja.com>,
  Robert Dewar <robert_dewar@my-deja.com> wrote:
>
> You may be in a software industry where your success (assuming
> you are in fact successful) depends on generating cheap
> commodity Windows software. That's fine, but it is not the
> main niche for Ada at the moment. To me it seems that Ada is
> being quite successful in the area where it can most likely
> play a role -- namely large high reliability systems. Could
> it be even more successful there, sure ...

BTW, cars. Coming models will have a board computer which will control
all from door locks to the motor and airbags.

Now the riddle. In which language these computers will be programmed?

> But all I am saying in my message is that if you sole criterion
> for success is mass market penetration in the Windows context,
> then I think you will be disappointed that Ada will not succeed
> here, but I won't be any more disappointed by that than the
> CEO of BMW is disappointed in seeing that FOrd sells more cars

Answer: This will not be a "large high reliability system".

--
Regards,
Dmitry Kazakov


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                                 ` gdemont
  2000-11-13  0:00                                   ` Ada student homework ?[OS/2 Comments] tjerick
@ 2000-11-14  0:00                                   ` Georg Bauhaus
  2000-11-14  5:16                                   ` Robert Dewar
  2 siblings, 0 replies; 168+ messages in thread
From: Georg Bauhaus @ 2000-11-14  0:00 UTC (permalink / raw)


gdemont@my-deja.com wrote:

: The nice thing for OS/2 would be to add the Win32 compatibility.
IBM has added some Win32 comatibility C header files a while ago.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00             ` Nicolas Brunot
@ 2000-11-14  0:00               ` Ronald Cole
  0 siblings, 0 replies; 168+ messages in thread
From: Ronald Cole @ 2000-11-14  0:00 UTC (permalink / raw)


Nicolas Brunot <n.brunot@cadwin.com> writes:
> If you think you are asked for a homework, I find more tolerant not
> to answer, than being part of some Ada fanatics trying to rule the
> world, and giving them lessons about how they should work.

I gotta agree, ignoring the post is more tactful than attempting to
"educate" or "chastise" the offender regarding the faux pas.

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <ronald@forte-intl.com>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-14  5:16                                   ` Robert Dewar
  2000-11-14  0:00                                     ` John English
@ 2000-11-14  0:00                                     ` Nicolas Brunot
  2000-11-15  0:00                                       ` Robert Dewar
  1 sibling, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-14  0:00 UTC (permalink / raw)


Robert Dewar wrote :

> A decent operating system cannot be crashed by "bad software",
> that is elementary. Yes, I know that Windows users get used
> to the contrary viewpoint (after all the navy concluded that
> the infamous NT blue screen event was due to a faulty
> application program!!!!)

I remember a thread on comp.lang.ada a few weeks ago where someone was
reporting a 5 lines procedure (syntaxically incorrect) where Gnat
crashes with Storage_Error after several minutes.
Your answer was more or less (no kidding ... !!!)
"This is not a bug, the compiler is just complaining it is out of
memory"
No comment ...
Well I just read a suggestion to end up this thread which seems quite a
reasonable suggestion






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-14  0:00                                     ` John English
  2000-11-14  0:00                                       ` gdemont
@ 2000-11-14  0:00                                       ` Ole-Hjalmar Kristensen
  1 sibling, 0 replies; 168+ messages in thread
From: Ole-Hjalmar Kristensen @ 2000-11-14  0:00 UTC (permalink / raw)


John English <je@bton.ac.uk> writes:

> Robert Dewar wrote:
> > 
> > In article <8up1ht$upu$1@nnrp1.deja.com>,
> >   gdemont@my-deja.com wrote:
> > > Robert Dewar:
> > 
> > > Maybe there is not enough bad software that make it crash.
> > 
> > A decent operating system cannot be crashed by "bad software",
> 
> I used to have a little DOS program that would kill OS/2 stone-cold
> dead... ;-)
> 
> -----------------------------------------------------------------
>  John English              | mailto:je@brighton.ac.uk
>  Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
>  Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
>  University of Brighton    |    -- see http://burks.bton.ac.uk
> -----------------------------------------------------------------

Yes, the problem is there are very few decent operating systems around :-)
Thanks to a bug in our program, HP-UX would freeze so totally that not
even the power-off button on the cabinet worked. We had to actually
unplug the system to get it running again.
But then, we were using some undocumented system calls in HP, with
parameters which apparently were never checked.

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-14  5:16                                   ` Robert Dewar
@ 2000-11-14  0:00                                     ` John English
  2000-11-14  0:00                                       ` gdemont
  2000-11-14  0:00                                       ` Ole-Hjalmar Kristensen
  2000-11-14  0:00                                     ` Nicolas Brunot
  1 sibling, 2 replies; 168+ messages in thread
From: John English @ 2000-11-14  0:00 UTC (permalink / raw)


Robert Dewar wrote:
> 
> In article <8up1ht$upu$1@nnrp1.deja.com>,
>   gdemont@my-deja.com wrote:
> > Robert Dewar:
> 
> > Maybe there is not enough bad software that make it crash.
> 
> A decent operating system cannot be crashed by "bad software",

I used to have a little DOS program that would kill OS/2 stone-cold
dead... ;-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-14  0:00 Duncan Sands
@ 2000-11-14  0:00 ` Ken Garlington
  0 siblings, 0 replies; 168+ messages in thread
From: Ken Garlington @ 2000-11-14  0:00 UTC (permalink / raw)


"Duncan Sands" <sands@topo.math.u-psud.fr> wrote in message
news:E13vbW9-0000DP-00@Baldrick...

: Here
: is a code snippet using the Beer oriented methodology (which naturally
: reflects the life style of many students) that swaps the values of two
: integers A and B if A is the greater value.  It uses an if statement.

Well, this doesn't seem right. In particular:

:       type Beer is new Integer;
-- this should be Natural; the -1 trick is no excuse (see below).

:       type Hand is (Left_Hand, Right_Hand);
-- this should be type What_I_Call_My_Hands
-- there should be a type Hand which is an access to Beer_Mug (see below)
-- there should be a type Hands which is an array (What_I_Call_My_Hands) of
Hand.

:       Mugs : array (Hand) of Beer_Mug;
-- this should be two separate mugs, since a particular mug is not
intrinsically tied to a particular Hand

:       type Table is record
:          Mug : Beer_Mug;
:       end record;
-- clearly, Table should be an array (or set) of Beer_Mugs, since a Table
could
-- hold more than one Beer_Mug.

:       procedure Move_Mug (From, To : Hand) is
:       begin
:          if From = To or Mugs (From).Refreshing_Fluid = -1 then
-- Ack! Arbitrary constants! Much better to allow a Hand to be set to null
-- explicitly when it isn't accessing anything.
-- Also, need to check that To is empty.

:             raise Tasking_Error;
-- should really declare a new Drunken_Fool exception rather than using
-- predefined exception







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
@ 2000-11-14  0:00 Duncan Sands
  2000-11-14  0:00 ` Ken Garlington
  0 siblings, 1 reply; 168+ messages in thread
From: Duncan Sands @ 2000-11-14  0:00 UTC (permalink / raw)
  To: comp.lang.ada

David Starner (speaking for IBM) writes:
>> On Fri, 03 Nov 2000 14:42:28 +0000, sc297 wrote:
>>>can anyone show me an if statement that will swap the values of A and B,
>>>if A is the greater value
>>
>> Yes. I can, and I bet your teacher can too.
>>
>Over in comp.arch they treat 'homework' questions a little differently
>than here. It seems to be an invitation to come up with the most
>reasonable, yet outlandish answers possible. Makes for fun reading.

That is an irresponsable attitude, and we should all blow our noses
at it.  We should instead show how the use of ADA allows us to write
a solution in a way that naturally reflects the problem domain.  Here
is a code snippet using the Beer oriented methodology (which naturally
reflects the life style of many students) that swaps the values of two
integers A and B if A is the greater value.  It uses an if statement.

if True then
   declare
      type Beer is new Integer;

      type Beer_Mug is record
         Refreshing_Fluid : Beer;
      end record;

      procedure Put_Beer_Into_Mug (
        Fluid : in     Beer;
        Mug   : in out Beer_Mug
      ) is
      begin
         Mug.Refreshing_Fluid := Fluid;
      end;

      function Make_Beer (X : Integer) return Beer is
      begin
         return Beer (X);
      end;

      procedure Burp_At_Wimpy_C_Programmers is
         task type Int_Swapper (X, Y : access Integer);
         task body Int_Swapper is
            type Int_Pointer is access all Integer;
            Z_Value : aliased Integer;
            Z : Int_Pointer := Z_Value'Access;
         begin
            Z.all := X.all;
            X.all := Y.all;
            Y.all := Z.all;
            A := X.all;
            B := Y.all;
         end;
         Swapper : Int_Swapper (new Integer' (A), new Integer' (B));
      begin
         null;
      end;

      procedure Drink_Beer (Fluid : in out Beer) is
      begin
         Fluid := 0;
         Burp_At_Wimpy_C_Programmers;
      end;

      type Hand is (Left_Hand, Right_Hand);

      Mugs : array (Hand) of Beer_Mug;

      Right_Hand_Mug : Beer_Mug renames Mugs (Left_Hand);
      Left_Hand_Mug  : Beer_Mug renames Mugs (Right_Hand);

      type Table is record
         Mug : Beer_Mug;
      end record;

      A_Convenient_Table : Table;

      procedure Move_Mug (From, To : Hand) is
      begin
         if From = To or Mugs (From).Refreshing_Fluid = -1 then
            raise Tasking_Error;
         else
            Mugs (To) := Mugs (From);
            Mugs (From).Refreshing_Fluid := -1; -- Null mug
         end if;
      end;

      procedure Move_Mug_To_Table (Member : Hand) is
      begin
         A_Convenient_Table.Mug := Mugs (Member);
         Mugs (Member).Refreshing_Fluid := -1;
      end;

      procedure Pick_Up_Mug (Member : Hand) is
      begin
         Mugs (Member) := A_Convenient_Table.Mug;
         A_Convenient_Table.Mug.Refreshing_Fluid := -1;
      end Pick_Up_Mug;

      procedure Pour_Beer (
        From : in out Beer_Mug;
        To   :    out Integer
      ) is
      begin
         To := Integer (From.Refreshing_Fluid);
         From.Refreshing_Fluid := 0;
      end;

      function Weight (Member : Hand) return Float is
         Density_Of_Beer : constant Float := 3.799237428472040235723029;
         Weight_Of_Hand  : constant Float := 2.369000038490274207765490;
      begin
         return Density_Of_Beer * Float (Mugs (Member).Refreshing_Fluid) +
           Weight_Of_Hand;
      end;
      
      subtype Excess is Float range 0.0 .. Float'Last;

      Excess_Weight : Excess;
   begin
      Put_Beer_Into_Mug (
        Fluid => Make_Beer (A),
        Mug   => Left_Hand_Mug
      );

      Put_Beer_Into_Mug (
        Fluid => Make_Beer (B),
        Mug   => Right_Hand_Mug
      );
      
      -- Round to one decimal place to compensate for experimental error
      -- in weighing the beer
      Excess_Weight := Float (
        Integer (100.0 * (Weight (Left_Hand) - Weight (Right_Hand)))
      ) / 100.0;
      Drink_Beer (Left_Hand_Mug.Refreshing_Fluid);
      Drink_Beer (Right_Hand_Mug.Refreshing_Fluid);
   exception
      when Constraint_Error => -- Beer off?  Swap mugs and try again
         Move_Mug_To_Table (Left_Hand);
         Move_Mug (
           From => Right_Hand,
           To   => Left_Hand
         );
         Pick_Up_Mug (Right_Hand);
         Excess_Weight := Float (
           Integer (100.0 * (Weight (Left_Hand) - Weight (Right_Hand)))
         ) / 100.0;
         Pour_Beer (
           From => Mugs (Right_Hand),
           To   => A
         );
         Pour_Beer (
           From => Mugs (Left_Hand),
           To   => B
         );
   end;
else
   -- Memory corruption due to solar radiation
   raise Storage_Error;
end if;





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-13  0:00                                 ` gdemont
  2000-11-13  0:00                                   ` Ada student homework ?[OS/2 Comments] tjerick
  2000-11-14  0:00                                   ` Ada student homework ? Georg Bauhaus
@ 2000-11-14  5:16                                   ` Robert Dewar
  2000-11-14  0:00                                     ` John English
  2000-11-14  0:00                                     ` Nicolas Brunot
  2 siblings, 2 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-14  5:16 UTC (permalink / raw)


In article <8up1ht$upu$1@nnrp1.deja.com>,
  gdemont@my-deja.com wrote:
> Robert Dewar:

> Maybe there is not enough bad software that make it crash.

A decent operating system cannot be crashed by "bad software",
that is elementary. Yes, I know that Windows users get used
to the contrary viewpoint (after all the navy concluded that
the infamous NT blue screen event was due to a faulty
application program!!!!)

In fact OS/2 always made a point of the fact that it was
crash proof compared to Windows, and OS/2 users do NOT
expect the system to crash, period.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-14  0:00                                     ` Nicolas Brunot
@ 2000-11-15  0:00                                       ` Robert Dewar
  2000-11-15  0:00                                         ` Ada student homework ? I give up Nicolas Brunot
  0 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-15  0:00 UTC (permalink / raw)


In article <3A10FA2A.E52FBF51@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> Robert Dewar wrote :
>
> > A decent operating system cannot be crashed by "bad
software",
> > that is elementary. Yes, I know that Windows users get used
> > to the contrary viewpoint (after all the navy concluded that
> > the infamous NT blue screen event was due to a faulty
> > application program!!!!)
>
> I remember a thread on comp.lang.ada a few weeks ago where
someone was
> reporting a 5 lines procedure (syntaxically incorrect) where
Gnat
> crashes with Storage_Error after several minutes.
> Your answer was more or less (no kidding ... !!!)
> "This is not a bug, the compiler is just complaining it is out
of
> memory"
> No comment ...
> Well I just read a suggestion to end up this thread which
seems quite a
> reasonable suggestion



First of all, you are mischaracterizing a response of mine,
if you don't believe that, go back over the archives, I said
absolutely NOTHING of the kind.

Second of all, you don't seem to understand the point. If
GNAT or any other program, malfunctions, that is one thing.
If it takes the operating system down with it, that is QUITE
another thing.

It is the latter behavior that you seem to find quite reasonable
in the Windows environment from your previous posts, but the
point is that in a decent operating system, bad applications
software can NEVER disable the operating system.

For example in OS/2, it is extremely rare to see the system
freeze up or crash. I can only remember one instance recently
in which OS/2 froze on me, and it could well have been a
hardware problem, since the machine I am working on is old
and tired.

By the way, when OS/2 did freeze in this instance, I lost only
two keystrokes of the file I had been editing, everything else
was saved automatically.

The technology for essentialy crash-proof operating systems has
been around for decades, it just has not arrived in Redmond yet!


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ? I give up ...
  2000-11-15  0:00                                       ` Robert Dewar
@ 2000-11-15  0:00                                         ` Nicolas Brunot
  2000-11-15  0:00                                           ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-15  0:00 UTC (permalink / raw)


Robert Dewar wrote :

> First of all, you are mischaracterizing a response of mine,
> if you don't believe that, go back over the archives, I said
> absolutely NOTHING of the kind.

Well sorry I couldn't resist, just check  :
http://ada.eu.org/pipermail/comp.lang.ada/2000-September/002448.html
where you'll find :
"Actually the compiler did not crash, it complained it was out of memory
(Storage_Error raised during compilation)"

answering
http://ada.eu.org/pipermail/comp.lang.ada/2000-September/002443.html
where you'll find :
>So just when I think I'm getting the idea of Ada95, along comes this
>problem, demonstrated by an admittedly contrived program. Gnat 3.13p
crashes
>trying to compile this:
>
>   with ada.float_text_io;
>   with ada.numerics;
>   with ada.numerics.elementary_functions;
>   use ada.numerics.elementary_functions;
>   procedure crash is
>      f, g : float;
>   begin
>      ada.float_text_io.get(f);
>      g := 2.7183 ** (-5340)/f + 21.5;
>   end crash;







^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ? I give up ...
  2000-11-15  0:00                                         ` Ada student homework ? I give up Nicolas Brunot
@ 2000-11-15  0:00                                           ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-15  0:00 UTC (permalink / raw)


In article <3A128778.54D5BE34@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:
> Robert Dewar wrote :
>
> > First of all, you are mischaracterizing a response of mine,
> > if you don't believe that, go back over the archives, I said
> > absolutely NOTHING of the kind.
>
> Well sorry I couldn't resist, just check  :
> > where you'll find :
> "Actually the compiler did not crash, it complained it was out
of memory
> (Storage_Error raised during compilation)"

But you mentioned a syntactically incorrect program -- there
was nothing syntactically incorrect about the program here, it
is a perfectly fine program, it is just that it requires a lot
of memory to compile. If you have enough memory it will compile
fine. If you don't have the memory, the compiler terminates
with a Storage_Error. In the current version, the message is
cleaner, but the functional situation is the same, if the
compiler has enough memory it will compile, if not it will
terminate indicating it does not have enough storage.

It was your reference to a syntactically incorrect program
that made me know you were misquoting me!
while


>
> answering
>
http://ada.eu.org/pipermail/comp.lang.ada/2000-September/002443.
html
> where you'll find :
> >So just when I think I'm getting the idea of Ada95, along
comes this
> >problem, demonstrated by an admittedly contrived program.
Gnat 3.13p
> crashes
> >trying to compile this:
> >
> >   with ada.float_text_io;
> >   with ada.numerics;
> >   with ada.numerics.elementary_functions;
> >   use ada.numerics.elementary_functions;
> >   procedure crash is
> >      f, g : float;
> >   begin
> >      ada.float_text_io.get(f);
> >      g := 2.7183 ** (-5340)/f + 21.5;
> >   end crash;
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                           ` Robert Dewar
  2000-11-13  0:00                             ` Nicolas Brunot
@ 2000-11-15  0:00                             ` Larry Kilgallen
       [not found]                             ` <3A0FCBAD.824095C6@cadwin.cOrganization: LJK Software <5E93Ivxu6GwO@eisner.decus.org>
  2 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-15  0:00 UTC (permalink / raw)


In article <8utul0$vnv$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> writes:

> The technology for essentialy crash-proof operating systems has
> been around for decades, it just has not arrived in Redmond yet!

While the technology (memory management tied to processor modes)
has been around, that does not mean there are crash-proof operating
systems, because the implementation is subject to human frailties.

So those "good" operating systems are not really crash-proof,
just so crash-resistant that they seem crash-proof when they
are compared to the competition.

As an example, consider that Windows NT uses the memory management
hardware and still gets lumped by practical experience into the
"not crash-proof" pile.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-11  0:00                       ` Marin David Condic
@ 2000-11-15  0:00                         ` Lao Xiao Hai
  2000-11-18  0:00                           ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: Lao Xiao Hai @ 2000-11-15  0:00 UTC (permalink / raw)




Marin David Condic wrote:

> Randy Brukardt wrote:
>
> > Well, that's the point of Claw: to allow people to develop for Windows
> > without needing to know C. (And, I'd expect that various other people
> > working on GUI tools would say the same.)
> >
>
>
> Maybe it would be productive to find a good book oriented towards
> programming with MSVC++ and using that as a model for writing a book on
> programming with CLAW? At least that way, you'd have a successful outline to
> start from and you'd just have to translate the topics into CLAW/Ada
> examples?

Relative to CLAW.    I have just about persuaded one of my graduate students
to do his thesis programming in Ada with CLAW.   This will be a substantitive
and hearty application, if he decides to go through with it.   Fortunately, this

student already has some solid experience with C++ and Windows, so his
difficulties with fundamentals of Windows programming should be minimal.

Meanwhile, many of my other students are enjoying the simplified Windows
programming environment, JEWL, created by John English.   This turns out
to be a really good set of tools for easing graduate students into Windows
programming with Ada while not requiring them to learn much about
Windows.   CLAW is for robust applications.   JEWL works well for
learners.     CLAW seems more appropriate for the power-student with
intentions of creating real software.   And it is really great that Randy was
able to eliminate any need for C++ in using CLAW.

All in all, the increased availability of these kinds of tools is making the job

of teaching students how to enjoy Ada much easier than it used to be.  We
have other students experimenting with JGNAT.    Ada is fun again!

Richard Riehle





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-08  0:00             ` Ted Dennison
  2000-11-09  5:11               ` Robert Dewar
@ 2000-11-18  0:00               ` John Magness
  1 sibling, 0 replies; 168+ messages in thread
From: John Magness @ 2000-11-18  0:00 UTC (permalink / raw)


Also please throw in some Obsessive - Compulsive behavior / perfectionism
characteristics.

Ted Dennison wrote:

> In article <3a095057.0@silver.truman.edu>,
>   "Chad R. Meiners" <crmeiners@hotmail.com> wrote:
> >
> > "Nicolas Brunot" <n.brunot@cadwin.com> wrote in message
> > news:3A0952B9.34BE19D1@cadwin.com...
> > > Nobody forces you to answer them.
> > > I personally wouldn't like to ride on an airplane programmed by
> > > R.Dewar who would certainly
> > > explained he expected the plane to crash because the compiler
> > > behaves as he expects ...
> >
> > From my observation,
> > Dr. Dewar appears to have a very critical eye for detail and a genuine
> > concern for correctness.
>
> I'm with Chad on this one. Pedantic people may be an aggrevation to deal
> with in personal conversation. We certianly wouldn't choose Dr. Dewar to
> be the chief Arab-Israeli negotiator.
>
> But if I had my life on the line, I'd want to use code written by the
> most mind-numbingly pedantic person I could find. So even if *I* was a
> choice, I'd pick Dewar.
>
> --
> T.E.D.
>
> http://www.telepath.com/~dennison/Ted/TED.html
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-18  0:00                           ` Robert Dewar
@ 2000-11-18  0:00                             ` tmoran
  2000-11-19  0:00                               ` Robert Dewar
  2000-11-19  0:00                             ` Lao Xiao Hai
  1 sibling, 1 reply; 168+ messages in thread
From: tmoran @ 2000-11-18  0:00 UTC (permalink / raw)


>which has the advantage of not being tied to windows.
Or disadvantage, depending on the situation.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-15  0:00                         ` Lao Xiao Hai
@ 2000-11-18  0:00                           ` Robert Dewar
  2000-11-18  0:00                             ` tmoran
  2000-11-19  0:00                             ` Lao Xiao Hai
  0 siblings, 2 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-18  0:00 UTC (permalink / raw)


In article <3A13427A.352C94BF@ix.netcom.com>,
  Lao Xiao Hai <laoxhai@ix.netcom.com> wrote:
>   Ada is fun again!

I would also definitely have your students look at GtkAda
which has the advantage of not being tied to windows.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
       [not found]                             ` <3A0FCBAD.824095C6@cadwin.cOrganization: LJK Software <5E93Ivxu6GwO@eisner.decus.org>
@ 2000-11-18  0:00                               ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-18  0:00 UTC (permalink / raw)


In article <5E93Ivxu6GwO@eisner.decus.org>,
  Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) wrote:
> In article <8utul0$vnv$1@nnrp1.deja.com>, Robert Dewar
<robert_dewar@my-deja.com> writes:

> that does not mean there are crash-proof operating
> systems, because the implementation is subject to human
> frailties.

Well, with obvious exceptions like THE, operating systems are
rarely certified to be bug free. But in pragmatic terms,
operating systems like VMS and IBM mainframe systems are
close enough. Indeed in practical terms, OS/2 also reachest
this criterion.

An interesting question to ask yourself. How often have you
seen Windows start up screens in places where they do not
belong (such as on airport monitors -- where I saw the
screen a couple of weeks ago :-)

By comparison, how often have you seen OS/2 startup screens
on your friendly ATM machine?

Of course all things are relative, but it really is possible
to achieve the engineering equivalent of crash-proof, which
is not really a mathematical property, but rather the stage
at which operating systems frailty is not the weak link in
the chain (there is generally no point in building software
that is orders of magnitude more reliable than the hardware
for example :-)




>
> So those "good" operating systems are not really crash-proof,
> just so crash-resistant that they seem crash-proof when they
> are compared to the competition.
>
> As an example, consider that Windows NT uses the memory
management
> hardware and still gets lumped by practical experience into
the
> "not crash-proof" pile.
>


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-09  0:00             ` Marin David Condic
  2000-11-10  2:15               ` Ken Garlington
@ 2000-11-18  0:00               ` John Magness
  2000-11-19  0:00                 ` Robert Dewar
                                   ` (2 more replies)
  1 sibling, 3 replies; 168+ messages in thread
From: John Magness @ 2000-11-18  0:00 UTC (permalink / raw)


Or could it be that we now have a generation of students so accustomed to
using the web as a research tool that they have not learned the use of a
physical resource such as a book?
John

Marin David Condic wrote:

> This looked so ridiculously simple a task that I began to wonder if maybe
> someone out there isn't just jerking our collective chain. Some version of
> "Lets see if I can start the customary homework chastisement thread..."
>
> OTOH, here in Palm Beach County, we seem to have a large number of people
> who are TOO STUPID to figure out how to punch a ballot - or even ask for
> help. So maybe the same people take programming classes and are TOO STUPID
> to open the textbook which undoubtedly has at least one example of an "if"
> statement in it somewhere. I'll bet there is even an index entry in the
> back of the book that would take you right to the page. Maybe even a Table
> Of Contents entry. Maybe even an example of a "Swap" program? That *is* a
> rather popular example to put in textbooks, isn't it?
>
> Or have they dropped the requirement that you be able to read in order to
> get into college? It is rather "exclusive" and not very "diverse" to
> require literacy, isn't it?
>
> (Maybe I should attach a smiley here somewhere - but I'm not sure that I'm
> joking. :-)
>
> MDC
>
> Ted Dennison wrote:
>
> > I don't think so. If I can be brutally honest here, anyone who has that
> > much trouble figuring out how an "if" statement works will *never* be a
> > programmer, Ada or otherwise.
> >
>
> --
> ======================================================================
> Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
> Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
> Visit my web site at:  http://www.mcondic.com/
>
>     "Giving money and power to Government is like giving whiskey
>     and car keys to teenage boys."
>
>         --   P. J. O'Rourke
> ======================================================================





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-18  0:00               ` John Magness
@ 2000-11-19  0:00                 ` Robert Dewar
  2000-11-19  0:00                   ` Larry Kilgallen
  2000-11-20  0:00                 ` John English
       [not found]                 ` <3A2827A9.B54C260@ebox.tninet.se>
  2 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-19  0:00 UTC (permalink / raw)


In article <3A16D60F.E915E6CA@swbell.net>,
  jmagness@swbell.net wrote:
> Or could it be that we now have a generation of students so
> accustomed to using the web as a research tool that they have
> not learned the use of a
> physical resource such as a book?
> John

That is indeed a problem, and the trouble is of course that it
is one thing to ask for help on CLA for an if statement, quite
another to ask for help on CLA for implementing a complex
program in a highly technical domain.

It always amazes me how many students do indeed have trouble
learning from books. I noticed this particularly in a recent
programming language course. One student actually wrote that
the Java assignment was impossible since we had not covered
enough in class for him to complete it and "I don't have
time to read books".

:-(


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-18  0:00                             ` tmoran
@ 2000-11-19  0:00                               ` Robert Dewar
  2000-11-19  0:00                                 ` tmoran
  2000-11-20  0:00                                 ` Wes Groleau
  0 siblings, 2 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-19  0:00 UTC (permalink / raw)


In article <53BR5.438553$i5.7568694@news1.frmt1.sfba.home.com>,
  tmoran@acm.org wrote:
> >which has the advantage of not being tied to windows.
> Or disadvantage, depending on the situation.

Well not being tied to windows can never be a disadvantage
per se. Obviously if one can have a portable solution which
is as easy or easier to use than a non-portable solution,
the former is preferable.

Now as to whether GtkAda is easier to use than CLAW for the
domains where functionality overlaps, that's a matter of
experience. So far, our interaction with users of GtkAda has
been very favorable in terms of them finding that they can
do portable complex stuff very easily, but obviously your
milage will vary.

A completely general rule is that you do NOT want to tie what
you write to a particular machine or operating system unless
you really benefit from doing so. Far too often, people create
non-portable code carelessly, and it is really remarkable to
see how many of the porting problems from Ada 83 to Ada 95
result from such carelessness (because this transition is
indeed often also associated with moving to new machines or
new operating systems).

It is indeed more difficult than it should be to write code
that runs on NT without getting tied to NT in a non-portable
manner. No doubt Microsoft is happy to leave it that way.
Perhaps indeed the "or disadvantage" quote above refers to
the possibility that the manufacturer of the software may
have NON-technical reasons to encourage people being tied
to windows :-)





Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-19  0:00                               ` Robert Dewar
@ 2000-11-19  0:00                                 ` tmoran
  2000-11-19  0:00                                   ` Robert Dewar
  2000-11-20  0:00                                 ` Wes Groleau
  1 sibling, 1 reply; 168+ messages in thread
From: tmoran @ 2000-11-19  0:00 UTC (permalink / raw)


> > >which has the advantage of not being tied to windows.
> > Or disadvantage, depending on the situation.
>
> Obviously if one can have a portable solution which is as easy or
> easier to use than a non-portable solution, the former is preferable.

  Obviously.  But is it really true that *any* app using the facilities
of MS Windows can be developed as easily, or easier, with GtkAda?

  I also note that the www.adapower description of GtkAda, under
"Compatitibility", says "The only GNAT-specific features in this
toolkit are related to command line handling (functions G[dt]k.Init),
and the use of GNAT.HTable.  Modifying this toolkit for another Ada 95
compiler should be straightforward."  Is there a release sequence of
GtkAda versions that have been developed and tested with multiple Ada
compilers?  Or does GtkAda free you from being tied to MS Windows, and
instead tie you to ACT's Ada compiler?

  Portability is not cheap.  Having worked on the development and
testing of CLAW on four different Ada compilers, including GNAT, over
the last few years I am acutely aware of that fact.  It's also true
that software vendors usually have strong economic incentives to
promote lock-in to their products.  Caveat Emptor.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-19  0:00                 ` Robert Dewar
@ 2000-11-19  0:00                   ` Larry Kilgallen
  0 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-19  0:00 UTC (permalink / raw)


In article <8v8vp3$ia2$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-deja.com> writes:

> It always amazes me how many students do indeed have trouble
> learning from books. I noticed this particularly in a recent
> programming language course. One student actually wrote that
> the Java assignment was impossible since we had not covered
> enough in class for him to complete it and "I don't have
> time to read books".
> 
> :-(

I hope you do not have sufficient time to give passing grades.
Otherwise I might be forced to work alongside such a person.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-19  0:00                                 ` tmoran
@ 2000-11-19  0:00                                   ` Robert Dewar
  2000-11-20  0:16                                     ` tmoran
  0 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-19  0:00 UTC (permalink / raw)


In article <uUWR5.441619$i5.7656071@news1.frmt1.sfba.home.com>,
  tmoran@acm.org wrote:

> Obviously.  But is it really true that *any* app using the
> facilities of MS Windows can be developed as easily, or
> easier, with GtkAda?

No, these are different tools, there are things that can be
done more easily with CLAW, but there are also things that
can be done more easily with GtkAda (in some respects the
facilities of GtkAda are higher level than those in CLAW,
but they certainly do not cover the full range of
functionality).
>
> Is there a release sequence of
> GtkAda versions that have been developed and tested with
> multiple Ada Windows, and
> instead tie you to ACT's Ada compiler?

That's a bit confused, but I assume you are asking whether
there are GtkAda versions that work with various Ada 95
compilers.

For this you have to ask other vendors. Unlike the situation
with a proprietary product like CLAW, anyone can take the
sources and adapt and distribute this for their own compiler.

ACT is in the business of making sure GtkAda works for GNU.
However, we try to generally maintain compatibility. We are
certainly aware that Rational for example has been at least
fiddling with GtkAda, and we have been happy to cooperate
with them on this.
I was talking more of compatiblity between operating systems
and architectures. We actually find that far more of our
users are concerned with this kind of portability, than with
portability to other compilers.

> Portability is not cheap.  Having worked on the development
> testing of CLAW on four different Ada compilers, including
> GNAT, ove the last few years I am acutely aware of that fact.
> It's also true that software vendors usually have strong
> economic incentives to promote lock-in to their products.

Right, which is why open source development works well, it
tends to counteract that. When sources are proprietary, people
have little chance to deal with that problem. In your case,
since CLAW is not open, you have to do all the work of making
sure it works on multiple Ada compilers. In the case of GtkAda,
different vendors can distribute that work among themselves.

Since GtkAda is part of the GNU project, the primary target is
of course GNU based tools (GNAT in particular), and now that the
GtkAda developers work for ACT that is certainly their primary
responsibility. However, as the release notes make clear we
generally try to avoid any compiler dependencies, and when
Rational has reported portability problems, we have been
able to fix them in the public sources without any difficulties.
Note that GNAT.HTable itself should be perfectly portable to
other Ada compilers, and there is nothing to stop Ada vendors
from taking components from the GNAT library (indeed for a while
Aonix was distributing some of our Annex G components with their
Ada 95 compiler, and may still be doing so for all I know, and
that's perfectly fine, providing that this is made clear and
appropriate licensing conditions are made clear to users (e.g.
appropriate copy of the GPL distributed with the product).

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-18  0:00                           ` Robert Dewar
  2000-11-18  0:00                             ` tmoran
@ 2000-11-19  0:00                             ` Lao Xiao Hai
  1 sibling, 0 replies; 168+ messages in thread
From: Lao Xiao Hai @ 2000-11-19  0:00 UTC (permalink / raw)




Robert Dewar wrote:

> In article <3A13427A.352C94BF@ix.netcom.com>,
>   Lao Xiao Hai <laoxhai@ix.netcom.com> wrote:
> >   Ada is fun again!
>
> I would also definitely have your students look at GtkAda
> which has the advantage of not being tied to windows.

Thanks Robert.   As always, it is a matter of selecting the toolset
most appropriate to the problem domain.  In this case, I think CLAW
is a good choice.   Other students, more involved with Linux and other
operating systems, will probably choose GtkAda.    Also, I am trying
to build a broader base of knowledge within our program so these
students, once in the field, will be able to engage each other in
intelligent discussion about the available choices.  This means I want
them to know about as many of those choices, in Ada, as I can
without confusing them.

Richard Riehle





^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-20  5:55                                         ` tmoran
@ 2000-11-20  0:00                                           ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-20  0:00 UTC (permalink / raw)


In article <E13S5.443413$i5.7723710@news1.frmt1.sfba.home.com>,
  tmoran@acm.org wrote:

>   "CLAW user" does not mean "CLAW vendor".

Well that's the point isn't it? :-)
In the open source world, there is no legal distinction, any
user of a product can sell it if they want to to third parties.

> >Presumably because you intend to make money selling it
>   CLAW is owned by RR Software, not me.

Oh sorry, I thought you were part of the development team
for CLAW.

> >We are not planning to make money selling GtkAda for use with
> >Rational etc compilers, ...

> Presumably you do intend to make money selling something and
> expect usage of GtkAda with GNAT to help,

Well we can certainly provide support for people wanting to
use GtkAda with GNAT, but so far we have no plans to provide
support for people who want to use GtkAda with other vendors
compilers.

> unless ACT's development and
> marketing of GtkAda is purely philanthropic.

Well the development of GtkAda was indeed a volunteer effort
in the open source arena. Ada Core Technologies, as above,
will provide support for GtkAda.

Philanthropy is not really the word you are looking for here.
Most certainly ACT spends some of its resources on trying to
help the success of Ada generally, and the continued development
and support of GtkAda is partly in this category (certainly the
fact that we make an effort to keep it easily portable to other
Ada compilers is in this category).


>


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Portability accross compilers
  2000-11-20  0:16                                     ` tmoran
@ 2000-11-20  0:00                                       ` Nicolas Brunot
  2000-11-20  0:00                                         ` Robert Dewar
  2000-11-20  3:18                                       ` Ada student homework ? Robert Dewar
  1 sibling, 1 reply; 168+ messages in thread
From: Nicolas Brunot @ 2000-11-20  0:00 UTC (permalink / raw)


tmoran@acm.org wrote :

>   To return to the previous topic, I trust we agree that GtkAda's
> portability across OSes sometimes, but not always, exceeds its
> disadvantages in missing functionality under Windows and its
> portability problems across Ada compiler vendors.

(I guess this doesn't deal any more with students homework)
I'd like to insist on the fact that portability is very important, and
that's right to recall that portability between compilers is no exception.

We've been using Ada since the beginning because we didn't want to be tied
to the OS, but also to the compiler, and we tested a lot.
Another advantage is that using several compilers can show code problems
you wouldn't detect with only one compiler.
And chek all along the development that your code work on several
compilers is a requirement, if you want to be ready in case you have to
change the compiler for any reason.
As any software, no compiler is perfect, and competition between them is
good for Ada programmers.

It's really too bad to see Ada tools we don't even think to use, because
they are tied to one compiler.






^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Portability accross compilers
  2000-11-20  0:00                                       ` Portability accross compilers Nicolas Brunot
@ 2000-11-20  0:00                                         ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-11-20  0:00 UTC (permalink / raw)


In article <3A18EA6E.4902F51@cadwin.com>,
  Nicolas Brunot <n.brunot@cadwin.com> wrote:

> (I guess this doesn't deal any more with students homework)
> I'd like to insist on the fact that portability is very
> important, and that's right to recall that portability between
> compilers is no exception.

Absolutely! That's why we work to make sure that GtkAda
is written as far as possible in entirely portable Ada. If you
find exceptions, report them as bugs to the GtkAda public
mailing list.



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-10  0:00                   ` Larry Kilgallen
  2000-11-10  0:00                     ` Nicolas Brunot
@ 2000-11-20  0:00                     ` Wes Groleau
  2000-11-20  0:00                       ` Larry Kilgallen
  1 sibling, 1 reply; 168+ messages in thread
From: Wes Groleau @ 2000-11-20  0:00 UTC (permalink / raw)



> If you find a C programmer who cannot learn Ada, you have not found a good
> programmer.

If a person is not capable of learning Ada, I doubt that he/she
is capable of ever getting something written in C to actually work.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-19  0:00                               ` Robert Dewar
  2000-11-19  0:00                                 ` tmoran
@ 2000-11-20  0:00                                 ` Wes Groleau
  1 sibling, 0 replies; 168+ messages in thread
From: Wes Groleau @ 2000-11-20  0:00 UTC (permalink / raw)



> Well not being tied to windows can never be a disadvantage

Bill would disagree with you.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-10  2:09             ` Ken Garlington
@ 2000-11-20  0:00               ` Wes Groleau
  0 siblings, 0 replies; 168+ messages in thread
From: Wes Groleau @ 2000-11-20  0:00 UTC (permalink / raw)



> 'A' and 'B' are your hands, 'Temp' is the table."

So we should have written  Table : xxxx := A;

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-09  0:00           ` Robert Dewar
  2000-11-10  0:12             ` Ehud Lamm
  2000-11-10  2:09             ` Ken Garlington
@ 2000-11-20  0:00             ` Wes Groleau
  2000-11-21  0:00               ` Robert Dewar
  2 siblings, 1 reply; 168+ messages in thread
From: Wes Groleau @ 2000-11-20  0:00 UTC (permalink / raw)



> I disagree, this is long-nameitis carried to absurd extremes.

My turn to get pedantic.  -itis means "inflammation of"
-osis means "presence of"


-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-20  0:00                     ` Wes Groleau
@ 2000-11-20  0:00                       ` Larry Kilgallen
  0 siblings, 0 replies; 168+ messages in thread
From: Larry Kilgallen @ 2000-11-20  0:00 UTC (permalink / raw)


In article <3A1959ED.FF484DF9@ftw.rsc.raytheon.com>, Wes Groleau <wwgrol@ftw.rsc.raytheon.com> writes:
> 
>> If you find a C programmer who cannot learn Ada, you have not found a good
>> programmer.
> 
> If a person is not capable of learning Ada, I doubt that he/she
> is capable of ever getting something written in C to actually work.

But that should not interfere with their job title or resume.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-18  0:00               ` John Magness
  2000-11-19  0:00                 ` Robert Dewar
@ 2000-11-20  0:00                 ` John English
       [not found]                 ` <3A2827A9.B54C260@ebox.tninet.se>
  2 siblings, 0 replies; 168+ messages in thread
From: John English @ 2000-11-20  0:00 UTC (permalink / raw)


John Magness wrote:
> 
> Or could it be that we now have a generation of students so accustomed to
> using the web as a research tool that they have not learned the use of a
> physical resource such as a book?

I have a cartoon from a newspaper on the wall of my office. The
caption is "OK, I'll read it -- how do you turn it on?"  ;-)

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-19  0:00                                   ` Robert Dewar
@ 2000-11-20  0:16                                     ` tmoran
  2000-11-20  0:00                                       ` Portability accross compilers Nicolas Brunot
  2000-11-20  3:18                                       ` Ada student homework ? Robert Dewar
  0 siblings, 2 replies; 168+ messages in thread
From: tmoran @ 2000-11-20  0:16 UTC (permalink / raw)


> > Is there a release sequence of
> > GtkAda versions that have been developed and tested with
> > multiple Ada Windows, and
> > instead tie you to ACT's Ada compiler?
>
> That's a bit confused, but I assume you are asking whether
> there are GtkAda versions that work with various Ada 95
> compilers.

  I think your newsreader may be broken.  The sentence said:

"Is there a release sequence of GtkAda versions that have been
developed and tested with multiple Ada compilers?  Or does GtkAda free
you from being tied to MS Windows, and instead tie you to ACT's Ada
compiler?"

  Is there?  Not "anyone can ...", or "... has been at least fiddling
with GtkAda,", but "Is there a release sequence of GtkAda versions
that have been developed and tested with multiple Ada compilers?"

>since CLAW is not open, you have to do all the work of making
>sure it works on multiple Ada compilers. In the case of GtkAda,
>different vendors can distribute that work among themselves.

  CLAW users have full source code and there is certainly no more
impediment to them making it work on some new fifth or sixth Ada
compiler, than to users making GtkAda work on a second or third or
fourth existing or new Ada compiler.  In fact, if a new Ada compiler
does not show any bugs or weirdnesses that need workarounds, porting
CLAW may need no changes at all!  It is true that we have taken it
upon ourselves to do that work for CLAW; I'm happy to hear that ACT
has "been happy to cooperate with them [Rational] on this [porting
GtkAda]."

  To return to the previous topic, I trust we agree that GtkAda's
portability across OSes sometimes, but not always, exceeds its
disadvantages in missing functionality under Windows and its
portability problems across Ada compiler vendors.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-20  0:16                                     ` tmoran
  2000-11-20  0:00                                       ` Portability accross compilers Nicolas Brunot
@ 2000-11-20  3:18                                       ` Robert Dewar
  2000-11-20  5:55                                         ` tmoran
  1 sibling, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-20  3:18 UTC (permalink / raw)


In article <s3_R5.442083$i5.7683711@news1.frmt1.sfba.home.com>,
  tmoran@acm.org wrote:
>
>   Is there?  Not "anyone can ...", or "... has been at least
> fiddling with GtkAda,", but "Is there a release sequence of
> GtkAda versions that have been developed and tested with
> multiple Ada compilers?"

No idea! We are not planning to make money selling GtkAda
for use with Rational etc compilers, so we are not in the
business of providing releases for other vendors compilers.

> CLAW users have full source code and there is certainly no
> more impediment to them making it work on some new fifth or
> sixth Ada compiler than to users making GtkAda work on a
> second or third or fourth existing or new Ada compiler.

Oh but there is! And you should not lose sight of it. There is
nothing to stop Rational or Aonix from selling and supporting
a version of GtkAda that works with their compilers. Far from
preventing it, we are happy to encourage it, and as I mentioned
we have responded to a few minor inputs from Rational on some
minor incompatibilities that were easily corrected.

With CLAW on the other hand, unless I misunderstand the license,
it would be a copyright and license violation for a third
party to produce this fifth port and sell it themselves. If
the CLAW license DOES allow free creation, distribution, and
sale-for-profit of deriviative versions, then it is indeed
Free Software in the normal sense, and it is a bad example
for my comparison.

> In fact, if a new Ada compiler does not show any bugs or
> weirdnesses that need workarounds, porting CLAW may need no
> changes at all!  It is true that we have taken it
> upon ourselves to do that work for CLAW

Presumably because you intend to make money selling it for
these other compilers, seeing as you have exclusive rights
to do so.

> I'm happy to hear that ACT has "been happy to cooperate with
> them [Rational] on this [porting GtkAda]."

As I said, we have no objection at all to other vendors using
parts of our technology that are complimentary. Indeed there
are quite a few users using mixtures of GNAT and Rational
technology, why not?

> To return to t previous topic, I trust we agree that
> GtkAda's portability across OSes sometimes, but not always,
> exceeds its disadvantages in missing functionality under
> Windows and its portability problems across Ada compiler
> vendors.

It's not a "disadvantage" of GtkAda that it does not take
advantage of some special Windows features, it is a critical
part of its design that it be portable across systems.

As to portability problems, I have no knowledge that there are
more problems in GtkAda than in CLAW. I know that you have
encountered quite a few portability problems with CLAW which
required new versions of compilers etc that fixed bugs (I
know we have fixed a couple of bugs that CLAW showed up,
since it uses quite complex features of Ada). In the case
of GtkAda, so far, we have not encountered any significant
portability problems, and those we have encountered were
fixed by trivial changes in the source. For example, GNAT
was allowing pragma Preelaborate in a package body, and there
were a couple of such instances in the GtkAda sources -- so
we simply made trivial changes to the sources (and fixed the
GNAT bug that allowed these wrongly placed pragmas, a bug
which interestingly had never been noticed before :-)
Certainly it would be our intention to make any such
necessary corrections if and when they prove to be
needed. One advantage of trying to keep the sources as
simple as possible, and therefore easily portable across
compilers is that it makes it easier to use GtkAda with
various different versions of GNAT.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
  2000-11-20  3:18                                       ` Ada student homework ? Robert Dewar
@ 2000-11-20  5:55                                         ` tmoran
  2000-11-20  0:00                                           ` Robert Dewar
  0 siblings, 1 reply; 168+ messages in thread
From: tmoran @ 2000-11-20  5:55 UTC (permalink / raw)


I'd prefer not to wander yet farther off the portability topic, but
I really must correct a few things you say about CLAW.

> > CLAW users have full source code and there is certainly no
> it would be a copyright and license violation for a third
> party to produce this fifth port and sell it themselves. If
  "CLAW user" does not mean "CLAW vendor".

>Presumably because you intend to make money selling it
  CLAW is owned by RR Software, not me.

>We are not planning to make money selling GtkAda for use with
>Rational etc compilers, ...
  Presumably you do intend to make money selling something and expect
usage of GtkAda with GNAT to help, unless ACT's development and
marketing of GtkAda is purely philanthropic.



^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-20  0:00             ` Wes Groleau
@ 2000-11-21  0:00               ` Robert Dewar
  2000-11-22  0:00                 ` Wes Groleau
  0 siblings, 1 reply; 168+ messages in thread
From: Robert Dewar @ 2000-11-21  0:00 UTC (permalink / raw)


In article <3A196194.6D3B2D8C@ftw.rsc.raytheon.com>,
  Wes Groleau <wwgrol@ftw.rsc.raytheon.com> wrote:
>
> > I disagree, this is long-nameitis carried to absurd
extremes.
>
> My turn to get pedantic.  -itis means "inflammation of"
> -osis means "presence of"


I definitely regard long-nameitis as an infectious disease, and
choose that suffix to express my opinion :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: if statements
  2000-11-21  0:00               ` Robert Dewar
@ 2000-11-22  0:00                 ` Wes Groleau
  0 siblings, 0 replies; 168+ messages in thread
From: Wes Groleau @ 2000-11-22  0:00 UTC (permalink / raw)


> > My turn to get pedantic.  -itis means "inflammation of"
> > -osis means "presence of"
> 
> I definitely regard long-nameitis as an infectious disease, and
> choose that suffix to express my opinion :-)

But it's not the long name that's inflamed, it's the reader.
:-) :-)


-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: Ada student homework ?
       [not found]                   ` <1dtW5.25958$6W1.1458704@news.flash.net>
@ 2000-12-12 20:52                     ` Stefan Skoglund
       [not found]                       ` <dKo%5.144$PE5.16970@read2.inet.fi>
  0 siblings, 1 reply; 168+ messages in thread
From: Stefan Skoglund @ 2000-12-12 20:52 UTC (permalink / raw)


Ken Garlington wrote:
> (a) the additional development expense: more source cards are required to be
> produced -- in Florida, 10 for president/vice-president alone; remember also
> this was a general election for a number of offices;
> 
> (b) the additional testing costs: the cards must be now extracted from the
> envelope without damage, the machines now have to count 10-20x the number of
> cards, etc.
> 
> (c) the potential for an increased error rate: accidentally reaching for the
> wrong boot, cards from one candidate put in another candidate's boot, etc.
> 
> (d) the maintenance impact: can't reuse the cards in future elections,
> greater likelihood that cards for a particular candidate might be
> prematurely exhausted, etc.

1. A envelope with a big notch.
   Large marking so that the ballot supervisor can verify that it is
   the proper card and that the voter doesn't try to fix the election by
   inserting 4 votes in the same envelope or if the box is for multiple
elections
   that the voter doesn't put the same card in multiple envelopes.

2. Sorting markings on the card - tadam you only need one box.

3. The clear text edge marking is for the ballot supervisor.

4. Cards shouldn't be reused because that is like asking for problems
!!!

5. The voting procedure should be arranged such that people with
   kind of handicap shouldn't have big problems and well pushin holes
with
   a pen doesn't match that requirement.

Here in Sweden the voting procedure is like this:
Simple printed cards of different color for the elections
ie municipal, regional and Riksdagen (swedish parliament).
On the card the party's name is printed together with a list of party
delegates to that assembly in a ranking ie the party have a say about
who gets
the seat. The voter can cross-over a delegate which could affect the
decision later
on. 
One box for each election and the supervisor before droping
the envelopes into its box checks that the card is of the proper
color.

Most circuits is small enough to allow hand-counting in most cases.




^ permalink raw reply	[flat|nested] 168+ messages in thread

* Re: election chit-chat (was Re: Ada student homework ?)
       [not found]                       ` <dKo%5.144$PE5.16970@read2.inet.fi>
@ 2000-12-19 16:36                         ` Robert Dewar
  0 siblings, 0 replies; 168+ messages in thread
From: Robert Dewar @ 2000-12-19 16:36 UTC (permalink / raw)


Please, it is bad enough having this completely irrelevant
stuff on CLA, but if you must wander off, change the subject
line as I have done above, so that we can easily delete
the thread. This has NOTHING WHATSOEVER to do with
student homework in Ada or in any other language for that
nmatter ...


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 168+ messages in thread

end of thread, other threads:[~2000-12-19 16:36 UTC | newest]

Thread overview: 168+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-03 14:42 if statements sc297
2000-11-03  0:00 ` David Starner
2000-11-07  0:00   ` John English
2000-11-13  0:00   ` Dale Pontius
2000-11-03 16:09 ` Larry Kilgallen
2000-11-03  0:00   ` tmoran
2000-11-03  0:00     ` David Starner
2000-11-05  0:00       ` tmoran
2000-11-06  0:00         ` David Starner
2000-11-08  0:14           ` Alejandro R. Mosteo
2000-11-08  0:00             ` Alejandro Villanueva
2000-11-08  0:00               ` Georg Bauhaus
2000-11-09  3:50               ` Ken Garlington
2000-11-07  0:00         ` John English
2000-11-03  0:00     ` Larry Kilgallen
2000-11-06  0:00       ` Brian Orpin
2000-11-07  0:00     ` John English
2000-11-08  5:22       ` Ken Garlington
2000-11-06  0:00 ` Daniel Allex
2000-11-07  0:00   ` dmitry6243
2000-11-07  0:00     ` Jean-Pierre Rosen
2000-11-08  0:00       ` dmitry6243
2000-11-07  0:00   ` Robert Dewar
2000-11-07  0:00     ` Larry Kilgallen
2000-11-08  0:00     ` Alejandro Villanueva
2000-11-08  0:00       ` Daniel Allex
2000-11-09  3:54       ` Ken Garlington
2000-11-09  5:24       ` Robert Dewar
2000-11-09  0:00         ` constants v variables (was Re: if statements) Martin Dowie
2000-11-09  0:00           ` Robert A Duff
2000-11-09  0:00             ` Robert Dewar
2000-11-09  0:00             ` Florian Weimer
2000-11-10  2:13               ` Ken Garlington
2000-11-10  5:59                 ` Brian Rogoff
2000-11-09  0:00             ` Martin Dowie
2000-11-09  0:00           ` Robert Dewar
2000-11-09  0:00         ` if statements Ken Garlington
2000-11-09  0:00           ` Robert Dewar
2000-11-10  0:12             ` Ehud Lamm
2000-11-10  2:09             ` Ken Garlington
2000-11-20  0:00               ` Wes Groleau
2000-11-20  0:00             ` Wes Groleau
2000-11-21  0:00               ` Robert Dewar
2000-11-22  0:00                 ` Wes Groleau
2000-11-09  0:00         ` Marin David Condic
2000-11-09  0:00           ` Robert Dewar
2000-11-10  0:00             ` Larry Kilgallen
2000-11-10  1:58           ` Ken Garlington
2000-11-10  3:53             ` Robert Dewar
2000-11-08  0:00     ` Ada student homework ? Nicolas Brunot
2000-11-08  0:00       ` Robert Dewar
2000-11-08  0:00         ` Nicolas Brunot
2000-11-08  0:00           ` Ted Dennison
2000-11-08  0:00             ` Nicolas Brunot
2000-11-08  0:00               ` Jerry Petrey
2000-11-08  0:00             ` Lao Xiao Hai
2000-11-09  0:00             ` Marin David Condic
2000-11-10  2:15               ` Ken Garlington
2000-11-10  0:00                 ` Marin David Condic
2000-11-18  0:00               ` John Magness
2000-11-19  0:00                 ` Robert Dewar
2000-11-19  0:00                   ` Larry Kilgallen
2000-11-20  0:00                 ` John English
     [not found]                 ` <3A2827A9.B54C260@ebox.tninet.se>
     [not found]                   ` <1dtW5.25958$6W1.1458704@news.flash.net>
2000-12-12 20:52                     ` Stefan Skoglund
     [not found]                       ` <dKo%5.144$PE5.16970@read2.inet.fi>
2000-12-19 16:36                         ` election chit-chat (was Re: Ada student homework ?) Robert Dewar
2000-11-08  0:00           ` Ada student homework ? Larry Kilgallen
2000-11-08  0:00             ` Nicolas Brunot
2000-11-14  0:00               ` Ronald Cole
2000-11-08  0:00       ` Larry Kilgallen
2000-11-08  0:00         ` Nicolas Brunot
2000-11-08  0:00           ` Brian Rogoff
2000-11-09  0:00             ` Nicolas Brunot
2000-11-09  0:00               ` Robert Dewar
2000-11-10  0:08                 ` Ehud Lamm
2000-11-10  0:00               ` Brian Rogoff
2000-11-08  0:00           ` Lao Xiao Hai
2000-11-09  0:00             ` Nicolas Brunot
2000-11-09  0:00               ` Lao Xiao Hai
2000-11-10  0:00                 ` Nicolas Brunot
2000-11-10  0:00                   ` Larry Kilgallen
2000-11-10  0:00                     ` Nicolas Brunot
2000-11-10  0:00                       ` Dan Nagle
2000-11-10  0:00                         ` Nicolas Brunot
2000-11-10  0:00                           ` Larry Kilgallen
2000-11-10  0:00                             ` Nicolas Brunot
2000-11-11  0:00                               ` Robert Dewar
2000-11-12  6:54                                 ` Brian Rogoff
2000-11-12  0:00                                   ` Robert Dewar
2000-11-11  0:00                           ` Robert Dewar
2000-11-13  0:00                             ` Nicolas Brunot
2000-11-13  0:00                               ` Robert Dewar
2000-11-13  0:00                                 ` gdemont
2000-11-13  0:00                                 ` Ken Garlington
2000-11-13  0:00                                 ` Nicolas Brunot
2000-11-13  0:00                                   ` Pascal Obry
2000-11-13  0:00                                 ` gdemont
2000-11-13  0:00                                   ` Ada student homework ?[OS/2 Comments] tjerick
2000-11-14  0:00                                   ` Ada student homework ? Georg Bauhaus
2000-11-14  5:16                                   ` Robert Dewar
2000-11-14  0:00                                     ` John English
2000-11-14  0:00                                       ` gdemont
2000-11-14  0:00                                       ` Ole-Hjalmar Kristensen
2000-11-14  0:00                                     ` Nicolas Brunot
2000-11-15  0:00                                       ` Robert Dewar
2000-11-15  0:00                                         ` Ada student homework ? I give up Nicolas Brunot
2000-11-15  0:00                                           ` Robert Dewar
2000-11-14  0:00                                 ` Ada student homework ? dmitry6243
2000-11-15  0:00                             ` Larry Kilgallen
     [not found]                             ` <3A0FCBAD.824095C6@cadwin.cOrganization: LJK Software <5E93Ivxu6GwO@eisner.decus.org>
2000-11-18  0:00                               ` Robert Dewar
2000-11-20  0:00                     ` Wes Groleau
2000-11-20  0:00                       ` Larry Kilgallen
2000-11-10  0:00                 ` Nicolas Brunot
2000-11-10  0:00                   ` Marin David Condic
2000-11-10  0:00                     ` Randy Brukardt
2000-11-11  0:00                       ` Marin David Condic
2000-11-15  0:00                         ` Lao Xiao Hai
2000-11-18  0:00                           ` Robert Dewar
2000-11-18  0:00                             ` tmoran
2000-11-19  0:00                               ` Robert Dewar
2000-11-19  0:00                                 ` tmoran
2000-11-19  0:00                                   ` Robert Dewar
2000-11-20  0:16                                     ` tmoran
2000-11-20  0:00                                       ` Portability accross compilers Nicolas Brunot
2000-11-20  0:00                                         ` Robert Dewar
2000-11-20  3:18                                       ` Ada student homework ? Robert Dewar
2000-11-20  5:55                                         ` tmoran
2000-11-20  0:00                                           ` Robert Dewar
2000-11-20  0:00                                 ` Wes Groleau
2000-11-19  0:00                             ` Lao Xiao Hai
2000-11-10  0:00                     ` Nicolas Brunot
2000-11-10  0:00                       ` David Starner
2000-11-11  0:00                       ` Robert Dewar
2000-11-13  0:00                         ` Nicolas Brunot
2000-11-10  0:00                     ` Ole-Hjalmar Kristensen
2000-11-11  0:00                   ` Robert Dewar
2000-11-13  0:00                     ` gdemont
2000-11-10  0:00                 ` mjsilva
2000-11-08  0:00           ` Chad R. Meiners
2000-11-08  0:00             ` Ted Dennison
2000-11-09  5:11               ` Robert Dewar
2000-11-18  0:00               ` John Magness
2000-11-09  5:04           ` Robert Dewar
2000-11-10  0:27             ` Subsetting Ada Ted Dennison
2000-11-07  0:00   ` if statements Wes Groleau
2000-11-08  0:00     ` John English
2000-11-08  0:00       ` Wes Groleau
2000-11-09  3:43         ` Ken Garlington
2000-11-07  0:00   ` John English
2000-11-07  0:00   ` Ken Garlington
2000-11-07  0:00     ` John English
2000-11-07  0:00       ` Robert Dewar
2000-11-08  0:00         ` John English
2000-11-08  0:00           ` Georg Bauhaus
2000-11-09  4:58           ` Robert Dewar
2000-11-09  0:00             ` Ken Garlington
2000-11-09  0:00               ` Designing test suites (was: if statements) Larry Kilgallen
2000-11-09  0:00             ` if statements John English
2000-11-08  5:29       ` Ken Garlington
2000-11-08  0:00         ` John English
2000-11-08  0:00           ` Ken Garlington
2000-11-07  0:00 ` John English
2000-11-07  0:00   ` Robert Dewar
2000-11-10  6:09 ` DJack143
2000-11-11  0:00   ` Here we go again (Was: if statements) Frank Christiny
  -- strict thread matches above, loose matches on Subject: below --
2000-11-09  0:00 if statements James Hassett
2000-11-10  0:02 ` Robert Dewar
2000-11-14  0:00 Duncan Sands
2000-11-14  0:00 ` Ken Garlington

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