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

Weng Jeff Lee
Weng Jeff Lee
12,865 Points

Should I learn PHP instead of Ruby?

I want to learn back-end development, So I started learn Ruby on Rails. But when I start the track "Build a to-do list ODOT" I realise that my ruby version are different with Jason course's Ruby version. I found it they are some different due to it version.

I also found out that it a bit hard to understand Ruby on Rails. So, should I learn PHP first then only back to Ruby? Will it help?

Thanks for the advise!

2 Answers

Someone adviced me to learn the language that is used by the company you want to work for. For example, if you want to apply at a local company that use WordPress as their CMS, then PHP is the language you want to learn first. Again, this is just advice, do what you think is right for you.

Personally, I would advice to learn PHP first for many reasons. As Jeff Atwood (probably one of the greatest haters of PHP out there) said;

If you want to produce free-as-in-whatever code that runs on virtually every server in the world with zero friction or configuration hassles, PHP is damn near your only option.

Jeff Atwood, Coding Horror

PHP sucks less than it used to, and by that I mean that there used to be horrible tutorials with bad coding standards. The community is certainly undergoing a transition. It used to be hobbyists, script kiddies and beginners (I was one of them), now there are more professionals whose companies have (rightly or wrongly) invested in PHP based products and services; It has pushed the community in the right direction. There are a ton of devs out there who basically grew up on PHP / CGI / PERL and it stands to reason that as the people mature, so does the community. Even Facebook released an "upgraded" version of PHP called (HHVM).

Sites like PHP the Right Way enforce better coding standards, and Teamtreehouse, TutsPlus, Laracasts, and others like them, are making lots of high quality modern PHP tutorials with (mostly) good information. Personally, a newer Framework called Laravel has made PHP a joy to build applications in.

However, in the end, the more you know the better. So why not learn both? you never know what tools you'll need for the job ;)