comp.lang.ada
 help / color / mirror / Atom feed
* Java-Ada 2005 Syntax / Language Features Comparisons
@ 2007-08-08 20:28 michael.mcnett
  2007-08-09  6:44 ` Maciej Sobczak
  2007-08-09  9:46 ` Anilkumar.T
  0 siblings, 2 replies; 7+ messages in thread
From: michael.mcnett @ 2007-08-08 20:28 UTC (permalink / raw)


Is anyone aware of a reference card or short document that shows
equivalent Ada syntax and language features with those of Java.

Students could use this to understand data structure concepts written
in a book using Java, and then implement these concepts in code using
Ada 2005.  These students are CS majors and will have already taken a
course in Ada.


Thanks,
Mike McNett




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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-08 20:28 Java-Ada 2005 Syntax / Language Features Comparisons michael.mcnett
@ 2007-08-09  6:44 ` Maciej Sobczak
  2007-08-09 11:15   ` Georg Bauhaus
  2007-08-09  9:46 ` Anilkumar.T
  1 sibling, 1 reply; 7+ messages in thread
From: Maciej Sobczak @ 2007-08-09  6:44 UTC (permalink / raw)


On 8 Sie, 22:28, michael.mcn...@usma.edu wrote:
> Is anyone aware of a reference card or short document that shows
> equivalent Ada syntax and language features with those of Java.
>
> Students could use this to understand data structure concepts written
> in a book using Java, and then implement these concepts in code using
> Ada 2005.  These students are CS majors and will have already taken a
> course in Ada.

If they are CS majors, then they should be able to think in terms of
abstracts and should not need such primitive cheat-sheets for 1:1
translations between languages.

I would even go further and say that the whole idea is broken at the
start. Java is reference-oriented whereas Ada is value-oriented, which
has significant consequences in how high-level concepts like
composition and aggregation are expressed in code - this goes much
further than syntax differences. Teaching people to recode some stuff
using "syntax equivalents" is a Bad Idea.

Just my 0.05 Euro.

--
Maciej Sobczak
http://www.msobczak.com/




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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-08 20:28 Java-Ada 2005 Syntax / Language Features Comparisons michael.mcnett
  2007-08-09  6:44 ` Maciej Sobczak
@ 2007-08-09  9:46 ` Anilkumar.T
  1 sibling, 0 replies; 7+ messages in thread
From: Anilkumar.T @ 2007-08-09  9:46 UTC (permalink / raw)


hi,
you can read this Article The Steelman

http://www.adahome.com/History/Steelman/steeltab.htm

Cheers
Anil Kumar .T

michael.mcn...@usma.edu wrote:
> Is anyone aware of a reference card or short document that shows
> equivalent Ada syntax and language features with those of Java.
>
> Students could use this to understand data structure concepts written
> in a book using Java, and then implement these concepts in code using
> Ada 2005.  These students are CS majors and will have already taken a
> course in Ada.
>
>
> Thanks,
> Mike McNett




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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-09  6:44 ` Maciej Sobczak
@ 2007-08-09 11:15   ` Georg Bauhaus
  2007-08-09 12:33     ` michael.mcnett
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Bauhaus @ 2007-08-09 11:15 UTC (permalink / raw)


Maciej Sobczak wrote:
> On 8 Sie, 22:28, michael.mcn...@usma.edu wrote:
>> Is anyone aware of a reference card or short document that shows
>> equivalent Ada syntax and language features with those of Java.
>>
>> Students could use this to understand data structure concepts written
>> in a book using Java, and then implement these concepts in code using
>> Ada 2005.  These students are CS majors and will have already taken a
>> course in Ada.

What kind of book is this? Would it be impractical to just
use an Ada book?

Key notions will include, with their syntax,

   Java class  <->  Ada package + tagged type
        (side note: JVM classes use tag fields, too!)

   Java packages <-> Ada package hierarchies

   Java subtypes <-> Ada packages and derived types

   Java public/protected/private <->
      Ada public/private + visibility rules + nesting

   Java low level concurrency building blocks <->
      Ada built in concurrency features

