Re: Choice of introductory programming language to a freshman class

2009-04-07 Thread Richard O'Keefe


On 7 Apr 2009, at 5:52 pm, Russel Winder wrote:


On Mon, 2009-04-06 at 12:32 +0100, Enda Dunican wrote:

Yes I agree with this last email. If there was an ideal language out
there everybody would be using it.  Be prepared to be browbeaten from
the soapbox when you start a topic like this.


Or it could have been an excellent exchange of people's experiences  
with

an interesting pool of ideas created.

It is a pity this email stifled that.


Perhaps we can resurrect it.

I take it we can all agree that

 - the standard library that comes with C++ is bigger than the
   standard library that comes with C (necessarily so, since
   C++ 98 includes everything that C89 does and then some,
   while C++ 0x will include everything that C99 does and then some).

 - the standard library that comes with Java is bigger than the
   standard library that comes with C++ (empirically so, since
   even C++ 0x does not include a graphics library or sockets) but
   it's less clear when you consider the "standard environment" that
   C++ usually lives in (UNIX or something much bigger), but even
   then, most of that stuff is available some other way.

The dubious bit is how much this helps, or rather, what it helps
*for*.  RMIT in Melbourne switched from Ada95 to Java because
AWT was in all the Java books and writing flashy GUI apps was
sexy and could be counted on to drag the students in, while
writing highly reliable code -- Ada's strength -- wasn't and
couldn't.

What this does is to trade the difficulty of _writing_ stuff for
the difficulty of _finding_ stuff in the library and wrapping
glue code around it.

