Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Java as a CS Introductory Language?

Cliff posted more than 13 years ago | from the languages-conducive-in-teaching-OO-concepts dept.

Education 913

A couple of questions concerning Java have ended up in the bin over the past few weeks, and rather than handle them separately, I've decided to lump them together as they deal with Java's use as a learning language, as opposed it's traditional use as an application language, and in many cases, which looks to be replacing C/C++ in this role. Personally, I feel that teaching Java in college is fine, however I'm a little concerned in it's replacing C/C++ in that role. This, of course, begs the question is C/C++ any better. How about this: if you were going to structure a curriculum to teach Object Oriented concepts, would you teach it using Java, C/C++, or something else?

First, tulare queries: "I'm currently a student at a small university whose CS students are required to attend two terms of Java programming courses before moving on to other OOP languages. My personal feeling is that Java is clunky, ugly, and runs much too slow on most platforms. The official CS department position is that Java is pure OOP (as opposed to C, for example), and furthermore, Java is extremely widely used at this time. Now, I may be stirring things up a little here, but just because everyone does something one way does not neccessarily mean that something is being done the best way. What I'm asking is to hear reasoned opinions on the following statements:

  1. Java is a fine development language, and it will help me as a programmer to learn it.
  2. I'm right. Java is a fad, not worth much more than the Windows OS in terms of quality, and my CS faculty is doing me a disservice by cramming it down my throat.
  3. There's a little truth in both the above statements."
And we have this one from Banjonardo: "The AP Computers course, the strongest computers-oriented course in a high school, is changing its core curriculum. The language taught, which has progressed from Pascal to (currently) C++ is changing once more. Next year will be the last for C++. The new language will become Java. My question is, realistically, which is the best language for an AP Comp class to learn? I will use my school as an example: Our 386s were given away to students on Friday, to make way for the brand spanking new 900Mhzs provided by the "Digital High School" program. What language would be the most appropriate to send our students forth with?"

While on IRC, I was discussing this issue a bit with other editors and Chris DiBona happened to have some thoughts on the matter, his words follow:

When Cliff mentioned that a Java in education story was going to be posted, I asked to weigh in on the topic. I will not talk about the suitablity of using a non-free language, as I'm certain that will be discussed in the comments and is not a trivial issue.

I don't think that Java, or any Object Oriented language, would be suitable for an AP Computer science class. I don't think it serves the needs of students looking to fully understand the internal workings of a computer, which is in my mind what an AP computer science course should be directed towards.

C is a language that has been designed to be very close to the hardware, and its ideosyncracies and power reflect that. Through this relationship, C reflects the realities of the hardware your programs run on. Memory management, low level process and I/O control are all things that a computer scientist should understand at a very low level, to better aid in future programming and debugging no matter which language is chosen or inflicted upon said scientist.

In contrast, Java has been designed to take such concerns away from the programmer. Memory management? Low level IO? These are not the droids you were looking for.. (at least not without an RMI written in another language) That's okay too, that isn't what people want from Java and it isn't what it was designed to do.

And that is exactly my problem with it being applied in a computer science course designed to teach CS fundamentals. In short, since I believe that AP CS courses should focus on the low level architecture of computing, Java is an inappropriate language for that course.

When is Java appropriate? In your college sophomore comparative languages course, or, alternatively, in an OO course or two, but it shouldn't be used as the keystone language for any CS program. Please don't take this as me saying that Java is neither useful or important in it's own (non-free) way, as it clearly is. However, in my opinion, It should be considered an adjunct subject to a serious program in Computer Science.

Sorry! There are no comments related to the filter you selected.

Lisp/Scheme (1)

