News for hackers. Stuff that matters.

AskHN: Should us youngins be taking a Java class as a first programming class?

I'll be starting with a computer engineering program this fall (curriculum: http://resources.msoe.edu/cdb/programs.php?progCode=SE2.4 ). My advisor has chosen classes for me -- and I see that one of the classes I'm taking, 'Software Development I', introduces the concepts of programming with Java.

After witnessing so many rants everywhere at just about all social bookmarking websites about the atrocities of Java (and especially nowadays, with what Oracle is doing), I find this a little bit unsettling. Should I just take it as my first programming language, or should I protest and try to find a way around it?

(Sorry, I know this isn't the forum to ask for personal advice in the manner that I am doing -- but I think the discussion that might ensue might interest the community, so that's why I'm asking).

( 13 comments | 11 points | on HN )
Re:AskHN: Should us youngins be taking a Java class as a fir... by paulitex on Wednesday September 01, 2010 @02:09AM (#1652009)
People like to bash Java because it can take it. It's the status quo, the most popular programming language in the world (see: http://www.tiobe.com/index.php/content/paperinfo/tpci/index....). That's what innovation is all about - surpassing the status quo.

It's the most popular language in the world for a reason. There are lots of great things about Java, some a direct result of it's popularity: Fantastic tools, a tonne of very mature and reliable open source libraries, great performance in most situations, and last but not least: A tonne of jobs.

By no means is Java dying. A lot of sexy new technologies are rooted in Java. Here's 3 popular among the HNers: Clojure, Cassandra, and JRuby. You wanna hack on any of these, you better know Java.

Java is far from perfect but it's also very far from horrible. It is most definitely useful. Take the course. You'll learn a lot.

Re:AskHN: Should us youngins be taking a Java class as a fir... by TallGuyShort on Tuesday August 31, 2010 @09:45PM (#1651540)
When you're learning your first programming language, the specific language you learn isn't worth stressing over. You can be sure that the professors at your school put some thought into the decision, and even if you disagree, it would take a lot to convince them otherwise. There are so many things to learn, that you should really just start somewhere, anyway. Even if they teach you Java, what you should be learning are programming concepts. You can then apply those any programming problem.

Personally, I think C would make a better choice, simply because it forces you to understand the underlying architecture, and appreciate the thinking behind the constructs of slightly higher-level languages. I'm sure I'm in the minority on that, though. Java is a decent choice, however, as it's very generic and allows you to focus on things like data structures and algorithms without necessarily having to go through that steep of a learning curve.

Re:AskHN: Should us youngins be taking a Java class as a fir... by 16s on Wednesday September 01, 2010 @04:52AM (#1652246)
Agree. You may never be required to understand the lower-level stuff behind it all, but you'll become a better programmer if you take the time to do so (e.g. why is one data structure more efficient for this problem, etc.) I re-started CS in a high-level language many years ago and ended-up doing mostly C++ b/c I need low-level, native code for what I do and that made me understand everything about the higher-level language even better.

Good luck, it will be fun I'm sure.

Re:AskHN: Should us youngins be taking a Java class as a fir... by mpim on Wednesday September 01, 2010 @12:47AM (#1651876)
I was talking to some friends at Berkeley and apparently they're learning Scheme. My first reaction was "meh, that's not very practical". However, I can guess as to why they chose it:

a) It levels the playing field for people who have and haven't programmed before (a much smaller percentage of new students have probably had previous experience with Scheme)

b) It forces students to take on a new way of thinking.

As some other people have said, it doesn't really matter what language you learn. It's important that you learn to think and solve problems.

Re:AskHN: Should us youngins be taking a Java class as a fir... by wmf on Tuesday August 31, 2010 @09:54PM (#1651556)
You should not avoid learning Java; I think most of the complaints are about people who only know Java. As long as you don't let it limit you, Java is a good skill to have.
Re:AskHN: Should us youngins be taking a Java class as a fir... by rewind on Tuesday August 31, 2010 @09:46PM (#1651545)
Don't worry about it. The first programming class you take isn't about the language. When I did my degree, we learned in Pascal, then were required to learn C, C++, etc. on our own for more advanced classes. Your first class is about concepts, algorithms, abstract data types, etc. You'll learn the basics then be able to apply them to a lot of other languages that you can easily pick up quickly on your own.
Re:AskHN: Should us youngins be taking a Java class as a fir... by elai on Wednesday September 01, 2010 @04:16AM (#1652196)
Take the class, it's fine. The only argument that I have against java is that it requires too much just to get started with and people get easily tripped up with it.

class Hello { public static void main(String args[]) { System.out.println("Hello"); } }

Is pretty horrendous to explain to students vs.

print("hello")

You have to tell them to just print the magic words to get started, and they all want to know what the hell it means. And then you have to use the very slow, large, and irritating java SDK install process and some heavy IDE because you can't just print python and test stuff out. Or python pyscript.py. It would even be more horrendous to start out teaching with by how to use the relatively estoric command line compiler, and then packaging a jar and then running that somehow. A lot of java just gets in the way of just learning programming.

But it's popular, and it's used by a very large majority of employers, and there are employers that want co-op students after 2 semesters so they do that.

Re:AskHN: Should us youngins be taking a Java class as a fir... by jjcm on Tuesday August 31, 2010 @11:47PM (#1651762)
Java is a good starting language not because Java is good, but because it covers a wide base of foundational concepts in programming. I personally feel that the first language someone learns should both be strong typed and compiled. The reason is simply because I find the transition between [compiled -> interpreted] and [strong typed -> loosely typed] an easier transition to make than the inverse. In addition, learning a strongly typed language first gets students in the mindset of knowing what data structure their variable is in its current state. Java is strongly typed, a compiled language, and it's fairly easy to learn - all in all a good candidate for an educational language.

The important thing to know here is that just because you learned Java doesn't mean you're a Java guy. If your teacher is worth his salt he'll quickly make you realize that the foundations that Java teaches can be ported to every language.

Re:AskHN: Should us youngins be taking a Java class as a fir... by waterside81 on Tuesday August 31, 2010 @09:45PM (#1651542)
If you're learning about software development then I don't think it matter which language you're taught in. I was taught in Java, but now use Python professionally. The concepts of unit tests, modular code, etc. etc. apply to all languages, not just language X. I wouldn't stress about this.
Re:AskHN: Should us youngins be taking a Java class as a fir... by metamemetics on Tuesday August 31, 2010 @09:56PM (#1651558)
Learn as many languages as you can including Java. Ignore all web-tabloid tech-drama distractions.

A large proportion of Software Development (as oppossed to Game dev or Web dev) jobs are in Java anyways, so it's pretty sensible.

Re:AskHN: Should us youngins be taking a Java class as a fir... by djb_hackernews on Wednesday September 01, 2010 @09:43AM (#1652744)
It's not a java class, it's a 'Software Development I' class. Treat it as such or else you'll lose the forest for the trees.
Re:AskHN: Should us youngins be taking a Java class as a fir... by CyberFonic on Wednesday September 01, 2010 @04:32AM (#1652217)
Learning to program is hard enough without having to grapple with the incidental complexities that Java presents.

Hope your instructor is providing good handouts to get you started. If not, have a look at BlueJ. It has been developed to ease you into Java programming without the stumbling blocks that JDK throws at novices.

Re:AskHN: Should us youngins be taking a Java class as a fir... by tjpick on Tuesday August 31, 2010 @10:36PM (#1651622)
just take the class. It'll be fine.

But if you also want to learn something else for interest sake, try python with this http://www.greenteapress.com/thinkpython/html/