comp.lang.ada
 help / color / mirror / Atom feed
* "Subtract C, Add Ada": More Details
@ 1995-01-05 21:06 John McCormick
  0 siblings, 0 replies; only message in thread
From: John McCormick @ 1995-01-05 21:06 UTC (permalink / raw)


The sidebar in the December 12 issue by Peter Coffee was abstracted from a
post I made to the Ada Section of the CLMForum of Compuserve in response
to a request for Ada success stories.  Since this article has aroused some
interest on c.l.a., I thought I would post the original to INFO-Ada.

John

-----------------------------------------------------------------------------
I teach a Real-Time / Embedded Systems course for undergraduate computer
science students at the State University of New York, Plattsburgh.  My
students work in teams of three or four to specify, design, and implement
the code to control a large model railroad.  The model railroad has 27
independently powered blocks of track, half a dozen reversing loops, and 25
turnouts (switches).  I would need over 150 toggle switches to control the
layout if I wired it with standard model railroading techniques.

I consider a project successful when it can run multiple trains, allow for
human control of at least one of these trains, prevent collisions between
trains, and detect and handle hardware failures (stuck turnouts, derailed
cars, noisy sensors, etc.).  A typical project contains about 15,000 lines
of code.

For the first five years that I offered this course, students implemented
their projects in the C language.  No team ever completed their project.
Every year I supplied the teams with more and more of my solution until I
was supplying them with over 50% of the project code.  But still no success.

About four years ago I decided to try using Ada in the course.  I expected a
disaster the first semester my students wrote in Ada.  I had not yet written
any "support" code in Ada; the students would have to write the entire
project without any of my usual help.  However, I was astonished to find
that about half of the teams completed their projects.  In succeeding years
I have supplied the teams with a couple of "support" packages and now have
about 75% of the teams completing their projects.

To what do I attribute this remarkable improvement in productivity?  I would
like to believe that it is a reflection of my refined teaching abilities.
However, the only real change made was in the implementation language.  In
fact, I can point to a number of specific areas in which Ada made my
students more productive (C horror stories available on request.)

1.  Elimination of single key-stroke errors (= instead of ==, etc).
2.  The higher level of abstraction for multi-tasking.
3.  The higher level of abstraction for bit manipulation.
4.  The higher level of abstraction for data types (far less pointer
    manipulation to use an ADT like a queue).
5.  The Ada program library (team members now know when someone changes a
    specification).
6.  Exception handlers to separate normal processing from error handling.
7.  Modularity and information hiding through packages.
8.  Encapsulation through private and limited private types.
9.  Code reuse through generic units.

One final note.  Students entering the course had no prior experience with
either C or Ada.  All had backgrounds in either Pascal or Modula-2.  The
success in the Real-Time course has convinced all my faculty colleagues to
support teaching Ada in our beginning courses.  This Spring semester the
first students with Ada as their mother tongue will enroll in my course.  I
can only imagine what these teams will accomplish.


===========================================================================
=  John W. McCormick                   Phone   (518) 564-2785             =
=  Computer Science Department         FAX     (518) 564-7827             =
=  State University of New York      mccormjw@snyplava.bitnet             =
=  Plattsburgh, NY  12901            mccormjw@splava.cc.plattsburgh.edu   =
=      USA                                                                =
=                           SUNY Plattsburgh                              =
=                                where                                    =
=       Computers + Model Railroading = Digitally Controlled Trains       =
=                                                                         =
=                        *      *     *                                   =
=                                          *                              =
=                                             *                           =
=          ##                           ##    T                           =
=        ######_########_########_#####_#########-                        =
=         o  o   o    o   o    o   o o  oo OOOO oo\                       =
===========================================================================



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-01-05 21:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-01-05 21:06 "Subtract C, Add Ada": More Details John McCormick

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