We have tried to collect a few hints in
http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation



> If they are CS majors, then they should be able to think in terms of
> abstracts and should not need such primitive cheat-sheets for 1:1
> translations between languages.

However, aproaching the subjects from a conceptual point
of view seems like a good opportunity to me. You can then
demonstrate, for example, where and when values are better
than references, see the benefits of a well defined base type
system, etc. In particular when the students have already taken
a course in Ada.



> Teaching people to recode some stuff
> using "syntax equivalents" is a Bad Idea.

Yes, syntax only transformations are indeed prone to financial and
technical desaster. They can be dangerous. There is enough anecdotal
evidence already. But I'm not sure this fits the OP's motivation?

One more anecdote: A programmer used Java for programming but wrote
identifiers such as

   performThisActionOnThingWithThatConstraint(
      equallyLengthyArgumentValue, ...);


It looked like the programmer had done some vanilla Scheme
programming before and was mathematically skilled.
Would syntax charts for plain Scheme <-> Java have helped at all?
I doubt it. However, studying the first chapters of any O-O methods book
such as the ones by Booch would have helped as these will inevitably make
you notice the method of finding objects by looking at function names...





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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-09 11:15   ` Georg Bauhaus
@ 2007-08-09 12:33     ` michael.mcnett
  2007-08-10 22:46       ` John McCormick
  0 siblings, 1 reply; 7+ messages in thread
From: michael.mcnett @ 2007-08-09 12:33 UTC (permalink / raw)


Thanks for everyone's responses.
- I already have the Steelman reference and will use a couple snippets
from it.
- While I've considered using a Data Structures book that uses Ada
2005, I've decided against it for several reasons.
- I agree that having "primitive cheat-sheets" is not best for all NEW
CS majors, there are a handful of students whose learning styles call
for something like this.  If a student doesn't want (or need) to refer
to it, they certainly don't have to.
- The next course they take uses Java, although we don't teach them
Java - it is expected that they do some self-study to learn the
language.  This means the following: CS1 teaches problem solving using
Ada; CS2 teaches data structures using Ada (but using a Java data
structures book); CS3 is Advanced Programming Concepts (using Java)
that focuses quite a bit on Design Patterns.
- The book that I'm using in CS2 also introduces students to UML,
sequence diagrams, and several other important concepts that we use in
the CS3 course.  Therefore, this CS2 course is the "hook" I'm using to
link their CS1 course to their CS3 course without directly "teaching"
a new programming language.  The book used in the CS2 course helps me
teach the concepts, with the extra benefit of their gaining some basic
familiarity with language they will use in their CS3 course.
- I agree with having recode some stuff using "syntax equivalents" is
a bad idea.  That's why I stated that they understand the concepts
from the book and implement them in Ada.  I certainly am not
advocating that they understand the SYNTAX from the book and code that
in "equivalent" Ada SYNTAX.
- The wiki reference will be helpful.

Thanks again to everyone's input.

Mike







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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-09 12:33     ` michael.mcnett
@ 2007-08-10 22:46       ` John McCormick
  2007-08-11  2:08         ` michael.mcnett
  0 siblings, 1 reply; 7+ messages in thread
From: John McCormick @ 2007-08-10 22:46 UTC (permalink / raw)


Switching languages in the second course is a sure way to create
frustrated students.  They are barely able to program in any language
after only 15 weeks.  They still think concretely in that first
programming language.  Very few students see the abstractions
necessary necessary to springboard to a new language - it is almost
like they are starting from scratch.  I can't imagine that keeping the
same language for the second course but teaching it with a book that
uses a different language is much better.

We teach Ada in both CS1 and CS2.  We teach algorithmic problem
solving in CS1 and move to an OO approach in CS2.  We switch to Java
in CS3 where patterns are the goal.  We don't need any "hooks" in CS2
to motivate a link betweeen CS1 and CS3.  And we don't just dump Java
on them in CS3 - we provide guidance on how "experienced" programmers
learn a new language.  I think that this guidance provides our
students with an important skill for learning in the future.  Our
students did not fare nearly as well when we just dumped a new
language on them in the third course.

