comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada as a First Language
@ 1992-12-29 15:40 agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!vx9000.weber.edu!
  0 siblings, 0 replies; 34+ messages in thread
From: agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!vx9000.weber.edu! @ 1992-12-29 15:40 UTC (permalink / raw)


Iam interested in Ada as an information systems language to be taught
in a college of business and economics.  I teach at Weber State Univ.
in Ogden, Utah, where we have a large government and contractor community
which hires our graduates.  It could be advantageous for our graduates
to know Ada, and so I am exploring the availability of business-oriented
Ada textbooks.  If you know of any, or can refer me to any schools where
Ada is taught from an IS perspective, I'd appreciate your help.

Dolly Samson
Weber State University
Ogden, UT 84408-3804
dsamson@cc.weber.edu 
-----------------------------------------------------

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

* Ada as a First Language
@ 1997-07-03  0:00 RC
  1997-07-03  0:00 ` Michael Feldman
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: RC @ 1997-07-03  0:00 UTC (permalink / raw)




Does any one have any opinions on whether Ada should be introduced as a
first programming language?

If not, what would be the best introductory language be as a pre-cursor
to Ada.


































































 




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

* Re: Ada as a First Language
  1997-07-03  0:00 Ada as a First Language RC
@ 1997-07-03  0:00 ` Michael Feldman
  1997-07-06  0:00 ` Alan Brain
  1997-07-07  0:00 ` Shmuel (Seymour J.) Metz
  2 siblings, 0 replies; 34+ messages in thread
From: Michael Feldman @ 1997-07-03  0:00 UTC (permalink / raw)



In article <kMVngCANO5uzYwoa@clanchy.demon.co.uk>,
RC  <rc1@clanchy.demon.co.uk> wrote:
>
>Does any one have any opinions on whether Ada should be introduced as a
>first programming language?
>
>If not, what would be the best introductory language be as a pre-cursor
>to Ada.
>
We (The George Washington University) are one of about 115
colleges and universities using Ada as a first language. 

I have taught Ada in the _second_ course since 1982, and in the 
_first_ course since 1991. I write from personal experience, not from 
theory or speculation. Thousands of students have passed through these
courses. Others' mileage may, of course, vary.:-)

Before jumping into details, a few URLs for you:

http://www.seas.gwu.edu/faculty/mfeldman/CS1-2.html
  (a list of the colleges and universities using "Ada first")

http://www.seas.gwu.edu/classes/cs1
http://www.seas.gwu.edu/classes/cs2
  (exhaustive detail on our first and second courses, with full
   texts of assignments, lots of program files, exams, etc.)

http://www.seas.gwu.edu/ada
  (some of our Ada-related research, and other links)

http://www.acm.org/sigada/education
  (Ada Resources for Educators and Students)

http://academic.uofs.edu/faculty/beidler/levy
  (a nice article on teacher satisfaction with their foundation
   languages - Ada and Scheme rank high, C and C++ rank low)

Now on to the details.

I cannot speak for others, but my choice is based on Ada's being the
_optimal_ one for this audience. 

Note: _optimal_. Nothing is perfect in this world; choice of a
foundation language, like so many other things, is an optimization
problem filled with tradeoffs. In my view, Ada comes out ahead of the
others, as a first language, because (in no particular order)

- it retains everything we've _liked_ about Pascal, including:

  - compile-time checking where possible, run-time checking where necessary
    (students at this level rarely need to use a debugger - many common
    bugs are detected by the compiler, and runtime checks pick up many
    others)
  - clear and reasonably obvious syntax, with few possibilities for
    single-keystroke errors that result in a compilable program that
    has bizarre runtime behavior
  - subrange types allowing one to specify a meaningful _range_ of
    values (e.g. a variable cannot meaningfully go negative)

- nice inner-syntactic improvements to Pascal, including:

  - full bracketing (if/end if, etc.) which minimizes "semicolon
    problems", dangling else's, etc.
  - named parameter association in subprogram calls - I have found
    this VERY helpful in teaching procedures, because the formal and
    actual parameters appear side-by-side in the call
  
- "system structure" extensions to Pascal, including:

  - packages (modules, units) with a clear division of interface
    and implementation into separate files
  - well-defined exception definition and handling, in which system
    and user-defined exceptions are treated similarly
  - private types 
  - procedure, function, and operator name overloading
  - well-defined generic template capability
  - type extension and polymorphism 
  - language-defined concurrency primitives
  (the last 3 are really 2nd-course matters, but they "trickle down"
   a bit into first courses with good students)

- a well-constructed and stable standard, with validation testing and
  therefore an especially high degree of commonality in the language
  supported by different compilers for different platforms. This is
  especially important in education, because students can move their
  code from (say) a home PC to (say) a university Unix box with no
  worry about whether it'll compile and run.

- platform-dependent features like graphics are implemented using
  packages, not new syntax. There are no syntactic dialects.

  Obviously, programs that use PC-specific graphics (say) will not
  work on Unix boxes, but this is, itself, a good lesson about
  machine independence vs. machine dependence. In general, Ada helps
  us with this because the platform-specific packages are pretty
  obvious, so students desiring to move code around can simply
  avoid them.

- several families of Ada 95 compilers available at no cost (GNAT) 
  or moderate cost (ObjectAda) for nearly all popular platforms

Whew! I'll stop here, but you get the idea. I'll be glad to participate
in a continuing thread on this, as long as it does not degenerate into
a language war.

Feel free to make contact by e-mail if you wish.

Michael Feldman
------------------------------------------------------------------------
Michael B. Feldman -  chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University -  Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax) 
http://www.seas.gwu.edu/faculty/mfeldman
------------------------------------------------------------------------
"Cooperate with those who have both know-how and integrity."      
   Fortune cookie, Wu Dynasty, Bethesda, MD, Spring 1996.
------------------------------------------------------------------------
Ada on WWW: http://www.acm.org/sigada/education or http://www.adahome.com 
------------------------------------------------------------------------




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

* Re: Ada as a First Language
  1997-07-03  0:00 Ada as a First Language RC
  1997-07-03  0:00 ` Michael Feldman
@ 1997-07-06  0:00 ` Alan Brain
  1997-07-06  0:00   ` Robert Dewar
  1997-07-16  0:00   ` Eric James DeArment
  1997-07-07  0:00 ` Shmuel (Seymour J.) Metz
  2 siblings, 2 replies; 34+ messages in thread
From: Alan Brain @ 1997-07-06  0:00 UTC (permalink / raw)



RC wrote:
> 
> Does any one have any opinions on whether Ada should be introduced as a
> first programming language?

The Australian Defence Force Academy uses Ada-95 as it's first language.
It teaches rather well many important concepts that are less well
approximated in the more popular and kludgy commercial languages such as
C++.

Being descended from Pascal, a teaching language, it does rather well.

The only possible better language from a teaching viewpoint I am aware
of would be BLUE, from the University of Sydney.
BLUE does, however, have its own disadvantages. It's great for teaching,
but not-so-good for any practical purpose.

BTW I teach Ada-95 for CS1 at ADFA.
-- 
aebrain@dynamite.com.au     <> <>    How doth the little Crocodile
| Alan & Carmel Brain|      xxxxx       Improve his shining tail?
| Canberra Australia |  xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM
100026.2014 compuserve o OO*O^^^^O*OO o oo     oo oo     oo  
                    By pulling MAERKLIN Wagons, in 1/220 Scale
See http://www.z-world.com/graphics/z/master/8856.gif for picture





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

* Re: Ada as a First Language
  1997-07-06  0:00 ` Alan Brain
