login about faq

Taken that nullpointer leans towards more subjective questions, a thought just popped into my head - why do they still teach Java given that Ruby and Python are also object oriented?

Btw, I've found that some science high schools are teaching Python, so why not make python the standard?

I'd love to hear from faculty/teachers/ students and their opinions. Maybe with enough balls running, finally it would be fun to learn computer programming. In my opinion they shouldn't make it hard for people who will be programming first time to learn OO.

To me java is like C which is like a super hard thing to make people learn, not unlike Python. Then when you teach python or ruby, it would make people more "happy" IMHO than Java which is very verbose/serious/difficult in its implementation. This is my opinion. Anyway, any suggestions? Java people just tend to make scripted languages a little less fun - IMHO.

This question is marked "community wiki".

asked Sep 08 '11 at 11:32

whatever's gravatar image

whatever
1.1k1117

wikified Sep 13 '11 at 13:45

Which college and universities are you referring to?

(Sep 08 '11 at 13:42) Randell ♦♦ Randell's gravatar image

ateneo, la salle, UP. they're all java for data structures and everything.

(Sep 08 '11 at 13:49) whatever whatever's gravatar image

if i'm not mistaken, these three do java. but mostly nag jajava ang universities. of course they offer a lot of other programming languages but i mean for fresh men they teach it for OOP. IMHO python is easier to teach for OOP and as well as Ruby. It's just one line. I don't get why they purposely pick a difficult language (at least for me). Anyway, java basics is easy, sure. Then there are a lot of tutorials on java and it was once open source.

(Sep 08 '11 at 13:52) whatever whatever's gravatar image

oh and this question would be meant for those teaching CS/MIS/IT in their respective curriculums. gayahan lang ba or is it hard to revise curriculums, so that's why everyone is on java for OOP for first year..

(Sep 08 '11 at 13:55) whatever whatever's gravatar image

There are some low level things in programming that are better explained in c/c++ and java. In Python and Ruby, a professor might just say when you set a variable it gets collected and you don't have to worry about it. While in c family, students will actually alloc/dealloc memory and IMHO gives you clear understanding of nitty gritty + discipline and quite a bit of different mindset.

(Sep 08 '11 at 15:40) Marconi Marconi's gravatar image

@marconi, you may post that as an answer. =D

(Sep 08 '11 at 15:41) Randell ♦♦ Randell's gravatar image
1

Right, I'll just edit my first one below. :)

(Sep 08 '11 at 15:43) Marconi Marconi's gravatar image

[java] for (i = 0; i < arrayOfInts.length; i++) { if (arrayOfInts[i] == searchfor) { foundIt = true; break; } }

vs [python)

if( searchfor in arrayOfInts) : foundIt = True

If there are short cuts, why not use them? what part of lists would I not understand if I shortcutted it? i know that a list will contain a list of values, just that i find the last statement easy to understand. (then again, I just wish that courses were flexible, OOP in Java or OOP in Python, which do you want? okay, there we go)

(Sep 09 '11 at 13:49) whatever whatever's gravatar image

@redshift, I believe this follow-up question has been answered in Marconi's post. If you want concrete examples of things you'll be misssing for this specific case, it's better to post this follow-up question on a new thread.

(Sep 09 '11 at 14:06) Randell ♦♦ Randell's gravatar image
1

Java has a first mover advantage. And if you used Ruby on Rails, I think you need to subscribe to some kind of religion/philosophical methodology for you to be able to use it. And do you want your students to be exposed to DHH? ;-) http://www.hanselman.com/blog/DontGiveBileAPermalinkFindingBalanceWithinTheNoAssholeRule.aspx

(Sep 10 '11 at 09:08) Michael Buen Michael%20Buen's gravatar image

You're confusing Ruby with Rails. Ever heard of MINSWAN?

And besides what's wrong with subscribing to a methodology if it works in the proper context?

(Sep 10 '11 at 17:32) Bryan Bibat Bryan%20Bibat's gravatar image

I'm not confusing Ruby with Rails. Ruby is fine. It's just that Ruby on Rails is the face of Ruby right now, and comes with it is a leader whose personality is a bit strong for some people. "And besides what's wrong with subscribing to a methodology if it works in the proper context" <-- I'm not complaining on this, just matter-of-factly there, that some will find other languages (notably PHP, Python, or Java if you may) more approachable(there's no gazillion of things to setup/configure or subscribe to certain methodology) and/or consquently has lesser learning curve

(Sep 10 '11 at 18:37) Michael Buen Michael%20Buen's gravatar image

Ruby will have a place in computing (if it still hasn't), Matz complied with facial rule :-) http://blogs.microsoft.co.il/blogs/tamir/archive/2008/04/28/computer-languages-and-facial-hair-take-two.aspx

(Sep 10 '11 at 18:50) Michael Buen Michael%20Buen's gravatar image

"..some will find other languages (notably PHP, Python, or Java if you may) more approachable(there's no gazillion of things to setup/configure or subscribe to certain methodology)"

Er.. that's the point of Convention over Configuration. If you're going to use a framework that gives you free reign over what you can do, you're going to have gazillions of things to configure, and vice versa. AFAIK, there's no framework that gives you both without compromise.

(Sep 11 '11 at 14:09) Bryan Bibat Bryan%20Bibat's gravatar image

yo michael use the answer thingy so we can add points. yes and that methodology is based upon the agile method, the MVC way of organizing code, and also some OOP. then there are alternatives to all frameworks (of course!) - one rails alternative is sinatra (microframework though). The reason to have a certain philosophy is if you say you're a RoR guy, any company using looking to maintain their RoR application can get you, vice versa. compare this to if you're not rails, then you can't get the job because you don't know where to start or what it's all about.

(Sep 11 '11 at 15:08) whatever whatever's gravatar image
2

@redshift: If I may clarify your question.

  1. What OOP concepts have you learned in Ruby (btw I think Rails should not be part of this question as it is not a language) or Python that you had a hard time learning in using Java?

  2. "IMHO python is easier to teach for OOP and as well as Ruby. It's just one line." Can you expound on this? IMO, language verbosity has nothing to do with OOP concepts. As rain mentioned Python and Ruby usually hides the details w/c might teach OOP concepts better.

Also I would like to say that Java is still open source.

(Sep 15 '11 at 01:23) bobsantos bobsantos's gravatar image

Sorry if I'm sounding like a grouch here, but isn't the question regarding learning OOP? It gets confusing, especially to those who are not familiar with what you guys are saying (e.g. RoR, agile methodology). And I think this stemmed-out because of the title, which should have not included Rails as it is not a language.

Also, I think agile doesn't have anything to do with "convention over configuration" but that's another topic.

(Sep 15 '11 at 01:39) bobsantos bobsantos's gravatar image

for those who dont know java has struts, hibernate,spring as frameworks. there are also groovy and even jruby which implem ruby.

scripted languages like ruby are yet another way to teach OOP, the language is part syntactic sugar, my point was its easier to read its syntax. theres no prob if you like compiling first then seeing if there are errors. its a little tedious but i understand why. so you'd have to look through all the possible loop wholes and learn bytecode etcetera. OOP has nothng to do with it, i think i wanted to replace java with ruby in colleges, thats the nature of my question.

(Sep 15 '11 at 06:03) whatever whatever's gravatar image

@bobsantos

Can you give a concrete, non-metaprogramming example wherein Python and Ruby hides implementation details for OOP compared to Java?

As for the digression into agile, it's due to someone basically saying "Don't use Ruby because you'll use Rails and you'll be forced to use a certain agile methodology. Also the guy who created Rails is an asshole." which is so wrong on many points.

(Sep 15 '11 at 12:32) Bryan Bibat Bryan%20Bibat's gravatar image

@redshift: Thank you for the clarification. :) So the question should not be limited to OOP and I saw that you created another question for that.

@bryan bibat: That's basically my point, the metaprogramming capability of Python and Ruby (I'm not saying this is a bad approach.) might hide some implementation details which leads to what @redshift said "easier" way of doing things. But if we are just talking about fundamentals of Python then I don't have any arguments for that. ;)

(Sep 15 '11 at 13:25) bobsantos bobsantos's gravatar image

@bryan bibat: "As for the digression into agile, it's due to someone basically saying "Don't use Ruby because you'll use Rails and you'll be forced to use a certain agile methodology. Also the guy who created Rails is an asshole." which is so wrong on many points." -- LOL, maybe I missed that part while reading thru the comments at 2AM. I agree that it is wrong at ALL points. Rails does not define Ruby and the agile methodology has little to nothing to do with creating Rails. That's why I mentioned that Rails should have not been part of the question.

(Sep 15 '11 at 13:29) bobsantos bobsantos's gravatar image

(Off-topic) For what it's worth, we'd really prefer it if NullPointer had more objective questions. :)

(Sep 24 '11 at 03:20) Nikki Erwin Ramirez ♦♦ Nikki%20Erwin%20Ramirez's gravatar image
showing 5 of 22 show all

  1. It's hard to teach certain aspects of programming when the PL already does everything for you (much like Python and other extremely high level interpreted languages do). Marconi gave a pretty good example already with regards to Java. Trying to teach concepts regarding proper memory management using Java (or even Python) would be pointless since the garbage collector will do all the work for you anyway. In any case, Python faces even more of the same problems when used for teaching fundamental courses because it affords even less control to the programmer than Java does.
  2. One of the reasons why extremely high level languages like Python are "fun" and "easy" is because they conceal many intricacies from the programmer. This is good when writing production code since you don't have to pay attention to too many details and there is thus less chance of screwing something up. But for teaching fundamental programming skills I'd have to say these traits are a big weakness. I am of the mind that if you want to teach students how to avoid shooting themselves in the foot when programming, you have to use a language that actually allows them to do so.
  3. As mentioned above, extremely high level languages hide a lot of intricacies which can serve as traps and pitfalls for programmers. Needless to say, it pays to know about these problems and how to solve them, and by using an "easy" language you are robbing the students of a chance to gain first hand experience in dealing with these problems before they go to work in the industry.
  4. It's definitely easier to transition from a "difficult" language to an "easy" one than vice versa. It's not hard to see that a university aiming to produce versatile programmers would teach using the more difficult option and leave it up to the students to learn the easier ones on their own rather than the other way around.

Suggested reading. Java actually gets a bit of flak every now and then for being "too easy" for teaching programming courses. :P Gives an alternate perspective on whether or not programming courses should be made easier.

link

answered Sep 09 '11 at 02:21

rain's gravatar image

rain
864

edited Sep 09 '11 at 03:37

I'm confused. What question is this answer answering?

(Sep 09 '11 at 10:17) Bryan Bibat Bryan%20Bibat's gravatar image

well, to somehow make this funny, i think it answers: "How do you make students suffer pain and agony in Java so that they can see better the light when they see Ruby and Rails?"

(Sep 09 '11 at 11:35) whatever whatever's gravatar image

All four points are possible reasons why universities are using "difficult" (Java) languages (as you put it) instead of "easy" (python) languages, like you're suggesting. That was your original question, wasn't it?

(Sep 09 '11 at 11:53) rain rain's gravatar image

it was a rhetorical question. not to be taken seriously, yes i just didn't have a good time with java in college, which lead to my rough start in software development

(Sep 09 '11 at 12:14) whatever whatever's gravatar image

apologies, now i understand why subjective questions aren't asked over at stack overflow. every answer is correct to an extent.

(Sep 09 '11 at 12:25) whatever whatever's gravatar image

I see... I sorta skipped the part in the question where Java was called hard. I was just confused that your points didn't seem to apply to Java. If applied to Assembly, C, or LISP, sure it would make sense, but Java, not so much.

(Sep 09 '11 at 13:16) Bryan Bibat Bryan%20Bibat's gravatar image

I agree with all the points that rain mentioned.

I would like to add that, IMO, the static typing of Java adds to its advantages, at least in teaching, because the students with or without the help of IDE will be able to know if they made a mistake in assigning values to variables as early as compile time.

(Sep 15 '11 at 01:18) bobsantos bobsantos's gravatar image
showing 5 of 7 show all

Market forces.

Think about it: what sort of people are needed by the enterprise solution vendors that donate computers/provide sponsorships to these schools?

That's right, Java or .NET programmers.

In hindsight, it's sad that I graduated UP without learning LISP / MIT Scheme (but then again, it's also sad that I graduated without learning JavaScript, HTML, and CSS :p)

link

answered Sep 08 '11 at 13:57

Bryan%20Bibat's gravatar image

Bryan Bibat
2.6k119

Because once you do Python... there's no turning back. :)

Drowsiness aside:

There are some low level things in programming that are better explained in c/c++ and java. In Python and Ruby, a professor might just say when you set a variable it gets collected and you don't have to worry about it. While in c family, students will actually alloc/dealloc memory and IMHO gives you clear understanding of nitty gritty + discipline and quite a bit of different mindset.

link

answered Sep 08 '11 at 15:35

Marconi's gravatar image

Marconi
9288

edited Sep 08 '11 at 15:44

correct. the thing is that in college CS is taught by fragmented courses. hence this course invented by some guy in jerusalem. http://diycomputerscience.com/courses/course/the-elements-of-computing-systems

(Sep 09 '11 at 12:23) whatever whatever's gravatar image

this might not be a favorable answer but looking at this wiki page http://en.wikipedia.org/wiki/Comparison_of_programming_languages Java is standardized as opposed to Ruby and Python.

There must have been guidelines set and followed by universities in choosing a Programming Language of choice if there needs be one specific PL for a curriculum.

link

answered Sep 08 '11 at 12:39

shemcristobal's gravatar image

shemcristobal
61519

Java is ideal to show you the real nature of OOP, there's no better language to teach it although many others like Python, Ruby or even JavaScript have nice "OO" features. It's also "not difficult" compared to C / C++ as a starter language.

You can easily explain the concepts of compiling, strong typing, etc ... There are sill loads of great Java projects/libraries that can let you have fun, even though in the begining for students Java may seem boring,

Anyway once they've learned Java, they'll have no issue learning Ruby/Python and will probably make their own choice.

link

answered Sep 11 '11 at 19:29

justadude's gravatar image

justadude
1002

edited Sep 11 '11 at 19:31

1

"Java is ideal to show you the real nature of OOP" is debatable. E.g. it's class-based OO, it still has primitives (i.e. not all entities are objects), its inheritance/abstraction scheme is limited, etc.

Also, the verbosity of the language tends to confuse the student to thinking that simply understanding Java's syntax would be enough to put "knows OOP" in their resume (and eventually fail when asked basic questions on OOP).

Oh and there's an issue with them moving to multi-paradigm languages: they aren't familiar with closures and HOFs. They'll be coding Java code in Ruby instead of Ruby.

(Sep 11 '11 at 19:46) Bryan Bibat Bryan%20Bibat's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×60
×25
×24
×3
×1

Asked: Sep 08 '11 at 11:32

Seen: 1,732 times

Last updated: Sep 24 '11 at 03:20