comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian_drummond@btconnect.com>
Subject: Re: Suggestions for topics in an Ada course?
Date: Mon, 12 Nov 2007 13:34:25 +0000
Date: 2007-11-12T13:34:25+00:00	[thread overview]
Message-ID: <dbkgj3p0bk55i9qqjf24l16pff1hf5mg3o@4ax.com> (raw)
In-Reply-To: 47383b63$0$27066$4d3efbfe@news.sover.net

On Mon, 12 Nov 2007 06:39:20 -0500, "Peter C. Chapin"
<pchapin@sover.net> wrote:

>wilson wrote:
>
>> That first language, as someone commented earlier, sets up all kinds of
>> pathways (ruts?) in the brain that are very hard to modify.
>> 
>> This is not to discourage you from trying.  God knows we need more
>> people like you.  It is just a note about possible difficulties along
>> the way.
>
>Thanks for the warning. I know people are influenced, for better or
>worse, by what they already know. How could it be otherwise? Part of my
>job as an educator is to figure out how to teach people new things
>despite their previous bias. One can't work in this field without
>believing that it is possible.

Perhaps the way is to contrive half a dozen realistic examples where
errors go unnoticed (except by the bad guys!), and to show how a type
system will (a) stop some errors at compilation
(b) eliminate others altogether (for array size n, iterate over
array'range instead over 0 to n ... *)
(c) catch others via exceptions instead of propagating incorrect results

(yes, the C prototypes will have bugs built in; bonus points for finding
them!)

Create essentially the same console input system in both languages and
challenge them to break it...

>Steve's suggestion of looking at tasking is good. That is a nice feature
>of Ada and also, as he said, a topic of current interest with a certain
>glamor. I'll have to think about that some more.

This was the first thing that struck me (coming to Ada from VHDL which
is probably equally misunderstood, but where parallelism is even more
simply expressed). There is a lot of grief and woe about the difficulty
of exploiting multiple cores and how long it will take to develop the
tools to catch up...

there's a wonderful little example in Grady Booch/Doug Bryan (Software
Engineering with Ada) - ch 14 - on matrix manipulation with tasks. The
actual algorithm could be anything massively parallel; prime numbers?
searches? shading triangles? just create an array of tasks (dynamically
sized to no. of cores?) and iterate over it twice; once to feed it
inputs, once to collect the finished work.

Compare and contrast with fork/join etc...

IMO C++ has done us one big favour.

I was put off Ada for about 20 years becuse of rumours about its size
and complexity... with the acceptance of C++, that argument is no longer
valid.

- Brian



  reply	other threads:[~2007-11-12 13:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-11 16:09 Suggestions for topics in an Ada course? Peter C. Chapin
2007-11-11 17:15 ` Jeffrey Creem
2007-11-11 18:29   ` Peter C. Chapin
2007-11-11 19:32 ` Larry Kilgallen
2007-11-12 11:33   ` Peter C. Chapin
2007-11-12  0:02 ` Ed Falis
2007-11-12 11:44   ` Peter C. Chapin
2007-11-12  0:59 ` Steve
2007-11-12  4:29   ` wilson
2007-11-12 11:39     ` Peter C. Chapin
2007-11-12 13:34       ` Brian Drummond [this message]
2007-11-13  3:31         ` Peter C. Chapin
2007-11-13 13:50           ` Maciej Sobczak
2007-11-13 13:53           ` Brian Drummond
2007-11-12  7:42   ` adaworks
2007-11-12 11:40     ` Peter C. Chapin
2007-11-12 11:57   ` Stefan Lucks
2007-11-12 11:54 ` Stefan Lucks
2007-11-13  3:27   ` Peter C. Chapin
2007-11-12 11:56 ` anon
2007-11-12 15:53   ` John McCormick
2007-11-12 16:12     ` Hyman Rosen
2007-11-12 16:13       ` Hyman Rosen
2007-11-12 17:38       ` adaworks
2007-11-12 18:12         ` Hyman Rosen
2007-11-12 17:45     ` adaworks
2007-11-12 20:45       ` Jerry Petrey
2007-11-13  3:33     ` Peter C. Chapin
2007-11-13  5:17       ` jimmaureenrogers
2007-11-16 15:48 ` Marco
replies disabled

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