@ 1997-07-06  0:00   ` Robert Dewar
  1997-07-16  0:00   ` Eric James DeArment
  1 sibling, 0 replies; 34+ messages in thread
From: Robert Dewar @ 1997-07-06  0:00 UTC (permalink / raw)



Alan asks

<<The only possible better language from a teaching viewpoint I am aware
of would be BLUE, from the University of Sydney.
BLUE does, however, have its own disadvantages. It's great for teaching,
but not-so-good for any practical purpose.
>>

There are a number of teaching languages that are of themselves quite
attractive from a pedagogical point of view. I helped develop one of
these IITRAN, at IIT in the 70's (it would probably be considered out
of date at this stage :-) Another more recent attempt is ABC from Lambert
Meertens at CWI.

The trouble with using one of these languages is that there is very little
external support available. In the case of Ada 95 for example, there are
a number of different CS1/CS2 texts to choose from, and many internet
resources, including adahome, and a load of freely available Ada code.
Not to mention easily available compilers on nearly all machines.

Still, I think if one of these languages is used in a place where there
is real enthusiasm and knowledge about it, then its use can be quite
successful -- at least that is certainly what we found using IITRAN
at IIT in the 70's.





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

* Re: Ada as a First Language
  1997-07-03  0:00 Ada as a First Language RC
  1997-07-03  0:00 ` Michael Feldman
  1997-07-06  0:00 ` Alan Brain
@ 1997-07-07  0:00 ` Shmuel (Seymour J.) Metz
  2 siblings, 0 replies; 34+ messages in thread
From: Shmuel (Seymour J.) Metz @ 1997-07-07  0:00 UTC (permalink / raw)



RC wrote:
> 
> Does any one have any opinions on whether Ada should be introduced as a
> first programming language?

While my preference is PL/I, I see no reason why Ada could not be taught
as a
first language, given proper instructional materials. It would not,
IMHO, be appropriate to cvoer the entire language in an introductory
course.

-- 

                        Shmuel (Seymour J.) Metz
                        Senior Software SE

The values in from and reply-to are for the benefit of spammers:
reply to domain eds.com, user msustys1.smetz or to domain gsg.eds.com,
user smetz.




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

* Re: Ada as a First Language
  1997-07-06  0:00 ` Alan Brain
  1997-07-06  0:00   ` Robert Dewar
@ 1997-07-16  0:00   ` Eric James DeArment
  1 sibling, 0 replies; 34+ messages in thread
From: Eric James DeArment @ 1997-07-16  0:00 UTC (permalink / raw)



I personally think that Ada is great as a first language.  It's very easy
to learn.  In addition, it can do anything that C can do and more.  Ada is
perfect for real-time programming, while Dennis Ritchie intentionally
didn't give C any such abilities.  I haven't the slightest idea why anyone
would want to use C as a teaching language.  It's extremely hard to learn,
and although I would agree that it's very powerful, it's pretty ugly too.


+----------------------------------------------+
| "It is what sustained us through our         |
|  days, the truth that was in our hearts      |
|  and strength in our arms, and fulfillment   |
|  in our tounges."-The Celtic warrior Oisin   |
| 					       |
|  Eric DeArment 			       |
|  ejd@efn.org				       |
+----------------------------------------------+





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

* Ada as a first language
@ 2009-03-22  2:26 Chris
  2009-03-22 10:36 ` mockturtle
                   ` (7 more replies)
  0 siblings, 8 replies; 34+ messages in thread
From: Chris @ 2009-03-22  2:26 UTC (permalink / raw)


Hi All,

I am a mechanical engineer, and I have become interested in robotics 
embedded systems. I have little experience in this area other that 
plugging in electronic components and clicking run.

I had recently started to learn Java, when I found out about Ada. From 
what I have seen of Ada, I really like the way that the language is 
structured, that is has a proper standard, and it seems like a good 
choice for the types of projects that I have in mind.

