[Edu-sig] java

Christine A. Shannon shannon at centre.edu
Thu Oct 16 08:08:14 EDT 2003


At Centre College we have been teaching CS I using Python for over three
years.  I reported on the course at the last ACM SIGCSE meeting:

Shannon, Christine, "Another Breadth-first Approach to CS I using
Python," Proceedings of the Thirty-Fourth SIGCSE Technical Symposium on
Computer Science Education, Reno, Nevada, February 19-22, 2003, pp.
248-251.

In the second course - which is primarily a data structures course -- we
use Java.  Students find it much harder but of course we also solve much
harder problems.  There is a learning curve -- but students know the
basics of programming and now have to learn a new syntax with lots of
extra rules like declaring variables, interfaces, Comparable Objects
etc.  I know I would not want to be teaching this to students who are
only marginally interested in CS.  Most students in our introductory
course are taking it because their major requires it or because they
want to learn something about computers.  The breadth first course we
teach is much more appropriate for them and still serves the needs of
our majors.  Many students resort to Python in later courses where they
are free to choose a programming language.

Christine Shannon
Margaret V. Haggin Professor of Mathematics
      and Computer Science
Centre College
600 W. Walnut
Danville, KY  40422
859 238 5406


-----Original Message-----
From: edu-sig-request at python.org [mailto:edu-sig-request at python.org] 
Sent: Wednesday, October 15, 2003 7:59 PM
To: edu-sig at python.org
Subject: Edu-sig Digest, Vol 3, Issue 13

Send Edu-sig mailing list submissions to
	edu-sig at python.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.python.org/mailman/listinfo/edu-sig
or, via email, send a message with subject or body 'help' to
	edu-sig-request at python.org

You can reach the person managing the list at
	edu-sig-owner at python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Edu-sig digest..."


Today's Topics:

   1. Re: java (luby liao)
   2. Re: java (Gerrit Holl)
   3. Re: java (Jason Cunliffe)
   4. RE: java (Kirby Urner)
   5. Re: java - 2 examples (Jason Cunliffe)
   6. RE: java (Danny Yoo)
   7. RE: java (Kirby Urner)
   8. Re: java (Jason Cunliffe)
   9. interactive languages (Jason Cunliffe)
  10. Re: java (Jaime E. Villate)
  11. Re: java (Terry Hancock)


----------------------------------------------------------------------

Message: 1
Date: Wed, 15 Oct 2003 09:17:25 -0700
From: luby liao <liao at sandiego.edu>
Subject: Re: [Edu-sig] java
To: Gerrit Holl <gerrit at nl.linux.org>
Cc: edu-sig at python.org
Message-ID: <3F8D7315.40903 at sandiego.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Gerrit, do you know what unviersities?  Are they important 
universities?  What are their wisdom?  cheers, Luby

--
Luby Liao, Department of Math/CS, University of San Diego, San Diego, CA

92110
(619)260-4021(O), (858)452-7644(H), (619)260-4293(fax)

   'Twas brillig, and the slithy toves    Did gyre and gimble in the
wabe:
   All mimsy were the borogroves    And the mome raths outgrabe   --
L.C.

>Hello,
>
>at least three universities in The Netherlands
>use Java to teach programming to non-CS-student.
>
>Is this bad?
>
>yours,
>Gerrit Holl.
>
>  
>





------------------------------

Message: 2
Date: Wed, 15 Oct 2003 18:26:29 +0200
From: Gerrit Holl <gerrit at nl.linux.org>
Subject: Re: [Edu-sig] java
To: edu-sig at python.org
Message-ID: <20031015162629.GA4604 at nl.linux.org>
Content-Type: text/plain; charset=us-ascii

luby liao wrote:
> Gerrit, do you know what unviersities?  Are they important 
> universities?  What are their wisdom?  cheers, Luby

I am a physics student, and next year, I will be teached Java.
The same is true for (at least) Chemists and Elektrotechnicians.
I am at the University of Twente, and I know that the Vrije
Universititeit also teaches programming with Java. I'm not sure
whether the Universiteit van Amsterdam also uses Java to teach
physisians programming. In The Netherlands, there is not a big
difference between more and less important universities.

