• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Why is Java taught in Universities?

Page 4 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: DWW
Originally posted by: RaynorWolfcastle
Originally posted by: DWW
Originally posted by: Ranger X
Java isn't as practical as C++ but they teach it so you can learn the concept of OOP. I think once you learn a language, the other languages aren't as hard to learn.

Ohh and also because Sun throws money at these Universities. 😀
The college that I graduated from now teaches strictly Java because of the generosities of Sun Microsystems. 😀

Sounds like when University of Waterloo started using MS languages in its curriculum (C# I think was the big one) after a generous donation. For those who don't know (Americans maybe) Waterloo is considered the northern MIT.

Ummm... I have some friends at Waterloo and they use Java for undergrad classes. It's a huge misconception that MS is forcing C# onto Waterloo, last I knew they told me that only a couple of C# classes were being given last semester. Also, Waterloo isn't the northern MIT, the people who go there like to think they are, though.

Uh well its been dubbed that from many people. It is Canada's equivalent at least supposedly and is rated year after year as the/one of the best in Macleans magazine and other ratings. Microsoft's first Canadian choice is Waterloo for hiring. Out of curiosity which school did you go to? Toronto? Simon Fraser? 🙂

Edit: And I agree with all the people who say that OOP is the way to teach programming. I learned the procedural way first anf OOP later, and I think that OOP is a much more modular approach that should be used for all but the smallest projects.

It is all opinion. What do you teach a future NASA shuttle pilot (who knows nothing)--how to fly a fast mach 5 jet or a single prop? Sure the jet is more real to his job, but the plane came first and it is those foundations which he/she should understand first and the basics of the subject.

Yes, Microsoft does hire a lot of people out of Waterloo and their software progeram has an excellent reputation because it is a very good program (and a coop program at that). That being said, I think people blow it out of proportion. FWIW, I go to McGill University and I'm an EE major so it's not that I'm jealous of Waterloo's Software Eng program or anything, I probably could have gotten accepted into Waterloo if I wanted to apply, but in the end I didn't think it was worth the trouble.
 
Why?
1. It's growing in popularity. Anything that isn't heavily limited by the speed of the machine (and with databases, sometimes things that are) can be done in Java with few worries. Even so, performance compared to C/C++ isn't terrible, and is getting better with each release. Simply because of the byte code it will never make it to par with C++, but as fast as computers are getting, if it can manage an average of 80%, it will be fast enough. Being a cross-platform high-level language, it can be made to do near anything on anything with minimal work (note: minimal != none).
2. OOP. Currently taking it, my only problem is that things get too tedious and complex before the curriculum gets into loading files. That really just screws w/ my head 🙂
3. GUI. It's got 90% of the ease of VB, without actually being VB. Anyone who has even beun to learn any other language will be able to tell you how VB sucks for all but the absolute most basic programs.
4. Transition to other languages. C and C++ are very similar to Java, and still widely used.
 
Anyone who thinks Java is useless isn't paying attention.
Do you know how many Java developers there are in this country?
Do you know what they do?
I'll give you a hint. Most of them aren't writing Applets or GUI-based apps.

As other's have said, Java is taught in universities primarily because it is a nice clean OO language. The vast majority of CS grads are going to be working on business apps. And for these kinds of projects, OO development has lots of advantages.

Some have pointed out that Java is slow. In many cases, that may be true, but it is important to remember when pure execution speed is important and when it isn't. For a large majority of business apps, the difference in execution time between C++ code and Java code is completely irrelevant because the rate limiting step is the database access or some other kind of network communication. If it takes one second to get a recordset from the database, who cares if your C++ code takes 3 milliseconds while your Java code takes 20 milliseconds.

Personally, I prefer VB.Net and C# for development.
They really are just an improved Java.
The thing I like about using .Net is that it gives you a powerful, completely OO language like Java while also giving you the fast easy GUI building you had in VB 6.
It's the best of both worlds and I think a lot of new development in the next couple years will be moving from Java to .Net.
 
Originally posted by: mugsywwiii
Originally posted by: Descartes
It's a fantastic language, that's why. Would you rather they teach you something more esoteric to limit the possibility of finding employment once you graduate?

Hey, I plan to use SmallTalk, ADA, Prolog, and CLIPS extensively... when I find a job. 🙂

CLIPS?? AHHHHHH!!!! :Q :frown: :| :| :|

You poor poor bastard.

Dave
 
I am going to disagree with almost all of you. Java as a language sucks. C is right up there too. You are all tackling this from a runtime perspective and not ease of use and flow. Just needing a ; for the compiler to work is the first strike against it. Both java and C seem to have obfustification in mind as a method of job security.

The easiest language I have used is Rexx. Too bad it was left incomplete by IBM (not because of anything Mike or his successor's did in the OS/2 project though) and has drifted off for the most part. Rexx was easy to teach basic programming with because of its english language instructions and easy formatting of data (everything was a string and length was what you wanted it to be). VB falls into that realm, but is not as easy to read.

I learned Fortran, BAL (Basic Assembler Language), and Basic first, but I really learned how to program with Pascal. I think it required semi-colons, but I have not touched it in about 20 years. It was one of the more basic 3GLs to use, but because of the ;, I just cannot give it a nod.

Java may be good for learning OO concepts, but then again, most of the other OO supporting languages have similar methods.

Oh, my favorite Rexx instruction... Do Forever
 
Originally posted by: gsellis
I am going to disagree with almost all of you. Java as a language sucks. C is right up there too. You are all tackling this from a runtime perspective and not ease of use and flow. Just needing a ; for the compiler to work is the first strike against it. Both java and C seem to have obfustification in mind as a method of job security.

The easiest language I have used is Rexx. Too bad it was left incomplete by IBM (not because of anything Mike or his successor's did in the OS/2 project though) and has drifted off for the most part. Rexx was easy to teach basic programming with because of its english language instructions and easy formatting of data (everything was a string and length was what you wanted it to be). VB falls into that realm, but is not as easy to read.

I learned Fortran, BAL (Basic Assembler Language), and Basic first, but I really learned how to program with Pascal. I think it required semi-colons, but I have not touched it in about 20 years. It was one of the more basic 3GLs to use, but because of the ;, I just cannot give it a nod.

Java may be good for learning OO concepts, but then again, most of the other OO supporting languages have similar methods.

Oh, my favorite Rexx instruction... Do Forever
So out of curiosity, what OOP language would you give the nod to?

 
Originally posted by: Shanti
Anyone who thinks Java is useless isn't paying attention.
Do you know how many Java developers there are in this country?
Do you know what they do?
I'll give you a hint. Most of them aren't writing Applets or GUI-based apps.

As other's have said, Java is taught in universities primarily because it is a nice clean OO language. The vast majority of CS grads are going to be working on business apps. And for these kinds of projects, OO development has lots of advantages.

Some have pointed out that Java is slow. In many cases, that may be true, but it is important to remember when pure execution speed is important and when it isn't. For a large majority of business apps, the difference in execution time between C++ code and Java code is completely irrelevant because the rate limiting step is the database access or some other kind of network communication. If it takes one second to get a recordset from the database, who cares if your C++ code takes 3 milliseconds while your Java code takes 20 milliseconds.

Personally, I prefer VB.Net and C# for development.
They really are just an improved Java.
The thing I like about using .Net is that it gives you a powerful, completely OO language like Java while also giving you the fast easy GUI building you had in VB 6.
It's the best of both worlds and I think a lot of new development in the next couple years will be moving from Java to .Net.

It's too bad it sucks donkey balls once it's time to run it.
Here's where I found the quote above by the way, great read, all true.
 
Originally posted by: SP33Demon

So out of curiosity, what OOP language would you give the nod to?

I liked the OO Rexx that they were developing (it had a cool visual interface, but died with OS/2), but OO tends to be a bit rough on the edges for me. Must be all of that structured programming 😉 . I am not sure I have a favorite because some of the OO stuff is not that intuitive for me (I mean in creating reusable code, not using it.) I never delved extremely deep into OO unless I had to.
 
Originally posted by: Cerb
Why?
3. GUI. It's got 90% of the ease of VB, without actually being VB. Anyone who has even beun to learn any other language will be able to tell you how VB sucks for all but the absolute most basic programs.

No, you are absolutely incorrect. I'm not going to even touch this argument again, but you're welcome to search the archives in the software forums for this "VB sucks for all but the absolute most basic programs" nonsense that has been posted a thousand times.

4. Transition to other languages. C and C++ are very similar to Java, and still widely used.

Again, absolutely incorrect. There are many languages that have syntactic similarities with C and C++, but that is where their similarities end.
 
Originally posted by: gsellis
Originally posted by: SP33Demon

So out of curiosity, what OOP language would you give the nod to?

I liked the OO Rexx that they were developing (it had a cool visual interface, but died with OS/2), but OO tends to be a bit rough on the edges for me. Must be all of that structured programming 😉 . I am not sure I have a favorite because some of the OO stuff is not that intuitive for me (I mean in creating reusable code, not using it.) I never delved extremely deep into OO unless I had to.

Ok, so you don't understand OO. How are you then qualified to say Java sucks, especially when you like a language that appreciates probably 0.01% of the usage that Java does?

I can understand someone saying they don't like something, but why do ignorants always use such language (e.g. "It sucks") regarding something they know nothing about?
 
I have never learned a speck of Java. I can graduate with a BSEE without looking at a single line of java code.

First semeter they start all the freshman on a psuedo-assembly machine. It's a fictional computer (LC3) and they strongly emphasize computer architecture. All the programing is first done in binary (for really simple stuff, like division through iterative subtraction) and then in LC-3 assembly, which only has 16 opcodes, and is designed so that certain exercises that are painless in other languages are exceeding annoying. The emphasis was on how the architecture parses the opcodes and does the fetching, which memory addressing mode it uses, how subroutines are stored on the stack, and so on. The second semester course is in pure C, no C++ is even addressed. The emphasis is on pure memory management, heap, stack, things like that. Third semester is embedded design on a MC6812A4, a fairly primative motorola chip (4 GP registers, WTF where they thinking?!?!?) and some of the programs in that class get pretty intense, like a binary-tree command line interpreter. I have a C++ data structures course next semester, and that's the end of my programming (in general).

The way this cirriculum is designed is new. They use to teach C/C+ then go back to assembly up until three years ago. The professor that designed this cirriculum often hangs around campus, and there were times that I've talked to him about why our program is so different from the norm. He told me it was because that his students when he was at Michigan (his prior school) took things for granted, like the stack and subroutines. He said, "the problem with teaching the higher-level languages first is that it is harder for students to grasp why their stuff doesn't work. For example, a lot of students treated recursion like it was magic, they had no clue why it worked the way it did and to right a recursive program on their own seemed much harder than an interative solution although in many cases the recursive solution was better. Because they didn't know how everything tied together, I felt a need to do teach them the hardware.

A search of his patents shows some of the work he does, and might give a clue why he feels this way

Of course, this is for EE. And obviously we do more embedded stuff than CS people.
 
Because we ignorants don't like the syntax of the language?

Here is an example of REXX OO that counts the words in a file from an IBM doc. Just like java, with methods, etc., but look at the code. "Words" tells me how many space/blank delimited words are in the linein. I could then reference each with "word".

parse arg path /* Get the file name */
count=0 /* Initialize the count */
file=.stream¡­new(path) /* Create a stream object for the input file */
do while file¡­lines<>0 /* Process each line of the file */
text=file¡­linein /* Read a line */
count=count+(text¡­words) /* Count blank-delimited tokens */
.output¡­charout('.') /* Write period to STDOUT */
end
say ''
say count

I do not need semicolons in the structure. Although I sometimes like brackets, I find them annoying at othertimes, especially debugging other peoples code with them inline.

I found this example on the web at Drexel...

class FileIO {

public static void main(String[] args) {

System.out.println("Enter some numbers.");
StreamTokenizer st = new StreamTokenizer(
new BufferedReader(new InputStreamReader(System.in)));
File f = new File("temp.out");
int numberCount = 0;
try {
DataOutputStream dos = new DataOutputStream(
new BufferedOutputStream(new FileOutputStream(f)));
while (st.nextToken() != st.TT_EOF) {
if (st.ttype == st.TT_NUMBER) {
dos.writeDouble(st.nval);
numberCount++;
}
}
System.out.println("numberCount=" + numberCount);
dos.flush();
dos.close();
DataInputStream dis = new DataInputStream(
new BufferedInputStream(new FileInputStream(f)));
for (int i = 0; i < numberCount; i++) {
System.out.println("number=" + dis.readDouble());
}
dis.close();
} catch (IOException e) {
System.err.println("FileIO: " + e);
} finally {
f.delete();
}
}
}

Elegent, but a little obtuse at first read and the structure is confusing for a virgin programmer. Maybe if I had written my response in latin? 😉
 
Syntax is just a matter of memorizing keywords, the important thing is what those commands actually DO. Scripting languages use easy syntax's with real english (like Tcl), but they are not as robust or powerful at C++ or Java. There's always a tradeoff. Personally I prefer a language that has rules like class.method(), so its consistent across the board instead of using keywords for everything.

I can graduate with a BSEE without looking at a single line of java code

I know a couple of CPE's and EE's who love assembly and basic because its barebones. Java was definately not made for the applications those programmers would ever use. Java is powerful when used it the right context.

Transition to other languages. C and C++ are very similar to Java, and still widely used.

Um, I'd have to disagree on the transitioning to C++ part. Java and C++ have nearly the same syntax and they are both OOP, if you just took a book and read up on how polymorphism, casting, inheritence, pointers and classes were different you'd have the language down in no time. The hardest part would be the fact that C++ sucks.
 

It's sort of true, but it's written from the perspective of a VERY narrow minded BOFH-like unix admin. These are the guys who seem to have no critical thinking skills and need everything spelled out for them.

For instance, he laments about the useless error messages of Java and cites as his example:
devweb02:~$ tar xf qwertyuiop
tar: qwertyuiop: No such file or directory
Is useful.

devweb02:~$ jar xf asdfghjkl
java.io.FileNotFoundException: asdfghjkl (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:64)
at sun.tools.jar.Main.run(Main.java:186)
at sun.tools.jar.Main.main(Main.java:904)

Is NOT useful.

I bolded the relevant portion. You would have to be retarded not to realize that they both say the exact same thing, just the Java error includes more data which is admittedly useless. He claims he could be confused if there is more than one Java process since it doesn't specify the that it was the jar command that failed, but it's pretty obvious that if you try to jar a file called asdfghjkl and you see an error "java.io.FileNotFoundException: asdfghjkl (No such file or directory)" that the two are somehow connected.

Or:
It's confusing. The file is named HelloWorld.class, but you can't call it that.

It's a syntactic rule. When invoking a java program, you leave out .class It's quite simple.
"It's extremely un-Unixy" woopdeedoo!

It's hard to take this guy seriously. All I can think of is Dilbert: "That scruffy beard... those suspenders... that smug expression....You're one of those condescending Unix users!"


 
The whole virtual machine concept makes it very portable but at the same time very slow. It's one of the basic object oriented languages as well and it's more up to date than c++. It does threads too. So I guess for the whole package and variety it's got more to show a new student than some languages.
 
sorry for not reading the whole thread, but here is my opinion:

C++ is better for learning OOP, i think.
Who cares what the teach in universities? The more you know the better right?
 
in my 1st qtr at college, they taught me c++ as my introductory language. after that, they changed the standard to java so all my classes have pretty much stressed java since then. imo, i think c++ is a better language to learn first than java. i just feel that C++ is a more complex OOP language and learning its constraints can better prepare you for other types of programming languages. Java is just all vanilla to me. I noticed that a lot of the younger undergrads are struggling with C++ in higher level courses since they were never introduced to C++.
 
I have been doing this long enough that I should have remember that like religion and politics, you do not discuss OS's and PLs in public. 🙂 Lately, I have decided that I should add CPUs to that too reading some of the foamings from cramitpal.

Remember, there is no such thing as gravity. The earth sucks.

It is not a vacuum, space just sucks.

For the surfers... Pipeline sucks. (this is not a broadband reference)

Happy Descartes? 😉 Having fun with you, so don't take it personally.
 
I hate to say it but for the most part University's teach what the students want to learn.

When I was in school we had alumni come back and tell us what the business world
was using. The professors also asked us what we wanted to learn, obviously within
reason. Most of us didn't want to learn about some of the more difficult and less used
languages and theories, but when we wanted to learn about newer things, they would
try to accomidate our requests.

Even after I graduated, my professors would ask us to keep them informed of what kind
of work we were doing, and anything we felt the current students should need to learn.

Though I am not sure how my school would deal with the C# and .NET stuff since, we
worked primarily on Solaris boxes.

I won't begin to try to say what the best language for OOP is, because I don't use OOP.
I work on embedded software and hard real time systems. So OOP sucks, joking,
OOP is just not the solution to this work. People have tried to redesign things to be more object
oriented but so far it hasn't been successful, basically a colossal waste of money. But I know
OOP has its place, its just not with our work.
 
Originally posted by: gsellis
I have been doing this long enough that I should have remember that like religion and politics, you do not discuss OS's and PLs in public. 🙂 Lately, I have decided that I should add CPUs to that too reading some of the foamings from cramitpal.

Remember, there is no such thing as gravity. The earth sucks.

It is not a vacuum, space just sucks.

For the surfers... Pipeline sucks. (this is not a broadband reference)

Happy Descartes? 😉 Having fun with you, so don't take it personally.

Yes. :beer:

I don't have a problem with people having opinions, but it just irks me when someone asks for legitimate opinions on a language and gets responses like "it sucks." It happens all the time in the software forum, and you'd think I'd learn to just ignore it by now 🙂
 
Programming? Who does that?

Although, when I do need to program, I usually use HTML. Sometimes I'll even use CSS if it's for a bigger project. I did learn other languages though. I started on C, then did C+ and I'm learning C++ now. We'll see if it works better than HTML.

What the hell is C#? I've never heard of that.
 
OK, I will take another twist at this and drift from the topic:
This are my opinions and you may think they... err.... And, some of them are not languages but environments...

Easy to read and type: Rexx

Coolest wierdness because a=b+c; c=a+b; (circular reference) can be solved: IFPS (Interactive Financial Planning System - since bought out and renamed)

Coolest nerdy stuff because statistics are fun: SAS

Coolest mainframe piece because they started doing basic graphics(they were not first): SAS

Obfustifcation Magnificus: C (you can make the coolest code, do the strangest things, and hardly anyone understands it when you do it.)

Obfustifcation Magnificus++: C++ (although java is a contender)

Coolest programming interface: VB (just because it was sort of the biggest first one)

Dumbest programming interface: VB

Hardest programming interface to explain to someone who has never written Win32 code before: VB

Full Metal Jacket nerd language: Assembler (370 BAL or 8086)

Too much free time, but wow: Machine language

Coolest commandline: LISP (first one I ever saw that would complete your statements for you back in 1989)

Language most deserving of extinction but you can't kill it (HEY! Maybe a new version should be released and called Jason or Freddy?): COBOL

As noted before, coolest instruction: Do Forever (although I have always like i++😉



 
Originally posted by: Jzero

It's sort of true, but it's written from the perspective of a VERY narrow minded BOFH-like unix admin. These are the guys who seem to have no critical thinking skills and need everything spelled out for them.

For instance, he laments about the useless error messages of Java and cites as his example:
devweb02:~$ tar xf qwertyuiop
tar: qwertyuiop: No such file or directory
Is useful.

devweb02:~$ jar xf asdfghjkl
java.io.FileNotFoundException: asdfghjkl (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:64)
at sun.tools.jar.Main.run(Main.java:186)
at sun.tools.jar.Main.main(Main.java:904)

Is NOT useful.

I bolded the relevant portion. You would have to be retarded not to realize that they both say the exact same thing, just the Java error includes more data which is admittedly useless. He claims he could be confused if there is more than one Java process since it doesn't specify the that it was the jar command that failed, but it's pretty obvious that if you try to jar a file called asdfghjkl and you see an error "java.io.FileNotFoundException: asdfghjkl (No such file or directory)" that the two are somehow connected.

Or:
It's confusing. The file is named HelloWorld.class, but you can't call it that.

It's a syntactic rule. When invoking a java program, you leave out .class It's quite simple.
"It's extremely un-Unixy" woopdeedoo!

It's hard to take this guy seriously. All I can think of is Dilbert: "That scruffy beard... those suspenders... that smug expression....You're one of those condescending Unix users!"

I don't considder myself a BOFH kind of admin, but I agree with hom on every point, though I do think some are more important than others.
For example, having to type "java Blah" instead of "java Blah.class" is no biggie, even though it makes no sense whatsoever to me, and it does break years and years of thinking.
Being able to type neither "java ../Blah" nor "java ../Blah.class" annoys me as well, again, it's no biggie, but it is annoying and makes no sense, from an admin/user point of view.

As for the error messages, that particular one is of course understandable, but I've seen so many useless error messages about NullPointerExceptions, Throwable's, etc etc etc, I'd be richer than his Billness himself if I got a buck for every one.
They just don't make sense.
I guess a programmer could make some sort of "error message wrapper" that actually output something useful, but I've yet to see one.

And, as I've said before, Java(well the JVM's for *NIX) seem to assume every computer out there ahs a couple of gigs of RAM, they just eat it like there' no tomorrow.
Same goes with GUI's, an awful lot of admin GUI's for various applications seem to be written in Java these days, SMC for one, DB2's admin tool is another example, and they run like complete ass.

In the end, Im no programmer, Im sure it's a lovely language, but for me as a user and admin, it's absolutely horrible in just about every possible way immaginable.
It's not even portable, like the guy said, it seems like even minor version numbers of the JRE/JDK can make a huge difference(1.4.1 to 1.4.2 under Linux for example).
 
Back
Top