Lambda the Ultimate

inactiveTopic Learning a new programming language
started 6/5/2001; 1:01:24 AM - last post 6/19/2001; 2:30:38 AM
Chris Rathman - Learning a new programming language  blueArrow
6/5/2001; 1:01:24 AM (reads: 4037, responses: 17)
Learning a new programming language
Nothing spectacular in this JavaLobby discussion, but since I got somewhat involved in the discussion, I thought I'd mention it here. Being JavaLobby, it's not a surprise that some of the participants think that Java is a good candidate. Personally, I think Java is a terrible first language - I'd even go as far as recommending VB over Java as a first language.

A first programming language should cover two territories. First, the positive feedback should be immediate without having to delve into a lot of intricacies beforehand - languages like VB, Python & Perl do this well. Kind of like the ability of small children to use the spoken word to get things accomplished way before they become fluent in the intricacies of the written word.

Second, this programming language should also impart the principles of programming - Pascal, Smalltalk & Scheme do this well. As I said in the thread, professional software developers will wind up having to learn more than one language.

The real question, though, is whether a person's first programming language has long term ramifications on a person's long term capacity to think logically? Perhaps my experience is unique, but the hardest language for me to learn was the third. The first two were as different as night and day, but the third contained ideas present in the first two and made matters somewhat confusing.
Posted to teaching/learning by Chris Rathman on 6/5/01; 1:07:54 AM

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/5/2001; 4:08:18 AM (reads: 3371, responses: 0)
I think Java is a terrible first language - I'd even go as far as recommending VB over Java as a first language.

I agree that Java is a terrible first language, but I think VB is even worse. It is not even a language, it is a Microsoft product...

John Lawter - Re: Learning a new programming language  blueArrow
6/5/2001; 8:52:17 AM (reads: 3349, responses: 0)
I think it's hard to recommend a particular language as being a good first language for everyone. A good first language for a computer scientist or electrical engineer is most likely going to be different from one for a liberal arts major. (My perspective comes from being a teaching assistant for some introductory CS classes, which contained both CS majors and also non-technical students, so it may be slightly skewed)

The choice of texts and instructors can also make a large difference. A bad instructor can ruin a good language, and a good instructor can render a difficult language easy to understand. Often I've found that when students react negatively to a language or to programming in general, what is really at fault is the instructor or one particular textbook.

Also, the programming environment is important. CMU had an editing system for its beginning students which ensured that the input was syntactically correct Pascal. This proved to be a great help for the students, as it enabled them to think less about syntax and more about the actual programming task at hand.

Overall, I can't point to one particular language. I can say not to use Fortran77. That was my first language, and it scarred me for life :-) I think that a good first language should be imperative, because in my experience students have an easier time with telling something what to do. It can help if the language is interpreted, because of the instantaneous feedback, but a compiled language with an easy to use IDE can be just as good. The important thing is having a simple, consistent syntax, (this rules Perl and C++ out...) so that the student can easily understand the meaning of an example, and isn't encumbered by quirky rules when trying to write their own programs. I'm not sure of the benefits of static typing, because I found that (at least with beginning students writing small programs) type declarations and the concept of typing are pretty alien, and in many cases I saw programs that were semantically correct, but would not compile because a student had forgotten a declaration. I'm sure others disagree with me on that...

Overall, I'd say for the average student learning to program, Python is a good choice, as its syntax is simple, it's interpreted, there are good texts for learning it, and it doesn't use static typing.

As far as Basic goes, didn't Dijkstra mention something about it ruining programmers ?

Brian Zhou - Re: Learning a new programming language  blueArrow
6/5/2001; 8:56:40 AM (reads: 3345, responses: 0)
Python is my recommendation as a first language. It's practical yet disciplined. Then, depending on the interest of the learner:

If they want performance, they can learn C to be close to the metal; If they want OO, they can learn Smalltalk which is not too far; If they want FP and correct static typing, they can study Haskell.

Python has been influenced by multiple paradigms. So although it forces you to use indentation, it's very open-minded otherwise. I've even seen multi-methods modeled in Python.

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/6/2001; 2:14:39 AM (reads: 3309, responses: 1)
I for one don'tknow which language is best suited for this. Am I the only one without a definite answer to this religious question?

I really think there is a place for teaching Scheme as a first language, but also for teaching Pascal. Some schools offer parallel tracks.

Christopher Cambell - Re: Learning a new programming language  blueArrow
6/6/2001; 4:44:29 AM (reads: 3329, responses: 1)
If you want to teach both FP and IP then I'd recommend teaching FP first if you don't want to teach them in parallel. It's more difficult to go IP->FP than it is to go FP->IP.

As for language choice i only know which not to use: Java, C++, Basic, and Concurrent Clean (and of course Intercal or BF). The language chosen to teach depends on too many factors and after all it's the ideas that count (most of which are similar if not the same)! It really doesn't matter which language you chose (apart from those mentioned).

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/6/2001; 12:16:16 PM (reads: 3401, responses: 0)
By 'parallel track' I meant an either/or sitations, where students choose to take an intro course that uses FP, or one that is more traditional. Think I heard this is what they do at Brown? Should probably check their web site to get more details.

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/6/2001; 12:44:59 PM (reads: 3281, responses: 0)
I think it's hard to recommend a particular language as being a good first language for everyone.

With I must agree. I also think most of the points you raise are valid.