My father (Ruby'ist) doesn't understand why universities do so.
I think he is over-aggerating when he compares Java with Cobol,
both being used in companies a lot, but I do understand that
Java is lower-level so less useful in physics?

yours,
Gerrit.

--  
190. If a man does not maintain a child that he has adopted as a son
and reared with his other children, then his adopted son may return to
his
father's house.
          -- 1780 BC, Hammurabi, Code of Law
-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/



------------------------------

Message: 3
Date: Wed, 15 Oct 2003 13:02:38 -0400
From: "Jason Cunliffe" <jason.cunliffe at verizon.net>
Subject: Re: [Edu-sig] java
To: "Gerrit Holl" <gerrit at nl.linux.org>
Cc: edu-sig at python.org
Message-ID: <007301c3933e$23979d20$6501a8c0 at vaio>
Content-Type: text/plain;	charset="iso-8859-1"

> at least three universities in The Netherlands
> use Java to teach programming to non-CS-student.
>
> Is this bad?

No - Not "bad".. [but it depends what you mean by bad]
Learning any widely used computer language is a good thing, especially
if it
is well taught ;-)
Learning several languages over time is even better !

An common argument is about which language makes a good beginning.
Is this your first programming language ?
What skills/experience/interest do you have now?

When considering languages I think it is very important to consider the
size
and quality or community and resources around them. This social
collaborative environment is as essential as the specific technical
features.

Python for example has a great community who contribute quality learning
and
code openly and generously.
Java has some of that also, though perhaps more mixed up with commercial
context.

Java is very widely used, and increasingly so for sophisticated apps and
frameworks for many communications and scientific software. Java-based
tools
can also be used with others very effectively. One example is Jython
which
offers a bridge between and benefits of both Java and Python.

Java can be initially very verbose compared to some other languages.
That is
why many people prefer languages like Python or Ruby. Because they are
considered more concise, more readable, more elegant, more fun,
[insert-your-own-preference-here], etc. But beauty is in the eye of the
maker, and the beholder. So many levels and ways of approaching
progamming,
that it is best to keep a very open mind to these issues. Experience
will
make it easier to decide what you like and why.

Java syntax and features are very similar to a number of modern
langauges.
So even if you don't continue long with it, you will gain many valuable
core
skills you can apply elsewhere.

An excellent book discussed here not long ago is "Head First Java".
http://www.oreilly.com/catalog/hfjava/
http://www.amazon.com/exec/obidos/tg/detail/-/0596004656/002-6665319-353
3633?v=glance

good luck
- Jason






------------------------------

Message: 4
Date: Wed, 15 Oct 2003 10:20:39 -0700
From: "Kirby Urner" <urnerk at qwest.net>
Subject: RE: [Edu-sig] java
To: "'Gerrit Holl'" <gerrit at nl.linux.org>, edu-sig at python.org
Message-ID: <E1A9pJw-0005nD-8T at mail.python.org>
Content-Type: text/plain;	charset="us-ascii"


I think there's a trend in many US colleges and universities towards
using
dynamic languages for non-CS course, vs. the more static ones.  

Static languages require declaring variable types before use and are
generally a lot stricter, and therefore take somewhat longer to learn.

If I had to choose one over the other, I'd take Python over Java.
Students
would be more productive more quickly and it's easier to teach.

Static languages include:  Java, C, C++, C#, Pascal, ocaml
Dynamic languages include:  Python, Perl, Ruby, FoxPro

That being said, Java is a capable, contemporary language and the skills
one
learns are transferable to other languages.

For more readings see:
http://www.artima.com/weblogs/viewpost.jsp?thread=4639
http://altis.pycs.net/2003/05/02.html

Kirby

> -----Original Message-----
> From: edu-sig-bounces+urnerk=qwest.net at python.org [mailto:edu-sig-
> bounces+urnerk=qwest.net at python.org] On Behalf Of Gerrit Holl
> Sent: Wednesday, October 15, 2003 8:25 AM
> To: edu-sig at python.org
> Subject: [Edu-sig] java
> 
> Hello,
> 
> at least three universities in The Netherlands
> use Java to teach programming to non-CS-student.
> 
> Is this bad?
> 
> yours,
> Gerrit Holl.





