Ask HN: Is there any excuse not to know Java?
I have complete buy-in to the idea that Lisp is an elegant computer language, and general buy-in to the idea that knowing a lot of languages from a lot of paradigms is good for perspective and for problem-solving. As Alan Perlis said, "A language that doesn't affect the way you think about programming, is not worth knowing." Any programmer can gain new ways of thinking by learning a new language.
But asking more for students whom I advise than for myself, is it at all expedient for a young person entering the job market today to be unfamiliar with Java? Java has its own set of trade-offs, but doesn't it continue to be employed in many applications in many industries?
22 comments
[ 4.2 ms ] story [ 78.2 ms ] threadI think it might be better generalized as knowing some object-oriented C-like language (C++, Java, C#).
Is is expedient for a young person entering the job market to be familiar with Java (I'm changing this to a positive formation becasue negatives are confusing)? Of course. The TIOBE index answers this is two seconds. Java has over 18% market share, the most of any language.
Is there any excuse not to know Java? Of course. You don't care about the 18% of the market that uses Java. I think I could be happy knowing just Python most of the time.
To answer some more implicit questions:
Will learning Java affect the way you think about programming? Java is a great place to learn about unit testing, DI, and design patterns. The value of these is of course up for debate, but knowledge is power, and Java gives you a great chance to get this knowledge. Ultimately, I think it's better if you move on to more expressive languages, but Java is a good platform to learn some stuff on.
Should you know a lot of languages? Yes. While you may not need Java specifically, not knowing any C-like object-oriented language is not only career suicide, it's detrimental to your development as a programmer.
If you are a good programmer without a job, it will definitely help you as there are plenty of Java jobs available in the market now.
I have personally come across a couple of startups, started by smart engineers from MIT/Stanford, which suffered because they found excuses not to do their work in Java and do it in Ruby/PHP. One of them ended up rewriting everything in Java (which made their initial 6 months of development a throwaway) and sadly, another one got stalled. Am not implying that its better than other languages as each language has its own pros and cons. However, you will not know if it can serve your specific purpose better because you don't know what you don't know.
It may be because I'm still feeling the glow Java had when I learnt it in the late 1990's, but I really like a lot of things about it. It's a very simple, safe and easy to use language, it's C++ without the broken glass, it's C with automatic memory allocation, bounds checking and a nicer package/interface system. API's are separated and enforced. It used to be bemoaned as slow ("knock knock" "who's there" "................java"), and now it's seen as fast. That's pretty cool (it's partly because it's relatively faster than python... but it also has been made actually faster).
Many early adopters left it for python/ruby a few years ago when the small language that Java was became uglier with extensions, esp generics and annotations. Perhaps an important reason people left is because it became successful, and it became associated with unpleasant mindless corporate programming.
If you care at all about what qualities a language needs to have in order to be wildly adopted, Java has something to teach. Some people say it was just Sun's marketing... but Sun marketed it as a web language (applets), and it never took off there.
That's the succinct version of my first thought: "Because one was too busy making something instead of learning languages for their own sake."
I would highly recommend against selecting a technology because you want to weed out applicants who are misfits. A better option would be to have a strong hiring process.
java+libraries: 13,600,000 results
php+libraries: 32,200,000 results
I know Java because it was the language of choice for my undergraduate software engineering lab (6.170), but I specifically do not take Java work because I've found other languages I enjoy more. One of the joys of being a professional engineer is the freedom to choose your tools.
But at the very least you should have some familiarity with C.
If you want to be big and lethargic. If you want to write twice as much code to get the job done then go ahead and use java or C#.
Python: 167 C#: 87 Ruby: 187 Java: 601 PHP: 318 Erlang: 14 Clojure: 3 LISP: 7 Perl: 100
Ruby is my primary programming language, but I've also built apps and scripts in Python, C, C++, Objective-C, PHP, and Scala.
I'm a firm believer that exposure to a wide variety of programming languages is a great way to experience new constructs, paradigms, and approaches to computer programming, which is why I've spent the past few years branching out. During this process, I've worked with a few languages built atop the JVM (Scala and JRuby), and thus learned a bit of Java, basic language structure / primitives, and some underpinnings of the JVM. I believe that making an effort to understand and employ these various platforms has helped me to become a better programmer.
It sounds as if you're coming from the perspective of an academic advisor. This surprises me, as your question is primarily career-focused. Had Java been forced on me in University, I would have left disappointed by my education and mentally prepared for five years as a junior developer in a cube farm working on obscure, broken internal HR software. Instead, exposure to this variety of languages, architectures, and concomitant development methodologies has taught me a lot about programming / software engineering, and opened my eyes to careers I might not have imagined otherwise.
Circling back to the original question, I can tell you that I live a happy, productive, fulfilling life as a software developer at a great company doing what I love without "knowing Java."
Yes, and I appreciate your response and the diversity of responses here. The only programming language I formally studied, a good long while ago, was BASIC, and I'm still wrapping my mind around what personal productivity problems I could solve by programming (as contrasted with being a power user of other programmers' software products). I do have occasion to talk to young people about career planning and academic goals through my math-coaching nonprofit organization, my new occupation, and through a statewide parent organization about education of able learners. My involvement with people in the next generation is what prompted the question.
Would it be fair to sum up the joint agreement of everyone here that one should always be eager to learn that which might bring about greater personal happiness and career development, without being squeezed into a mold by arbitrary requirements of an educational program?
Until about 3 years ago, I used Common Lisp and Java each roughly 40% in my work (I still think that if you search for "Java consultant" I am the number 1 Google hit :-)
However, after I started using Ruby, I have transitioned to using Ruby for most of my work.
Ruby is great because it provides most of the advantages of Lisp except for the fantastic run time performance (natively compiled Common Lisp is fast!). However, for many (at least web) applications, bottlenecks tend to be stuff like session handling across multiple servers, database access, dealing with network partitioning and server failure, etc.
One problem with Lisp is the lack of a super rich ecology of libraries. Lots of great stuff is available for Lisp, but still weak compared to Ruby, Java, Python, etc. I'm rewriting a customers app right now because we learned what we needed to learn with a small Common Lisp prototype, and are now doing a hopefully final Ruby + Rails rich UI web portal (it is so much easier to write a rich web UI in Rails that in Lisp-based alternatives).
I would advise concentrating on one language and platform, and only spend perhaps 5 to 10 hours a week (an evening and some weekend time) learning new languages and frameworks.
BTW, feel free to substitute Python for Ruby, in my advice to your students - pick a primary language based on which you enjoy using the most. Also, Java as your primary language is fine also, if that suits you.
That's a good excuse.
I took an APL course once. I SWEAR I could feel myself growing new brain wiring...
Depends on your (or your student's) approach to employment, really. If you want any programming job at any cost, of course you should know Java. There are lots of Java jobs, though the flip-side to that is that the market for Java programmers is extremely flooded.
On the other hand, if you're more worried about actually finding "interesting" work, pitching yourself as a Java programmer might help more than hurt. I would personally rather stack boxes or something along those lines than work on some kind of enterprise payroll nightmare in Java. Some would not. As always, it depends.
That said, Java is pretty simplistic if you're familiar with any even vaguely similar language (which you certainly should be, since the overwhelming majority of code out there is written in them). There's really very little to "learn" anyway...