John

On Aug 9, 7:33 am, michael.mcn...@usma.edu wrote:
> Thanks for everyone's responses.
> - I already have the Steelman reference and will use a couple snippets
> from it.
> - While I've considered using a Data Structures book that uses Ada
> 2005, I've decided against it for several reasons.
> - I agree that having "primitive cheat-sheets" is not best for all NEW
> CS majors, there are a handful of students whose learning styles call
> for something like this.  If a student doesn't want (or need) to refer
> to it, they certainly don't have to.
> - The next course they take uses Java, although we don't teach them
> Java - it is expected that they do some self-study to learn the
> language.  This means the following: CS1 teaches problem solving using
> Ada; CS2 teaches data structures using Ada (but using a Java data
> structures book); CS3 is Advanced Programming Concepts (using Java)
> that focuses quite a bit on Design Patterns.
> - The book that I'm using in CS2 also introduces students to UML,
> sequence diagrams, and several other important concepts that we use in
> the CS3 course.  Therefore, this CS2 course is the "hook" I'm using to
> link their CS1 course to their CS3 course without directly "teaching"
> a new programming language.  The book used in the CS2 course helps me
> teach the concepts, with the extra benefit of their gaining some basic
> familiarity with language they will use in their CS3 course.
> - I agree with having recode some stuff using "syntax equivalents" is
> a bad idea.  That's why I stated that they understand the concepts
> from the book and implement them in Ada.  I certainly am not
> advocating that they understand the SYNTAX from the book and code that
> in "equivalent" Ada SYNTAX.
> - The wiki reference will be helpful.
>
> Thanks again to everyone's input.
>
> Mike





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

* Re: Java-Ada 2005 Syntax / Language Features Comparisons
  2007-08-10 22:46       ` John McCormick
@ 2007-08-11  2:08         ` michael.mcnett
  0 siblings, 0 replies; 7+ messages in thread
From: michael.mcnett @ 2007-08-11  2:08 UTC (permalink / raw)


John,
During the previous several semesters this CS2 course did the same
thing that I am doing now, except the book used in those semesters
used C++.  From personal experience, it actually worked quite well for
both CS and non-CS students.  Yes, it is challenging to them when they
first start reading the book and try to implement its concepts in a
different language.  By the middle of the semester, however, they
realize that the fundamentals of the languages are quite similar.

The Spring semester will be a good indicator to see if moving to the
Java-based book for CS2 helps them in their CS3 course.  I should
clarify what I meant by us not teaching them Java.  We don't just
"dump a new language on them" without any assistance (although that's
what my earlier post made it sound).  There is plenty of in-class work
between the instructor and the students that helps them understand the
fundamentals of Java.  I'd be very interested in hearing more about
the guidance you provide on "... how "experienced" programmers learn a
new language."

Our approach described in the earlier post is meant to give them the
opportunity to explore Ada more fully in this CS2 course while
simultaneously giving them familiarity with a language they will be
using in CS3.  There is no expectation that they would actually be
able to design and implement an application in Java after this CS2
course.

> We teach Ada in both CS1 and CS2.  We teach algorithmic problem
> solving in CS1 and move to an OO approach in CS2.  We switch to Java
> in CS3 where patterns are the goal.  

It certainly sounds like our CS1, 2, and 3 courses are quite similar
based on this.

Mike




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

end of thread, other threads:[~2007-08-11  2:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08 20:28 Java-Ada 2005 Syntax / Language Features Comparisons michael.mcnett
2007-08-09  6:44 ` Maciej Sobczak
2007-08-09 11:15   ` Georg Bauhaus
2007-08-09 12:33     ` michael.mcnett
2007-08-10 22:46       ` John McCormick
2007-08-11  2:08         ` michael.mcnett
2007-08-09  9:46 ` Anilkumar.T

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