------------------------------

Message: 5
Date: Wed, 15 Oct 2003 13:26:38 -0400
From: "Jason Cunliffe" <jason.cunliffe at verizon.net>
Subject: Re: [Edu-sig] java - 2 examples
To: "Gerrit Holl" <gerrit at nl.linux.org>
Cc: edu-sig at python.org
Message-ID: <008c01c39341$7e3892e0$6501a8c0 at vaio>
Content-Type: text/plain;	charset="iso-8859-1"

Two examples of very cool software written in Java for science student:

JSyn
http://www.softsynth.com/jsyn/

Vis-Ad
http://www.ssec.wisc.edu/~billh/visad.html

enjoy
-Jason





------------------------------

Message: 6
Date: Wed, 15 Oct 2003 11:12:18 -0700 (PDT)
From: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
Subject: RE: [Edu-sig] java
To: Kirby Urner <urnerk at qwest.net>
Cc: edu-sig at python.org, 'Gerrit Holl' <gerrit at nl.linux.org>
Message-ID:
	<Pine.LNX.4.44.0310151049410.4726-100000 at hkn.eecs.berkeley.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII



> Static languages require declaring variable types before use and are
> generally a lot stricter, and therefore take somewhat longer to learn.

[some text cut]

> Static languages include:  Java, C, C++, C#, Pascal, ocaml


Hi Kirby,


I do have to disagree about clumping OCaml in with those other
languages.
OCaml (and the ML languages) are strictly typed, but their type systems
are much more intelligent than traditional "typed" languages.  Unlike
Java, C, C++, C#, and Pascal, OCaml will perform proper type inference;
in
almost all cases, types won't have to be explicitely written out.  For
example:

(******)
# let rec length list =
      if list = [] then 0
      else 1 + length (List.tl list);;
val length : 'a list -> int = <fun>
(******)


This length() function takes a list of any type, and knows that it'll
return an integer.  Nothing here requires the programmer to explicitly
declare variable types -- it'll work on lists of strings just as well as
on lists of integers.

(******)
# length ["hello"; "world"];;
- : int = 2
# length [1;2;3;4;5];;
- : int = 5
(******)


And, like Python, OCaml's types will follow values, not names:

(******)
# let age = "forty-two";;
val age : string = "forty-two"
# let age = 42;;
val age : int = 42
(******)

OCaml has a lot of the good features of a "dynamic" language, including
a
interactive interpreter.  And although its syntax is a little wacky,
that
shouldn't be an excuse to aggregate it with the likes of Java.  *grin*


> If I had to choose one over the other, I'd take Python over Java.
> Students would be more productive more quickly and it's easier to
teach.

Yes, Python and OCaml are excellent alternatives to Java.  Both present
an
environment where the cost of playing around with the language is very
low
--- their interactive interpreters allow for casual experimentation.
Java,
on the other hand, requires explicit compilation, so it's just not much
fun to play with.


My apologies for focusing on OCaml so much on this post; I'm still a bit
brainwashed after reading Mark Jason Dominus's page on:

    http://perl.plover.com/yak/typing/typing.html

*grin*


Good luck to you!




------------------------------

Message: 7
Date: Wed, 15 Oct 2003 11:29:43 -0700
From: "Kirby Urner" <urnerk at qwest.net>
Subject: RE: [Edu-sig] java
To: "'Danny Yoo'" <dyoo at hkn.eecs.berkeley.edu>
Cc: edu-sig at python.org, 'Gerrit Holl' <gerrit at nl.linux.org>
Message-ID: <E1A9qOq-0001Zj-22 at mail.python.org>
Content-Type: text/plain;	charset="us-ascii"

> I do have to disagree about clumping OCaml in with those other
languages.

OK, thanks for the experience-based details.  I just grabbed it from
someone
else's list of static languages.  I've not used OCaml myself (just read
some
docs at one point).

