I am asking this because I read Joel's The Perils of JavaSchools.
views:
777answers:
16No, Java is a fine language that can help you learn various techniques invaluable while programming. What gets you in trouble is if you only learn Java, and never try out other languages to learn the various interesting ways that languages differ.
But this applies to nearly everything, not just languages. If I go to a restaurant and really enjoy their chicken fried steak, but never try any other restaurants, how will I know what I'm missing out on?
Everyone has to start with one language or another. Java is not a bad one to start with and was the second OO strongly typed language I learned. Keep an open mind to other languages and ways of doing things and you won't go wrong. Learning one new language a year is my personal goal, to keep my knowledge current.
Here is my rough timeline of languages studied/used:
- Q-Basic
- Paschal
- C++
- Lisp
- Java
- Perl
- Various Assembly languages
- PHP
- VB 5/6
- VB.NET
- C#
- Ruby
- F#
Important things to learn which are language-agnostic are Programming Patterns
It's going to show you one way to go about things, mainly the OO way. But I don't think it will permanently ruin you or anything, unless you take that as being the only way and fail to explore other paradigms later on (especially functional, IMO)
I wouldn't worry too much about your starting language, I started with VB3. The way to look at it is a language is a language it's really the logic and concepts you have to nail then you can port your knowledge to any language.
I agree with NilObject.
Personally I started with Java and wouldn't have it any other way! Granted, I had a great teacher for it though. Since then I have had no trouble moving onto any other languages (though I still think that C++ looks ugly in comparison :D). At any rate, this is my two cents.
Joel's take is, that Java won't teach you how computers work. But no, it won't take away you chance to learn how computers work.
Your programming base is logic, reasoning and a good sense. You can transmit that through English language and it will still be a great program (except there is no compiler for it ... yet).
So, go on, learn whichever language works for you right now. Java, C#, Perl, Python, Ruby share the commonality of being object-oriented while not bugging you down to pointer arithmetic and unsafe capabilities of C, C++.
You don't have to know pointers first. Someone may even argue that you don't have to know it ever (unless you do certain kinds of programming).
Pick any programming langauge. Get two or three books. Read the books and work through the code. Don't simply read the books - try all the code. Compile the code and see what the output is. Modify the code and see what the new output is. Break the code and figure out how to fix it.
After you have done that for a while (say 3 months) get a couple of more advanced books and a general book on program design. Books like Effective Java or Code Complete or the Design and Evolution of C++ (those 3 books you should read regardless of what language you selected to start with). Read those books and see how you can apply what they talk about to the code you have written (you will likely find that you have done a lot of things "wrong" and you will now see better ways of doing them).
After you have read those books (or similar ones) then start looking at a different langauge. If you chose Java take a look at something different (and I mean really different, so not C++ or C#). C would work well as would something like Python. Do the same thing - grab 3 books and start working through them. At the same time keep going with the first language. Try writing the same program in both languages.
Overall to really "learn" a language probably takes a couple of years (yup, I said a couple of years). Once you have done that picking up a new language is relatively easy. Programming is all about patterns and recongizing when to apply them (not talking about GoF design patterns, just common ways of doing things).
Learning some too low-level language first can ruin your programming future - if it makes you feel so frustrated that you decide to switch your career to McDonald's instead. Java is fine.
Java will only spoil you if you don't think about your profession!
If you learn a language (no matter how bad) then you will find it easier to learn another and another. Try reading some of the classic books about program design as well.
Heck, most guys I know and respect learned line numbered Basic as their first language and it didn't spoil them.
Java is a great language (despite the naysayers). It is the backbone of business in the US, UK and Europe.
A failure to think critically on your own is far more likely to kill your career than writing Java.
Joel's claim seems no less true for C#, yet I don't see any articles claiming that writing it will ruin a programmer.
Will Lisp or Smalltalk or F# teach you how a computer works any better?
Writing in a high level language of any kind hides what's going on in the layers below from the user. That's the whole point.
If you want to know how hardware works, study hardware. If you want to understand how software and hardware interact, I'd recommend that you write a simulator for a particular architecture. I had to do it for a PDP-8 and learned a lot.
I'm not a fan of the Deitel and Deitel books, but their "C++: How To Program" book had a very nice exercise that did just that.
Joel and Jeff and people like them are smart guys, but that doesn't mean you shouldn't question them or fail to think for yourself. You should examine any argument for its biases and try to come to your own conclusions.
I don't believe so. As an experienced Java programmer who did mathematics at university, I find that my main failings in the workplace are a lack of a better understanding of various CS subjects:
- databases
- networks
- file systems
- transmission protocols
- algorithms/graphs etc.
I can imagine that using an array of languages would be better than using just one, even if just for the fact that you can then settle on the one in which you feel most comfortable. But the choice of a taught language per se is not that important in the grand scheme of things.
At university, for learning how to write algorithms we programmed console applications with java (with DOS editor, can you believe that?). Now I can't remember anything of java, but it helped me when learning C++. And C++ helped me when learning C#.
I think that any C-like language is ok for getting started. I recomend start ALWAYS programming console applications. But I strongly say that a bad choice for learning programming is Visual Basic 6 (I haven't tried VB .net).
VB6 will make you get bad practices: not variable initialization, no case sensitive, no pointers... VB6 is ok when you already know how to program, but not for learning to program.