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
Matthew McLennan
10,315 PointsWhat would make me more marketable? Proficiency in PHP or Rails.
There are great projects at Treehouse for both. Which one would make me more valuable as a developer. I'm thinking in terms of being a T-shaped person and less of a jack of all trades.
6 Answers
Liban Shire
Courses Plus Student 4,147 PointsPersonally I would say Javascript or php but ruby is used a lot too. depends on where you want to work I guess.
Ali Onur Baykal
5,367 PointsPHP is very similar to many other languages. It could ease learning C like languages. Rails on the other hand is very popular with startups and very useful for creating backbone of an application.
Matt West
14,545 PointsThe most valuable developers are generalists.
That doesn't mean that you have to know every language, just pick a core set that interest you and learn as much about them as you can. If you're new to programming learn one at a time. After the first language you will find that the concepts are much the same in other languages, only the syntax really changes.
However, if you really want to specialise there seems to be a lot of demand for Ruby on Rails devs at the moment.
Either one. Whichever you are better at honestly.
Randy Hoyt
Treehouse Guest TeacherIf you want to get a job working as a web developer, you really should be able to work in multiple languages. You don't have to be an expert in every language. But if your boss asks you to troubleshoot a support issue on code written in a language you've never seen, you need to have the ability and the confidence to start digging in and figuring it out ... you can't panic or pass out from fear and anxiety.
The best way to reach that level is to learn a new programming language every year. This is one of the great recommendations in The Pragmatic Programmer, as essential book for anyone in this field. Learning a second language is perhaps the most eye-opening. You see difference between them and start to understand the design that language creators have to make.
To me, it sounds like the question is this: should you learn PHP or Ruby on Rails next? It depends on what you already know. (I'll post this comment now and give my recommendation next.)
Randy Hoyt
Treehouse Guest TeacherIf you want to be able to work as a web developer with server-side technologies, it would be good to be comfortable working with PHP and Ruby on Rails. Here's a list of questions I'd ask. If you don't know how to answer at least half of them, I'd recommend taking my PHP course first:
- What does the HTML tag form do? What are its action and method attributes for?
- What is the difference between POST and GET variables? If I wanted a particular view of a page to be able to be bookmarked, which one would I use?
- What's the difference between a variable, an argument, and a property? Which of them applies to a function? Which one applies to an object?
- What are the different types of HTTP header redirects? What is the difference between a 301 and a 302?
- Visiting a web address like /books/edit/10 should load a file called books.[ext] and load "edit" and "10" into variables. How is this possible?
- What's a SQL injection attack? How would you avoid it?
- What do the following commands do on the Linux command line? ls, cd, mkdir, mv
If you can comfortably answer more than half of these, then I'd recommend the Ruby on Rails course. If not, then I'd recommend my PHP course.
PHP was conceived as a web programming language, and writing a simple app will give you a good understanding of how the core structure of the web works. Ruby was not conceived as a web programming language; Ruby on Rails is a complex and powerful framework that brings Ruby to the web. It does a great job, but it also hides a lot of how the web works from you. You'd be better served learning the basics through PHP first before moving to a framework like Rails.