> This length() function takes a list of any type, and knows that it'll
> return an integer.  Nothing here requires the programmer to explicitly
> declare variable types -- it'll work on lists of strings just as well
as
> on lists of integers.
> 
> (******)
> # length ["hello"; "world"];;
> - : int = 2
> # length [1;2;3;4;5];;
> - : int = 5
> (******)

Well, this would be a feature of C# as well, in that the System.Array
type
has its built-in Length field, like Python's __len__ method, where the
Array
may be of various types, or of mixed type if you say its an array of
object
references.

Yes, you have to declare the array type, but it's the same
myarray.Length
invocation every time.

Isn't Java like this too?
 
> 
> And, like Python, OCaml's types will follow values, not names:
> 
> (******)
> # let age = "forty-two";;
> val age : string = "forty-two"
> # let age = 42;;
> val age : int = 42
> (******)
> 
> OCaml has a lot of the good features of a "dynamic" language,
including a
> interactive interpreter.  And although its syntax is a little wacky,
that
> shouldn't be an excuse to aggregate it with the likes of Java.  *grin*
> 
> 
> > If I had to choose one over the other, I'd take Python over Java.
> > Students would be more productive more quickly and it's easier to
teach.
> 
> Yes, Python and OCaml are excellent alternatives to Java.  Both
present an
> environment where the cost of playing around with the language is very
low
> --- their interactive interpreters allow for casual experimentation.
Java,
> on the other hand, requires explicit compilation, so it's just not
much
> fun to play with.

But Jython fixes that shortcoming.

I think you've hit the nail on the head though:  it's having an
interactive
interpreter that makes all the difference.  Non-CS majors trying to be
productive in their own disciplines should be given an interactive
language
to learn (Mathematica and Matlab also qualify, as does J).
 
> My apologies for focusing on OCaml so much on this post; I'm still a
bit
> brainwashed after reading Mark Jason Dominus's page on:
> 
>     http://perl.plover.com/yak/typing/typing.html
> 
> *grin*

Again, I appreciate your detailed input.

Kirby





------------------------------

Message: 8
Date: Wed, 15 Oct 2003 14:44:54 -0400
From: "Jason Cunliffe" <jason.cunliffe at verizon.net>
Subject: Re: [Edu-sig] java
To: "Kirby Urner" <urnerk at qwest.net>
Cc: edu-sig at python.org
Message-ID: <001201c3934c$6cf810e0$6501a8c0 at vaio>
Content-Type: text/plain;	charset="iso-8859-1"

> I think you've hit the nail on the head though:  it's having an
interactive
> interpreter that makes all the difference.  Non-CS majors trying to be
> productive in their own disciplines should be given an interactive
language
> to learn (Mathematica and Matlab also qualify, as does J).

Yes indeed..

Does anyone have a full list of interactive languages?

- Jason




------------------------------

Message: 9
Date: Wed, 15 Oct 2003 15:13:13 -0400
From: "Jason Cunliffe" <jason.cunliffe at verizon.net>
Subject: [Edu-sig] interactive languages
To: <edu-sig at python.org>
Message-ID: <002801c39350$61b933e0$6501a8c0 at vaio>
Content-Type: text/plain;	charset="iso-8859-1"

> Does anyone have a full list of interactive languages?

hmm... I am underwhelmed by a quick Google for "interactive languages"
-- 
slim pickings

http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=interactive+langu
ages&btnG=Google+Search

At least I expected to find more obvious evidence of rich discussion on
this.
Yes, I barely skimmed the surface and *very* quickly, but such Google
sessions that can meaningful indicators often.

I find these weak search response quite interesting.
If you look instead for "interpreted language" it's more like what you
might
expect
http://www.google.com/search?sourceid=navclient&q=interpreted+language

Interactive == Interpreted

But that's not really the [default] point or is it?

The other way around I accept..
Interpreted  == Interactive

- Jason




------------------------------

Message: 10
Date: Wed, 15 Oct 2003 23:42:13 +0100
From: "Jaime E. Villate" <villate at gnu.org>
Subject: Re: [Edu-sig] java
To: edu-sig at python.org
Message-ID: <20031015224213.GC564 at fe.up.pt>
Content-Type: text/plain; charset=us-ascii

