Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 ;)