In fact, useful GUI stuff can be done quite simply in C by using
a small library that turns your program into a localhost web server
serving up HTML.  (I've been given such a library, which comes to
13 printed pages all up.  It's multiplatform, of course.)

But that raises another question:

 - what kind of stuff do we really _want_ students doing in a first
   programming paper?  What is it _good_ for them to do?

Another question of interest is the size of the reference manual.

The C99 standard is about 600 pages.
The C++0x standard is over 1300 pages.
I don't have a figure for Java off the top of my head,
but it came to two thick bound books, so it's not small.

Another factor has less to do with the language than with
the compiler:  the quality of the error messages.  I well
recall a friend who was an undergraduate when I was.  She
has a PhD in statistics, so is no dummy.  She had trouble
learning to program, and claimed that it was because the
compiler error messages made no sense to her.

Now C++ templates are fearful and wonderful things.  You
can do really amazing stuff with them.  But if you are not
an expert, a simple typing mistake in using a string
method can give you half a screen of error message.  (Come
to that, C++ strings can be a total performance disaster,
as one of my students this year found to his cost.)

I suggest that it's worth trying some "typical" student programs,
if you can find them, randomly mutating them, and seeing what
kind of error messages you get.

an expert that
The


RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Peter Gutmann
Russel Winder  writes:

>As a way of killing what could have been an interesting thread, potentially
>full of people's experiences and reasons for choices, and not involving too
>much prejudice and advocacy research, this appears to have been very
>successful.

As a way of pointing out that this exact same topic has been debated to death
(and possibly beyond) on any number of mailing lists and web boards for about
as long as programming has been taught and email has existed, and that perhaps
people would think twice before going over the exact same ground that's been
covered every single time this has been debated in the past, I think it was
reasonably effective.

Hint: Typing "teaching programming language" into Google gives 1.2 million
  hits, that might serve as a starter.

Peter.


RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Errol (IEEE Computer)
 
Hi. I have been casually watching this discussion but feel that my recently
completed thesis might be of interest to some particularly those thinking of
mental models and conceptions of a program.

As I am not in an academic position at present, I am not able to take my
work to what I see as the next stage. However, a key premise is that how a
person perceives the task or the outcome of the task influences the way that
they approach that task and the resulting outcome. This is view is based on
Ramsden's work (2003).

What my thesis does is explore the practitioner perceptions of an
object-oriented program. I believe that it has valuable information that
should be considered in debates about teaching programming.

Thesis is:

Thompson, E. (2008). How do they understand? Practitioner perceptions of an
object-oriented program. Dissertation, Massey University, Palmerston North.
URL: http://www.teach.thompsonz.net/img/Thompson2008PhDThesis.pdf

Errol Thompson
KiwiET Computing Consultancy and Computing Education Research
2 Haven Grove
Naenae
Lower Hutt.

E-mail: kiwiet (at) acm.org
kiwiet (at) computer.org
Windows Live: kiwiet (at) computer.org
Skype: kiwielt
Phone +64 21 2101662

Blog: http://kiwi-et.blogspot.com/
Website: http://www.teach.thompsonz.net/




Re: Choice of introductory programming language to a freshman class

2009-04-07 Thread Steve Freeman
That's an interesting point. As practitioners we spend almost all of  
our time looking at stuff that doesn't work because we haven't  
finished or it's broken.


That said, I disagree that the language doesn't matter. C++ is just  
too complicated, most "professionals" I know choose to ignore half the  
language -- until it bites them back. It's important to have at least  
one experience where the quirks of the language aren't the biggest  
problem...


S.

On 7 Apr 2009, at 10:03, C.Douce wrote:

(forwarded on behalf of Andy Ko)

I'm amazed to see so many recommendations based on power, consistency,
expressiveness, and performance. These qualities are great properties
for people using languages on a daily basis to build shippable, robust
code. But in most cases, trying to teach what someone ought to know
ideologically (objects first, elegantly designed languages, etc)
overlooks the fact that the complexity of these languages quickly
exhaust any motivation such students had to start with. Unless one has
an amazing teacher to help every student overcome the upfront
complexity with sheer charisma, the only students still paying
attention at the end will be the ones with a high tolerance for  
failure.


My advice: tell the students upfront to expect constant failure,
intense debugging, and give them guidance on how to respond tp such
failures. Do that and it doesn't really matter what language you use
first. Teaching these courses is a matter of managing expectations and
providing concrete, reusable disgnostic strategies. Save the
principles for once they have these strategies, and they'll have a
much better experienced-based insight into how and why the principles
help.

Andy Ko
Information School
University of Washington

(Andy: I have added your mail to both announce and discuss lists.
Cheers, Chris)



Chris Douce, Institute of Educational Technology, The Open University,
Walton Hall, Milton Keynes, MK7 6AA
http://iet.open.ac.uk/people/c.douce

+44 (0) 1908 653 414




Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006

http://www.m3p.co.uk

M3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627




Re: Choice of introductory programming language to a freshman class

2009-04-07 Thread Kari Laitinen


   Thanks for the comment, Walter.

   My words in the previous message were, as usual,
   inaccurate. I should have said that it is important
   that a student knows how a computer works in a
   LOGICAL sense. This means, for example, that everything is stored
   as binary numbers in the registers and in the main
   memory, and that the contents of a memory location
   are lost when something new is written into the
   memory location. It is not absolutely necessary
   to understand the electronic details of a
   computer.


Walter Milner wrote:

So Kari raises a corollary - to what extent does it matter what mental
model of a computer the student has?

But this is also on the dimension of abstraction. For example, 'how main
memory works'. This might be at the level of addresses, binary contents
and read/write operations. Or at the more concrete level of logic gates,
or below that, semi-conductor fabrication. Or above all of it, variables
which persist values during execution. Which is best?
   


-Original Message-
From: Kari Laitinen [mailto:kari.laiti...@oamk.fi] 
Sent: 07 April 2009 10:50

To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class


It indeed seems that there is no consensus over
what is a good language to start studying computer
programming.

I think that almost any language will do when only
the basic things are taught. On the page
  http://www.naturalprogramming.com/all_example_programs.html
I provide about 100 simple programs written with four
different languages. If a student studies, say,
the Java programs, he or she should be able to easily
move to other languages by using different program
versions.

Another important question is that what a student
should know before he or she starts studying
computer programming. I think it is important to
understand how a COMPUTER works before one starts
studying COMPUTER programming. To study the basics
of computing, I provide a very simple computer at
  http://www.naturalprogramming.com/IC8/index_for_ic8.html

With this simple computer it is possible, in less than
10 hours, to explain
   - how the main memory works
   - how machine instructions are executed
   - what compilation means
   - why high-level languages should be favored

We have been teaching this computer at our school
for three years before the actual programming courses.
Most students think that it is a useful tool.
Later on I hope to be able to provide more accurate
data concerning how the ability to understand this
imaginary computer corresponds with the ability to
become a good programmer.

Kari Laitinen
School of Engineering
Oulu University of Applied Sciences, Finland


Bennett Kankuzi wrote:

Dear All,

Many thanks to everyone for taking your time to air out your views on 
the question I had posted on the forum. For now I will use C since the


students will need to learn the art of problem solving but most 
importantly they also need to learn the basics of programming like 
data types, looping constructs, pointers etc. My hope is that  later 
on they shall be able to transfer this basic programming knowledge in 
learning other languages like Java and C++.


I must also say that from what I get across this thread of discussion,



Scheme and Python seem also to be good alternatives. I will definitely


try them in the forthcoming semesters. I have done a bit of 
programming in Python and PERL on a Unix system but not yet tried 
Scheme although it seems to be a very good alternative.


Once again many thanks for the insights!

Bennett




2009/4/6 Walter Milner :
A question to the OP: is it true that the choice must be between C, 
C++ and Java? Or might other languages be considered?


-Original Message-
From: Jay McCarthy [mailto:jay.mccar...@gmail.com]
Sent: 06 April 2009 13:21
To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a 
freshman class


I've had a lot of success using the How to Design Programs textbook 
(http://www.htdp.org/), which uses a series of Scheme-based languages



explicitly designed for beginners. The TeachScheme, ReachJava!
(http://www.teach-scheme.org/) curriculum uses this book in a 
two-semester sequence where students learn programming in the first 
semester with HtDP and these Scheme-derived languages, then 
transition to Java and objects in the second semester.


I'm happy to provide additional help getting you running in this 
curriculum if you'd like.


Jay McCarthy

--
Jay McCarthy 
Assistant Professor / Brigham Young University 
http://teammccarthy.org/jay


"The glory of God is Intelligence" - D&C 93








RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Walter Milner
So Kari raises a corollary - to what extent does it matter what mental
model of a computer the student has?

But this is also on the dimension of abstraction. For example, 'how main
memory works'. This might be at the level of addresses, binary contents
and read/write operations. Or at the more concrete level of logic gates,
or below that, semi-conductor fabrication. Or above all of it, variables
which persist values during execution. Which is best?
   

-Original Message-
From: Kari Laitinen [mailto:kari.laiti...@oamk.fi] 
Sent: 07 April 2009 10:50
To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class


It indeed seems that there is no consensus over
what is a good language to start studying computer
programming.

I think that almost any language will do when only
the basic things are taught. On the page
  http://www.naturalprogramming.com/all_example_programs.html
I provide about 100 simple programs written with four
different languages. If a student studies, say,
the Java programs, he or she should be able to easily
move to other languages by using different program
versions.

Another important question is that what a student
should know before he or she starts studying
computer programming. I think it is important to
understand how a COMPUTER works before one starts
studying COMPUTER programming. To study the basics
of computing, I provide a very simple computer at
  http://www.naturalprogramming.com/IC8/index_for_ic8.html

With this simple computer it is possible, in less than
10 hours, to explain
   - how the main memory works
   - how machine instructions are executed
   - what compilation means
   - why high-level languages should be favored

We have been teaching this computer at our school
for three years before the actual programming courses.
Most students think that it is a useful tool.
Later on I hope to be able to provide more accurate
data concerning how the ability to understand this
imaginary computer corresponds with the ability to
become a good programmer.

Kari Laitinen
School of Engineering
Oulu University of Applied Sciences, Finland


Bennett Kankuzi wrote:
> Dear All,
> 
> Many thanks to everyone for taking your time to air out your views on 
> the question I had posted on the forum. For now I will use C since the

> students will need to learn the art of problem solving but most 
> importantly they also need to learn the basics of programming like 
> data types, looping constructs, pointers etc. My hope is that  later 
> on they shall be able to transfer this basic programming knowledge in 
> learning other languages like Java and C++.
> 
> I must also say that from what I get across this thread of discussion,

> Scheme and Python seem also to be good alternatives. I will definitely

> try them in the forthcoming semesters. I have done a bit of 
> programming in Python and PERL on a Unix system but not yet tried 
> Scheme although it seems to be a very good alternative.
> 
> Once again many thanks for the insights!
> 
> Bennett
> 
> 
> 
> 
> 2009/4/6 Walter Milner :
>> A question to the OP: is it true that the choice must be between C, 
>> C++ and Java? Or might other languages be considered?
>>
>> -Original Message-
>> From: Jay McCarthy [mailto:jay.mccar...@gmail.com]
>> Sent: 06 April 2009 13:21
>> To: Bennett Kankuzi
>> Cc: Ppig-Discuss-List
>> Subject: Re: Choice of introductory programming language to a 
>> freshman class
>>
>> I've had a lot of success using the How to Design Programs textbook 
>> (http://www.htdp.org/), which uses a series of Scheme-based languages

>> explicitly designed for beginners. The TeachScheme, ReachJava!
>> (http://www.teach-scheme.org/) curriculum uses this book in a 
>> two-semester sequence where students learn programming in the first 
>> semester with HtDP and these Scheme-derived languages, then 
>> transition to Java and objects in the second semester.
>>
>> I'm happy to provide additional help getting you running in this 
>> curriculum if you'd like.
>>
>> Jay McCarthy
>>
>> --
>> Jay McCarthy 
>> Assistant Professor / Brigham Young University 
>> http://teammccarthy.org/jay
>>
>> "The glory of God is Intelligence" - D&C 93
>>
> 
> 
> 



RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Walter Milner
The OP thinks of this thread as a way of obtaining good advice. On the
basis of what he has seen, he has made a decision, and from his point of
view the thread has fulfilled its purpose and has ended.
 
However the original question - which language for an introductory class
- is something which many people are interested in and it raises several
significant issues.
 
One issue is 'the aim of the class'. Here's an observation - it is
almost impossible to formulate precise and formal aims for introductory
courses. For example, what is the aim of an introductory calculus
course? A typical student following such will probably not get a strong
grasp of the limit concept - but they've made a start. The point of this
example is that most maths science and engineering students need to
start learning about calculus at some point. Same for programming.
 
Second issue is the dimension which ranges from the cognitive psychology
of the students at one end, to characteristics of the language (as a
professional production language) at the other. In other words, is the
primary concern the learning process of the student, or the 'merit' of
the language?
 
I think that psychologically the concrete is much more 'graspable', but
not as powerful, as the abstract. Consequently a possible route is to
start with assembler, so the student can see values being moved between
registers, added up, conditional branches and so on, in an extremely
concrete manner. And also to experience why in general assembly language
is not very productive, and that C is far easier to write and just as
fast to execute. And then to move on to Java or whatever, making use of
the idea of abstraction.
 
The hardest thing to bear in mind is that while we (educators) have the
idea of bits and bytes and registers, and know it is good to be able to
ignore them, most students are not aware of what it is that we are
saying 'it doesn't matter'.




From: C.Douce [mailto:c.do...@open.ac.uk] 
Sent: 07 April 2009 10:03
To: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class


(forwarded on behalf of Andy Ko)
 
I'm amazed to see so many recommendations based on power, consistency,  
expressiveness, and performance. These qualities are great properties  
for people using languages on a daily basis to build shippable, robust  
code. But in most cases, trying to teach what someone ought to know  
ideologically (objects first, elegantly designed languages, etc)  
overlooks the fact that the complexity of these languages quickly  
exhaust any motivation such students had to start with. Unless one has  
an amazing teacher to help every student overcome the upfront  
complexity with sheer charisma, the only students still paying  
attention at the end will be the ones with a high tolerance for failure.
 
My advice: tell the students upfront to expect constant failure,  
intense debugging, and give them guidance on how to respond tp such  
failures. Do that and it doesn't really matter what language you use  
first. Teaching these courses is a matter of managing expectations and  
providing concrete, reusable disgnostic strategies. Save the  
principles for once they have these strategies, and they'll have a  
much better experienced-based insight into how and why the principles  
help.
 
Andy Ko
Information School
University of Washington
 
(Andy: I have added your mail to both announce and discuss lists.
Cheers, Chris)
 
 
 
Chris Douce, Institute of Educational Technology, The Open University,
Walton Hall, Milton Keynes, MK7 6AA
http://iet.open.ac.uk/people/c.douce
<http://iet.open.ac.uk/people/c.douce> 
+44 (0) 1908 653 414
 
 


Re: Choice of introductory programming language to a freshman class

2009-04-07 Thread Kari Laitinen


   It indeed seems that there is no consensus over
   what is a good language to start studying computer
   programming.

   I think that almost any language will do when only
   the basic things are taught. On the page
 http://www.naturalprogramming.com/all_example_programs.html
   I provide about 100 simple programs written with four
   different languages. If a student studies, say,
   the Java programs, he or she should be able to easily
   move to other languages by using different program
   versions.

   Another important question is that what a student
   should know before he or she starts studying
   computer programming. I think it is important to
   understand how a COMPUTER works before one starts
   studying COMPUTER programming. To study the basics
   of computing, I provide a very simple computer at
 http://www.naturalprogramming.com/IC8/index_for_ic8.html

   With this simple computer it is possible, in less than
   10 hours, to explain
  - how the main memory works
  - how machine instructions are executed
  - what compilation means
  - why high-level languages should be favored

   We have been teaching this computer at our school
   for three years before the actual programming courses.
   Most students think that it is a useful tool.
   Later on I hope to be able to provide more accurate
   data concerning how the ability to understand this
   imaginary computer corresponds with the ability to
   become a good programmer.

   Kari Laitinen
   School of Engineering
   Oulu University of Applied Sciences, Finland


Bennett Kankuzi wrote:

Dear All,

Many thanks to everyone for taking your time to air out your views on
the question I had posted on the forum. For now I will use C since the
students will need to learn the art of problem solving but most
importantly they also need to learn the basics of programming like
data types, looping constructs, pointers etc. My hope is that  later
on they shall be able to transfer this basic programming knowledge in
learning other languages like Java and C++.

I must also say that from what I get across this thread of discussion,
Scheme and Python seem also to be good alternatives. I will definitely
try them in the forthcoming semesters. I have done a bit of
programming in Python and PERL on a Unix system but not yet tried
Scheme although it seems to be a very good alternative.

Once again many thanks for the insights!

Bennett




2009/4/6 Walter Milner :

A question to the OP: is it true that the choice must be between C, C++
and Java? Or might other languages be considered?

-Original Message-
From: Jay McCarthy [mailto:jay.mccar...@gmail.com]
Sent: 06 April 2009 13:21
To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class

I've had a lot of success using the How to Design Programs textbook
(http://www.htdp.org/), which uses a series of Scheme-based languages
explicitly designed for beginners. The TeachScheme, ReachJava!
(http://www.teach-scheme.org/) curriculum uses this book in a
two-semester sequence where students learn programming in the first
semester with HtDP and these Scheme-derived languages, then transition
to Java and objects in the second semester.

I'm happy to provide additional help getting you running in this
curriculum if you'd like.

Jay McCarthy

--
Jay McCarthy 
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93







Re: Choice of introductory programming language to a freshman class

2009-04-07 Thread C.Douce
(forwarded on behalf of Andy Ko)
 
I'm amazed to see so many recommendations based on power, consistency,  
expressiveness, and performance. These qualities are great properties  
for people using languages on a daily basis to build shippable, robust  
code. But in most cases, trying to teach what someone ought to know  
ideologically (objects first, elegantly designed languages, etc)  
overlooks the fact that the complexity of these languages quickly  
exhaust any motivation such students had to start with. Unless one has  
an amazing teacher to help every student overcome the upfront  
complexity with sheer charisma, the only students still paying  
attention at the end will be the ones with a high tolerance for failure.
 
My advice: tell the students upfront to expect constant failure,  
intense debugging, and give them guidance on how to respond tp such  
failures. Do that and it doesn't really matter what language you use  
first. Teaching these courses is a matter of managing expectations and  
providing concrete, reusable disgnostic strategies. Save the  
principles for once they have these strategies, and they'll have a  
much better experienced-based insight into how and why the principles  
help.
 
Andy Ko
Information School
University of Washington
 
(Andy: I have added your mail to both announce and discuss lists.
Cheers, Chris)
 
 
 
Chris Douce, Institute of Educational Technology, The Open University,
Walton Hall, Milton Keynes, MK7 6AA
http://iet.open.ac.uk/people/c.douce
 
+44 (0) 1908 653 414
 
 


RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Russel Winder
Enda,

On Tue, 2009-04-07 at 09:15 +0100, Enda Dunican wrote:
> I was under the impression that the idea behind a discussion list
> was to allow people to express their opinions. I simply expressed an
> opinion. One could accuse your email of attempting to stifle freedom
> of expression, but I'd never agree with such an accusation!

I am clearly feeling grumpy this morning, and the pain killers are not
working which just makes things worse.  Sorry.

-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077  xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: http://www.russel.org.uk/


signature.asc
Description: This is a digitally signed message part


RE: Choice of introductory programming language to a freshman class

2009-04-07 Thread Enda Dunican
I was under the impression that the idea behind a discussion list
was to allow people to express their opinions. I simply expressed an opinion. 
One could accuse your email of attempting to stifle freedom of expression, but 
I'd never agree with such an accusation!

Enda

Or it could have been an excellent exchange of people's experiences with
an interesting pool of ideas created.

It is a pity this email stifled that.

> Enda
> 
> 
> Can I perhaps pre-empt a pile of responses in this soon-to-be-long
> thread with 
> my following meta-response:
> 
> "I think you should use  because   standard reasons here>.  In particular I've run into problems with
>   non-favourite language here> because .  You may
> also
>  want to take into account  language
>  here> which isn't handled too well by  here>.
>  Disclaimer: This worked for me but may not work for you, so shop
> around".
> 
> If everyone could just fill out the template it'd save a lot of time.
> 
> Peter :-).
> 
-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077  xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: http://www.russel.org.uk/



RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Russel Winder
On Mon, 2009-04-06 at 12:32 +0100, Enda Dunican wrote:
> Yes I agree with this last email. If there was an ideal language out
> there everybody would be using it.  Be prepared to be browbeaten from
> the soapbox when you start a topic like this.

Or it could have been an excellent exchange of people's experiences with
an interesting pool of ideas created.

It is a pity this email stifled that.

> Enda
> 
> 
> Can I perhaps pre-empt a pile of responses in this soon-to-be-long
> thread with 
> my following meta-response:
> 
> "I think you should use  because   standard reasons here>.  In particular I've run into problems with
>   non-favourite language here> because .  You may
> also
>  want to take into account  language
>  here> which isn't handled too well by  here>.
>  Disclaimer: This worked for me but may not work for you, so shop
> around".
> 
> If everyone could just fill out the template it'd save a lot of time.
> 
> Peter :-).
> 
-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077  xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: http://www.russel.org.uk/


signature.asc
Description: This is a digitally signed message part


RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Russel Winder
On Mon, 2009-04-06 at 23:12 +1200, Peter Gutmann wrote: 
> Can I perhaps pre-empt a pile of responses in this soon-to-be-long thread 
> with 
> my following meta-response:
> 
> "I think you should use  because   standard reasons here>.  In particular I've run into problems with   non-favourite language here> because .  You may also
>  want to take into account   here> which isn't handled too well by .
>  Disclaimer: This worked for me but may not work for you, so shop around".
> 
> If everyone could just fill out the template it'd save a lot of time.
> 
> Peter :-).

As a way of killing what could have been an interesting thread,
potentially full of people's experiences and reasons for choices, and
not involving too much prejudice and advocacy research, this appears to
have been very successful.

-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077  xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: http://www.russel.org.uk/


signature.asc
Description: This is a digitally signed message part


Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Richard O'Keefe


On 6 Apr 2009, at 9:55 pm, Walter Milner wrote:


I agree - not C++.

I think it depends whether or not you take the 'objects first'  
route. If

you do, and you reject C++, you are only left with Java.


If you take the 'objects first' route,
 - what is wrong with Smalltalk?
   Still around, commercial and free versions, powerful as heck,
   consistent objects-all-the-way-down (unlike Java),
   ...
 - what is wrong with Eiffel?
   The basic design is clean and elegant, and consistent
   objects-all-the-way-down.  A certain amount of cruft has
   accumulated over the years, commercial and free versions,
   the commercial version is free to students and has a good IDE,
   there's a book by Meyer aiming to teach programming using it,
   which takes an interesting approach,
   ...
 - what, for that matter, is wrong with Python?
   We're (somewhat tentatively) using it in a service paper,
   and it seems to work quite well as a first language.





However I think objects-first is not a good idea, and there is a small
amount of evidence to support that, relating to understanding main()  
and

the dynamics of execution. My concern is that a student cannot write a
method unless they know about primitive types, loops, conditionals and
arrays. And there is an enormous amount of evidence to show that many
students find those ideas very challenging.


100% agreement about that.

(Mind you, Smalltalk and Eiffel don't *have* "primitive types" in
that sense.  There is no syntactic or semantic distinction between
numbers and other objects.)


Therefore start with C, using a debugger that allows students to step
through code and see how variable values change. Start with a concrete
understanding, about bits and bytes - abstraction can come later. Look
(briefly) at compiled C to see how it relates to machine code. Use
pointers. Without pointers the idea of references in Java seems
completely mysterious. Use structs. Then it's just a little step to
classes.


I think the key point is that you have to decide what you want
people to learn before you can decide how you are going to teach
it.

Arguably, you might come up with quite an interesting course
that starts with the lecturer pulling a mobile phone out of his
pocket and saying "I am going to teach you how to program THIS".
Then the lecturer proceeds to explain the ARM architecture and
teach ARM assembly programming.  The next semester, the lecturer
says "I am going to teach you how to program this EASIER" and
introduces C.

The original poster said:

I have to choose between Java, C and C++ since these languages have
their compilers already instead in our computer labs.


One download will get you a good free Smalltalk or Eiffel or Python  
or ...

Burn it to a CD.  A day's work will install it on every machine in
your labs.  What's the price of a day's work compared with the cost of
doing it wrong?


These students
are just coming from secondary school and they have general computing
skills which are taught in secondary schools in Malawi.


What are those skills?
If they include using office (Word, Excel, &c) applications on Windows
or OpenOffice on practically anything, there is an argument for
using Visual Basic for Applications (M$)/Office Basic (OpenOffice).
Horrible language, but it has all the basics, and the immediate payoff
is high.  And you probably already have _that_ on your lab machines too.

The Surveying department here has VBA taught to first year surveyors.

My personal preference would probably be either Eiffel or Ada, as
worthy successors to Pascal.  But my preference is unimportant.  Your
explicit _educational_ goals are what matters, constrained by your
financial and technical resources.  The technical resources really
need not be limited to C, C++, and Java.



RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Jan Erik Moström

On 09-04-06 at 15.14, Walter Milner  wrote:


A question to the OP: is it true that the choice must be between C, C++
and Java? Or might other languages be considered?


Personally I would take a look at Python

jem
--
Jan Erik Moström, http://mostrom.eu




Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Bennett Kankuzi
Dear All,

Many thanks to everyone for taking your time to air out your views on
the question I had posted on the forum. For now I will use C since the
students will need to learn the art of problem solving but most
importantly they also need to learn the basics of programming like
data types, looping constructs, pointers etc. My hope is that  later
on they shall be able to transfer this basic programming knowledge in
learning other languages like Java and C++.

I must also say that from what I get across this thread of discussion,
Scheme and Python seem also to be good alternatives. I will definitely
try them in the forthcoming semesters. I have done a bit of
programming in Python and PERL on a Unix system but not yet tried
Scheme although it seems to be a very good alternative.

Once again many thanks for the insights!

Bennett




2009/4/6 Walter Milner :
> A question to the OP: is it true that the choice must be between C, C++
> and Java? Or might other languages be considered?
>
> -Original Message-
> From: Jay McCarthy [mailto:jay.mccar...@gmail.com]
> Sent: 06 April 2009 13:21
> To: Bennett Kankuzi
> Cc: Ppig-Discuss-List
> Subject: Re: Choice of introductory programming language to a freshman
> class
>
> I've had a lot of success using the How to Design Programs textbook
> (http://www.htdp.org/), which uses a series of Scheme-based languages
> explicitly designed for beginners. The TeachScheme, ReachJava!
> (http://www.teach-scheme.org/) curriculum uses this book in a
> two-semester sequence where students learn programming in the first
> semester with HtDP and these Scheme-derived languages, then transition
> to Java and objects in the second semester.
>
> I'm happy to provide additional help getting you running in this
> curriculum if you'd like.
>
> Jay McCarthy
>
> --
> Jay McCarthy 
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
>



-- 
Blog1: http://bkankuzi.blogspot.com
Blog2: http://ilovemalawi.blogspot.com
Flickr: http://www.flickr.com/photos/bfkankuzi/
Google Talk: bfkankuzi
VoipCheap: bkankuzi
Skype: bfkankuzi
Mobile: +265 4 188 893


RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Walter Milner
A question to the OP: is it true that the choice must be between C, C++
and Java? Or might other languages be considered?   

-Original Message-
From: Jay McCarthy [mailto:jay.mccar...@gmail.com] 
Sent: 06 April 2009 13:21
To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class

I've had a lot of success using the How to Design Programs textbook
(http://www.htdp.org/), which uses a series of Scheme-based languages
explicitly designed for beginners. The TeachScheme, ReachJava!
(http://www.teach-scheme.org/) curriculum uses this book in a
two-semester sequence where students learn programming in the first
semester with HtDP and these Scheme-derived languages, then transition
to Java and objects in the second semester.

I'm happy to provide additional help getting you running in this
curriculum if you'd like.

Jay McCarthy

--
Jay McCarthy 
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93



Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Jay McCarthy
I've had a lot of success using the How to Design Programs textbook
(http://www.htdp.org/), which uses a series of Scheme-based languages
explicitly designed for beginners. The TeachScheme, ReachJava!
(http://www.teach-scheme.org/) curriculum uses this book in a
two-semester sequence where students learn programming in the first
semester with HtDP and these Scheme-derived languages, then transition
to Java and objects in the second semester.

I'm happy to provide additional help getting you running in this
curriculum if you'd like.

Jay McCarthy

-- 
Jay McCarthy 
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Enda Dunican
Yes I agree with this last email. If there was an ideal language out
there everybody would be using it.  Be prepared to be browbeaten from
the soapbox when you start a topic like this.

Enda


Can I perhaps pre-empt a pile of responses in this soon-to-be-long
thread with 
my following meta-response:

"I think you should use  because .  In particular I've run into problems with
 because .  You may
also
 want to take into account  which isn't handled too well by .
 Disclaimer: This worked for me but may not work for you, so shop
around".

If everyone could just fill out the template it'd save a lot of time.

Peter :-).



RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Peter Gutmann
Can I perhaps pre-empt a pile of responses in this soon-to-be-long thread with 
my following meta-response:

"I think you should use  because .  In particular I've run into problems with  because .  You may also
 want to take into account  which isn't handled too well by .
 Disclaimer: This worked for me but may not work for you, so shop around".

If everyone could just fill out the template it'd save a lot of time.

Peter :-).


RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Russel Winder
On Mon, 2009-04-06 at 10:55 +0100, Walter Milner wrote:
> I agree - not C++.

I think there is general agreement on that one.

> I think it depends whether or not you take the 'objects first' route. If
> you do, and you reject C++, you are only left with Java.
> 
> However I think objects-first is not a good idea, and there is a small
> amount of evidence to support that, relating to understanding main() and
> the dynamics of execution. My concern is that a student cannot write a
> method unless they know about primitive types, loops, conditionals and
> arrays. And there is an enormous amount of evidence to show that many
> students find those ideas very challenging.

I have never understood this quasi-religious debate about "objects
first", "objects early", "objects late", and in particular the various
claims that one is better than the other.  The principal driver is not
really the material but the trainer/educator and the quality of the
support materials.  Having tried, and seen other try, traditional
bottom-up, top-down, middle-out, etc., etc. all of them work if the
curriculum is well structured and the examples and explanations well
organized and motivating.

I would agree though that writing methods requires a lot of precursor
material to make it sensible.

> Therefore start with C, using a debugger that allows students to step
> through code and see how variable values change. Start with a concrete
> understanding, about bits and bytes - abstraction can come later. Look
> (briefly) at compiled C to see how it relates to machine code. Use
> pointers. Without pointers the idea of references in Java seems
> completely mysterious. Use structs. Then it's just a little step to
> classes.

I don't agree with the deduction/inference.  I do not agree that not
starting with full object oriented Java or C++ means you have to start
with procedural C.  Unless you are studying operating system writing, or
hardware control / embedded systems, it is hard to find fun motivating
examples of code that really work with C.  It is just too low level,
with too little easily accessible, sophisticated functionality.

The problem is that the implementation details of creating interesting
applications in standard C get in the way of design issues.  One way
round this is to have a support library that offers lots of interesting
support, but this is then not standard C.

I do not agree that abstraction must come later in a constructivist
bottom up approach.  Whilst students need to have a basis set of types,
using bits and bytes is too low level for computer scientists, it is
more the electronic engineers and computer architecture people that need
this level as a start point.  Programming is based on a simple type set
of integer, float, character, string (or whatever the representation is
in the chosen language) which can be taken as axiomatic.  They are types
which can represent a bounded set of values -- almost simple set
theoretic approach.  Then immediately into doing things with them, and
building selection, iteration, and functions/procedures.

Pointers and references are for a second course in programming.

> There is a lot of pressure to use Java because it is 'modern' and you
> can get a job with it. But I think employers want developers who
> understand properly what they are doing. And this is just a first
> language - they should learn others anyway, so C followed by Java seems
> a good route. 

Certainly there is a lot of pressure to use Java, much of it based on
hype, fashion and peer pressure.  However the fact that it is based on a
virtual machine and so works the same on all platforms is a great bonus
-- OK let's not get into the details of the problems of portability and
the stupidity of the WORA claim, at the level of first programming
course these really don't matter.

Employers are a strange breed who rarely know what they really want, and
rarely get what they actually need.

I think one thing we are all going to agree on is the absolutely
essential need for students to learn at least three languages of
different computational models during their time as students.

One of the single biggest problems in the programming shops I have had
association with has been "mono culture".  There are two aspects to this
one is the stupidity of monoculture as a corporate strategy, the more
important for this list is that students who have been taught and done
all their work in one language are generally very poorly educated and
extremely ill prepared for what they will find in the world of work.

On another list I am on there is a current debate (amongst people just
interviewing looking to employ) about the dearth of quality programmers
just now (Java, C++, C and C#) and how dreadful all of them who know
only one language really are.


-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 777

Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread john . sturdy
Jan Erik Moströ m writes:
 > On 09-04-06 at 11.10, Bennett Kankuzi  wrote:
 > 
 > Personally I would consider what the purpose of the course is, 
 > what do you expect the kids to learn. My opinion is that it's 
 > the problem solving part that's important and that's what they 
 > should learn ... the programming language is just a specific 
 > notation for their solution.

I agree.

 > So assuming that it's problem solving part that is of importance 
 > then you only have to give them an easy way of writing down 
 > their solution ... which pretty much rule out all three of these 
 > languages :-D

Definitely none of those three.  My suggestion is Scheme, for several
reasons including:

 * simple syntax and semantics

 * a well-known and (I think) well-regarded textbook, "Structure and
   Interpretation of Computer Programs", which is aimed at teaching
   programming rather than just teaching a programming language.  It's
   by the designers of the language, and it's also available on-line
   free of charge http://mitpress.mit.edu/sicp/

 * instructors' manual available

 * an introductory course of video lectures by the designers,
   downloadable free of charge -- even if you don't use them directly
   it might save some time in preparing your own lecture series
   http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/

 * a choice of implementations, including a specifically
   student-friendly one (DrScheme on http://www.plt-scheme.org/software/)

 * the language is simple enough that its internals can be taught at
   undergraduate level, giving an introduction to programming language
   implementation

__John



Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Miguel P. Monteiro
I agree that it depends on what is the purpose of the course. It also depends on
available course time. In practice, the objects-first approach requires lots of
training time and pays off only in the long run.

For example: global variables are bad style, but it is hard to get students 
tell the
difference between a global variable and an object field. I often see students 
use
fields to pass the result of an operation (method) to another operation.

If the students are absolute beginners, algorithms take precedence over 
structure
and design. I would give priority to teaching array processing over the 
distinction
between a local variable and an object field. Of the languages you mention, this
points to C.

Unless you have a specific reason for considering it, my advice is: forget C++ 
:-)

My 2 cents (FYI, I'm about to leave on holiday, so I won't be able to keep
contributing to the discussion, sorry)

-- 
Miguel P. Monteiro  | cell phone +351 96 700 35 45
Departamento de Informatica | Phone +351 21 294 8536 ext. 10708
Faculdade Ciencias e Tecnol.| Fax: +351 21 294 8541
Universidade Nova de Lisboa | URL: http://ctp.di.fct.unl.pt/~mpm
2829-516 Caparica, PORTUGAL | Skype: miguel.p.monteiro



Em Seg, Abril 6, 2009 10:57 am, Jan Erik Moström escreveu:
> On 09-04-06 at 11.10, Bennett Kankuzi  wrote:
>
>>Searching through the web I note that the issue on the choice of an
>>introductory programming language to students is quite debatable. What
>>is your take PPIGers on this issue? What can you recommend for my
>>situation?
>
> Personally I would consider what the purpose of the course is,
> what do you expect the kids to learn. My opinion is that it's
> the problem solving part that's important and that's what they
> should learn ... the programming language is just a specific
> notation for their solution.
>
> So assuming that it's problem solving part that is of importance
> then you only have to give them an easy way of writing down
> their solution ... which pretty much rule out all three of these
> languages :-D
>
> Frankly I have difficulties in deciding which is "the least bad choice".
>
>  jem
> --
> Jan Erik Moström, http://mostrom.eu




Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Russel Winder
Bennett,

On Mon, 2009-04-06 at 11:10 +0200, Bennett Kankuzi wrote:
> Dear All,
> 
> I work for the University of Malawi in Africa (http://www.unima.mw). I
> am taking a freshman class in programming for computing students. I
> have to choose between Java, C and C++ since these languages have
> their compilers already instead in our computer labs. These students
> are just coming from secondary school and they have general computing
> skills which are taught in secondary schools in Malawi.
> 
> Searching through the web I note that the issue on the choice of an
> introductory programming language to students is quite debatable. What
> is your take PPIGers on this issue? What can you recommend for my
> situation?

Despite Francis Glassborow's and Bjarne Stroustrup's books intended as
introductory programming texts, I would say C++ is definitely for a
second course in programming.  C is probably useful as an introductory
language for electronic engineers, but it is almost certainly too
low-level and with restricted abstraction constructs for computer
science students.

Java has been taken up by a large number of institutions as a first
teaching language, many of them even use the book Graham Roberts and I
wrote ("Developing Java Software") as a teaching text :-)  However, I am
increasingly of the view that using a dynamic programming language such
as Groovy or Python for a first introductory course is the right way
forward.  The ease of accessibility to quite sophisticated features
enable people (relatively) new to programming to write quite complex
programs quite easily.  This enables them to get a first understanding
of programming and the tools of programming so that then easing them
into Java and/or C++ becomes much easier.  Most important, the ability
to create interesting and complex programs quickly and easily enhances
interest, motivation and general fun.  The importance of these factors
should never be underestimated!

Experience (anecdotal) of Sarah Mount (at Wolverhampton) and James
Shuttleworth (at Coventry), my co-authors for "Python for Rookies",
indicates that Python is a very good tool for teaching students
introductory programming.  In a sense this ought to be expected since
Python grew out of a project to create a very good programming language
for teaching and learning.

Experience (again anecdotal) of Graham Roberts at UCL is that Groovy as
a first language works well.  Their structure is an introductory course
in programming (starts with half the course in Groovy followed by half
the course in Prolog) followed by a second course in programming using
Java.  They are finding that this works well as a two-course programme.

-- 
Russel.

Dr Russel Winder  t: +44 20 7585 2200  voip:  
sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077  xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: http://www.russel.org.uk/


signature.asc
Description: This is a digitally signed message part


Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Jan Erik Moström

On 09-04-06 at 11.10, Bennett Kankuzi  wrote:


Searching through the web I note that the issue on the choice of an
introductory programming language to students is quite debatable. What
is your take PPIGers on this issue? What can you recommend for my
situation?


Personally I would consider what the purpose of the course is, 
what do you expect the kids to learn. My opinion is that it's 
the problem solving part that's important and that's what they 
should learn ... the programming language is just a specific 
notation for their solution.


So assuming that it's problem solving part that is of importance 
then you only have to give them an easy way of writing down 
their solution ... which pretty much rule out all three of these 
languages :-D


Frankly I have difficulties in deciding which is "the least bad choice".

jem
--
Jan Erik Moström, http://mostrom.eu




RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Walter Milner
I agree - not C++.

I think it depends whether or not you take the 'objects first' route. If
you do, and you reject C++, you are only left with Java.

However I think objects-first is not a good idea, and there is a small
amount of evidence to support that, relating to understanding main() and
the dynamics of execution. My concern is that a student cannot write a
method unless they know about primitive types, loops, conditionals and
arrays. And there is an enormous amount of evidence to show that many
students find those ideas very challenging.

Therefore start with C, using a debugger that allows students to step
through code and see how variable values change. Start with a concrete
understanding, about bits and bytes - abstraction can come later. Look
(briefly) at compiled C to see how it relates to machine code. Use
pointers. Without pointers the idea of references in Java seems
completely mysterious. Use structs. Then it's just a little step to
classes.

There is a lot of pressure to use Java because it is 'modern' and you
can get a job with it. But I think employers want developers who
understand properly what they are doing. And this is just a first
language - they should learn others anyway, so C followed by Java seems
a good route. 

-Original Message-
From: Gergely Buday [mailto:gbu...@gmail.com] 
Sent: 06 April 2009 10:30
To: Bennett Kankuzi
Cc: Ppig-Discuss-List
Subject: Re: Choice of introductory programming language to a freshman
class

> I have to choose between Java, C and C++ since these languages have 
> their compilers already instead in our computer labs. These students 
> are just coming from secondary school and they have general computing 
> skills which are taught in secondary schools in Malawi.

Dear Bennett,

definitely not C++. Although Bjarne Strostrup did write a book for
beginners:

http://www.research.att.com/~bs/programming.html

I do not believe that it is a choice for freshmen. Java seems a better
option with the caveat that they should learn C thereafter.

Best Wishes

- Gergely



RE: Choice of introductory programming language to a freshman class

2009-04-06 Thread Lindsay Marshall
None of them.

If it had to be any I would personally say C++ in a limited subset : Java is an 
abomination and C is too deceptively simple.

L.


Re: Choice of introductory programming language to a freshman class

2009-04-06 Thread Gergely Buday
> I have to choose between Java, C and C++ since these languages have
> their compilers already instead in our computer labs. These students
> are just coming from secondary school and they have general computing
> skills which are taught in secondary schools in Malawi.

Dear Bennett,

definitely not C++. Although Bjarne Strostrup did write a book for beginners:

http://www.research.att.com/~bs/programming.html

I do not believe that it is a choice for freshmen. Java seems a better
option with the caveat that they should learn C thereafter.

Best Wishes

- Gergely