On Wed, Oct 15, 2003 at 06:26:29PM +0200, Gerrit Holl wrote:
> I am a physics student, and next year, I will be teached Java.
> The same is true for (at least) Chemists and Elektrotechnicians.
> I am at the University of Twente, and I know that the Vrije
> Universititeit also teaches programming with Java. I'm not sure
> whether the Universiteit van Amsterdam also uses Java to teach
> physisians programming. In The Netherlands, there is not a big
> difference between more and less important universities.

I do not know Java very well, and even if I would not use it to
teach my students here in Portugal, I do not think there is anything
wrong with adopting it in a science course.
The only problem I see with Java is that some Java features are not
standard and will only work with SUN's proprietary versions;
it is better to avoid using those non-standard features and
write programs that can run with the free versions of Java.

As a physicist, I've had to use several different programming
languages during the last 25 years. Some years ago, Fortran used to be
the preferred language in Physics, mainly because there was a large
number of libraries already well tested; a lot of those libraries have
now been ported to C++ or C.

In some applications I had to use assembly language and in some other
cases I've even become an expert in Postscript as a programming
language :)
I think that it is good to get exposed to different languages. That's
why nowadays my choice for teaching would be Python, because it would
allow me to cover procedural programming as well as object oriented
programming and GUI applications without the overhead of a complicated
syntax.

Cheers,
Jaime




------------------------------

Message: 11
Date: Wed, 15 Oct 2003 19:01:47 -0500
From: Terry Hancock <hancock at anansispaceworks.com>
Subject: Re: [Edu-sig] java
To: edu-sig at python.org
Message-ID: <m1A9vXa-007nJGC at mail.augustmail.com>
Content-Type: text/plain;  charset="iso-8859-1"

On Wednesday 15 October 2003 01:29 pm, Kirby Urner wrote:
> > Yes, Python and OCaml are excellent alternatives to Java.  Both
present an
> > environment where the cost of playing around with the language is
very low
> > --- their interactive interpreters allow for casual experimentation.


> But Jython fixes that shortcoming.

Of course, Jython is Python, not Java from the programmer's POV, no
matter that it is written and interpreted in Java.

> I think you've hit the nail on the head though:  it's having an
interactive
> interpreter that makes all the difference.  Non-CS majors trying to be
> productive in their own disciplines should be given an interactive
language
> to learn (Mathematica and Matlab also qualify, as does J).

Absolutely -- I think this is the single strongest advantage of Python
as far
as ease of use goes: it's faster to experimentally verify behavior in
the
interpreter than it is to look it up in the manual.  It's the only
language I've
used for which that is true (with the possible exception of the BASIC
interpreters I started on some 20+ years ago).  Add to that that Python
is a full-fledged language with support for structured programming,
object-oriented programming, and functional-programming models,
and it's just a real breeze to get going in.

I've also just used Python as a shell, tinkering with word games and
so on -- such as "collecting the 400 most commonly used words of
more than 3 characters appearing in selected project Gutenberg
texts," which I did without formally creating a program, but just
tinkering with objects in the interpreter.  It's also pretty cool that
Python
is forgiving enough to let you do something like:

words = open("jane_austens_collected_works.txt", 'r').read().split()
uniq_words = {}
for word in words:
   uniq_words[word] += 1

without choking your computer. ;-)
(Yes this is an imperfect result -- I actually did a bit more than this
when I did it -- I was compiling an "ignore" list for a mnemonic id
generator, in which I wanted to throw out common words and
preferentially keep the more unique words in a title).

This tolerance of blunderingly inefficient (but conceptually obvious)
approaches is also what made IDL nice in astronomical work.

I haven't tried some of the other languages you mention, so I can't
say that Python is better than them, but it's certainly a good place
to start, and it does a lot of stuff well.  I also have a very warm
fuzzy feeling knowing that Python is both free and Free, and therefore
I don't have to worry about losing it or being left behind so much.

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



------------------------------

_______________________________________________
Edu-sig mailing list
Edu-sig at python.org
http://mail.python.org/mailman/listinfo/edu-sig


End of Edu-sig Digest, Vol 3, Issue 13
**************************************



More information about the Edu-sig mailing list