Java is often found in academia. What is the reason behind that?
locked by ChrisF♦ Aug 10 at 12:24
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.
closed as primarily opinion-based by amon, MichaelT, jwenting, Bart van Ingen Schenau, Kilian Foth May 6 at 9:50
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.
A few Universities have somebody who's sufficiently well known that many (if not most) decisions revolve around that person's likes, dislikes, opinions, taste, etc. Just for example, Texas A&M has Bjarne Stroustrup on staff; it probably comes as little surprise to anybody that their curriculum tends to emphasize C++.
Most universities are a bit different though. First, decisions are often made much more for the benefit of the faculty than the students. The single biggest criterion in many cases is "which language requires the least effort on our part?" Most of them are also careful in their laziness -- they want not only the language with the fewest advanced concepts to learn, but also one that is (for example) the slowest to innovate, update, or embrace anything new.
Second, most decisions are made by committee. This means the final decision is rarely (if ever) what anybody actually wanted -- it's just what the fewest members of the committee (especially those with the most influence) found particularly objectionable. It's like picking a flavor of ice cream. One really likes strawberry, but another is allergic to strawberries. Another really loves chocolate, but somebody else can't stand it. Yet another thinks rum raisin is great, but the other two worry that mentioning "rum" would be interpreted as encouraging alcohol abuse -- so they end up with vanilla, even though it's not what anybody really wanted.
Finally, even though it usually runs directly contrary to most of what the previous two criteria would produce in isolation, they generally need (or at least want) to be seen as responsive to the needs of industry.
Java is the intersection of these three:
Note that I'm not really saying (for example) that there's nothing more to know about Java than the most basic notion of what OOP is -- only that that's all that's needed to do what passes for an acceptable job of teaching it.
I studied Computer Science during the early nineties right before Java came out. The approach followed by our professors was the following.
First year: introductory course about programming and algorithms in Pascal. Why Pascal? Because it is a clean language designed to teach the concepts of programming without facilities for hacking. Of course we students knew that the most popular language at the time was C and that there was a new language with growing popularity: C++. So we were reading and discussing about these languages all the time and doing small projects using them on our own. So the idea was: at class we do the serious theory (Pascal) while at home we learn how to hack (C). :-)
During the second year we had an operating system course in which we were asked to do the exercises in C and assembly. The professor did not give us a complete course on C (just a few lessons) because (1) we had already had a course on programming during the first year and (2) he said that every computer scientist who knows the concepts of programming should be able to read a book and learn a new programming language. The course went pretty smoothly and we all found it normal that C and assembly were practical topics that you learn by yourself or discuss in the corridor with other students but were not worthwhile making a course on.
During the third year we had a course on programming languages, in which we studied the different paradigms of programming languages (imperative, functional, logical, object-oriented), we learnt general concepts and implementation techniques, and revised major programming languages (Pascal, C, Modula2, Simula, Lisp, C++, Prolog). What our professor told us at the beginning of the course was: you should not evaluate this course by thinking about how many programming languages you know at the end of the course, but rather about all the general concepts that you have learnt, how they are related to each other, what they are good for, how they are used in which languages. Then, learning a specific language is just a matter of reading a book, looking at existing code, trying to use it on a specific project, and so on.
I found this approach very appropriate and effective. I do not think that university should aim at preparing good programmers but rather at giving a good knowledge that allows to understand programming and programming languages. Becoming a good programmer will just come as a side effect of that. I am now considering applying for a job where Ada is required and I am not scared by it, even though I have never done any serious programming in Ada before.
Going back to the question of teaching Java. I guess Java is often used for teaching because it is neutral enough and allows to explain the principles of programming using a language that is also close to the world of industry.
Personally I would still use Pascal or a similar language for a first course, because that would allow me to distinguish between control structures and data structures, which in Java / object-oriented languages are tightly integrated. So, in my opinion, Pascal would allow a more gradual introduction to the basic concepts of programming.
Also, a computer scientist (and a good programmer) should know about basic mechanisms / runtime structures like the stack, the heap, parameter passing, memory allocation, pointers, or how to implement abstract data types without using the built-in facilities of the language (lists, sets, and so on). Java takes much of this away from programmers (that's good, of course), but a beginner should learn about these things. Maybe after a first programming course in Java one should also take a more general course on programming languages concepts.
This are just my experience and opinions.
I was in school when Java came out. And my university almost changed overnight. People were out right giddy at Java in academia. I was a Jr when it came out, and by the time my senior year, almost all academia was quickly moving to change their curriculum. Not just at my university but everywhere. It was really that fast. Our second intro course was Pascal, and that quickly converted to Java in less than a year. Why did they convert so fast? Two big reasons.
One academics want to teach the theory and algorithms. Languages that facilitate you learning those algorithms that don't need a lot of experience to operate are best: Scheme, Python, Java, Smalltalk, etc. The more the language gets in the way the more distracted you are from learning the real algorithms. At the time scripting languages were second class citizens frowned upon by employers as cheap or quick and dirty. Academics saw them as more copy cat, but what employers want has sway with academics too.
That brings us to the next reason. Employers want certain language experience, and at the time that was C/C++. But, C/C++ takes a lot of experience to learn, and has a lot of corner cases and if ands or buts that are distracting. We learned courses in C/C++ but not at the lower levels. At the time employers were mad at CS programs because students didn't come out being C/C++ gurus.
Java was sweeping through the industry too almost as fast as academia. So finally academia was getting what they wanted. High level language that was easier to learn, and a language employers wanted. It was all too perfect. I had a friend return to academia maybe 3 years after I left, and he said you could find a Java book in every CS subject. That's how fast Java took over academia.
Personally I think Java hasn't dumbed down CS I think it's actually been a good thing because students can study CS, participate in Open Source, and find work even while their in school. I still believe you should study lots of languages as a CS student, and that shouldn't just be Java. But, if they all used python Joel would hate on python too.
There's a few reasons for that including:
Do note that there are a number of schools who teach C# for many of the same reasons. There are many more reasons, some of them more particular to the individual school. In essence, Java has become the object oriented "BASIC" of yesteryear.
I have heard the following said many times: "a Computer Science degree isn't a degree to learn programming, it is to learn the theory". The language doesn't necessarily need to matter (although it shoudln't get in the way) as long the theory is being learned. Java is a relatively easy language to pick up and that allows for more time to be spent learning the theory behind everything. This is one of the reasons that MIT uses Scheme (so I've heard).
Many of the answers given above are good ones, but they leave something out.
Java is a multiplatform language. One student can use his Mac, another her PC, and another her student Unix account. The same code will do the same thing. Think how much easier that is for both the teacher and the school's IT department to support.
This was the real importance of Java when it came out. The joke was "Code once, debug everywhere", but it really does take hardware and operating systems out of the equation.
I've heard professors say they use java to teach because:
Personally I'm glad I took CS at Berkeley when they used Scheme to teach. Although I didn't realize how elegant of a language it really was until a few years later.
A little background
I took the only Java class offered at our school. This was late 90s to early 2000. Java was growing but hadn't nearly taken off. Coming from a lot of development in C, I was a little frustrated with all the boilerplate code need to get Java up and running. I couldn't focus on my task. I couldn't just open a file with "open". I had to define the class and then the imports, etc, etc.
I was computer engineering, so I took assembly programming first and then C and then C++, Scheme, and that one Java course. It was mostly a C oriented school program. The algorithms class was taught using C.
When I went into industry, Java was clearly the dominant player. Maybe it was the only player during the conversion from backend COBOL systems to Java web business applications. Java made huge strides in the business world during the early 2000 days.
At the same time, I didn't know all of the Java frameworks but I knew how to code and adapt to the Java environment. If I took training courses on good Java coding standards, I probably could have started out with better Java style or knowledge of the Java ecosystem.
In retrospect, I don't think it matters.
To answer your question: Why do we study Java at university?
Java should be taught but not used in all courses:
You should learn Java at some point in college if you are learning computer science. It is popular in the business world. You should learn Java and maybe C#. I wouldn't ABSOLUTELY would not teach Java as an introductory programming course. And Java should certainly not be the primary language used across all courses.
On Java criticism:
Java receives a lot of criticism and it always has. I have been reading Java magazines that mention Java with a question mark, "Is Java ready for the Enterprise?". The Java platform is still a widely used platform. But, for most general programming tasks, Java works fine. And there aren't any major issues with using Java. It won't hurt your skillset. It might if you just rely on the Java libraries without learning what goes on underneath. But Java doesn't cause any kind of brain damage (some developers actually believe this to true).
Plus, why don't developers attack C or C++? Or at least C++. The imperative programming paradigms are very similar. And I wouldn't ever consider writing a webapp in C++ but I might with Java.
Here is how I would setup a curriculum:
The languages I listed in my curriculum are pretty common. A lot of schools are teaching multiple languages without issue. In industry, you will will use many different programming languages. You will use languages you haven't even heard of.
The topic of Java in schools isn't an issue unless they completely want to shield you from Java or they want to teach ONLY Java. In both cases, the schools are unjustified.
(Sorry Ruby lang)
Sorry, long boring answer only:
(1) Did you mean:
"Why do we study Java at university, as a first programming language ?"
(2) Or do you mean:
"Why do we study Java at university, anyway, even if we learn other programming languages, before Java ?"
Sounds like you really mean both questions.
In case of (1):
I don't think Java (or .NET C# and Visual Basic) should be teach as first programming languages. Structured & Modular Pascal should be first, even if it sounds old & obsolete.
Many people think we should teach people Object Oriented programming or Functional programming inmediatly, just because its "hype" or "trend".
I learn Structured Pascal as a small version of "Object Oriented Programming", not as something similar. I see an structured program as a single small object.
After that, I suggest continue Functional languages and Object Pascal.
And later, C, C++, C#, VB.Net, Java.
The main reasons I don't like Java or C#, as a first programming language, its that they have mix "pointers", "pointers to objects" and "objects" themselves ("references") concepts.
I believe that students should have in mind, the differences & similarities among those concepts. The comparison of Strings objects in Java is a good example of that odditie:
In case of (2):
I think Java or C# should be teach in school, because they have several updated good features, and at the same time, they have real world use.
I cannot disagree more. Java was language at my college that you had to take to get into the CS&E program at my school. Java is extremly easy to teach. Because you can limit yourself to certain concepts that "non-programmers" can learn.
I also can't tell if you would or would not ABSOLUTELY teach Java as an introductory programming course. You basically said you would NOT ABSOLUTELY WOULD NOT teach it?
The simple reason has already been explained. Java has no license fees. You can teach it using a basic test editor. Its used for the wrong reasons certainly.
I disagree with a previous answer, that Java has not made the students passing it "dumber", it really shows when they have problems with realatively simple concepts like arrays and lists in C++.
The switch from C to Java happened at the wrong time.
Somewhere around 2000. I was in the last C class at my university.
I feel compelled to add to the answers here as I don't really see any of these answers actually covering my perspective.
IMHO, the language that is used to teach programming to students is an indicator of the times that we currently are living in. For example, during 1980s, Assembly was the low-level language while C was considered to be a high level language.
During 1990s, C++, Java, Perl and such languages gained importance primarily because much higher level than C and embodied rapid development principles. So they kinda stopped teaching Assembly to the CS students and taught C as a way of expressing algorithms. Slowly that has changed over the last decade where C is considered too low-level language to capture the essence of algorithms effectively and without too much of 'systems' know-how. This is actually extremely important as the focus of a CS curriculum ought to be more 'theoretical' than practical and every time someone wants to write an algorithm, if he/she gets bogged down with memory allocations and pointer arithmetic then you'll not get anywhere.
Even today if you're in a Masters CS programme, you would have to complete certain 'Systems' requirements (atleast in the US and this should not be very different for US universities) which needs students to be able to program systems level applications and in certain cases as deep as kernel level hacking to actually pass the requirements. So, although C is not the defacto language being taught in schools, it is relevant if you'd like to specialize in say Systems or High Performance Computing or such niches.
I would also like to mention another point is the C requires a lot of discipline to get things right while languages such as Java are a little relaxed about such constraints. This makes it easier to conduct courses without requiring the RA/TAs to launch GDB to debug a student's program :)
I think a large part of it is that's what's being used in the industry.
My CS program had an Industrial Advisory Board, made up of senior staff from local tech and aerospace companies, and they had a lot of input into the curriculum. The intro CS classes dropped Pascal in favor of C the year I started (1986), largely at the behest of the IAB. Similarly, there was a push to teach Ada in some of the higher-level courses since the local aerospace companies were having to use it for DoD work.
Java's pretty ubiquitous now, especially now that Android devices are taking off. It sucks from a didactic perspective, but then, so did C.
Because they hope that less students will fail the course, which is a FAIL in itself, IMHO. Maybe one of the reasons why almost no one takes University degrees seriously any more, at least here.
Java is too simple of a language, and doesn't teach the PC has limited resources paradigm. While at the same time forces into "there is nothing that can't be solved with another layer of abstraction" line of thinking.
Yes, it's good for OOP concepts and toy problems, but it teaches to approach the problems from the wrong angle. Use neat construct here, screw the rest.
But academia is known for being dreamy about AI, OWL and other toy technologies. While they keep researching such things, sometimes, someone invents something amazing there as well, but if you want to be a good developer you have to learn that independently.