* Re: Suggestions for topics in an Ada course?
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
` (5 subsequent siblings)
6 siblings, 1 reply; 30+ messages in thread
From: Jeffrey Creem @ 2007-11-11 17:15 UTC (permalink / raw)
Peter C. Chapin wrote:
> I have the luxury of teaching a course next semester that can be about
> anything I want. It's a course on "special topics" and the content is at
> the discretion of the instructor.
>
> I would like to teach the students some Ada.
>
> The students in question are already competent programmers (in the
> college student sense, that is). They have taken two courses in C/C++
> and so should be familiar with basic programming concepts, including
> concepts like encapsulation, (operator) overloading, and inheritance.
> The programs they have worked on so far have been typical programming
> exercises given in first courses: nothing large or complicated.
>
..stuff delete
>
> Anyway, I'm sure I can put something together. However, I thought I
> would ask here to see if anyone has some suggestions for libraries,
> tools, etc, that I might look at as I prepare materials for next semester.
>
> In case it matters, I'll be using the GNAT compiler.
>
> Thanks!
>
> Peter
Dr. McCormick used to have a 1 credit Ada course at the State University
of New York. Not sure what rights he has to the example programs and
course outline.
He is now at the university of Northern Iowa.
http://cns2.uni.edu/~mccormic/
Perhaps he has some materials/ideas to share.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
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 19:32 ` Larry Kilgallen
2007-11-12 11:33 ` Peter C. Chapin
2007-11-12 0:02 ` Ed Falis
` (4 subsequent siblings)
6 siblings, 1 reply; 30+ messages in thread
From: Larry Kilgallen @ 2007-11-11 19:32 UTC (permalink / raw)
In article <4737291e$0$27064$4d3efbfe@news.sover.net>, "Peter C. Chapin" <pchapin@sover.net> writes:
> I have the luxury of teaching a course next semester that can be about
> anything I want.
> The course I'll be teaching has two hours of lecture per week plus a
> three hour "lab" period where the students can work on some sort of
> project or assignment in a supervised setting. So there is a fair amount
> of time available.
To emulate the real world, I would suggest something where students
have to modify code written by others (perhaps different students
in the earlier parts of the class) without participation of those
others.
I could envision grading schemes that involve not just how well a
given student does but how their team does, and how the successor
team does with code written by the team that student was on in the
first place.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-11 19:32 ` Larry Kilgallen
@ 2007-11-12 11:33 ` Peter C. Chapin
0 siblings, 0 replies; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-12 11:33 UTC (permalink / raw)
Larry Kilgallen wrote:
> To emulate the real world, I would suggest something where students
> have to modify code written by others (perhaps different students
> in the earlier parts of the class) without participation of those
> others.
>
> I could envision grading schemes that involve not just how well a
> given student does but how their team does, and how the successor
> team does with code written by the team that student was on in the
> first place.
I appreciate your thoughts and I agree that doing something like this
would be good. However, I think it would be hard to pull this off in an
immature (first time) course. The classroom situation is inherently
artificial for the sake of providing a uniform educational experience
and generating fair grades. Some things from the real world are hard to
simulate outside the scope of special projects, and the like. This isn't
to say that it shouldn't be tried or that it can't be done. However,
it's probably not something I'd want to try on the first iteration.
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
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 19:32 ` Larry Kilgallen
@ 2007-11-12 0:02 ` Ed Falis
2007-11-12 11:44 ` Peter C. Chapin
2007-11-12 0:59 ` Steve
` (3 subsequent siblings)
6 siblings, 1 reply; 30+ messages in thread
From: Ed Falis @ 2007-11-12 0:02 UTC (permalink / raw)
On Sun, 11 Nov 2007 11:09:06 -0500, Peter C. Chapin <pchapin@sover.net>
wrote:
> I have the luxury of teaching a course next semester that can be about
> anything I want. It's a course on "special topics" and the content is at
> the discretion of the instructor.
>
> I would like to teach the students some Ada.
Maybe you should join the AdaCore GAP program, and ask some of the other
members there for ideas. GAP = "GNAT Academic Program".
- Ed
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 0:02 ` Ed Falis
@ 2007-11-12 11:44 ` Peter C. Chapin
0 siblings, 0 replies; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-12 11:44 UTC (permalink / raw)
Ed Falis wrote:
> Maybe you should join the AdaCore GAP program, and ask some of the other
> members there for ideas. GAP = "GNAT Academic Program".
Thanks for the suggestion. Actually my institution is already a member
and I do talk about Ada some in my programming languages class. This new
course is different because I would use Ada throughout with a heavier
emphasis on actually programming with it.
Alas, there is a quirk with my email address that prevents me from
posting to the GAP list. I probably will do so once that's straightened
out. So those of you on the GAP list, please bear with me if you see
this query again later!
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-11 16:09 Suggestions for topics in an Ada course? Peter C. Chapin
` (2 preceding siblings ...)
2007-11-12 0:02 ` Ed Falis
@ 2007-11-12 0:59 ` Steve
2007-11-12 4:29 ` wilson
` (2 more replies)
2007-11-12 11:54 ` Stefan Lucks
` (2 subsequent siblings)
6 siblings, 3 replies; 30+ messages in thread
From: Steve @ 2007-11-12 0:59 UTC (permalink / raw)
"Peter C. Chapin" <pchapin@sover.net> wrote in message
news:4737291e$0$27064$4d3efbfe@news.sover.net...
[snip]
> course? I would like to talk about something that shows the language in
> a good light as well as captures student interest. Some kind of
An area that might capture students' interest is tasking. Since the current
trend is toward multi-core processors and Ada has tasking built into the
language, it's a natural fit.
I'm not in academics, but one thing that I find that people with a
C/C++/Java background have a hard time understanding is strong typing. They
"think" that C++ has strong typing, teach them what strong typing really is.
Regards,
Steve
(The Duck)
> introduction to a GUI library or network library might be good (the
> students have never done any GUI or network programming before). Also
> because I teach in a computer engineering curriculum, low level device
> control applications would be reasonable and appropriate as well.
>
> Anyway, I'm sure I can put something together. However, I thought I
> would ask here to see if anyone has some suggestions for libraries,
> tools, etc, that I might look at as I prepare materials for next semester.
>
> In case it matters, I'll be using the GNAT compiler.
>
> Thanks!
>
> Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 0:59 ` Steve
@ 2007-11-12 4:29 ` wilson
2007-11-12 11:39 ` Peter C. Chapin
2007-11-12 7:42 ` adaworks
2007-11-12 11:57 ` Stefan Lucks
2 siblings, 1 reply; 30+ messages in thread
From: wilson @ 2007-11-12 4:29 UTC (permalink / raw)
I have to go along with Steve (the Duck) about the difficulties of
teaching Ada to people with a strong C family background. My experience
is that their understanding of such fundamental terms such as classes,
procedures, functions, etc. is quite different from the use of those terms
in Ada. I know at least one company gave up trying to switch C family
programers to Ada because the programmers never really understood what
they were doing.
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.
Lee
On Sun, 11 Nov 2007 19:59:48 -0500, Steve <nospam_steved94@comcast.net>
wrote:
> "Peter C. Chapin" <pchapin@sover.net> wrote in message
> news:4737291e$0$27064$4d3efbfe@news.sover.net...
> [snip]
>> course? I would like to talk about something that shows the language in
>> a good light as well as captures student interest. Some kind of
>
> An area that might capture students' interest is tasking. Since the
> current
> trend is toward multi-core processors and Ada has tasking built into the
> language, it's a natural fit.
>
> I'm not in academics, but one thing that I find that people with a
> C/C++/Java background have a hard time understanding is strong typing.
> They
> "think" that C++ has strong typing, teach them what strong typing really
> is.
>
> Regards,
> Steve
> (The Duck)
>
>> introduction to a GUI library or network library might be good (the
>> students have never done any GUI or network programming before). Also
>> because I teach in a computer engineering curriculum, low level device
>> control applications would be reasonable and appropriate as well.
>>
>> Anyway, I'm sure I can put something together. However, I thought I
>> would ask here to see if anyone has some suggestions for libraries,
>> tools, etc, that I might look at as I prepare materials for next
>> semester.
>>
>> In case it matters, I'll be using the GNAT compiler.
>>
>> Thanks!
>>
>> Peter
>
>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 4:29 ` wilson
@ 2007-11-12 11:39 ` Peter C. Chapin
2007-11-12 13:34 ` Brian Drummond
0 siblings, 1 reply; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-12 11:39 UTC (permalink / raw)
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.
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.
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 11:39 ` Peter C. Chapin
@ 2007-11-12 13:34 ` Brian Drummond
2007-11-13 3:31 ` Peter C. Chapin
0 siblings, 1 reply; 30+ messages in thread
From: Brian Drummond @ 2007-11-12 13:34 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 13:34 ` Brian Drummond
@ 2007-11-13 3:31 ` Peter C. Chapin
2007-11-13 13:50 ` Maciej Sobczak
2007-11-13 13:53 ` Brian Drummond
0 siblings, 2 replies; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-13 3:31 UTC (permalink / raw)
Brian Drummond wrote:
> 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.
I hear this. Twenty years ago we ran an Ada compiler on a 8088 based
system with 640 Kbytes of RAM running MS-DOS (Janus Ada). I seriously
doubt if one could squeeze a C++98 compiler into such a small box. Ada
might have looked pretty big in 1987. It doesn't any more.
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-13 3:31 ` Peter C. Chapin
@ 2007-11-13 13:50 ` Maciej Sobczak
2007-11-13 13:53 ` Brian Drummond
1 sibling, 0 replies; 30+ messages in thread
From: Maciej Sobczak @ 2007-11-13 13:50 UTC (permalink / raw)
On 13 Lis, 04:31, "Peter C. Chapin" <pcha...@sover.net> wrote:
> Twenty years ago we ran an Ada compiler on a 8088 based
> system with 640 Kbytes of RAM running MS-DOS (Janus Ada). I seriously
> doubt if one could squeeze a C++98 compiler into such a small box.
Me too, especially if we take into account that twenty years ago there
was no C++98.
I think you have mixed two concepts anyway. The size of the
compilation system and the size of the compiled program are two
different things.
You might argue that there is still need to *run* programs on
8088/640kB hardware, but you will not convince me that there is a need
to *compile* them on the same hardware.
The size of compilation system does not matter and languages should
not be compared based on this factor.
--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-13 3:31 ` Peter C. Chapin
2007-11-13 13:50 ` Maciej Sobczak
@ 2007-11-13 13:53 ` Brian Drummond
1 sibling, 0 replies; 30+ messages in thread
From: Brian Drummond @ 2007-11-13 13:53 UTC (permalink / raw)
On Mon, 12 Nov 2007 22:31:48 -0500, "Peter C. Chapin"
<pchapin@sover.net> wrote:
>Brian Drummond wrote:
>
>> 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.
>
>I hear this. Twenty years ago we ran an Ada compiler on a 8088 based
>system with 640 Kbytes of RAM running MS-DOS (Janus Ada). I seriously
>doubt if one could squeeze a C++98 compiler into such a small box. Ada
>might have looked pretty big in 1987. It doesn't any more.
Compared with Modula-2, which would fit into 64k for CP/M (FTL) and
really fly under MS/DOS (JPI/Topspeed) it was probably true then. But
the world has changed...
- Brian
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 0:59 ` Steve
2007-11-12 4:29 ` wilson
@ 2007-11-12 7:42 ` adaworks
2007-11-12 11:40 ` Peter C. Chapin
2007-11-12 11:57 ` Stefan Lucks
2 siblings, 1 reply; 30+ messages in thread
From: adaworks @ 2007-11-12 7:42 UTC (permalink / raw)
"Steve" <nospam_steved94@comcast.net> wrote in message
news:IbidnT7gyP70OKranZ2dnUVZ_vumnZ2d@comcast.com...
>
> I'm not in academics, but one thing that I find that people with a C/C++/Java
> background have a hard time understanding is strong typing. They "think" that
> C++ has strong typing, teach them what strong typing really is.
>
Actually, strong typing is relatively easy to explain. With Ada, the most
difficult
part of the language is the visibility rules. I have known people who have
been
using Ada for many years who never quite "get it" with regard to the visibility
rules. In my experience, once someone does understand the visibility rules,
their
ability to design and program with Ada becomes much better.
Chapter Eight of the ALRM is where the essence of engineering lies in Ada.
Knowing
when and how to design with limited types demonstrates a level of sophistication
that
is quite rare. Being able to design packages with well-formed utilization of
information
hiding, abstraction, and encapsulation using Ada's several features that support
those
ideas, is more difficult than type design alone.
At the risk of seeming to be self-promoting, my I suggest that you consider
having those
students download a copy of Ada Distilled from the AdaIC or AdaCore website.
BTW,
I recently began work on updating Ada Distilled for the 2005 standard.
For introductory students I currently use JEWL as part of the teaching. The
JEWL packages
themselves illustrate some of the best design features possible with Ada. The
example programs
make great a starting point for students who want to see their programs in a GUI
format.
Richard Riehle
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 7:42 ` adaworks
@ 2007-11-12 11:40 ` Peter C. Chapin
0 siblings, 0 replies; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-12 11:40 UTC (permalink / raw)
adaworks@sbcglobal.net wrote:
> At the risk of seeming to be self-promoting, my I suggest that you consider
> having those
> students download a copy of Ada Distilled from the AdaIC or AdaCore website.
> BTW,
> I recently began work on updating Ada Distilled for the 2005 standard.
That sounds great!
> For introductory students I currently use JEWL as part of the teaching. The
> JEWL packages
> themselves illustrate some of the best design features possible with Ada. The
> example programs
> make great a starting point for students who want to see their programs in a GUI
> format.
That sounds interesting too. I'll take a look.
Thanks.
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 0:59 ` Steve
2007-11-12 4:29 ` wilson
2007-11-12 7:42 ` adaworks
@ 2007-11-12 11:57 ` Stefan Lucks
2 siblings, 0 replies; 30+ messages in thread
From: Stefan Lucks @ 2007-11-12 11:57 UTC (permalink / raw)
> An area that might capture students' interest is tasking. Since the current
> trend is toward multi-core processors and Ada has tasking built into the
> language, it's a natural fit.
Yes, that was my experience.
> I'm not in academics, but one thing that I find that people with a
> C/C++/Java background have a hard time understanding is strong typing. They
> "think" that C++ has strong typing, teach them what strong typing really is.
My students where pretty good at catching this.
--
Stefan Lucks (moved to Bauhaus-University Weimar, Germany)
<Stefan.Lucks at medien.uni-weimar.de>
------ I love the taste of Cryptanalysis in the morning! ------
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-11 16:09 Suggestions for topics in an Ada course? Peter C. Chapin
` (3 preceding siblings ...)
2007-11-12 0:59 ` Steve
@ 2007-11-12 11:54 ` Stefan Lucks
2007-11-13 3:27 ` Peter C. Chapin
2007-11-12 11:56 ` anon
2007-11-16 15:48 ` Marco
6 siblings, 1 reply; 30+ messages in thread
From: Stefan Lucks @ 2007-11-12 11:54 UTC (permalink / raw)
On Sun, 11 Nov 2007, Peter C. Chapin wrote:
> I have the luxury of teaching a course next semester that can be about
> anything I want. It's a course on "special topics" and the content is at
> the discretion of the instructor.
I had the luxury of doing something similar in the previous semester to a
similar group of students. (I.e., having some experience in programming in
either Java or C.) I had two hours of teaching a week, plus two hours
every second week for a tutorial, plus some time for a final
"mini-project".
After the exams, I asked the students for their favourite topic during
that course. To my surprise, the topic the majority liked most was
parallel programming (or "Ada tasks").
You can find some information about the course, including my slides (in
German, alas), on the following web page (sorry for the length URL):
http://www.uni-weimar.de/cms/medien/mediensicherheit/teaching/software-entwicklung-fuer-sichere-verteilte-systeme.html
> Anyway, I'm sure I can put something together. However, I thought I
> would ask here to see if anyone has some suggestions for libraries,
> tools, etc, that I might look at as I prepare materials for next semester.
Apart from the development environment (I think, all the students used
GPS), I used the "tg test generator"
http://www.free-software-consulting.com/projects/tg/index.html
for the introduction to systematic black-box testing.
It would be very interesting for me to hear what topics you choose and
what your experiences where ...
--
Stefan Lucks (moved to Bauhaus-University Weimar, Germany)
<Stefan.Lucks at medien.uni-weimar.de>
------ I love the taste of Cryptanalysis in the morning! ------
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-11 16:09 Suggestions for topics in an Ada course? Peter C. Chapin
` (4 preceding siblings ...)
2007-11-12 11:54 ` Stefan Lucks
@ 2007-11-12 11:56 ` anon
2007-11-12 15:53 ` John McCormick
2007-11-16 15:48 ` Marco
6 siblings, 1 reply; 30+ messages in thread
From: anon @ 2007-11-12 11:56 UTC (permalink / raw)
For Concepts
First: Ada Conformity
Second: Elaboration
Third: The compiling process [ compile / bind / link ].
A. Compiler. Limited command line options. And they
not needed to maintain portability with
other operating environments. Unlike C
1. No conditional coding. Unlike C
B. The Bind(er) -- Not used in C.
0. For your student why is Binding require for Ada
code.
1. Performs consistent checking
2. Calculates elaboration order.
3. Determines the object code needed.
4. Builds a small program that calls the
Elaboration routines in correct order and
then calls main procedure that is the
users program then calls finalization
routines.
C. Linker
Fourth: Built-in constructs that can aid the programmer to create
a higher integrity and efficient algorithm in a timely
matter. Such as using Attributes and Exceptions for data
validation and error checking.
Example : X'Valid -- The attribute Valid returns true if
the value of X is valid for X's
pre-defined type.
Assignment:
The following was my first assignment in my Ada class. Given on the
first day of class. Due Date was 2 weeks.
Create 5 task: Tasks may be with a single procedure or grouped into
one procedure and two packages. Signals are string that refect the
action being perform or simulated.
The following is basic an outline of the operation of the partition.
Package 1
Task 1: Non functional until started by Task 2
Obtain a random number every X seconds from a pseudo
random number generator
function (user created).
Transmit each number to Task 3.
Task 2: Wait until Signaled from task 4
Startup
Signal Task 4 that startup command has been received.
Start Task 1
Signal Task 4 that Task 1 is operational.
Shutdown
Signal Task 4 that shutdown command has been received.
Preform Task 1 shutdown
Signal Task 4 that Task 1 has shutdown.
-- Preform Task 2 shutdown
Signal Task 4 that Task 2 has shutdown.
Package 2
Task 3: Operational base on commands from Task 4
Receive a number from Task 1
Calculate a Sum of these numbers
Transmit the sum to Task 5 every Y seconds.
Clear and reset Sum
Task 4: Wait until Signaled from task 5
Startup
Signal Task 5 that startup command has been received.
Signal Task 2 to perform startup
Retransmit any signals from Task 2 to Task 5
Start Task 3
Signal Task 5 that Task 3 is operational.
Shutdown
Signal Task 5 that shutdown command has been received.
Signal Task 2 to perform shutdown
Retransmit any signals from Task 2 to Task 5
Preform Task 3 shutdown
Signal Task 5 that Task 3 has shutdown.
-- Preform Task 4 shutdown
Signal Task 5 that Task 4 has shutdown.
Procedure 1 which contains one task
Task 5: A. Receive the number from Task 3
Calculate a total
print Total and the Sum
keep a running total.
Procedure 1. Wait for command from user
Startup
Signal Task 4 to perform startup
Print any signals received from Task 4
Startup Task 5 counting routine ( part A )
Shutdown
Wait for shutdown command from user
Signal Task 4 to perform shutdown
Print any signals received from Task 4
Print a shutdown signal that Task 5 is shutdown
Print a shutdown signal that Task 5 has shutdown
This project may seam complex but it is not. TASK 2 and 4 are
operational duplicates in nature. TASK 3 and 5 are functional
similar, they both perform a summation, except for Task 3 which
transmit the data to another task while Task 5 just prints the data.
Also, another point of decision in the lab or classrom. Is procedure 1
a seperate Task, without the convension of a Task body.
In <4737291e$0$27064$4d3efbfe@news.sover.net>, "Peter C. Chapin" <pchapin@sover.net> writes:
>I have the luxury of teaching a course next semester that can be about
>anything I want. It's a course on "special topics" and the content is at
>the discretion of the instructor.
>
>I would like to teach the students some Ada.
>
>The students in question are already competent programmers (in the
>college student sense, that is). They have taken two courses in C/C++
>and so should be familiar with basic programming concepts, including
>concepts like encapsulation, (operator) overloading, and inheritance.
>The programs they have worked on so far have been typical programming
>exercises given in first courses: nothing large or complicated.
>
>The course I'll be teaching has two hours of lecture per week plus a
>three hour "lab" period where the students can work on some sort of
>project or assignment in a supervised setting. So there is a fair amount
>of time available.
>
>My thought was to cover the basics of Ada, the language, in the first
>half (third?) of the course. My expectation is that because of their
>background, the students will pick up the basic ideas fairly quickly.
>The question becomes: in what direction should I take the rest of the
>course? I would like to talk about something that shows the language in
>a good light as well as captures student interest. Some kind of
>introduction to a GUI library or network library might be good (the
>students have never done any GUI or network programming before). Also
>because I teach in a computer engineering curriculum, low level device
>control applications would be reasonable and appropriate as well.
>
>Anyway, I'm sure I can put something together. However, I thought I
>would ask here to see if anyone has some suggestions for libraries,
>tools, etc, that I might look at as I prepare materials for next semester.
>
>In case it matters, I'll be using the GNAT compiler.
>
>Thanks!
>
>Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 11:56 ` anon
@ 2007-11-12 15:53 ` John McCormick
2007-11-12 16:12 ` Hyman Rosen
` (2 more replies)
0 siblings, 3 replies; 30+ messages in thread
From: John McCormick @ 2007-11-12 15:53 UTC (permalink / raw)
Hello Peter,
I have been teaching Ada to students with C/C++/Java backgrounds for
two decades. I have gotten many of these students hooked on Ada.
Those students who have a strong dislike for software engineering
principles are the least likely to appreciate Ada.
I have some of my current course work on my web site
CS 810:059 Our CS1 course (no programming background assumed)
http://cns2.uni.edu/~mccormic/059
CS 810:063 A traditional data structures course for people with two
semesters of OO programming in C++/Java under their belt
http://cns2.uni.edu/~mccormic/063/
CS 810:188 A special topics course on concurrent programming with
Ada
http://cns2.uni.edu/~mccormic/188/
If they have enough programming skills, I would suggest you teach them
concurrent programming in Ada. Burns and Wellings have a new book out
that I plan to use this Spring - Concurrent and Real-Time Programming
in Ada, Cambridge University Press, 2007, ISBN 978-0-521-86697-2. I
suggest that you avoid GUI or graphics programming. The Ada tools are
simply not up to what they have seen in C++ and Java. This
observation is supported by a keynote speaker I heard at the SIGAda
conference last week. He said that the new en-route air traffice
control software now being installed is about 50% Ada and 50% C++.
The C++ is for the intense graphics needed by a controller. The Ada
is for the parts that can't fail.
I'd be happy to discuss any of my work with you on or off the
newsgroup.
John
> >I have the luxury of teaching a course next semester that can be about
> >anything I want. It's a course on "special topics" and the content is at
> >the discretion of the instructor.
>
> >I would like to teach the students some Ada.
>
> >The students in question are already competent programmers (in the
> >college student sense, that is). They have taken two courses in C/C++
> >and so should be familiar with basic programming concepts, including
> >concepts like encapsulation, (operator) overloading, and inheritance.
> >The programs they have worked on so far have been typical programming
> >exercises given in first courses: nothing large or complicated.
>
> >The course I'll be teaching has two hours of lecture per week plus a
> >three hour "lab" period where the students can work on some sort of
> >project or assignment in a supervised setting. So there is a fair amount
> >of time available.
>
> >My thought was to cover the basics of Ada, the language, in the first
> >half (third?) of the course. My expectation is that because of their
> >background, the students will pick up the basic ideas fairly quickly.
> >The question becomes: in what direction should I take the rest of the
> >course? I would like to talk about something that shows the language in
> >a good light as well as captures student interest. Some kind of
> >introduction to a GUI library or network library might be good (the
> >students have never done any GUI or network programming before). Also
> >because I teach in a computer engineering curriculum, low level device
> >control applications would be reasonable and appropriate as well.
>
> >Anyway, I'm sure I can put something together. However, I thought I
> >would ask here to see if anyone has some suggestions for libraries,
> >tools, etc, that I might look at as I prepare materials for next semester.
>
> >In case it matters, I'll be using the GNAT compiler.
>
> >Thanks!
>
> >Peter-
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
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 17:45 ` adaworks
2007-11-13 3:33 ` Peter C. Chapin
2 siblings, 2 replies; 30+ messages in thread
From: Hyman Rosen @ 2007-11-12 16:12 UTC (permalink / raw)
On Nov 12, 10:53 am, John McCormick <mccorm...@cs.uni.edu> wrote:
> Those students who have a strong dislike for software engineering
> principles are the least likely to appreciate Ada.
It would be interesting if you could get those students to post some
comments here. A cynic might be inclined to respond to you with the
claim that you have a strong dislike for students who dislike Ada, and
so accuse them of having a strong dislike for software engineering.
Perhaps they have reasonable arguments to back their dislike.
Ada's type safety, modules, and visibilty rules are not all that
different
from those in languages like C++ or Java. Sure, it may be the case
that
Ada's way is better or safer (not knowing Ada well, I can't say for
sure)
but any modern programmer has to deal with getting code to be typesafe
and
with visibility rules of the language. So it cannot be that students
are
rejecting Ada just because other languages let them do what they want
willy-nilly.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 16:12 ` Hyman Rosen
@ 2007-11-12 16:13 ` Hyman Rosen
2007-11-12 17:38 ` adaworks
1 sibling, 0 replies; 30+ messages in thread
From: Hyman Rosen @ 2007-11-12 16:13 UTC (permalink / raw)
Sorry for the stupid line breaks. Google Groups :-(
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
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
1 sibling, 1 reply; 30+ messages in thread
From: adaworks @ 2007-11-12 17:38 UTC (permalink / raw)
"Hyman Rosen" <hyman.rosen@gmail.com> wrote in message
news:1194883941.855761.192050@22g2000hsm.googlegroups.com...
>
> Ada's type safety, modules, and visibilty rules are not all that
> different from those in languages like C++ or Java. Sure, it may be the case
> that Ada's way is better or safer (not knowing Ada well, I can't say for
> sure)
The visibility rules of Ada, along with the type system, is far more strict and
much more thoroughly defined than in C++ or Java. In addition, the rules
for access types (pointers) prevent many of the accidents that can occur
with C or C++. These are really not arguable if one knows enough about
all three languages.
Ada is also structurally unique. I recently read a paper on separate
compilation
written by some scholars from Europe in which they went on about C++ and
Java, but completely overlooked Ada. I wrote a short essay on the subject
and sent it to them, receiving a reply to the effect, "We didn't know ... " The
architecture of a large-scale Ada program is much easier to follow than that
of a C++ program, and the production C++ I have seen is usually pretty hard
to follow.
As we all know, the real test of the value of a programming language is not
the ease with which we can compose programs, but the ease with which we
can "maintain" them. Of course, we don't really maintain software in the
sense of the physical world. Rather, we adapt it to changing circumstances.
The structure of Ada, the readability of the programs, largely due to the
structural model and the rules for design and construction, seem to make Ada
easier to understand by someone who has never seen the code before.
Granted, someone could write readable C++ code, and some people do. But
both C++ and Java seem to encourage shortcuts that result in code that is
all but obscure. One of my favorite columns in C++ Report was that last
page, "Obfuscated C++." It was great fun trying to figure out the solution
from one issue to another. I cannot imagine anyone writing a column called
"Obfuscated Ada."
Finally, my impression of C++, after many years of having to deal with it in
academia and industry is that it is highly error-prone. The ease with which
a C++ programmer can introduce difficult to spot mistakes is far greater than
I have ever seen with Ada programmers of similar skill and education. So I
have often wondered why anyone using a language that is inherently
error-prone would expect a result that is error-free.
The choice of C++ for certain tasks is not due to the superiority of the
language, but due to the fact that there are more libraries for those
tasks in C++, and a larger base of programmers experienced in C++.
The popularity of C++ owes little to its being a better language, but
more to the circumstances of the industry when it was introduced, and
not a little to the incompetence of those charged with managing the
Ada mandate when it was in place.
Richard Riehle
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 17:38 ` adaworks
@ 2007-11-12 18:12 ` Hyman Rosen
0 siblings, 0 replies; 30+ messages in thread
From: Hyman Rosen @ 2007-11-12 18:12 UTC (permalink / raw)
On Nov 12, 12:38 pm, <adawo...@sbcglobal.net> wrote:
> "Hyman Rosen" <hyman.ro...@gmail.com> wrote in message
> > Ada's type safety, modules, and visibilty rules are not all that
> > different from those in languages like C++ or Java.
>
> Granted, someone could write readable C++ code
You missed my point. In this posting, I wasn't making any claims for C+
+'s superiority. I was saying that languages like C++ and Java have
their own versions of visibility issues and type safety, and so any
modern programmer will be familiar with those concepts.
The OP said "Those students who have a strong dislike for software
engineering principles are the least likely to appreciate Ada." Even
if Ada has differences in the way it handles pointers, visibility, and
type safety, I find it difficult to attribute a student's dislike of
Ada to a dislike of software engineering principles. How are these
principles embodied in Ada such that they would be so foreign and
hateful to programmers in other languages? What is it that someone who
hates software engineering principles can do in Java that cannot be
done in Ada?
That's why I would like to hear from the students themselves.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 15:53 ` John McCormick
2007-11-12 16:12 ` Hyman Rosen
@ 2007-11-12 17:45 ` adaworks
2007-11-12 20:45 ` Jerry Petrey
2007-11-13 3:33 ` Peter C. Chapin
2 siblings, 1 reply; 30+ messages in thread
From: adaworks @ 2007-11-12 17:45 UTC (permalink / raw)
"John McCormick" <mccormick@cs.uni.edu> wrote in message
news:1194882790.326239.115730@22g2000hsm.googlegroups.com...
>
> I suggest that you avoid GUI or graphics programming. The Ada tools are
> simply not up to what they have seen in C++ and Java.
My students really like being able to do some elementary graphics
with JEWL. I make it clear to them that JEWL is not an industrial
strength graphics library, but it is easy to use. In fact, it is, for
MS-Windows programming, easier to use than Java for the kind of
simple programs they do.
I have been surprised by the programs my students have turned in
using JEWL. Consider, scientific calculators, encrypting text editors,
two-paddle pong programs, specialized navigation calculators, among
others. I have found JEWL to be much better for this kind of thing
than Ada.Text_IO. In fact, John English should be nominated some
time for a SigAda award for his JEWL contribution.
Richard Riehle
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 17:45 ` adaworks
@ 2007-11-12 20:45 ` Jerry Petrey
0 siblings, 0 replies; 30+ messages in thread
From: Jerry Petrey @ 2007-11-12 20:45 UTC (permalink / raw)
adaworks@sbcglobal.net wrote:
> "John McCormick" <mccormick@cs.uni.edu> wrote in message
> news:1194882790.326239.115730@22g2000hsm.googlegroups.com...
>> I suggest that you avoid GUI or graphics programming. The Ada tools are
>> simply not up to what they have seen in C++ and Java.
>
> My students really like being able to do some elementary graphics
> with JEWL. I make it clear to them that JEWL is not an industrial
> strength graphics library, but it is easy to use. In fact, it is, for
> MS-Windows programming, easier to use than Java for the kind of
> simple programs they do.
>
> I have been surprised by the programs my students have turned in
> using JEWL. Consider, scientific calculators, encrypting text editors,
> two-paddle pong programs, specialized navigation calculators, among
> others. I have found JEWL to be much better for this kind of thing
> than Ada.Text_IO. In fact, John English should be nominated some
> time for a SigAda award for his JEWL contribution.
>
> Richard Riehle
>
>
Richard,
I agree completely about JEWL. I have been using it for years to make all
kinds of PC based simulators for various hardware devices (such as GPS
simulators, RF Link simulators, etc.). It is a great GUI tool for Ada.
I only wish John had not dropped its support to move on to JAVA but it is
still very useful.
Look forward to your new Ada Distilled as well. Another well done product for
Ada!
I think teaching new Ada students a little graphics using something like JEWL
is a great idea. I would also recommend doing some type of hardware control
application (like sending messages over the serial port to some device to get
a hardware action to take place). Years ago I taught some classes on Forth
and I built a simple hardware traffic light simulator that the students could
control over a PC serial port and it was very successful in allow them to try
our various algorithms and see the tangible results. I'm sure John McCormick
had the same success with his model train control.
Jerry
-- If replying, perform appendectomy on email address.
--
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-12 15:53 ` John McCormick
2007-11-12 16:12 ` Hyman Rosen
2007-11-12 17:45 ` adaworks
@ 2007-11-13 3:33 ` Peter C. Chapin
2007-11-13 5:17 ` jimmaureenrogers
2 siblings, 1 reply; 30+ messages in thread
From: Peter C. Chapin @ 2007-11-13 3:33 UTC (permalink / raw)
John McCormick wrote:
> I have some of my current course work on my web site
Thanks for the links! I'll definitely take a look.
> If they have enough programming skills, I would suggest you teach them
> concurrent programming in Ada.
Yes, this has come up several times. I think it would be a good topic to
give some attention.
Peter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Suggestions for topics in an Ada course?
2007-11-11 16:09 Suggestions for topics in an Ada course? Peter C. Chapin
` (5 preceding siblings ...)
2007-11-12 11:56 ` anon
@ 2007-11-16 15:48 ` Marco
6 siblings, 0 replies; 30+ messages in thread
From: Marco @ 2007-11-16 15:48 UTC (permalink / raw)
After the basics of Ada I would do some tasking examples and
exercises.
P.S. Ada has a lot of free books on-line so your students will
probably appreciate not having to fork out for another text book.
^ permalink raw reply [flat|nested] 30+ messages in thread