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
Jack Carr
7,329 PointsPHP or JavaScript first?
Im getting back into the swing of things as I have just started summer vacation. Back to working on treehouse for a few hours per day.
I need a little advice from someone that has been in the development for a while. Id rather now waste my time learning something that I shouldn't be (or doing it in the wrong order)
It seems like Javascript is a kind of introduction to programming, then people move onto PHP, Ruby or Python.
Am I correct in my thinking or is it fine for a beginner to jump straight into PHP or would you advise me to get my feet wet with Javascript first?
Thanks in advance!
2 Answers
Keith Wyland
10,576 PointsI would also suggest JavaScript. Mainly because no matter what backend language you're dealing with, the code that gets spit out at the end of it all (what the browser uses) is going to be a combination of HTML, CSS, and JS.
And JS is pretty powerful. I'm far from a JS expert, but I'm pretty sure developers are now setting up whole backends using just JS (like node.js I think).
Also, you may be noticing that JS is used in a lot of beginner tutorials for programming (based on your comment about it being an intro to programming) and I think that's largely because JS is something that is already "installed" on anyone's machine via their web browser. Other programming languages require setting up perhaps a local server or some kind of IDE in order to actually see the results of the run/compiled code. JS is much easier in set up: just open a browser, find the console, and you're already rockin'. In that way, it's a good "intro for beginners" because there's very little between the beginner and actually starting to learn code.
Otherwise, JS has the same concepts as other programming languages: variables, types of variables, loops, conditionals (if/else/elseif), functions, etc. So learning the concepts is key. That foundation will translate over to any programming language, and it becomes more a matter of learning the (sometimes subtle) differences in syntax between languages. Obviously, the deeper you go with a language, the more there is to learn.
All that said, I'll stick with suggesting JS first.
Hope that helps! Keep learning!
Rick Rakin
6,531 PointsI'd suggest JavaScript. When you create a new pen at codepen.io what are the names of the three columns? php is not there.
Jack Carr
7,329 PointsAlright, thanks for that :)
Isn't codepen more for front end developers rather than backend? I assume thats why HTML CSS + JavaScript are the three columns
Jack Carr
7,329 PointsJack Carr
7,329 Pointswow! Thanks for the detailed response, you answered everything I was looking for. I will go over the Javascript courses on here and see how well I pick it up.
Thank you!