Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Luqman Shah
Luqman Shah
3,016 Points

Java or Python?

Hi, I'm a senior in high school and I've been wanting to learn java for the longest now, I've done my research on this particular programming language and it seems to be suitable for all my needs when it comes to what I want to do as a programmer; which is obviously enterprise, building large websites like twitter or facebook, and android app development. And a good thing about the java track on treehouse is that you don't need any prior coding experience whatsoever, so it's right around my alley. As I literally have no programming experience whatsoever. But the only thing is, as I was doing some more research, I found out that java takes up a lot of code, it's very heavy(metaphorically speaking), the amount of code it would take to do something in java would only take a fraction of the amount of code in something like Python. Which leads me to my next concern; I was then beginning to show interest in the programming language of python, and I began to do research on it. But turns out, in order to learn python or begin a python track on treehouse, I need to have at least a little bit of prior coding experience, according to the Learn Python Track on treehouse. So I'm kind of stuck here.

  • Which programming language should I learn? Which would be more suitable for me as a beginner with no prior coding experience?
  • What programming language should I learn in order to befit my needs as a future programmer?
  • Should I learn both java and python? If so, where do I start?
  • What direction can you give me so that I can have a clear perspective on where I should go?
  • What programming language should I learn in 2016/17?

Thanks ~

3 Answers

I know nothing of Java. I have done JavaScript and Python. I found Python rather refreshing after doing JavaScript. I can't imagine really that Java would require more code than Python, unless there are no frameworks available for Java. But I just did a quick search and there ARE frameworks for Java and in at least some peoples minds it is in very high demand. I have heard people say Python is a good first language. But, I think if you have been leaning toward Java you should do it. You can always learn others after. I do get the impression that Java is a bread and butter language. You probably can't go wrong in learning it.

Well... In my humble opinion (I simply don't want to start a programming language war here), language choice isn't really a big issue especially when you just starting out. Modern programming languages can pretty much do the same thing. Python is easier to learn comparing to Java. I'm fairly sure you can join the Python track without prior knowledge. Different languages have its own benefits and weeknesses. And for large tech corporations they use more than just one programming language. For example, Facebook uses a large amount of PHP, C++, Java and Python to achieve what they have today. If you could, learn both. But be sure to become a master in at least programming language.

andren
andren
28,558 Points

I want to clarify that you don't need any prior knowledge to start either the Java or Python track on Treehouse, pretty much all of the Basic courses on Treehouse assumes that you have no prior programming knowledge.

I'm not sure where you read that the Python track requires previous knowledge, the Python basics course's introduction text specifically states that the course is meant for people new to programming.

Python is often considered to be easier for beginners nowadays, and it certainly has a simpler syntax overall. But Java has a long history as a beginner language as well. And while it has a bigger learning curve in the beginning I (personally) feel that it actually becomes pretty easy and pleasant to use once you get used to the general concept that rule the language.

Python and Java are fundamentally quite different languages in syntax and structure, which one you will end up liking best is hard to say as it is somewhat of a personal preference thing. My recommendation would be to take a look at the basic courses of both languages to get an idea of what the basic structure and workings of the languages are. And then continue learning about the language that resonated the most with you.

Ultimately you will likely end up learning both at some point anyway, as most programmers these days are expected to know multiple languages. That's not as hard as it sounds though, as once you master one language you will likely find that there is a lot of concepts that are very similar in other languages. Which make it far easier to learn them than when you learned your first language.

andren, you said something that caught my interest. Java has it's big learning curve at the beginning. That sounds appealing because just at the point I'm feeling competent (somewhat) in say, Python or JavaScript it all comes tumbling down. If java really does has it's heaviest learning moments early on, that sounds very inviting.