Anonymous Coward | more than 13 years ago | (#153730)

Really, if you want teach students "how to program" and not tie them down to any particulars, which should be the case, then go the route of all the major technology schools, teach Scheme. You can really tell by the end of scheme who are the "real programmers" and who are simply the weekend Perl hackers. I actually started at one school, and they taught C as an intro language. These kinds of schools are designed to feed you right into the IT industry and write code for insurance companies. My other school, when I transferred, used Scheme. Attacked "how to program" from a completely different angle, and actually taught programming techniques, not how to overcome syntax problems. Java and C++ are good second programming course languages, and then only to learn OO programming, now tie you down to learning syntax. I say if you feel your school is trying to teach you specific technologies and not theory, you should probably head else where, if you have some self respect. Scheme is great because syntax is simple, yes lots of parans, you'll get over it, considering it is really the only non alpha character you will be using, you'll be fine, and if you're programming soundly, you shouldn't run into any problems.

If Java is great, why are no kernels written in it (1)

Anonymous Coward | more than 13 years ago | (#153731)

And I don't just mean Linux kernels. Any kernels.

Java is like Perl, VB, or Tcl. Nice for high level scripting and rapid prototyping, but too much of a resource hog for real apps.

Besides, C pointers, I've found, makes for a nice way to shakeout the "I wannt learn programming so I can buy a nicer car." crowd.

language agnostic (1)

Anonymous Coward | more than 13 years ago | (#153732)

(First, my experience is java, c/c++ and perl(4ish) -- and I work 100% in java)
  1. What are the ends of the course?
  2. If you're trying to teach someone how to program in an object-oriented style, Java will get you that sooner.
  3. If you're trying to teach design-by-contract, what's wrong with eiffel?
  4. If you're trying to learn about how the hardware work, assembly seems like a good choice, and maybe C/C++.

One of the important lessons I've learned from Java is to program to the interface, and in the same theme but more generally, to keep things extremely modular. The first time I plugged in a new CORBA ORB at runtime, and then again when I chose which XML parser I used at runtime, I was floored. This can be done in any language but I think its easiest with Java.

It is definitely easy to go from C++ to Java - which argues that those learning a C++/Java-style language should start with Java and _then_ go to C++, even if its part way through the course. Why not? How would this be worse than starting in C++ right away? Why tie yourself to any language - choose the right tool for the right job.

Shrug off the mantle of shame, and reject the concept of the One-True-Language.

(And yes, I use and know both vi and emacs.)

Scheme (1)

Anonymous Coward | more than 13 years ago | (#153733)

Use scheme (or another Lisp-variant) ... An introductory CS course should concentrate on the elements of programming: - expressions - procedures/functions - elementary design methods: tree structures, elementary datastructures, recursion (not very well understood by most programmers ...) To do this efficiently, you should give the student the freedom to think about these paradigms and not about some syntactic sugar ... 'Structure and interpretation of computer programs' by Abelson and Sussman should be used in _any_ CS education. But of course, the industry needs Java programmers ...

The language is secondary (3)

jandrese (485) | more than 13 years ago | (#153746)

Really, what language you use in those first few programming classes is a secondary concern. You don't take those classes to learn the language (although that is a side effect), you take those classes to learn the fundimentals of programming, which apply to almost all computer languages (BASIC not withstanding). Once you learn the fundimentals, learning whatever language you need, be it C, C++, Python, Perl, Java, Lisp (not as much, functional programming languages are generally different enough from procedural languages that they require another class to use correctly).

I say, use whatever they are teaching, and if you don't like it then pick up another language. It's a lot easier to learn a programming language than it is to learn how to program.

My only concern is trying to shove too much syntax down the throat of first year students. Full blown OO languages tend to require a bit more typing than something like C for the trivial projects that students do, which may turn off some people (I know in my high school, the Pascal class lost 3/4 of it's slow typers on the second day. Worse, in high school almost everybody types slow.)

I guess you might want to avoid "bad habit" languages as well, like BASIC and possibly Perl. I'd also shy away from anything that the average windows user hasn't heard of like Scheme, Python, Modula II, Ada, or APL. You probabally want to chose something with good free or cheap compilers as well. Ada95 may be a nice language, but your school won't be able to afford the licenses for the compilers under Windows.

Down that path lies madness. On the other hand, the road to hell is paved with melting snowballs.

My experiance at the Univ. Of Arizona (1)

Tom Rini (680) | more than 13 years ago | (#153748)

The univeristy of arizona (UofA) has been doing this for a few years (originally w/ java 1.0 I think). The first 2 required classes are all done in java. I don't think this was wholly bad. Mainly because first we didn't have to (and didn't use at all really) the fact that Java is ment to be OO. It was introduced and used near the end of the second class for projects, but not empisized. The other strong point (which the Prof disliked actually, since he was very much an OO person) is that Java has similar syntax to C and C++. The other smart thing to UofA did was realize that java is NOT useful for lots of things too. The recommended next classes were 'Introduction to UNIX' and 'Systems Programming' which was taught in mips32 asm with SPIM and then C. This has changed slightly to emphisize C more as students still had problems doing C well.

All in all, I don't think Java is a bad langauge to use for an introduction, but it should be followed up quickly by C or C++.

ML (1)

aleksey (1519) | more than 13 years ago | (#153755)

I would disagree with the statement that AP Computer Science should teach students about low-level workings of a computer. Instead, the AP has always been about teaching a kind of rigorous thinking that can be honed through programming. To that end, I think that the work of Felleisen, et al (see [] ) to bring Scheme to young students is wonderful. Though personally, I think that a static-typing approach is more useful. I say, teach AP CS in a language like SML or OCaml.

Wrong Direction (3)

swingkid (3585) | more than 13 years ago | (#153780)

I've had some conversations w/ friends of mine about this very idea. I think that assembly should be the first language taught in CS. To be a skilled programmer, you MUST know how a computer works at the fundamental level. Teaching java to beginning programmers only encourages sloppy programming, despite any admonitions from profs.

Java is perfect for teaching. . . (1)

heller (4484) | more than 13 years ago | (#153787)

Java is possibly one of the best tools for teaching programming. Note that programming is radically different from "computer internals". That's the kind of stuff you should cover in other classes spanning much more time than one or two classes.

First off, I spent a lot of time in college working in the computer labs and helping other students debug programs. Some of the biggest problems these students had was with pointers. Java, of course, doesn't have them. This is ideal for learning how algorithms work. See, students shouldn't care about internal pointers and stuff. Debugging and run time errors in Java are great! By default, the JVM will tell you where your error is at run time.

** Martin

I started with C and look how I turned out... (1)

ZxCv (6138) | more than 13 years ago | (#153799)

My first programming language was C, using a great book I found abandoned in the detention room when I was in high school. It was called Beginning with C, and it was definitely geared towards beginners. It had a whole chapter on the hardware aspects of a PC--cpu, memory, i/o, etc--and then went slowly into the language itself. The book was really good at teaching how the syntax and functionality of C goes almost hand-in-hand with what's actually happening in hardware. And its this point that languages like Python and Java miss when used as a teaching language. I started with C and went on to learn scores of other languages over the years, from VB to Perl to Python and Java. And I guarantee that each was that much easier to learn simply because I had a solid understanding of how things worked internally. I certainly think that OO has to be part of any good CS program, or at least introduced in an AP class, but it definitely shouldn't be the cornerstone of one.

Yes and no (1)

Zombie (8332) | more than 13 years ago | (#153803)

After reading the above, it seems to me that English would be an interesting language to teach in school. Sheesh.

Java most certainly isn't too slow or resource-hungry for most applications. If you look at the typical code generated by your average Java programmer vs. your average C++ programmer, you'll notice that the Java code will be faster and better to maintain.

It also isn't necessarily such a bad education tool. You could go into the inner workings of the JVM, look at the bytecode, the stack-based architecture (very useful model in CS) and garbage collection strategies (Lisp or Smalltalk, anyone?).

Its use as an education tool, rather than an applied programming training course, is questionable though. C++ certainly isn't a very nice model. Smalltalk would be a lot more interesting to study as a 'pure OO' language. C fills the gap between high-level OO-languages and bare metal assembler nicely. The entire range should be taught, using fairly appropriate educational languages. Hey, there are schools out there that teach BASIC and COBOL, and I bet there will be some that teach C-blunt, so don't slag off Java...

We Use it at My School... (1)

Mad Browser (11442) | more than 13 years ago | (#153819)

At my school, the University of California, Santa Barbara, all CS classes start with Java.

The first two courses you take are Java, then you move to C/C++.

As a teaching language, Java makes a lot of sense for introductory languages. Here are some reasons:

1. Compilers are free (no cost) and are available on Windows/Mac/*nix. This is in contrast to C and C++. Using a free C/C++ compiler on Windows is a pain and there is no such thing on the traditional MacOS.

2. Almost all the machines in my CS department are Suns. You don't think Sun would give you a deal on hardware if you promised to use Java do you? This happens all the time in CS departments.

If the first thing you saw in CS was pointer arithmetic, would you be scared? I'm sure a lot of people are. Java insulates that a bit so you can get a handle around OO without having your mind totally boggled...

The Java API is pretty complete, which helps learning basic concepts without having to roll your own all the time... This is good at the beginning of the learning process...

JavaDOC is great. The whole API is thoroughly documented. I have yet to find an STL doc that is as good as the Java API JavaDoc.

Basically, I think that Java is a good starter language but there is NO EXCUSE to neglect C/C++.

Teach all of them? (2)

MikeFM (12491) | more than 13 years ago | (#153830)

Highschool and/or intro to programming classes should start with the basics of how a computer works, some theory, and into to a couple different languages. I'd suggest short stints in C, PHP/SQL/HTML, and Python to start. Then after the intro classes you can take a more in-depth approach and add things like C++, Java, and Asm.

It depends ... (2)

crumley (12964) | more than 13 years ago | (#153837)

The best introductory language depends a lot on who the course is aimed towards. For some student populations Java might be best, but for other C, C++, Cobol, or even Fortran might be best.

Back when I was an undergrad, different sections of Intro Programming were taught in a variety of languages. Different engineering departments allowed their students to take different languages, but the only section that all of the engineers could take was 2/3 Pascal and 1/3 Fortran. It was definitely a weird combination, but I thinked it worked out pretty well. Learning 2 languages right away makes it easier to pick up other languages on your own later. Plus, Fortran was still (and probably is still though C/C++ are making some headway) the dominant language for engineering/hard sciences.

So anyway, Java might work OK, in some of the situations above, but I'm not sure that having a particular language that is the dominant one taught in introductory classes is the best option


Re: FORTRAN is useful (1)

Weasel Boy (13855) | more than 13 years ago | (#153838)

FORTRAN continues to be a valuable language in science and engineering. It's worth knowing if you're a scientist, although an interactive system such as MATLAB or Mathematica is probably better suited for exploratory use. For heavy-duty number crunching, FORTRAN is still an excellent choice.

Not quite (1)

Hammer (14284) | more than 13 years ago | (#153841)

Smalltalk is an excellent social skill ;-)

The language smalltalk enforces most of the OO paradigm. It suffers from the same gross mistake as Java, no multiple inheritance. MI is not needed very often but when you need it you should not have to resort to various clunky workarounds

Try Eiffel it supports and enforces the entire OO paradigm.

UIUC CS 125 (3)

zealot (14660) | more than 13 years ago | (#153843)

The University of Illinois at Urbana/Champaign has been using Java in the introductory CS class since the spring term of '98 (when I first took it... before that they had been using scheme). The first portion of the class (at least back then) dealt with basic programming syntax and how to do loops, etc. Then it moved on to the OOP philosophy and started dealing with classes.

The course homepage for CS125 is:

The next class required of CS majors is CS225, which is a data structures class taught in C++. The first couple of days of the class are spent going over the difference between C++ and Java (most especially stuff on pointers), and then later they move in to data structures and algorithms.

The course homepage for CS225 is:

C++ and OO Cheating (2)

Midnight Thunder (17205) | more than 13 years ago | (#153850)

Part of the problem with C++ is that you can cheat. What I mean, is that you have already done C then you can program in C++ without really taking advantage of any other object orientated programming techniques. Java on the other hand is a much more orientated language and since it is portable you avoid platform specific issues. Java also provides a rich API for doing many different tasks, so this not only helps in learning to program but also in accessing different open APIs.

Smalltalk is the real object-orientated language and the reference to them all. The only problem with Smalltalk is that it is percieved to be a dead language, though this in academic environment is not always a bad thing.

When I was at uni I was taught prodcural, functional, object-based and object-orientated programming. One thing that I got out of that is that there is no such thing as an ideal language. You have to look at the task at hand and decided which approach works best.

At the end of the day the best language for the job depends on what your target is.

Option number 1 for me, thank you very much! (1)

pong (18266) | more than 13 years ago | (#153855)

My personal feeling is that Java is clunky, ugly, and runs much too slow on most platforms

Clunky and ugly? Compared to what? The language is pretty clean OO (as opposed to C), and clean and simple (as opposed to C++). This makes it an excellent candidate compared to those two languages for learning OOP, right? Your last point about runtime performance has little to do with how useful it is as a teaching language. Believe me, if you are going to be serious about programming, you are going to learn plenty of languages, but few are as clean and suitable for OOP education as Java.

Language de jour (2)

Black Parrot (19622) | more than 13 years ago | (#153860)

First it was Pascal, then all the Unis switched to C, then to C++, now to Java. One cycle is hardly complete before the next one starts; those eager freshpeople getting Java now will discover that it's old hat by the time they graduate, and the wheel will start another turn.

For my money, use something simple like Pascal or C to introduce the basics, and then introduce OOP after a good semester of abstract data types.

Alternatively, do like a lot of schools [] and use Scheme, so you can teach beginners to 'think' rather than to 'program'.


Why Java is an ideal instructional language (1)

mkozlows (21830) | more than 13 years ago | (#153867)

1. High-level. Contrary to Mr. DiBona's assertion, most of computer science is looking at higher levels, not lower ones. Sure, there's the obligatory computer fundamentals, but what's more important is what's done on top of the fundamentals -- databases, algorithms, AI, what have you. Java allows the student to quickly learn the basics of programming without having to simultaneously learn machine fundamentals, which they'll pick up later. (Not the case with C.)

2. It's free, in the monetary sense, which is important for high schools and small colleges. (Not the case with VB.)

3. It's real; students can compile and write real, significant programs in Java and know that businesses use Java extensively for significant applications. (Not the case with Pascal or Python.)

4. It's GUI, but not exclusively so: Students can start out learning console programming, but also be able to use a standard GUI framework (Swing) to make GUI apps. In C, you need to learn Motif, MFC, or the equivalent to write GUI apps, which is significantly more involved (and system-specific).

5. It's cross-platform. You can have Unix machines in the labs, but still allow people to do homework on their Macs or Windows machines. (Not the case with VB, and only partially true of C.)

6. It's clean. A lot of Java tends to look like pseudocode -- it's a very straightforward language, with few distracting frills. (Not the case with C++, certainly, nor with Perl.)

7. It's familial. It looks like other C-based languages look. It uses familiar types, familiar notation, and familiar keywords. (Not the case with VB or Perl.)

On the whole, it's a solid language for instructional purposes, combining the simplicity of Pascal with the real-world applicability of C++.

Java a great intro to OO (1)

KevinRemhof (29738) | more than 13 years ago | (#153884)

I feel that Java is a great intro to OO-programming. Teaching OO is completely relevant to computer science courses. Hardware is such a minor part of CS. Hardware should be focused on for Electrical Engineering much more than CS. To me, CS is about understand how computer logic works. To do so, you need to understand programming, logic, math, science, and to a lesser degree hardware. But, I don't want to abandon hardware. I'm just saying that a CS course should focus on theory more than practice. That is why Java would be a great way to learn OO. If I were teaching a class on OO, I would start with some C, move to C++, and finally Java. Java makes it very simple to understand OO. You don't have to deal with malloc and pointers are handled in a much higher level. Just because you learn a language in a CS course doesn't mean you are stuck using that language forever. I graduated from the University of Dayton in 1995 with a BS in CS. We learned Ada. Unless you are working for the DoD, you problem will never see Ada again. But, Ada is object-based (newer versions are OO) and is a great language to start with. Making the transition from Ada to Java is easier than from Pascal or some other basic language. Java could also be taught with C++ so that students can learn the best of both languagues. The more you know, the easier it is to switch to other languagues and methodologies.

Re:Not widely used yet (1)

KevinRemhof (29738) | more than 13 years ago | (#153885)

Please, let's not start advocating VB as a learning language. VB allows such lousy structure. I wrote VB for about 4 years. I really enjoy the language, but too many people are focused on the RAD of it. Look, I can generate a form, put some code behind it, and I'm done. This is not how to code.

VB allows you to bypass all formal design (yes, you can do this in any language) and go right to designing the look & feel. I have always felt that VB apps get developed in reverse. Very few people take the time to write a VB app starting with a structure or plan.

Let's leave VB to community colleges, training classes, and for you to learn on your own.

Java is definately not for CS (1)

musicmaker (30469) | more than 13 years ago | (#153893)

Java teaches you nothing about underlying architecture, and system management. How are you supposed to write good code if you won't know anything about the underlying mechanisms. I have seen some of the most inneffecient code in my life written in Java, creating half a gazillion objects then deleting them, and hearing someone say... 'oh it's okay, Java garbage collects', not realising that garbage collection is slow if you just instantiated half a million objects.

C should be the staple for an CS course. It might not be pretty, but neither is x86 asm. C++ might not be purely OO, but it does support multiple inheritance, and although many purists might argue that that is bad, there are plenty of situations where toolkits like Qt use it to very good effect.

Also - note that Object Oriented Design is not the solution for world peace and the common cold. There are other design metaphors that surpase OO for many tasks.

I have worked in at least two companies that are moving firmly and fastly _away_ from Java because they had so many issues with JVMs not performing properly in a high load environment. I think that C/C++ will remain the back bone of the industry for some time, and if not, then more fool the industry (oh wait - there are still companies runnign IIS/NT - I take it back - at least half the industry is moronic).

Does this feels like the industry ensuring it's own future by teaching programmers to write more slow bloated code and therefore require more and more ridiculous hardware requirements? I know that many educational institutions in the US are heavily funded by big business...

Re:Java better for learning than C++, Scheme? (1)

musicmaker (30469) | more than 13 years ago | (#153894)

Oh yeah - and Run Time Typing is so much better than templates that give nice compile time errors that are clear and easy to fix. Oh yeah - we will just have this method accept a type Object as an arg because we can.

And don't even get me started on the piece of pain in the ass that is reflection.

Java is a stepping stone (1)

topham (32406) | more than 13 years ago | (#153900)

I've learned Pascal, Basic, and IBM 360/Assist as initial programming languages. (Basic/ Grade 11, Pascal/ Grade 12, IBM 360/Assist (assembler) in College Term 1.)

I won't discuss Basic. It's an abomination as a teaching language.

Pascal was good because it had constraints, and was well structured.

IBM 360 forces you to understand the basics before you can do anything else.

All of these have there place for different types of courses.

With decent course material each of these languages can be used to teach without worrying the students will get over their heads too fast. (It's difficult to jump ahead in IBM 360 without understanding, with Pascal the structure is quite simple, etc.)

A language like C is impossible for beginners to grasp. They can quickly get over their head with bugs they cannot even comprehend yet. You have to be able to take small steps to build on the ideas.

Java, I think, can fit nicely in this. You won't have to worry about core dumps while your trying to teach simpler concepts.

The problems with C++ relate back to C, it is quite possible to shoot yourself in the foot in such a way it is very difficult to find the problem without a through understanding of C/C++ and the program as written. Sometimes difficult to do with some students programs.

I knew C quite well before I attended college, I help a number of students that were learning it, they found it difficult, or impossible to debug if they made a mistake with an unintended pointer issue.

Fixing it for them doesn't help their understanding, and, in general, they don't have the background at that point to understand it enough to fix it themselves.

(Keeping in mind this was on a 3-6week course in C, not 2 years...)

No memory management? (1)

DirkGently (32794) | more than 13 years ago | (#153901)

Maybe I'm a little old skool because I learned with C, but I think starting off with Java is a bad idea at the collegiate level. Sure, its great lexically, but I think Java is much easier to appreciate by first coding in C/C++.

I think that new coders SHOULD have to deal with typing your variables, and being careful with pointers.

Maybe if Intro to Programming was a seprate course that just taught the basics of logic, that'd be okay. CS majors could skip that one (presumably CS101) and start with a more structured intro class for CS majors (CS120...programming in C++?).

The structure is important if we want to in any way discourage writing bloated code and letting the VM manage memory.


Principles, not implementations (1)

tuxedo-steve (33545) | more than 13 years ago | (#153904)

I don't believe that the tool used is particularly important - it is the principles being taught that is of the greatest relevance. In an OOP course, for instance, the principles of OOP should be emphasised, not the language of implementation. Once a student has a strong understanding of these principles, they will be able to apply them to any language that follows them - the C++ or Java question should be largely irrelevant.

That said, it could be argued that procedural programming should be taught before OOP, as procedural programming has traditionally been the optimal compromise between high-level design (OOP and so on) and the actual low-level structure of things (assembler programming and such), from which point it is easiest to grasp those higher and lower levels. However, in this enlightened day of RAD tools and such, perhaps this knowledge is not as relevant for "Joe Coder" as it is for those more oriented towards the science of such things.

Nonetheless, the main point is that the paradigm is what should be emphasised, not the language.

Wanna Learn how a computer works? (1)

Frankus (38740) | more than 13 years ago | (#153914)

...How about teaching them embedded programming?

You could take this to it's logical but absurd conclusion and say that students should have to enter their program with little switches and a button, eight bits at a time. But seriously, you can learn a lot about how computers work if you have to write your own stack, your own heap, and your own start-up code.

What you won't learn is how to use a modern computer to create useful applications (unless you want to go into embedded programming). IOW half of CS is knowing how a computer works, but the other half is getting the computer to do most of the work.

Java may get a lot of bashing, but I see it as C++ with most of the bullshit removed (oh, yeah, and it's slow). I think it makes a perfectly good into-to-OO language.

Java is fine for OO (5)

Hard_Code (49548) | more than 13 years ago | (#153941)

Let's face it, most tutorial languages are picked for being high level, and having a fairly shallow learning curve. When I started learning programming, Pascal was used, which was fine in the days of purely procedural programming. Now that OO is more or less the defacto way of thinking about things (NOT to say that we should only be programming in OO languages), it makes sense to go with Java. Java was designed from the very very beginning with the explicit goal of making it harder to make mistakes - errors are caught up-front as much as possible.

Java has:

1) strict typing
2) dynamic linking
3) built-in memory management
4) a consistent implementation and rich libraries from a single vendor (for better or for worse)
5) works *identically* on many platforms ("identically" is the key here...we don't need to be spending half our time teaching build environments for various systems)

For all these reasons, it makes sense to use Java as a beginning language. The basic programming concepts are all there (yes, even resource management). The problem with C and C++ is that it is very easy to obscure larger concepts with intimate technical details, the learning curve is steep. I remember when I was learning Pascal, it was as if the class hit a brick wall when pointers were introduced. Imagine if learning pointers and intimate machine-dependent ("words"??) memory management was the prerequisite to larger programming concepts such as conditional statements, iteration, recursion, etc. The whole learning process would be stymied.

And I used to be one of the oh-so-cool C++ programmers who thought that Java was just a kindergarten-level "fad", and scoffed at it when it was used to teach programming in CS courses. Now enterprise Java programming is my day job, and I can attest to the fact that it is NOT a fad, is very powerful, and is used to do some really serious, and really cool stuff. I'm sure assembly programmers said "C?? You don't even need to know what REGISTERS are to use that!!".

The C++ experts don't teach pointers anymore... (4)

devphil (51341) | more than 13 years ago | (#153948)

There's a really great book out called _Accelerated C++_, by Koenig and Moo. (Yes folks, that Koenig and that Moo, the C++ gods.) It's a very new approach to teaching C++ as a first language, and everybody who's used it or even just reviewed it has loved it.

It doesn't even introduce pointers for several chapters. Students learn how to write simple loops, manage collections of things using std::vector, do the common 90% of string-related tasks using std::string, write some useful and practical programs, all before ever seeing a pointer.

Side note: the book is part of the C++ In-Depth series, being edited by Stroustrup. One of the rules for the series is that the main body text of the book must be no more than 300 pages. No filler crap, no 1500-page tomes to raise revenue; make your point simple and clear and then shut up.

Objective C (1)

xphase (56482) | more than 13 years ago | (#153957)

Put G4's with OS X in all CS labs, and teach Objective C.

Language NOT Importiant (1)

Capt_Troy (60831) | more than 13 years ago | (#153967)


I graduated from a CS dept. right before the Java wave took. We started with FORTRAN (about 3 months worth) and moved on to C and later C++. Now, because of the position I took, I program mainly in Java.

The difference is that Java teaches good OO (since it is required) concepts that are hopefully also being taught in the curriculum. However, procedural coding is also importiant (for example, most games are not pure OO because of memory overhead and speed etc). So I would say knowing both is a benifit.

Now, as to what language should be taught...

I make this point strongly, CS is not about programming. It's about solving problems, the fact that a computer is used to do so is secondary. Any good CS student should be able to sit down and not only be able to decide what the best language for the job is, but also learn how to use it and get the job done. Whether it's C for games, or Java for a web app, or perl, or python, or whatever.

So concerntrate on the concepts. Java is impressive on a resume, so is C and so is C++, but proving you are adaptable and resourceful and that you understand concepts is way more valuable any day than what language you learned on.


What about Python? (2)

Zigg (64962) | more than 13 years ago | (#153979)

Seems to me Python would be a much better fit as a learning language.

Re:Not widely used yet (3)

Zigg (64962) | more than 13 years ago | (#153981)

I suppose VB would be good for teaching what people have to do in the real world when their language isn't up to the task at hand, and vendors have to invent new and strange things to give programmers the features they want. VB feels so hacked-together it's not even funny.

Besides, if we went by "widely-used" to decide what to teach new programmers, we'd all still be using COBOL. :-)

Re:Wrong Direction (5)

Zigg (64962) | more than 13 years ago | (#153982)

Actually, that is a pretty interesting philosophy... I like it, and not just because of sadistic tendencies. :-)

Think about it:

  1. People learn first-hand what happens under the hood.

  2. The lack of any kind of visually impressive positive feedback will guarantee that the really bad programmers with a serious lack of dedication never come back.

  3. The apparently inexplicable things the machine does when you do something wrong will guarantee that those with some dedication but poor understanding will never come back.

  4. You are left with those who are really good programmers at heart, understand what they do, and are strongly dedicated to doing it. Ergo, fewer programmers, better programmers, more money to go around to less people, six figure salaries to all and real productivity. Oh, and Windows eventually goes away too. :-)

Sigh, what a world that would be...

SmallTalk (1)

Mano1KAges (71161) | more than 13 years ago | (#154006)

I haven't had a lot of experience with it, but SmallTalk [] is a great language for learning object-oriented principles, because it is purely object oriented; everything in the language is an object, from integers to windows to text and all methods act on an object. In that respect, it's a bit closer to "human thinking" than most programming languages.

I did not study SmallTalk until my Programming Languages Concepts in my junior year here at Penn State, but I wish I had studied it earlier. My initial reaction to the language was it would make a perfect "introduction to programming" language, particulary object-oriented programming. Squeak [] is a great implementation of SmallTalk, very intuative design and easy to examine classes, objects, and methods.

Look to the local university (1)

mjgamble (79684) | more than 13 years ago | (#154023)

If you are trying to prepare high school students for college, take a look around at the local University for what they do with CS101.

As a side note, the University I attended taught us a complete impractical language as a learning tool, Scheme -- the bastard stepchild of Lisp. I do not remember any of it, but the point of it was to teach concepts which it was good for.

My second CS language class was C++ (replaced by Java now methinks). In terms of good OO design it was certainly lacking and was meant to translate the concepts from the first CS class to the real world.

All of the rest of the theory classes reverted to Scheme or assembly language. You could subsitute C for the assembly language part and get nearly the same effect for educational purposes.

If you are going to teach Java, please keep in mind it is more than GUI window programs or web applets. I have seen too many reviews of books on websites that complained because Java educational books and courses focused too much on the non-GUI parts. Ugh.

Lastly, I think Java is excellent in terms of teaching the fundamentals of OO programming and patterns. You'll need to decide if you're up to the task of teaching programming and OO.


IMO... (1)

Moonshadow (84117) | more than 13 years ago | (#154034)

Java shouldn't be the teaching language. I've done minimal java development, but I try to avoid it nowadays because it sucks resources like none other.

I'd recommend that the teaching language be C/C++ - once you know that, you can learn Java, Perl, PHP, etc. with little effort. True, Java's cross-platform, but if today's AP computer science classes were anything like mine, you'll be developing on a single machine, writing code that serves little practical purpose other than to learn. Teach them C/C++.

My AP compsci classes (2 yrs ago) used the old 25mHz Macs - God help us if they try to run Java on one of those beasts.

Re:Wrong Direction (2)

Moonshadow (84117) | more than 13 years ago | (#154037)

I'd disagree - I never learned assembler, and I am a very competent programmer - I program in 11 languages, 3 professionally. I know how a computer works, as far as registers and such, yet have little desire to learn to code that myself.

It's kinda the difference between a computer science major and computer systems engineering major. The compeng major needs to know how the hardware works - the compsci needs to know how to make use of the hardware through software. Knowing that your byte is stored in register X isn't going to matter to them in the slightest, unless they're writing for embedded systems or such.

I'd like to learn assembly someday, but just so that I could do nifty stuff with my TI calculator. Other than that, I don't see the reason to know it. I don't think its necessary - certainly, it's a feather in your cap, but it's not a critical step.

Assembly (2)

Greyfox (87712) | more than 13 years ago | (#154056)

You shouldn't be doing OOP until you really understand what's going on at the low level. And C isn't low level enough. Your fresman year should be devoted to assembly language, basic data structures and low level hardware concepts.

CS should give you a thorough grounding in several languages. Once you've got a few languages under your belt, you begin to understand that when you get right down to it, languages are just syntax and the concepts invariably remain the same. In fundamental concepts, Java and C++ are damn close to one another. As long as you understand the fundamental concepts and can pick a language that can most easily express the solution to your problem, you're pretty well set.

Any langugage will do. (1)

Dandre (90053) | more than 13 years ago | (#154063)

I honestly don't think it matters too much what language is used in teaching intro CS courses, as what must be conveyed in those courses are the basic paradigms that are expressible in all languages, from ML to LISP to Java to C.

Intro to CS courses that use Java could be taught badly, as they would be if they focus on UI issues instead of learning to write the fundamentals. Students should be expected to learn how to write linked lists, trees, and all the basic underlying structures of programming. There should not be too much dependence on the fancy features of the language for doing this, IMHO. Learning to use Java's list class is not the same as writing it yourself, and thus understanding how it's written. Java is fine for testing issues of relative speed and for empirical explorations of computational complexity.

One of the key advantages that java has over C (or especially C++) is that it is relatively clean, and relatively safe. On the other hand, it's not as portable as C or C++, which is a real problem for many schools, since Macs are often used in education.

David Andre
UC Berkeley

LISP? (1)

drfireman (101623) | more than 13 years ago | (#154091)

While I agree with DiBona's reasons for objecting to Java as a learning language, my suggestion would be a language that really insulates the programmer from the hardware: LISP. If you want to force someone to learn something about structuring code, I think it's a good adjunct, though not a substitute for c.

Computer programming != Computer science (2)

SirWhoopass (108232) | more than 13 years ago | (#154123)

I think the biggest problem is the confusion between computer programming and computer science. A surgeon must know how to cut open the body and stitch it back together. These are very important skills for a surgeon to have. Learning how to cut and stitch the body does not make you a surgeon.

Java, in my humble opinion, is not a good core learning language for computer science. Lisp (or Scheme, as used at my school [] ) is a good choice. As a language to teach object oriented programming, it's not bad. Neither is C++, or several other languages.

I never took the AP computer science course (my high school didn't have AP classes). If the goal is to teach computer science, then I think Java is a bad choice. I would argue that you could design a high school introductory computer science course that could be done entirely with paper and pencil.

The problem is the computer science/programming confusion. Teachers, parents, and kids think that they want to learn programming. They demand that the courses use current programming languages so that they're not "wasting their time" with something like BASIC. They don't understand (and, perhaps, don't care) that they're not learning computer science, just a single programming language.

My Experiences w/ Java == Bad (2)

Eagle7 (111475) | more than 13 years ago | (#154125)

I have been arguing for the past 3 years (when my University had switched from C++ to Java) that it was a bad idea.

From a theoretical standpoint, Java skips two important features. First, it does not have (traditional C) pointers. Learning a linked list in Java (if you actually learn one instead of using a library) lacks the effectiveness of learning a linked list in C/C++. Along the same lines, becuase of its garbage collection, Java teaches first time programmers to be lazy with their objects. I saw countless programmers who cut their teeth on Java fall flat on their faces later on when faced with C++, with its pointers, segmentations faults, loss of memory, etc. you are much better off learning the right way before being able to take shortcuts.

I have also notice some disturbing trends with the way Java is used to teach. When I took classes in C++, our projects were Comptuer Science oriented, such as simulating a rudimentary telephone switching system. Many of the first year Java assignments I have seen take "advantage" of Java's graphical features, and involve clocks, scrolling text, etc. Instructors seem to lose sight of the real Computer Science oriented projects that present themselves when the only easily availible interfaces are file and text.

So I heartly say that Universities (and High Schools) should teach C++. And students learning Java now should do themselves a favor and learn C++ on their own.

Re:How about (1)

pallex (126468) | more than 13 years ago | (#154167)

I dont think teachers are paid enough to mark assignments written in Perl!

Slightly different view (1)

Triode (127874) | more than 13 years ago | (#154170)

I will agree with the argument of C(++) being used as it gets one closer to the hardware, however, as someone who took the CS courses some time ago, I think that a CS course should teach fundamentals and be language independant. Of course at one point you have to actually use a language, but that should be a means to an end to be determined by one who knows the fundamentals. I may be getting off an a tangent here as it did mention it was an advanced course, but when I went through (hell) it was elementary structure etc. Getting back to the subject at hand, I think that C(++) has been time tested... should we just switch at a whim? It was not too long ago that we were all quiche eating ba#$%!#ds in those courses.

Languages (1)

tony clifton (134762) | more than 13 years ago | (#154188)

MIT and Berkeley were pretty well known for using Scheme as an intro computing language. It gives a pretty easy transition into computuational issues and if you "get it", you learn powerful metaphors which can be implemented in many many languages. For O-O, I think Smalltalk (or right now Squeak) are utterly appropriate. For the same reason -- you get used to metaprogramming concepts, and Smalltalk's probably the best environment I've seen where you really grasp the implications of the concept -- "everything is an object." Java, C, COBOL, and C++ are industrial languages -- they were designed with industrial tradeoffs which have nothing to do with educational forces. I've got a huge problem with treating CS programs like job training: if you want Java for a resume, go to a Sun training class. In SF there are "learn IT in 3 weeks!" posters in bathrooms. Blah.

movin' on up (1)

digitalsushi (137809) | more than 13 years ago | (#154202)

i'll offer my laymen's opinion on this subject. i've taken C in college. Just enough to learn all the syntax- data structures are still my master. I don't write programs using C... ever. College has taken the backseat for a while, however. I've been working as a netadmin for an ISP, and as such I shall speak what is useful to me, and also integrate some of the history we learned in CS. and I'll even try to take a stab at brevity (a first for so many of us!)

Back in the day, you learned machine code. Or assembly code, which I believe is the next layer up. Then everyone started learning C.

I think it's time to start learning something above C, something OOP. Java is the first choice cause, well... it's the first thing that comes to mind. Python would be another example, but Java lets you make more programs in the typical "I wanna add shiny GUIs to my windows app" sense of a program. C? C++? I can't speak for C++ as I don't know anything about it, but my (laymen) understanding is that C doesnt do object oriented stuff, and C++ does, but the learning curve is steeper than Java. So...

Seeing that (laymen!) a lot of this stuff seems to happen automatically now (memory allocation, et cetera) and that we've built these routines... let's move the next layer up.

See, eventually... we'll write programs in regular old English. It'll take forever to get there, but that's how I envision programming developing, as a person who "gets the basic idea, kinda".

So much for brevity. Hey, someone reply with some official names for those different layers I am referring to.

btw (1)

digitalsushi (137809) | more than 13 years ago | (#154203)

before anyone asks, no, of course i didnt read the article. and it was on the same page, even! can it get any worse?!

Java as a prelude to C++ (2)

jbischof (139557) | more than 13 years ago | (#154204)

I go to a really big university and as their intro to programming course, they used to teach scheme but recently switched ot Java. The main reasons Im not exactly clear on, but I think are :
  • Java can be used on the web (ooh ahh).
  • It is object oriented, even if clunky and weird
  • More "user friendly", but many people would debate if thats a good thing, I mean Unix isn't exactly user friendly.
Anyway we then go on to take C++ on the next course, and use that in most classes down the line. So people who just take the intro can get a nice feel of applets and coding in a fairly simple, if weak, programming language. Now I dont really agree with the industry standard of using C++, and I wish that a functional programming language was a required course, but many people seem to like C++. (let me just say that its syntax can be quite frustrating at times, I mean how many different ways can you use the ampersand?) anyway thats just my two cents.

My experience (1)

ritlane (147638) | more than 13 years ago | (#154219)

Speaking as a student that was introduced to OOP through Eiffel, I must say that CS students at my school [] were very happy when they switched over to Java as the language of choice for introducing freshmen to CS.

I would be interested to see any comments by students from RIT who went through those trials.


Java Shouldn't Be the Cornerstone Language (1)

Homebrewed (154837) | more than 13 years ago | (#154232)

My alma mater made Java the cornerstone language for their CS program. They also eliminated assembly language programming as a graduation requirement. These are both *bad ideas*.

It is *much* easier to learn other languages when you have a background in C++ than in Java. Knowledge of C++ will get you more jobs (and better) than knowledge of Java (however, knowing both is a good thing, too). And, truthfully, dealing with the additional programming issues that C++ introduces will teach you to be an all-around better programmer.

As for ending the assembly language requirement, I'd have to say that, while I don't really program in it anymore, learning assembler was one of the most important things I learned. It taught me to understand how the processor views data.

Smalltalk (2)

mmaddox (155681) | more than 13 years ago | (#154235)

Not that I'm particularly fond of Smalltalk, but it is a simple language to learn, it's well-connected to its development environment (thus, very, very simple to prototype in), and Object-Oriented at its very core. Java, on the other hand, is much too complex and idiosyncratic for placement as a learning language ... ditto C/C++. I think a more straightforward language benefits the student of OOA&D.

Plus, some of the better CS departments (GATech, etc.) seem to agree. Check out Squeak [] .

Re:Either would be better than what I got stuck wi (2)

mmaddox (155681) | more than 13 years ago | (#154236)

Man, I got that thrown at me, too. Don't get me wrong, FORTRAN has it's place (garbage pail, septic tank, the city dump...kidding), but it's just not terribly relevant to modern software development, except as an historical exercise. I was actually stuck with FORTRAN 77 (in about 95) for a grad-level course on Scientific and Numerical programming I was taking from a local university. Talk about USELESS. I've been a professional developer for 10 years, write component-based (COM/CORBA) code in C++, and have absolutely no FORTRAN tools excepting the GNU stuff. How was I supposed to apply this course?!

I suggest closely reviewing the curriculum of any CS school you might attend. It becomes pretty obvious who's real and who's not.

How many times... (1)

imagineer_bob (163708) | more than 13 years ago | (#154246) you folks have to be reminded that JAVA is the language of PEDOPHILES [] and as such is inappropriate for schools.

In fact, language inventor PATRICK NAUGHTON [] developed Java to help him write software to find and download kiddie porn.

Part of his DEAL WITH THE FBI [] is to use his JAVA SOFTWARE to catch more pedophiles.

Please check out my references and you'll see that I'm right.

Lot of possible reasons (1)

decesare (167184) | more than 13 years ago | (#154256)

There are several possible motivations why Java is being chosen as the language du jour for intro-level CS courses (though for the record, I am just speculating here; I don't think any of them are necessarily good ones):

  1. The already-mentioned academic reason that Java is perceived to be a pure OO language, which some professors may well have bought into;
  2. colleges have long been criticized by industry (who will eventually employ the students at these colleges) for not teaching those students skills that they can immediately apply when they are employed. Hence, Java (since it is perceived to be the programming language of the future);
  3. colleges want to impart upon their students skills that would command large salaries from business when they are alumni (thus increasing both the prestige of the college itself, and potential donations from said alumni). Right now, Java programming fits that bill;
  4. it may well be easier to teach programming in Java than in other languages. Less concepts to deal with, I suppose. Again, not a good reason, but those who actually teach may consider it as one;

smalltalk? (1)

spike666 (170947) | more than 13 years ago | (#154266)

how about smalltalk. for teaching, it enforces Object Oriented methodology.

This is a mistake. (1)

spribyl (175893) | more than 13 years ago | (#154277)

I am a Grad Student and full time programmer.

DePaul University is going to switch to Java as its primary programming language. I have to agree with the poster that this will be a dis-service to students. A good developer will know how to solve programming problems using several types of languages Java/OO is only one solution. There are times when C or some other non-OO solution is going to be needed.

Poor Programming methods (1)

Halo- (175936) | more than 13 years ago | (#154278)

Simply put, I don't want someone using a hashtable if they can't program one themselves. Higher level languages are great time savers, but learning is not always about shortcuts and portability. This is not to say Java shouldn't be taught, but that without a firm grounding, the tempation to program badly is very strong.

Why bother debugging a funny memory bug when you can just rewrite the code? Sure it's a quick fix, but there may be a more subtle point being missed. One of the most valuable experiences I had in college was when I was doing some math-intensive code, and could not make the algorithm work right. Many hours later, I dug down to the assembly, and discovered the compilier had made a mistake while optimizing. I wasn't programming in assembly, but it saved my ass to be able to read it.

If you're gonna be an engineer, be an engineer.

python (1)

dsavitsk (178019) | more than 13 years ago | (#154283)

obviously everyone's first language should be python.

Java better for learning than C++, Scheme? (1)

0tim0 (181143) | more than 13 years ago | (#154286)

I've been a professional programmer for several years. I started in C++ and am now doing Java. As far as that debate goes, Java IMHO is a much better learning language than C++. It has a much cleaner syntax (no preprocessor, not figgin ugly template syntax, etc). And it has a much broader and more standard standard library. Plus, it's a lot easier to debug.

Having said that, I'm not sure that either one is a good introductory language. Personally, after reading the book The Structure and Interpretation of Computer Programs (which, I think, is used as the intro CS course at MIT -- not that I could get in there ;), I think an alternative language like Scheme might not be such a bad idea.

Now, I don't think that Scheme is a great general purpose language, but it's very flexible and allows you to experiment with a couple of different paradigms. (You don't need to use an 'Object-Oriented' language to leran or program in good object-oriented style.

Plus, since it's a language that one will probably never use in a job, it will give the students a little more diversity (rather than tying their minds to one particular language).


Re:Wrong Direction (1)

MathPenguin (181736) | more than 13 years ago | (#154287)

I agree with you that Java would be a mistake for introductory programmers, but assembly should in my opinion be a second or third language. What we should be trying to teach is the style of thinking required to write good code. This involves having a good concept of the big picture as well as the fundamental workings of a computer.

Besides how many people code in assembly anymore? Almost noone. Better they learn something in between (C/C++), something that is remotely likely to be a language they will have to work with, and then go back and learn exactly how things are don e (assembly) and good ways to structure large projects (OOP).
It's not really funny, unless someone doesn't get it

What about pointers? (2)

donkeyboy (191279) | more than 13 years ago | (#154299)

If your first program doesn't SEGFAULT are you really learning anything?

Use Java? (1)

nileshch (194481) | more than 13 years ago | (#154307)

IMHO C++ is the best language for OOP concepts. Besides who would want to run java on the 386s on my college's lab? C++ being a continuation of C is easier to adapt to, than java and its "abstract" classes.

Changing to Java (1)

Yossarian2000 (200994) | more than 13 years ago | (#154326)

I am currently a CS major entering my senior year. My school has used C in its intro courses up until now. Starting this year, freshmen will be required to take Java. C++ will still be taught, but in an upper-level OOP class. I dont agree with this choice. C/C++ is still very prominent in the software field, especially in Linux programming. While C++ includes everything C does, not having a course that uses ANSI C will result in many students missing out on the kinds of things you can do with a procedural, powerful language. Java hides quite a bit of low-level stuff from the programmer. While this is well and good, it still needs to be learned. Understanding pointers is a topic that is especially valuable and, if java is used, they wont even be mentined. This raises another question: is OOP suitable for all programming tasks? By teaching intro courses in Java and then C++ in upper level courses, students may be able to get out of college without ever programming in a procedural language (the only non-oop language may end up being assembly). Should schools be so eager to jump on the OOP bandwagon that they abandon all procedural programming?

Re:IMO... (4)

wheel (204735) | more than 13 years ago | (#154333) resources like none other.
True, esp. for gui's. (We all know about listener leaks, right?) For other uses, however, such as web-enabled db apps, it can actually make more efficient use of resources -- and Java can remove most of the pain from tasks like session management.

the teaching language be C/C++ - once you know that, you can learn Java, Perl, PHP, etc. with little effort
The problem of using C/C++ for teaching is, a student can get distracted from learning how to program well by the idiomatic syntactical complexities that make C/C++ such a powerful language in the first place. I say, learn Java first, so you understand the classic algorhythms, simple OO, and things like threads. Then, find out what else you can do with C/C++, and others.

True, Java's cross-platform...
Do not forget, Java is not the only cross-platform language -- emacs-lisp is available for many many platforms, and uses such nicities as "byte-compiling", just like Java. :*)

Make 'em learn assembler. (2)

gantzm (212617) | more than 13 years ago | (#154363)

OO is high level, teach them assembler first and how the machine works. I've seen way too many people writing really crappy code because they have no idea what's going on inside the machine.

Java as an introductory (1)

B00yah (213676) | more than 13 years ago | (#154369)

Actually, it was just tried as an introductory level language here at the University of Missouri St. Louis, which is the top CS school in Missouri. The feedback has been good overall...

Re:Either would be better than what I got stuck wi (1)

w.p.richardson (218394) | more than 13 years ago | (#154381)

I agree. I was a statistics major in college, and at the time the programming language we had to take was Pascal. C would have been much more useful in hindsight, as I have had to spend some time later picking it up. The program changed a couple of years later too, to C++.

It is a good education language. (3)

bmongar (230600) | more than 13 years ago | (#154406)

I think Java is a fine education language for the following reasons.
It is cleaner than C++.
It is widely and freely avalaible. (though so are many other languages.
It is being used widely in the industry, and I think educational institutions have a responsibility to realease students with marketable skills.
As for performance, it is slower than some languages closer to the heart of a computer, but speed is not the point of an educational language, constructs and methodology are. And Java offers all the needed constructs and is good to teach the OOAD methodology.

Re:smalltalk? (3)

bmongar (230600) | more than 13 years ago | (#154407)

Smalltalk is much cleaner OO than Java which is much cleaner than C++. I think the main reason Java is chosen over Smalltalk is Java is more widely used in the industry. It is a tradeoff purity versus use, Smalltalk wins in purity and c++ wins in use, but Java is a good middle ground

I took Java last year (4)

trolebus (234192) | more than 13 years ago | (#154412)

I took the grade 11 computer course last year, basically they started us in C/C++ until Christmas and then switched to Java. Needless to say most of the people in this class would not have gone onto do computer nor did they have any experience but I noticed a distinct lack of interest when we swithed to Java. I think it had something to do with re-learning everything but it also had something to do with them finding C/C++ more intuitive. The point remains, whatever you go with, especially at the highschool level, stick with it all year or you will loose half the class right then and there.
More imporantly if you want to keep as many people interested in computers, especially their first introduction to programming, keep the language simple, worry about whether or not a high level or low level expericne is better later.

OO is great, but learn something structured first. (1)

BeulahGirl (237681) | more than 13 years ago | (#154419)

In my not so humble opinion, a first programming class should be structured. I think the student ends up having a deeper understanding of what is going on behind the scenes when Java lets you import a hash table and populate it at will if you have written one in C, for example. I have also seen in my co-workers, who have done nothing but OO, not being able to solve simple problems with checking on return values from functions because they are used to error objects and the like. OO is great, and makes a lot of things very nice, but I for one advocate the use of a structured language as a first programming experience.

RIT (1)

Apreche (239272) | more than 13 years ago | (#154431)

The Rochester Institute of Technology is the university I attend. CS majors and many other majors have to take CS classes. CS 1 2 and 3 all teach java. CS 4 switches to C++.

The university claims that someone who has never written code before can be a CS major. Of course the first 3 computer classes they will take are CS 1 2 and 3. What I've found is that those who have programmed in any language previously have a very easy time with these classes. They teach object oriented concepts and the java language very well. The people with experience have a very easy time learning or even relearning java.

However, most people who have never programmed before have a very difficult time in these classes. Some of them work hard, or are able to understand the concepts easily. The rest fail. There were still people taking CS1 when I was taking CS3. Those were the people who didn't switch to being IT majors.

The reason for this I think is because java is an object oriented language. It is my belief that object oriented languages are indeed a fad. However not a fad like beanie babies or pokemon, they are a fad that doesn't go away. It will always be trendy to program in an object oriented language, however the real programming will be done in stuff like C.

Now object oriented languages are easier to code in, why would coding in C first make any sense? The reason is this. The first thing they teach you in CS1 (after they teach you to use UNIX) is how to use the static methods of the MATH class. They never teach the very basics of programming. People who weren't capable of writing a hello world were using objects. You have to teach the fundamental tools of programming before teaching object oriented concepts.

The structure of a file of code. How to print text on the screen. If, while, for, switch, int, char, double, float, String. People have to understand how to write a regular method before writing a class method. They have to learn how to declare a variable before writing a class with instance variables. The most important thing that is missing however, is pointers. Java has no pointers. When people have to switch to C after only learning Java, pointers fudge them up real bad.

So in conclusion Java is not a good language to learn as your first language. C++ is because you can be tought how to write code before you are taught objects and you don't have to change languages. Java forces objects, and therefore you can't teach fundamentals of coding without teaching object oriented concepts.

Java Applications considered harmful... (2)

Bonker (243350) | more than 13 years ago | (#154433)

I listen to Java zealots defend their chosen language day in and day out as the best possible lanuguage for any possible application. They tout its speed, portability, and power.

What they fail to recognize is that Java application environments are horrible. For example: I hate trying to set up any of the Freenet software, just because of the pain in the ass involved in making sure I have the fastest/best/non-proprietary Java VM installed. There are many more examples of people developing software that relies of Java.

If you have any sense at all, DO NOT TEACH Java as an application language, just because that means the rest of us will have to use crappy JVM-dependant apps once your students find their way into the real world. Use C, C++ if you prefer to get your students wet in OOP before structured programing, or Perl, which offers both kinds of environments.

Installing or running an application should never be more difficult than writing one.

Either would be better than what I got stuck with (2)

tewwetruggur (253319) | more than 13 years ago | (#154446)

For one, I was not a CS major. I was a chemistry major. But a programming class was required. My classmates and myself all felt that learning C/C++ would be more beneficial to us in the long term. The cirriculum required FORTRAN, since that was a "sience programming language".

The refused to budge. I took FORTRAN. I have never used FORTRAN. It was so much like BASIC on my old C64 I wanted to cry. I learned NOTHING (or, at least that's how it felt).

The next year, the cirriculum was changed to C/C++. I was rather pissed.

I am by no means a good programmer. I'm not even a crappy programmer. I do almost no coding. But, every time I look around, I feel that had I learned C I'd have been better off.

I've played with Perl, I've played with Python. I've not played much with Java. But even with just playing, it has felt more useful than what I had gotten out of FORTRAN.

It's all about complexity. (1)

Phredward (254393) | more than 13 years ago | (#154451)

I think part of the problem is, you don't want to ask 'which makes a better teaching tool' but 'which teaches what I want to teach, better'. It is only a side benefit to learn, say, the java class library, stdlib, etc. Your goal, while teaching, should be to teach people language concepts, not specific languages. Now, personally, I believe that teaching dynamic memory allocation (the kind that C does) is _very_ important, and if you learn java first you might be hampered by that. But on the other hand, java is a much simpilar (and more forgiving) language to learn under.

I had a lot of computer background before I got to college, tho, so C didn't intimidate me. I'm probably biased.

A good free Java Book (1)

AdamInParadise (257888) | more than 13 years ago | (#154454)

Free as in Free beer... []
This is a real book, not a 15 page tutorial.

Re:Java is also inappropriate (1)

AdamInParadise (257888) | more than 13 years ago | (#154455)

>8) Allows direct memory manipulation
>9) Disallows bad things like pointer manipulation
Direct memory manipulation without pointers? Want do you mean? Manual garbage collecting?

>10) Is assembly language
Duhh ? Why ? I know how a computer works, down to the CPU level, but I can see at all how such low level knowledge it could help me how to program in today's world (Ok IO from RAM is faster than IO from disk)

Seems to me like Java fulfills all your needs (well ok it isn't technically compiled), even if others could too (I'm thinking Python here).

Java in the business world (4)

AdamInParadise (257888) | more than 13 years ago | (#154456)

Remember that most software development is bespoke (i.e. it will never get out of the company that wrote, for whatever reason).

And I can tell you that whenever number crunching is not required, Java takes over. Java on the server is really gone rule the business world for the next 10 years (unless .NET...), thanks to Enterprise Java Beans and XML.

As a learning language, I would say that Java being easier to learn, it's easier to teach OO concepts with Java because you don't have to make sense of this huge thing call C++ first.

I'm taking Java (1)

Husaria (262766) | more than 13 years ago | (#154462)

Or rather took java in my intro cs classes. Alot of my friends who programmed before complained alot about it. How only applets and games were made with them, (bigoted opinions).
I liked the language, taught me alot about the OO concept. The garbage collector is a convience for those beginner programmers that would have to constantly worry about making a garbage collector, although, it would work against them in the future, being forced to learn it when they learn another language.
Java is an easy language to learn, compared to C++ and C.
One more thing, UMLs, if you want to teach how to make programs, my school puts in the idea of good design = good coding, so we have to sometimes make code from UML. UMLs were a help in learning the OO concept.

C++ Demand (1)

papskier (263483) | more than 13 years ago | (#154467)

It would be foolish, as far as preparing students for the workplace goes, for the Universities to cut out C++. A recent report from a consortium of HR and recruiting firms showed that Unix was the most in demand skill, followed closely by C++ in the runner up spot. Java was down at about 5 or 6 on the list of about 25. Anybody got a link to this report? It was about 2 months ago.

Java is also inappropriate (2)

Dancin_Santa (265275) | more than 13 years ago | (#154469)

CS is not about writing programs. It is about problem solving and computation. Java is no more appropriate than HTML in this sense.

However, since writing programs is the method of dealing with the above issues, it begs the question of what language would be the best to teach.

Ideally, a good language should have at least the following features:

1) Enforces good design
2) Supports procedural programming
3) Supports OO programming
4) Is compiled
5) Is interpreted
6) Is useful outside academia
7) Is limited, to provide students an easy foundation
8) Allows direct memory manipulation
9) Disallows bad things like pointer manipulation
10) Is assembly language

In short, no one language is good enough to take a student through all four years of schooling.

Dancin Santa

UW is switching over (1)

densun (266670) | more than 13 years ago | (#154470)

Java is going to replace C/C++ at the University of Washington starting next year. I don't think that's too good of a thing to do, when the majority of programming jobs use C or C++.

Java/C++ (2)

dachshund (300733) | more than 13 years ago | (#154481)

My college went from teaching C/C++ to teaching Java in their intro classes a few years after I'd finished them. Our experience with C and C++, however unpleasant those languages are to learn with, really helped people get jobs. Java is much less useful in this way. And while it's not too difficult to transfer from one to the other, I wouldn't trust a newly converted C++ programmer to write robust code farther than I could throw him/her. Moving from Java to C++ is a lot stickier than going the other way-- C++ to Java is almost effortless.

Java's like candy-- it takes care of so much of the annoying stuff that C++ programmers get used to dealing with. While C++ sucks in this way, if you're looking for a high-performance language you can't rely on a system with garbage collection and run-time linking. Not to mention that truly understanding what's going on with memory and pointers, while posing a steeper learning curve, really helps you understand how the machine deals with your programs.

Why not select language as appropriate for topic? (5)

hding (309275) | more than 13 years ago | (#154510)

For the express purpose of teaching OOP, why not use Smalltalk, which makes it difficult to fall into other methodologies and easy to use OO techniques?

But as a greater question, why restrict the field to one or a few languages? I'd think that in a CS curriculum (I insert the disclaimer that I came from mathematics and not from such a curriculum) one would want students to explore as many languages and paradigms as possible, ranging all the way from assembler to Prolog. This would presumably encourage a student both to develop many different ways of thinking about any given problem and to be able and willing to select an appropriate tool for any problem encountered. Far too often we see (as evidenced by responses on Slashdot to articles like this one) that many people are rather narrow-minded about language selection and unwilling to deviate from using their one pet language. Why not start to discourage that immediately in the course of formal CS training?

A good compromise (2)

tb3 (313150) | more than 13 years ago | (#154515)

Twenty years ago, everyone started off learning Pascal, so anything is an improvement :)
Honestly, I think Java is a good compromise. It is OOP, although more or less OOP is debatable given that it doesn't implement multiple inheritance.

Remember that we're talking about a beginners class here. C++ would put them into shock. The other alternatives are few, and not practical. For those who don't think there is money in Java, take a look at the sales of BEA Weblogic and IBM Websphere, and the corresponding numbers of developers programming on those platforms. Java is here to stay, the momentum has reached critical mass.

So, start 'em off with Java, and then toughen 'em up with C++. But for God's sake don't start with Visual Basic! (as I have heard some schools do)

"What are we going to do tonight, Bill?"

Too Many Important First Concepts for OO (2)

jeff67 (318942) | more than 13 years ago | (#154526)

In my mind, no OO language should be the first language taught. There are too many fundamentals which ought to be learned first. If students don't understand what's going on at the machine level, we may as well teach them in HyperCard!

Re:Proof: (1)

lyberth (319170) | more than 13 years ago | (#154528)

I wouldnt call using jave being 10 years behind, rather i would call it aheard: Many companies still use cobal or fortran or some other really old language because they just work

Java? Try Python! (1)

Tyler Eaves (344284) | more than 13 years ago | (#154541)

Python ( [] ) is a great language for beginners, and not-so-beginners :) Its features include:
  • Fast development time, which makes it more fun and productive.
  • Free (libre)
  • No compile step, although it is possible to 'compile' code on Macs and Windows so they can be run without a Python installation.
  • Fully object oriented.
  • Simple yet powerful syntax.
  • Cross platform
  • VERY powerful and flexible. I've done everything from CGI-based coporate helpdesk software to 3d rendering in Python. NB: By rendering I mean wireframe and non-shaded polys.
  • Many standard modules
  • Etc...
In short, use the snake :)

Intro OOP languages (1)

neutron2000 (409922) | more than 13 years ago | (#154544)

I much prefer seeing SmallTalk or any of several Lisp variants used as intro programming languages.

Aside from the interpretive nature of this languages (yeah, I know there are both C/C++ and Java interpreters) I think they tend to develop better _thinkers_, which is what is necessary.


You need to understand the machine first. (1)

catslaugh (443278) | more than 13 years ago | (#154569)

Generally, I recommend that people learn C first. C is a form of portable assembly language, and is a good introduction to giving orders to a computer. I've found that far too many programmers these days have no idea what's going on down on the bare metal, and you need that understanding to be an effective engineer. I get people coming in for interviews who don't understand why you would ever want to inline a function call.

Once you know C and have learned what it can do, C++ should be taught before Java. It gives you a lot of useful tools while keeping a fairly strict environment. In particular, it helps you think about memory management as you work with constructors and destructors.

Java insulates you from memory management, and pointer arithmetic, and the way it does so requires that you deal with its object-oriented libraries. As a language for teaching OO techniques, it could be effective once the student has learned the disciplines of C and C++.

(As an aside, the discipline taught by C and C++ is important when moving to more flexible C-based languages like JavaScript and Perl. Some people regard Perl as an abomination because it is extremely easy to write thoroughly obfuscated code in the language. I recommend that people writing Perl stick to C/C++ like syntax as much as is practical as a way of avoiding obfuscation. Once you take steps to avoid obfuscation-- which requires some discipline-- Perl is a very effective scripting tool.)

Good Teaching Language (1)

Phunky Monkey (443307) | more than 13 years ago | (#154570)

One word... Pascal.

Learning Language (1)

zoombah (447772) | more than 13 years ago | (#154579)

I've decided to lump them together as they deal with Java's use as a learning language, as opposed it's traditional use as an application language, and in many cases, which looks to be replacing C/C++ in this role

You're not the only one.
The AP Computer Science Course [] for high schoolers announced this year that in 2003, they will be replacing C/C++ with Java.

Understandability vs Power (1)

Violet Null (452694) | more than 13 years ago | (#154592)

Ok. Let's just get this out of the way:

1: Java is easier for a beginner to understand than C++.
2: C++ is more powerful than Java.

Now, with that said, Java as an educational language is a great idea -- in the beginning. In the beginning, you want a language that is easy to teach and, most of all, readable. Really, in my mind, teaching people about memory allocation and garbage management to people who still might be having trouble with references and indirection and double indirection is a waste of time. Java hides the complexity of the details, so that people can actually learn to design and think logically before they have to worry about more pragmatic concerns. After all, programming isn't about languages: it's about theory. Once you understand the theory behind a concept (be it classes, references, pointers, garbage collection, whatever), everything else is just keywords and syntax.

So I got to say: I would go ahead and teach the AP students Java. It's more likely to be useful to more of them than C++. And even if it isn't, the practice of good design skills will still carry over to whatever language(s) you learn in college/work. Sure, you can make the argument that Java hides a lot of stuff from the user, but the purpose of a CS course, in my mind, isn't to teach students about 'this' language or 'that' platform: it's to teach them about programming and computers in general. You want to show them everything under the hood? Don't teach them C, teach them assembler.

For the CS students, though, I think the question is kind of redundant: you don't learn one or the other, you learn both (and assembler, to boot). But I think a CS degree is a lot different from a CS AP class.

Experience from teaching (4)

absurd_spork (454513) | more than 13 years ago | (#154597)

I have been using Java for CS teaching for some time. It is not the funniest language for people to learn, mainly because you have to get yourself a thorough knowledge of Sun's standard libraries and their class hierarchy.

The main advantage of Java over C and C++ (and the reason why C and derivations are discontinued as teaching tools in my university) is it's relative platform-independence. When you want to test the programs that people have written at home, it's a real pain in the ass to get their Borland C++ programs running under Linux, you know. This disappears with Java.

On the other hand, Java is not the most highly structured language, especially in recent versions. That greatly lessens its didactic qualities; I have had several students here who started to experiment with all sorts of arcane features like inner classes and operator overloading without learning how to write good programs first. It's a bit like comparing Niklaus Wirth's original Pascal to Borland Delphi. Deplhi is more powerful, but you need a thorough knowledge of the class hierarchy and in order to deliver good OO programs, you have to be a good OO programmer beforehand.

Therefore, I now prefer either more systematic languages like Eiffel, or script-like languages like Python - the first for their higher level of abstraction and cleaner design, the latter for their greater ease of use and wider field of applications. Both are, in my opinion, better suited as didactic tools for learning OO programming.

And BTW, over here in Germany the high dependence on symbols such as {} or [] or /**/ is a didactic problem in itself because these aren't so easily reached on a German keyboard. This may sound harmless, but we get endless complaints from people who hate to perform strange Alt+Key acrobatics to get a simple thing like a curly brace.

Re:Too Many Important First Concepts for OO (1)

ruszka (456169) | more than 13 years ago | (#154602)

I'm going for my programming degree at a small college and so far the only programming class I've had is a semester of VB. It's required before moving on to any other languages. Although I was learning fairly well in the beginning, I found later on that I didn't really understand what I was learning. I would much rather see a class required before any programming classes that teaches the basics of programming, concepts, just how it works and why - I would have felt much more comfortable taking VB had I understood just what I would be doing and learning.

Algorithms first (1)

Anomolous Cow Herd (457746) | more than 13 years ago | (#154610)

I think just the opposite is true of teaching introductory Computer Science courses. One should teach students all about concepts such as OOP and data structures such as the hash table and binary search tree, not to mention the algorithms behind said structure. Teaching a course on what would amount to introductory OS design would be exactly the thing that you would NOT want to teach to first year people, as it would be confusing for first time CS people who are just getting into computers and programming.

As far as I'm concerned, Mr. DiBona is just trying to keep CS "1337" by scaring off people like the boys (and girls) that were in my AP CS class this year. They would have never stuck with it if they had to deal with crap like low-level memory management and buffers, which one really shouldn't have to learn today anyway, what with the easy availability of high level languages such as Python and Java and the abundence of computing resources (Moore's Law).

Java is too young and too bloody for intro student (1)

Gyrfalcon_255 (458304) | more than 13 years ago | (#154611)

I've been programming mainly in C++ for a while (with a smattering of Perl) but for a couple projects I have had the misfortune of using Java. I think that Java, while maybe a bit more of a "True" Object-Oriented language, creates a lot of bad habits. The way it's used is one heck of a lot different from C++ and things derived thereof. Currently, it's popularity stems from it's use in applets on the web. It's far too young to be basing our students on it just because they want to learn web programming.

Just my opinion, feel free to disagree here or in my email.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?