I think much of the confusion comes from the fact the CS educators argue which language is best for budding computer scientists. This, of course, is an entirely different question.

Jordan Katz - Re: Learning a new programming language  blueArrow
6/6/2001; 2:05:09 PM (reads: 3375, responses: 0)
I'm curious to know why you think Pascal is a good first programming language.

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/6/2001; 2:33:54 PM (reads: 3290, responses: 1)
I'm curious to know why you think Pascal is a good first programming language.

Seeing as it was designed to be a teaching language, and was a traditional first language for a long period of time (and quite a few places still use it), I am inclined to say why not?!

Is this some kind of troll?

Chris Rathman - Re: Learning a new programming language  blueArrow
6/6/2001; 6:34:58 PM (reads: 3280, responses: 0)
Just to throw one other curve into the equation, I do think there are two different questions. What language an individual should learn on their own time? vs. what language is best to teach as a first course in an academic setting?

When you teach yourself a language outside of the classroom, ease of setup, use, instant gratification and support are the primary concerns. OTOH, teaching a first language should be geared towards imparting fundamental concepts with a the minimal amount of sidetracking into syntactical trivia.

IMO, Python is the best language to learn if you are trying to learn it on your own. From a teaching standpoint, I'd probably slant towards Scheme. However, more important than the particular language being taught is the specific concepts you are aiming to teach within the given time frame. The language used should be a function of these principles rather than vice-versa.

Bryn Keller - Re: Learning a new programming language  blueArrow
6/7/2001; 3:14:50 PM (reads: 3253, responses: 0)
Chris raises a good point. One thing that's critical to teaching yourself a language (at least for me) is an impetus to learn it. I'm a bit of a language nut like many here, so I read a lot of language reports and articles and so on, but I never *really* learn a language until I have a project that calls for it.

Since these projects spring from a vacuum, this means libraries and interfaces to other systems (C libraries, GUI, networking, etc.) rank right up there with decent tutorials. User community is important too. If people can ask questions and get real answers without being made to feel stupid, that counts for a lot.

I suspect that this sort of motivation would work for educators, too. Students in school might like to learn to program by making simple GUIs, doing database work, etc. like they know they're going to be doing in the 'real world', rather than writing console-based calculators (for instance). There's ample room for an instructor to teach fundamentals and good habits there, and I think most students would find it more engaging.

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/9/2001; 6:03:36 AM (reads: 3251, responses: 0)
In general I ahve no argument with this. Indeed, I think being able to build something that works, and does something useful is very important, even if only for motivational reasons.

One should, however, be careful to avoid languages that may ruin the way new programmers think. VB may be a good example of this. Alas, it seems Java often has this eefect too.

Jordan Katz - Re: Learning a new programming language  blueArrow
6/11/2001; 5:51:41 PM (reads: 3327, responses: 0)
No, it's not a troll. I'm just not willing to accept Pascal as a good first language simply because it was designed as one. Since I have no experience with it, I was wondering what are its advantages over studying other procedural languages. I can hardly see why my comment would be interpreted to be a troll..

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/13/2001; 1:22:18 AM (reads: 3229, responses: 1)
Since I have no experience with it...

That's a good reason to questoin things. I just didn't think about this obvious reason for your question...

I am not going to advocate Pascal, since it is an old language with some problems. But it good points are also quite important, and realatively well known. It is strongly type (though the type system isn't up to modern standards). Type quivalence is by-name. The language is procedural and support structured programming (true strucutred programming: unlike C you can nest routines etc.).

The language is pretty restricted which is a Good Thing, for teaching purposes. Yuo don't have to master huge libraries to use the language. You don't need tostart right off with complicated concepts (IMHO) like OOP/inheritance.

The syntax is readable (though Ada has some improvements). For example you can explicitly state the parameter passing style. Youd don't use pointers explicitly like in some other languages.

Notice that all these factors can be seen as making Pascal a 'Toy Language'. You may enjoy reading this classic attack.

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/13/2001; 6:42:54 AM (reads: 3317, responses: 0)
Sorry for all the typos in my previous message

Israel - Re: Learning a new programming language  blueArrow
6/15/2001; 9:37:03 AM (reads: 3208, responses: 1)
I'm extremely new to the world of programming and I am at a point where it seems that the actual language you learn, doesn't matter quite as much as the basic theories of problem solving on the computer. The many different syntaxes and approaches ( ie. imperative, declarative, functional, OO and so on) to programming may vary from language to language, but it seems that there are things that I'm missing seeing as I'm an artist learning to program on my own time.

I feel that I'm short on the math skills, but that hasn't really come up in the little programs I've written in Python. I read articles on AI and other stuff and I end up seeing complex mathmatical expressions to explain different problems, though when I peek over the engineers shoulders, I see that they mainly rely on the large amounts of gadgets stored in various libraries.

So in your opinions, is it really the Language or is it the ability to understand and solve a problem and from there decide on which language is the best tool for the job?

Ehud Lamm - Re: Learning a new programming language  blueArrow
6/19/2001; 2:30:38 AM (reads: 3276, responses: 0)
Short answer is that a first language can verey well determine your success at learning programming. For experts, learning a new language (not a new paradigm) is usually quite easy, since like you say, other skills are involved. But a bad language can cause you to abandon your efforts at learning how to program, or can cripple the your understanding of what programming is all about.