I have down loaded GNAT with the GPS IDE, as well as the work bench for 
eclipse (although I haven't had it working yet), and have been trying to 
work my way through the examples.

My concern lies in the smaller community for Ada. As an 
amateur/hobbyist, am I biting off more than I need to?



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
@ 2009-03-22 10:36 ` mockturtle
  2009-03-22 14:44 ` Brian Drummond
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 34+ messages in thread
From: mockturtle @ 2009-03-22 10:36 UTC (permalink / raw)


On Mar 22, 3:26 am, Chris <c...@internode.on.net> wrote:
> Hi All,
>
> I am a mechanical engineer, and I have become interested in robotics
> embedded systems. I have little experience in this area other that
> plugging in electronic components and clicking run.
>
> I had recently started to learn Java, when I found out about Ada. From
> what I have seen of Ada, I really like the way that the language is
> structured, that is has a proper standard, and it seems like a good
> choice for the types of projects that I have in mind.
>
> I have down loaded GNAT with the GPS IDE, as well as the work bench for
> eclipse (although I haven't had it working yet), and have been trying to
> work my way through the examples.
>
> My concern lies in the smaller community for Ada. As an
> amateur/hobbyist, am I biting off more than I need to?

First of all... welcome aboard!

To be honest, your question is not entirely clear to me
(consider that English is not my native language).  I interpret it
as if you are wondering if Ada is a "gun for mosquitos" when compared
to the needs of an hobbyist, considering also a possibly
limited support due to a smaller amauter community.

Let me tell you my experience.  I am a University researcher and
I program mainly to implement the results of my work and to do
"fast and dirty" work (e.g., shell script or processing of log files).
I discovered Ada few years ago and since then I abandoned other
languages such as C, C++, ...  My opinion is that  Ada is a nice
language for whatever problem you have at hand, from doing DSP
on small processor, to writing very large pieces of software which
will "live" for years.  So, I think (my opinion) that it can be a
very good choice for your applicative context.

Should I mention one important defect of Ada, I would say the
relative loss of introductory documentation, although you can
find enough to start working with the language. [To be honest,
there are few aspects (e.g. streams) that it is difficult to
find explained in good detail, maybe someone can prove me false
(I would be glad to)].



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
  2009-03-22 10:36 ` mockturtle
@ 2009-03-22 14:44 ` Brian Drummond
  2009-03-23 11:03   ` Peter C. Chapin
                     ` (2 more replies)
  2009-03-22 15:21 ` Gary Scott
                   ` (5 subsequent siblings)
  7 siblings, 3 replies; 34+ messages in thread
From: Brian Drummond @ 2009-03-22 14:44 UTC (permalink / raw)


On Sun, 22 Mar 2009 13:26:51 +1100, Chris <calc@internode.on.net> wrote:

>Hi All,
>
>I am a mechanical engineer, and I have become interested in robotics 
>embedded systems. I have little experience in this area other that 
>plugging in electronic components and clicking run.
>
>I had recently started to learn Java, when I found out about Ada. From 
>what I have seen of Ada, I really like the way that the language is 
>structured, that is has a proper standard, and it seems like a good 
>choice for the types of projects that I have in mind.
>
>I have down loaded GNAT with the GPS IDE, as well as the work bench for 
>eclipse (although I haven't had it working yet), and have been trying to 
>work my way through the examples.
>
>My concern lies in the smaller community for Ada. As an 
>amateur/hobbyist, am I biting off more than I need to?

I would have to say that, in itself, it's easily the best language for the job.

However it is something of a minority language; you will be limited in the
support and tools you can find for it.

For example if you are interested in robotics you may wish to develop for
embedded processors, e.g. to read position sensors and control stepper motors
(or BLDC or induction motors, depending how serious you are!) 
Of all the small embedded controllers, only one family (the Atmel AVR) has an
Ada compiler targetting it. (google AVR Ada)

As it happens the AVR is quite a good choice - there are low-cost boards,
programmers, and peripherals (sensors, steppers) for it (www.arduino.cc) , and
it is used in a number of popular robotics projects (http://www.reprap.org)

HOWEVER I can't find ANY tutorial on putting these (AVR Ada and Arduino)
together. 

It can't be too hard. 

And it looks like an ideal match.

But ... no, I haven't tried it either.

One piece of good news is that Ada interfaces to C fairly easily. Assuming that
works in the AVR-Ada compiler (can anyone confirm that?) you can use any C
libraries (e.g. to talk to peripherals) on a "fit and forget" basis, from Ada.

- Brian 



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
  2009-03-22 10:36 ` mockturtle
  2009-03-22 14:44 ` Brian Drummond
@ 2009-03-22 15:21 ` Gary Scott
  2009-03-23  8:28 ` Brian
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 34+ messages in thread
From: Gary Scott @ 2009-03-22 15:21 UTC (permalink / raw)


Chris wrote:
> Hi All,
> 
> I am a mechanical engineer, and I have become interested in robotics 
> embedded systems. I have little experience in this area other that 
> plugging in electronic components and clicking run.
> 
> I had recently started to learn Java, when I found out about Ada. From 
> what I have seen of Ada, I really like the way that the language is 
> structured, that is has a proper standard, and it seems like a good 
> choice for the types of projects that I have in mind.
> 
> I have down loaded GNAT with the GPS IDE, as well as the work bench for 
> eclipse (although I haven't had it working yet), and have been trying to 
> work my way through the examples.
> 
> My concern lies in the smaller community for Ada. As an 
> amateur/hobbyist, am I biting off more than I need to?
I do all this with Intel Visual Fortran.  Most of the APIs are written 
in C, so if you choose any other language than C, interfacing with most 
of the device drivers will be messy.

-- 

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library:  http://www.fortranlib.com

Support the Original G95 Project:  http://www.g95.org
-OR-
Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows 
it can't be done.

-- Henry Ford



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
                   ` (2 preceding siblings ...)
  2009-03-22 15:21 ` Gary Scott
@ 2009-03-23  8:28 ` Brian
  2009-03-23  9:05   ` Jacob Sparre Andersen
  2009-03-23 12:08 ` Chris
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 34+ messages in thread
From: Brian @ 2009-03-23  8:28 UTC (permalink / raw)


Hello Chris,

Before I begin, you should know that I've been using Ada since the mid 80's, 
and it's still my language of choice for any project.  Since that time I've 
worked on a wide variety of projects, including a satellite, a submarine, a 
variety of missiles, tanks, other weapons and assorted non-embedded work. 
Also, I did my robotics work at UCLA in Ada, and it was a lot of fun!

So, as an obviously rabid Ada-geek, would I recommend Ada for you?  No.  Ada 
is a great language for beginning programmers, it helps newbies to develop 
discipline and learn software development skills that will last them a 
lifetime.  But you didn't say that you wanted to learn SW development, you 
said that you wanted to do some embedded robotics.  And Ada is far from the 
easiest path for someone in your shoes.

What kind of projects did you want to try?  There are some very good kits 
available that provide more "fun for the buck" than you might get with Ada. 
(Think Lego Mindstorms NXT, or the Parallax BASIC Stamp processor, or a 
variant of the Processing language called Wiring that has a nice bit of 
hardware.)  Also, there are a number of microprocessors available that are 
programmable in C or assembly.

Ada is a beautiful, elegant language.  Feature rich, it offers a lot to the 
seasoned and newbie coder, but it's not the easiest language.  By far.  Oh, 
and there are a number of languages with better libraries.  Sure, you COULD 
spend a lot of time interfacing to those libraries, but isn't that time 
better spent making your robot move, see, navigate or whatever?

Good luck, and let us know how it goes!
Brian Salter 





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

* Re: Ada as a first language
  2009-03-23  8:28 ` Brian
@ 2009-03-23  9:05   ` Jacob Sparre Andersen
  2009-03-23 22:02     ` Brian
  0 siblings, 1 reply; 34+ messages in thread
From: Jacob Sparre Andersen @ 2009-03-23  9:05 UTC (permalink / raw)


Brian wrote:

> [...]  No.

> [...], but isn't that time better spent making your robot move, see,
> navigate or whatever?

Considering the papers I have read comparing how engineering students
succeed in implementing embedded systems in Ada and C, I disagree.

There is of course the difference that the students most likely got
their development system served on a silver platter.  You may want to
see if you can get information on what they have been working with.
(Asking John W. McCormick might be the easy way to get the
information.)

You can find an on-line paper on the experiment at
<http://www.adaic.org/atwork/trains.html>.

Greetings,

Jacob
-- 
"Look!  Ugly one-horned mule."



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

* Re: Ada as a first language
  2009-03-22 14:44 ` Brian Drummond
@ 2009-03-23 11:03   ` Peter C. Chapin
  2009-03-23 13:29     ` Brian Drummond
  2009-03-23 16:59   ` rolf.ebert_nospam_
  2009-03-24 19:22   ` Tim Rowe
  2 siblings, 1 reply; 34+ messages in thread
From: Peter C. Chapin @ 2009-03-23 11:03 UTC (permalink / raw)


Brian Drummond <brian_drummond@btconnect.com> wrote in
news:hhics4h0pagtf9gcc6n9bsdfh0i64atb65@4ax.com: 

> However it is something of a minority language; you will be limited in
> the support and tools you can find for it.

The AdaMagic compiler by SofCheck: 

     http://www.sofcheck.com/products/adamagic.html

has a version that takes Ada95 source and generates C. I'm working with 
a student who is using this product to write Ada for a small embedded 
system for which we only have a C compiler. The bulk of the program is 
written in Ada, translated to C using AdaMagic, and then compiled with 
the "native" C compiler. The student has had to write a few low level 
interfacing functions in C but calling them from Ada is simple 
(especially given that the Ada compiler uses C as its output language 
anyway).

In our project we are doing without the Ada runtime. We've even disabled 
languaged mandated exceptions by providing trivial stub functions (in C) 
to replace the ones usually used by AdaMagic. We are also using SPARK 
which helps us to justify this radical step. For example a program that 
obeys SPARK rules can never raise PROGRAM_ERROR due to a problem in 
elaboration order. Thus we can safely "stub out" the C function that 
does this in AdaMagic's runtime.

Anyway, this approach is actually working fairly well for us. It lets us 
use Ada in a significant way on a very small system without an Ada 
compiler. However, I'm not sure how generally applicable it is. For one 
thing without SPARK one would want to make more use of the AdaMagic 
runtime. SofCheck provides the source code for it, so porting the 
runtime to your environment (basically compiling it with AdaMagic and 
then compiling the generated C with the native C compiler) should be 
possible. I don't know how difficult it is to do because we haven't 
tried it.

I should also note that fluency in both Ada and C is desirable if one 
tries this approach. So while interesting, it probably isn't of 
immediate use to the OP.

Peter



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
                   ` (3 preceding siblings ...)
  2009-03-23  8:28 ` Brian
@ 2009-03-23 12:08 ` Chris
  2009-03-25 21:10   ` John McCormick
  2009-04-11 16:40   ` Mike Silva
  2009-03-23 23:05 ` jpwoodruff
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 34+ messages in thread
From: Chris @ 2009-03-23 12:08 UTC (permalink / raw)


Hi All,

mockturtle, "gun for mosquitoes" was definitely what I was thinking, as 
well as am I making it harder on my self than I need to. From what you 
have described as your use fo ada, that is where I would like to get to. 
being able to script things for work would be beneficial

Brian D, thanks for your perspective on ada and the tip on AVR-ada. I 
found the sourceforge project for it, it even had a wiki with a couple 
of little tutorials. As far as other embedded tutorials/guides, not to 
much. Its funny I can find lots of references to it, but not much actual 
documentation.

Brian S, thanks for your views. Right now I'm just looking to get 
started with software. Ive been working on a VTOL RC aircraft for a 
while, and I would like to, eventually, intergrate sensors, auto pilot, 
ect... down the line.


Jacob, thanks for the reminder about John McCormick's course, I had read 
  his paper from a link on this group, I will try to get in touch with him.


The problem that I've got now is that I really like Ada. It may sound 
silly, but the clear syntax makes it so much easier to see what's going 
on in the program. And for a person with limited experience, that's a 
massive help.
I also think that good structure, and best practice are the only way to 
do something, even if it is as a hobby. All my home projects I structure 
and document as if it were a commercial project. While it takes more 
time, it means that the data from the project is always available in the 
future.

I also found an IDE for ada on the lego mindstorms RCX 
http://www.usafa.af.mil/df/dfcs/adamindstorms.cfm in case anyone is 
interested.

For now I'm going to keep plugging away with ada. If anyone has any good 
beginners books they can recommend, it would be greatly appreciated.

Christian



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

* Re: Ada as a first language
  2009-03-23 11:03   ` Peter C. Chapin
@ 2009-03-23 13:29     ` Brian Drummond
  2009-03-25 10:51       ` Peter C. Chapin
  0 siblings, 1 reply; 34+ messages in thread
From: Brian Drummond @ 2009-03-23 13:29 UTC (permalink / raw)


On 23 Mar 2009 11:03:37 GMT, "Peter C. Chapin" <pcc482719@gmail.com> wrote:

>Brian Drummond <brian_drummond@btconnect.com> wrote in
>news:hhics4h0pagtf9gcc6n9bsdfh0i64atb65@4ax.com: 
>
>> However it is something of a minority language; you will be limited in
>> the support and tools you can find for it.
>
>The AdaMagic compiler by SofCheck: 
>
>     http://www.sofcheck.com/products/adamagic.html
>
>has a version that takes Ada95 source and generates C. I'm working with 
>a student who is using this product to write Ada for a small embedded 
>system for which we only have a C compiler. The bulk of the program is 
>written in Ada, translated to C using AdaMagic, and then compiled with 
>the "native" C compiler. The student has had to write a few low level 
>interfacing functions in C but calling them from Ada is simple 

Interesting approach, and for the interfacing functions you can restrict
yourself to a small subset of C, avoiding its more "interesting" features.

>I should also note that fluency in both Ada and C is desirable if one 
>tries this approach. So while interesting, it probably isn't of 
>immediate use to the OP.

which is why I suggested "fit and forget" for the C libraries. If they just
work, you have saved time. If not... I'd rather use Ada for interfacing. 
Does AdaMagic have trouble translating low level code like interrupt handlers or
representation clauses?

AdaMagic doesn't look free, which may be a consideration for personal
experiments.

- Brian




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

* Re: Ada as a first language
  2009-03-22 14:44 ` Brian Drummond
  2009-03-23 11:03   ` Peter C. Chapin
@ 2009-03-23 16:59   ` rolf.ebert_nospam_
  2009-03-24 19:22   ` Tim Rowe
  2 siblings, 0 replies; 34+ messages in thread
From: rolf.ebert_nospam_ @ 2009-03-23 16:59 UTC (permalink / raw)


> For example if you are interested in robotics you may wish to develop for
> embedded processors, e.g. to read position sensors and control stepper motors
> (or BLDC or induction motors, depending how serious you are!)
> Of all the small embedded controllers, only one family (the Atmel AVR) has an
> Ada compiler targetting it. (google AVR Ada)
>

I had used AVR-Ada on the Asuro, a very cheap (<40€) toy robot (http://
www.arexx.com/arexx.php?cmd=goto&cparam=p_asuro). My Ada equivalent of
the Asuro-lib (http://sourceforge.net/projects/asuro) covers about 60
- 80%.


> As it happens the AVR is quite a good choice - there are low-cost boards,
> programmers, and peripherals (sensors, steppers) for it (www.arduino.cc) , and
> it is used in a number of popular robotics projects (http://www.reprap.org)

I happen to got started on the Arduino as well.  There will be growing
support for it in AVR-Ada. (not in the short term)

> HOWEVER I can't find ANY tutorial on putting these (AVR Ada and Arduino)
> together.
>
> It can't be too hard.
>

No, it isn't hard.  But still, someone has to do it.

> And it looks like an ideal match.
>
> But ... no, I haven't tried it either.
>
> One piece of good news is that Ada interfaces to C fairly easily. Assuming that
> works in the AVR-Ada compiler (can anyone confirm that?) you can use any C
> libraries (e.g. to talk to peripherals) on a "fit and forget" basis, from Ada.
>

Accessing C functions from Ada works well with AVR-Ada.  If you need
small code you cannot profit from inlining, however.  It might be
useful if you want to access complete libraries, e.g. a TCP/IP stack.
But then quite a number of peripherals are already directly available
in Ada (e.g. 1-wire, I2C, UART, LCD, EEPROM, timers)

   R



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

* Re: Ada as a first language
  2009-03-23  9:05   ` Jacob Sparre Andersen
@ 2009-03-23 22:02     ` Brian
  2009-03-24  1:41       ` Gautier
                         ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Brian @ 2009-03-23 22:02 UTC (permalink / raw)


"Jacob Sparre Andersen" <sparre@nbi.dk> wrote in message 
news:87r60oip8a.fsf@nbi.dk...

> Considering the papers I have read comparing how engineering students
> succeed in implementing embedded systems in Ada and C, I disagree.
>
> There is of course the difference that the students most likely got
> their development system served on a silver platter.  You may want to
> see if you can get information on what they have been working with.
> (Asking John W. McCormick might be the easy way to get the
> information.)

Hmmm, with no consideration of the scope, size, and complexity of the 
problem space that Chris is trying to tackle, you disagree?  So, you truly 
believe that Ada is a better language, no matter what he is trying to 
achieve?   For any size project?  (The Ada Kool-Aid claims another victim!) 
This is one of the items that, I believe, has lead to some disillusionment 
with Ada.  It isn't the perfect tool for every situation, embedded or not. 
And we should stop saying that it is, the language and it's proponents are 
losing credibility.

When someone asks us for advice like this, we should consider it from an 
engineering perspective.  What's the right tool to use?  The one that gets 
the job done, for the right amount of manpower, time and money.  Just as I 
wouldn't recommend that Chris use COBOL for his hobby work, I would expect 
that the learning curve for Ada would hamper his work.  Since hobbyist, 
beginner code tends to be small (Less than 1K SLOC/project, and usually much 
smaller), then other languages might tend to give him more success with less 
pain.

With all due respect to Mr McCormick, his "Why Ada succeeds where C fails" 
should be changed to "Why Ada succeeds where C fails for this hardware and 
these software requirements relating to driving a model railroad".  While my 
version lacks snappy prose, the accuracy is much improved.  Otherwise, 
people might assume that he is saying Ada is superior to C (Or other 
languages) for every situation, which is just plain silly.

Brian Salter





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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
                   ` (4 preceding siblings ...)
  2009-03-23 12:08 ` Chris
@ 2009-03-23 23:05 ` jpwoodruff
  2009-03-25  0:16 ` Martin
  2009-03-25 15:54 ` John McCormick
  7 siblings, 0 replies; 34+ messages in thread
From: jpwoodruff @ 2009-03-23 23:05 UTC (permalink / raw)


On Mar 21, 7:26 pm, Chris <c...@internode.on.net> wrote:
> Hi All,
>
> I am a mechanical engineer, and I have become interested in robotics
> embedded systems. I have little experience in this area other that
> plugging in electronic components and clicking run.
>     <...>


Let a retired enthusiast suggest an advantage:  orthogonality.

A hobbyist might not need to learn every part of the language.  Just
decide what your programs require and put off the rest to later.  Ada
makes easy to skip (for example) child packages or private parts or
exceptions or tagged types.

So the language isn't really as large as it seems.

John



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

* Re: Ada as a first language
  2009-03-23 22:02     ` Brian
@ 2009-03-24  1:41       ` Gautier
  2009-03-24  5:56       ` Jacob Sparre Andersen
  2009-03-25 17:58       ` John McCormick
  2 siblings, 0 replies; 34+ messages in thread
From: Gautier @ 2009-03-24  1:41 UTC (permalink / raw)


Brian wrote:

> Since hobbyist, beginner code tends to be small (Less than 1K SLOC/project, and usually much 
> smaller), then other languages might tend to give him more success with less 
> pain.

I would put the line rather around 100 lines. And even so... I often do 
less than 100 lines hobby programs without too much pain in Ada. I just 
made this one with a buddy who was sure it would be more complicated in 
some script language (and would be a lot slower of course):

with Graph; use Graph;

procedure Fractal is

   subtype Real is Float;

   type Pt is record
     x,y:  Real;
   end record;

   subtype Vector is Pt;

   type Figure is array(Positive range <>) of Pt;

   type Matrix22 is array(1..2,1..2) of Real;

   function "+"(p: Pt; v: Vector) return Pt is
   begin
     return (p.x+v.x, p.y+v.y);
   end;

   function "*"(M: Matrix22; p: Pt) return Pt is
   begin
     return
       (M(1,1) * p.x + M(1,2) * p.y,
        M(2,1) * p.x + M(2,2) * p.y);
   end;

   type Affine is record
     M: Matrix22;
     v: Vector;
   end record;

   type Affine_array is array(Positive range <>) of Affine;

   function Morph(f: Figure; a: Affine) return Figure is
     mod_f: Figure(f'Range);
   begin
     for i in f'Range loop
       mod_f(i):= a.M*f(i) + a.v;
     end loop;
     return mod_f;
   end Morph;

   procedure Draw(f: Figure; a: Affine_array; level: Natural) is
   begin
     if level = 0 then
       Point( f(f'Last).x, f(f'Last).y );
       for i in f'Range loop
         LineTo( f(i).x, f(i).y );
       end loop;
     else
       for i in a'Range loop
         Draw( Morph(f,a(i)), a, level-1 );
       end loop;
     end if;
   end Draw;

   procedure Plot(f: Figure; a: Affine_array; d:device_type; n:string) is
   begin
     InitGraph(d, file_name=>n);
     Set_math_plane(0.0,0.0, 1.0,1.0, d);
     for level in 1..10 loop
       Draw( f, a, level);
       ClearDevice;
     end loop;
     CloseGraph(d);
   end Plot;

   procedure Plot_Sierp(d:device_type; n:string) is
     triangle: Figure:= ((0.0,0.0), (0.5, 0.886), (1.0,0.0));
     M: Matrix22:= ((0.5,0.0),(0.0,0.5));
     v1: Vector:= (0.0,0.0);
     v2: Vector:= (0.5,0.0);
     v3: Vector:= (0.25,0.886/2.0);
     transformations: Affine_array:=
       ( (M,v1), (M,v2), (M,v3) );
   begin
     Plot( triangle, transformations, d, n);
   end Plot_sierp;

begin
   Plot_sierp(PostScript, "sierpinski.ps");
end;
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!



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

* Re: Ada as a first language
  2009-03-23 22:02     ` Brian
  2009-03-24  1:41       ` Gautier
@ 2009-03-24  5:56       ` Jacob Sparre Andersen
  2009-03-24 22:30         ` Brian
  2009-03-25 17:58       ` John McCormick
  2 siblings, 1 reply; 34+ messages in thread
From: Jacob Sparre Andersen @ 2009-03-24  5:56 UTC (permalink / raw)


Brian wrote:
> Jacob Sparre Andersen wrote:

>> Considering the papers I have read comparing how engineering
>> students succeed in implementing embedded systems in Ada and C, I
>> disagree.
>>
>> There is of course the difference that the students most likely got
>> their development system served on a silver platter.  You may want
>> to see if you can get information on what they have been working
>> with.  (Asking John W. McCormick might be the easy way to get the
>> information.)
>
> Hmmm, with no consideration of the scope, size, and complexity of the 
> problem space that Chris is trying to tackle, you disagree?

I _have_ considered the scope, size and complexity of the problem
space Chris was kind enough to describe.  Given that information, my
experience with teaching people software engineering, my own
programming experience, and my experience with hobbyist scale
robotics, I stand firmly by my disagreement with your advice.

> So, you truly believe that Ada is a better language, no matter what
> he is trying to achieve?

I never claimed that.

> For any size project?

I expect that the benefits grow with project size.  But given the
constraints I considered, yes!

> It isn't the perfect tool for every situation, embedded or not.  And
> we should stop saying that it is, the language and it's proponents
> are losing credibility.

I never claimed that Ada is the perfect tool for every situation.
Stop #�%&!" putting words in my mouth!

Greetings,

Jacob
-- 
Stop the proliferation of weapons of maths instruction!



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

* Re: Ada as a first language
  2009-03-22 14:44 ` Brian Drummond
  2009-03-23 11:03   ` Peter C. Chapin
  2009-03-23 16:59   ` rolf.ebert_nospam_
@ 2009-03-24 19:22   ` Tim Rowe
  2009-04-04  1:42     ` Brian Gaffney
  2 siblings, 1 reply; 34+ messages in thread
From: Tim Rowe @ 2009-03-24 19:22 UTC (permalink / raw)


Brian Drummond wrote:

> For example if you are interested in robotics you may wish to develop for
> embedded processors, e.g. to read position sensors and control stepper motors
> (or BLDC or induction motors, depending how serious you are!) 
> Of all the small embedded controllers, only one family (the Atmel AVR) has an
> Ada compiler targetting it. (google AVR Ada)

But Ada for Lego Mindstorms is apparently on its way...



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

* Re: Ada as a first language
  2009-03-24  5:56       ` Jacob Sparre Andersen
@ 2009-03-24 22:30         ` Brian
  2009-03-25  9:41           ` rmoldskr+usenet
  0 siblings, 1 reply; 34+ messages in thread
From: Brian @ 2009-03-24 22:30 UTC (permalink / raw)


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


"Jacob Sparre Andersen" wrote
> I _have_ considered the scope, size and complexity of the problem
> space Chris was kind enough to describe.  Given that information, my
> experience with teaching people software engineering, my own
> programming experience, and my experience with hobbyist scale
> robotics, I stand firmly by my disagreement with your advice.

You could_not_have_considered the scope, size and complexity of the problem 
space that Chris was kind enough to describe, as he was not kind enough to 
describe them at that time.

>> So, you truly believe that Ada is a better language, no matter what
>> he is trying to achieve?
>
> I never claimed that.

Yet, with no data of any kind other than his words ("robotics embedded 
systems"), you chose to disagree and recommend Ada over other languages 
without consideration of any requirements, whatsoever.

>
>> For any size project?
>
> I expect that the benefits grow with project size.  But given the
> constraints I considered, yes!

What constraints did you consider?  Again, the only words he used to 
describe his project were those mentioned above, and he did mention that he 
did not have programming experience.  The project could have been anything 
from a garage door to R2-D2.

>
>> It isn't the perfect tool for every situation, embedded or not.  And
>> we should stop saying that it is, the language and it's proponents
>> are losing credibility.
>
> I never claimed that Ada is the perfect tool for every situation.
> Stop #�%&!" putting words in my mouth!

Again, you disagreed and recommended Ada for a project that you knew nothing 
about, other than it is an embedded robotic project.  It could have been 
anything, from 5 to 5,000,000 SLOC.  You recommended it over any other 
language, with nearly no data, for a user who admitted to having no 
experience.

I have not put words in your mouth.  I've tried to carefully read your 
disagreements, and weigh their possible effect on a new coder.  His 
experience in the next few months is likely to color his view of programming 
for a long time.  If he has a negative experience because he was enticed to 
use Ada when it wasn't appropriate to his experience level, and for the 
project he has selected, then he may go around saying bad things about Ada. 
That has happened with many companies and individuals before, and the Ada 
world continues to be impacted.  In that light, I've tried to recommend 
tools to him that will allow him to achieve success earlier, and easier. 
Let him move into Ada when it's appropriate, and he is more likely to have a 
more experience overall.  That would be best for him, and for us.

Brian Salter






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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
                   ` (5 preceding siblings ...)
  2009-03-23 23:05 ` jpwoodruff
@ 2009-03-25  0:16 ` Martin
  2009-03-25 15:54 ` John McCormick
  7 siblings, 0 replies; 34+ messages in thread
From: Martin @ 2009-03-25  0:16 UTC (permalink / raw)


On Mar 22, 2:26 am, Chris <c...@internode.on.net> wrote:
> Hi All,
>
> I am a mechanical engineer, and I have become interested in robotics
> embedded systems. I have little experience in this area other that
> plugging in electronic components and clicking run.
>
> I had recently started to learn Java, when I found out about Ada. From
> what I have seen of Ada, I really like the way that the language is
> structured, that is has a proper standard, and it seems like a good
> choice for the types of projects that I have in mind.
>
> I have down loaded GNAT with the GPS IDE, as well as the work bench for
> eclipse (although I haven't had it working yet), and have been trying to
> work my way through the examples.
>
> My concern lies in the smaller community for Ada. As an
> amateur/hobbyist, am I biting off more than I need to?

As others have pointed out, without know what your building, what CPU,
what you want your robot to do, etc it is very hard to say. However...

...I would encourage you to learn Ada in the same way as I would
encourage my kids to learn Latin. It may not be a day-to-day language
for many people (although there are more Ada-natives than Latin-
natives these days ;-) but it will serve you immeasurably well when
you learn almost any other language.

Cheers
-- Martin



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

* Re: Ada as a first language
  2009-03-24 22:30         ` Brian
@ 2009-03-25  9:41           ` rmoldskr+usenet
  2009-03-25 22:27             ` Brian
  0 siblings, 1 reply; 34+ messages in thread
From: rmoldskr+usenet @ 2009-03-25  9:41 UTC (permalink / raw)


Brian <phaedrusalt@hotmail.com> wrote:
 
> You could_not_have_considered the scope, size and complexity of the problem 
> space that Chris was kind enough to describe, as he was not kind enough to 
> describe them at that time.

"Amateur/hobbyist" does give a fairly good indication of scope, size and
complexity.

Anyway, didn't you advice _against_ Ada on exactly the same limited
information that you lambast Andersen for basing his advice in favour of Ada
on?

-- 
Leif Roar Moldskred





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

* Re: Ada as a first language
  2009-03-23 13:29     ` Brian Drummond
@ 2009-03-25 10:51       ` Peter C. Chapin
  0 siblings, 0 replies; 34+ messages in thread
From: Peter C. Chapin @ 2009-03-25 10:51 UTC (permalink / raw)


Brian Drummond <brian_drummond@btconnect.com> wrote in
news:r33fs4h5di2v0si3k8mi2vetqeglsdchfu@4ax.com: 

> which is why I suggested "fit and forget" for the C libraries. If they
> just work, you have saved time. If not... I'd rather use Ada for
> interfacing. Does AdaMagic have trouble translating low level code
> like interrupt handlers or representation clauses?

It has a configuration file where you describe the various 
characteristics of the underlying C compiler (sizes of the C basic 
types, endianness, etc). It uses this information to generate 
appropriate C code. When I set up the configuration file I had to run a 
few test programs using the C compiler to find out what it did in some 
cases. The documentation that came with the C compiler was not specific 
enough. In our project, which is fairly simple, we have not (yet) had 
the need to use representation clauses, but I assume they would work 
given the knowledge AdaMagic has about the C compiler's basic types, 
etc.

Also in our project we have only two simple interrupt handlers so we 
(the student) just wrote them in C. Essentially our device spends most 
of its time in a deep sleep mode and then is awakened by an interrupt. 
The Ada code calls a procedure, implemented in C, that puts the 
processor to sleep. That procedure won't return until it is awakened... 
something that is done in the interrupt handler. In fact that's 
basically all the interrupt handler does.


> AdaMagic doesn't look free, which may be a consideration for personal
> experiments.

That's right. It is a non-free product for sure. One nice think about 
working in academia is that I can often get commercial toys cheap. :-)


Peter



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

* Re: Ada as a first language
  2009-03-22  2:26 Ada as a first language Chris
                   ` (6 preceding siblings ...)
  2009-03-25  0:16 ` Martin
@ 2009-03-25 15:54 ` John McCormick
  7 siblings, 0 replies; 34+ messages in thread
From: John McCormick @ 2009-03-25 15:54 UTC (permalink / raw)


Chris,

Check out the article in Circuit Cellar Magazine March 2008 on Ada and
robotics.  http://www.circuitcellar.com/archives/viewable/212-Ramirez/index.html

John

On Mar 21, 9:26 pm, Chris <c...@internode.on.net> wrote:
> Hi All,
>
> I am a mechanical engineer, and I have become interested in robotics
> embedded systems. I have little experience in this area other that
> plugging in electronic components and clicking run.
>



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

* Re: Ada as a first language
  2009-03-23 22:02     ` Brian
  2009-03-24  1:41       ` Gautier
  2009-03-24  5:56       ` Jacob Sparre Andersen
@ 2009-03-25 17:58       ` John McCormick
  2009-03-25 23:20         ` Brian
  2 siblings, 1 reply; 34+ messages in thread
From: John McCormick @ 2009-03-25 17:58 UTC (permalink / raw)


On Mar 23, 5:02 pm, "Brian" <phaedrus...@hotmail.com> wrote:
>
> With all due respect to Mr McCormick, his "Why Ada succeeds where C fails"
> should be changed to "Why Ada succeeds where C fails for this hardware and
> these software requirements relating to driving a model railroad".  While my
> version lacks snappy prose, the accuracy is much improved.  Otherwise,
> people might assume that he is saying Ada is superior to C (Or other
> languages) for every situation, which is just plain silly.
>
> Brian Salter

Brian,

Perhaps if you read the portion of my articles that explains WHY Ada
succeeds where C fails you could expand the domain far beyond my
trains.  My conclusions on the problems with scalars has been
confirmed in numerous domains.  See for instance

Eisenstadt, M.,  My Hairiest Bug War Stories,  Communications of the
ACM, vol 40, no 4, 30-37, 1997.

McCormick, J., Forum Letter, Communications of the ACM, vol 40, no 8,
30, 1997.

McCormick, J., We've been Working on the Railroad: A Laboratory of
Real-Time Embedded Systems in Proceedings of the 36th SIGCSE Technical
Symposium on Computer Science Education, St. Louis, Missouri, USA,
530-534 © ACM, 2005.  http://doi.acm.org/10.1145/1047344.1047510

I agree that Ada is not suitable for many domains, but embedded
systems is one domain for which it is generally extremly well
suited.

John



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

* Re: Ada as a first language
  2009-03-23 12:08 ` Chris
@ 2009-03-25 21:10   ` John McCormick
  2009-04-11 16:40   ` Mike Silva
  1 sibling, 0 replies; 34+ messages in thread
From: John McCormick @ 2009-03-25 21:10 UTC (permalink / raw)


On Mar 23, 7:08 am, Chris <c...@internode.on.net> wrote:
> Jacob, thanks for the reminder about John McCormick's course, I had read
>   his paper from a link on this group, I will try to get in touch with him.

Feel free to e-mail me:  mccormick at cs.uni.edu

>
> For now I'm going to keep plugging away with ada. If anyone has any good
> beginners books they can recommend, it would be greatly appreciated.

If you really do mean beginner books, check out the two I wrote for
the Freshman Intro to Computing and Data Structures courses.

Programming and Problem Solving With Ada 95
by Nell B. Dale, Chip Weems, and John W. McCormick
Jones & Bartlett Publishers; 2nd edition (March 1, 2000) ISBN-10:
0763707929

Ada Plus Data Structures: An Object-Oriented Approach
by Nell B. Dale and John W. McCormick
Jones & Bartlett Publishers; 2nd edition (August 1, 2006) ISBN-10:
0763737941

John



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

* Re: Ada as a first language
  2009-03-25  9:41           ` rmoldskr+usenet
@ 2009-03-25 22:27             ` Brian
  0 siblings, 0 replies; 34+ messages in thread
From: Brian @ 2009-03-25 22:27 UTC (permalink / raw)


> "Amateur/hobbyist" does give a fairly good indication of scope, size and
> complexity.
>
> Anyway, didn't you advice _against_ Ada on exactly the same limited
> information that you lambast Andersen for basing his advice in favour of 
> Ada
> on?
>
> -- 
> Leif Roar Moldskred

Exactly right!  I advised against Ada because it's a poor choice for a 
hobbyist with no prior programming experience, when the hobbyist wants to 
make inroads into a specific domain.  Then, I used to problem domain as a 
descriminator to select environments that would better suit a beginner.  A 
rough parallel could be drawn to a person, with no prior driving experience, 
asking which vehicle they should choose to go across town to pick up a loaf 
of bread and a jug of milk.  Even though they might lean toward a Formula 1 
racer, I'd suggest they pick something a bit easier to learn on.  Otherwise, 
a calamity is nearly unavoidable!  If the goal is the groceries, then pick a 
vehicle that makes getting to and from the groceries easier.

Brian 





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

* Re: Ada as a first language
  2009-03-25 17:58       ` John McCormick
@ 2009-03-25 23:20         ` Brian
  0 siblings, 0 replies; 34+ messages in thread
From: Brian @ 2009-03-25 23:20 UTC (permalink / raw)


"John McCormick" <mccormick@cs.uni.edu> wrote

>Perhaps if you read the portion of my articles that explains WHY Ada
>succeeds where C fails you could expand the domain far beyond my
>trains.  My conclusions on the problems with scalars has been
>confirmed in numerous domains.

>I agree that Ada is not suitable for many domains, but embedded
>systems is one domain for which it is generally extremly well
>suited.

John,

Ada works great, better than other languages, for certain situations.  Not 
all situations.  So, let's list a few "rules of thumb" about programming:
1. Short programs tend to be better (More successful) when they're written 
in the language that the implementer knows best.  (Barring prior knowledge, 
then these short programs tend to be more successful in languages that are 
easier to learn.)
2. Some languages make handling some domains easier than others.
3. For programs under 100 SLOC, it might be a wash as to which language was 
better suited.  (As long as the language supports the domain.)

Now, what should we expect from a person with no programming experience, 
experimenting with embedded robotics?  Probably small programs, for a good 
while.  Probably most interested in seeing action from the end effectors 
than anything else.  Now, what environment(s) would be most likely to give 
this person the greatest success with the least pain?  Not Ada.

The conclusions reached in your article are correct, up to a point. 
However, to make your point you abstracted two variables, the user's prior 
experience and the complexity of the problem space.  (I don't blame you, the 
addition of those two variables would have turned your paper into a 
ponderous tome!)  But, in this case these two variables are very important, 
in fact they're the only information given.  Roughly applying my rules of 
thumb (Paragraph 1) to my assumptions (Paragraph 2), we get:

A. The user will probably want to write short programs because he has no 
prior experience.  He might tend to be more successful in a language that is 
easy to learn.  And for programs under 100 SLOC, it might be a wash as to 
which language was better suited.
B. The user will probably most want to see action from the end effector(s), 
and some languages might make handling the robotic domain easier.

So, language probably doesn't matter and user success is of paramount 
importance. In this case, don't you think that an easier environment might 
be a better choice?  If NXT-G (The Lego Mindstorms graphical language) is 
too simple, then there are many other choices available before I'd recommend 
Ada to a beginner.  I realize that we all love using Ada, but shouldn't we 
consider the person's needs first?

Brian Salter









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

* Re: Ada as a first language
  2009-03-24 19:22   ` Tim Rowe
@ 2009-04-04  1:42     ` Brian Gaffney
  2009-04-07  9:50       ` Alex R. Mosteo
  0 siblings, 1 reply; 34+ messages in thread
From: Brian Gaffney @ 2009-04-04  1:42 UTC (permalink / raw)


"Tim Rowe" <spamtrap@tgrowe.plus.net> wrote in message 
news:R4idnWGodbdmr1TUnZ2dnUVZ8omWnZ2d@posted.plusnet...
> Brian Drummond wrote:
>
>> For example if you are interested in robotics you may wish to develop for
>> embedded processors, e.g. to read position sensors and control stepper 
>> motors
>> (or BLDC or induction motors, depending how serious you are!) Of all the 
>> small embedded controllers, only one family (the Atmel AVR) has an
>> Ada compiler targetting it. (google AVR Ada)
>
> But Ada for Lego Mindstorms is apparently on its way...
How long has that been on the way?

There is also a GCC port for 68HC10/12, which contains GNAT (but no runtime, 
and last I looked it didn't advertise Ada as working).  I did get it 
working, and built some simple programs.  Unless it's advanced, I wouldn't 
recommend it for a newbie.

--Brian
--Chip away the stone Sissaphis, chip away the stone.
--Make the burden lighter if you must roll that rock alone.





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

* Re: Ada as a first language
  2009-04-04  1:42     ` Brian Gaffney
@ 2009-04-07  9:50       ` Alex R. Mosteo
  0 siblings, 0 replies; 34+ messages in thread
From: Alex R. Mosteo @ 2009-04-07  9:50 UTC (permalink / raw)


Brian Gaffney wrote:

> "Tim Rowe" <spamtrap@tgrowe.plus.net> wrote in message
> news:R4idnWGodbdmr1TUnZ2dnUVZ8omWnZ2d@posted.plusnet...
>> Brian Drummond wrote:
>>
>>> For example if you are interested in robotics you may wish to develop
>>> for embedded processors, e.g. to read position sensors and control
>>> stepper motors
>>> (or BLDC or induction motors, depending how serious you are!) Of all the
>>> small embedded controllers, only one family (the Atmel AVR) has an
>>> Ada compiler targetting it. (google AVR Ada)
>>
>> But Ada for Lego Mindstorms is apparently on its way...
> How long has that been on the way?

This time it could be truer. According to some recent posts to the GAP 
mailing list, there's some already functional thing somewhere. It should be 
here, according to the mail I received:

https://www2.adacore.com/gnattracker2/contributions#Labs_Material

but alas, it is not.

Alex.

> 
> There is also a GCC port for 68HC10/12, which contains GNAT (but no
> runtime,
> and last I looked it didn't advertise Ada as working).  I did get it
> working, and built some simple programs.  Unless it's advanced, I wouldn't
> recommend it for a newbie.
> 
> --Brian
> --Chip away the stone Sissaphis, chip away the stone.
> --Make the burden lighter if you must roll that rock alone.





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

* Re: Ada as a first language
  2009-03-23 12:08 ` Chris
  2009-03-25 21:10   ` John McCormick
@ 2009-04-11 16:40   ` Mike Silva
  1 sibling, 0 replies; 34+ messages in thread
From: Mike Silva @ 2009-04-11 16:40 UTC (permalink / raw)


On Mar 23, 8:08 am, Chris <c...@internode.on.net> wrote:
> Hi All,
>
> mockturtle, "gun for mosquitoes" was definitely what I was thinking, as
> well as am I making it harder on my self than I need to. From what you
> have described as your use fo ada, that is where I would like to get to.
> being able to script things for work would be beneficial
>....Right now I'm just looking to get
> started with software. Ive been working on a VTOL RC aircraft for a
> while, and I would like to, eventually, intergrate sensors, auto pilot,
> ect... down the line.

Based on that comment, you're already well into the realm where the
benefits of Ada would be worth the learning curve, IMHO.  You're also
in the realm where, if you decided to learn C instead (picking the
most obvious alternative) you could end up tying yourself in major
knots, especially as a beginner.

> The problem that I've got now is that I really like Ada. It may sound
> silly, but the clear syntax makes it so much easier to see what's going
> on in the program. And for a person with limited experience, that's a
> massive help.
> I also think that good structure, and best practice are the only way to
> do something, even if it is as a hobby. All my home projects I structure
> and document as if it were a commercial project. While it takes more
> time, it means that the data from the project is always available in the
> future.

You certainly have a mindset to succeed with Ada.  The AVR family of
uCs may be quite suitable for your goals (I use them a lot and I like
them).  I don't know anything about Ada for AVR other than that it
exists (but I think I'll go do some reading now that the subject has
come up).  If it's really useable then that may be just the ticket for
you.

Mike



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

end of thread, other threads:[~2009-04-11 16:40 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-22  2:26 Ada as a first language Chris
2009-03-22 10:36 ` mockturtle
2009-03-22 14:44 ` Brian Drummond
2009-03-23 11:03   ` Peter C. Chapin
2009-03-23 13:29     ` Brian Drummond
2009-03-25 10:51       ` Peter C. Chapin
2009-03-23 16:59   ` rolf.ebert_nospam_
2009-03-24 19:22   ` Tim Rowe
2009-04-04  1:42     ` Brian Gaffney
2009-04-07  9:50       ` Alex R. Mosteo
2009-03-22 15:21 ` Gary Scott
2009-03-23  8:28 ` Brian
2009-03-23  9:05   ` Jacob Sparre Andersen
2009-03-23 22:02     ` Brian
2009-03-24  1:41       ` Gautier
2009-03-24  5:56       ` Jacob Sparre Andersen
2009-03-24 22:30         ` Brian
2009-03-25  9:41           ` rmoldskr+usenet
2009-03-25 22:27             ` Brian
2009-03-25 17:58       ` John McCormick
2009-03-25 23:20         ` Brian
2009-03-23 12:08 ` Chris
2009-03-25 21:10   ` John McCormick
2009-04-11 16:40   ` Mike Silva
2009-03-23 23:05 ` jpwoodruff
2009-03-25  0:16 ` Martin
2009-03-25 15:54 ` John McCormick
  -- strict thread matches above, loose matches on Subject: below --
1997-07-03  0:00 Ada as a First Language RC
1997-07-03  0:00 ` Michael Feldman
1997-07-06  0:00 ` Alan Brain
1997-07-06  0:00   ` Robert Dewar
1997-07-16  0:00   ` Eric James DeArment
1997-07-07  0:00 ` Shmuel (Seymour J.) Metz
1992-12-29 15:40 agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!vx9000.weber.edu!

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