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

PHP

PHP or Python?

I am a beginner and I want to lear a new language. I have already taken the Java Basics class and now I am not sure if I should learn PHP or Python. What do you think? Thanks!

1 Answer

If you are comfortable with Java, you should stick with it. There is no need to learn a new basics of a language at your level. What you will be learning is the syntax of a new language, Concepts I'm sure you already know. If you didn't like Java, then move on, of course. The best thing you can do is code every day and stick with a language, there is a lot of opportunity knowing Java, and a high price point for people who can OOP in Java. Consistency is key in learning.

So there isn't like an advantage on learning one of this 2 languages? Like, I can make the same things in Java that I can with Python, Ruby or PHP?

At your stage no. there is no advantage, in fact I would say it hinders growth. First, it really depends on what your building, but more so, if you just took the basics of the course, you will need to take your learning further than just the basics, to understand the language. If you like Java, you need to learn at least what an abstract class and a concrete class is, and use these concepts to build something. The basics is a great first step, but it's just the beginning to the language, not the end. My suggestion would be to further your learning with Java, and go as far as you can with it. theres functional programming, OOP, a bunch of stuff. There are reasons why one type of language is more suited for a project than another, but until you understand the CS concepts of why that might be, theres no reason to just switch to another language just because.

Ok. Thanks!!!

Not a problem, stick with it, there are a lot of great courses here, learn as much as you can, and code every day!!!!!

Just another question. Is there any difficulty difference between Java and Python? Like what is 'better' to write with? Perhaps the language is shorter or the terms are easier...

The concept of "better" does not exist, in the context of learning a language for the first time. "better" would only work in a situation such as, Do I want to manipulate the DOM, and add animation to a div? In this case JavaScript would be "better" than python, because its runs in the browser. (not talking about Node.js) where Python does not.

At the beginning stage I would say no, you are learning about variables, arrays, functions, loops, and maybe objects. Theses concepts are found in every language, and need to be mastered. They only thing different is the syntax. There is no "easy" route in programming, but if you code every day, and you know you want to be a backend dev, then Java is great. the average salary for a Java dev, is 90K, not bad. Take a look at this blog, it might help

why learn Java