Live data from Hacker News

Ask HN: PHP or Ruby?

news.ycombinator.com

31–32 of 32 posts

Re: Ask HN: PHP or Ruby?

#31
post #6

Am considering Ruby at the moment. But reminded of Twitter dropping Ruby due to certain reliability issues. Hence having second thoughts. Or am I a little ahead of myself here worrying about something that may never affect me?

For what it's worth, Facebook "dropped PHP" in the same way that Twitter "dropped Ruby" in that both dramatically exceeded the scale that these languages and frameworks support out of the box and had to custom develop certain components to keep costs down.

Re: Ask HN: PHP or Ruby?

#32
Short answer: Any language can scale, and any language can perform well. The easiest language to develop and support is the one you know. Hosting is just as simple/easy/cheap with either language. If you already know one of those languages, go with it. If you don't, go with Ruby; it's a vastly better language, with a more mature ecosystem.

Longer answer:

* Scaling and performance is mostly an issue of architecture, and is heavily dependent on what you're trying to accomplish. You can go a long way just by using varnish/nginx/memcached as appropriate, and serving static assets from a CDN. The actual language is sort of a sideshow, because no language is fast enough; everything needs to be pre-calculate and cached.

* If you don't know either language, you'll probably find that Ruby is easier to learn and become productive with, but it's easier/cheaper to find good PHP developers. Kind of a wash. In either case, you will absolutely need to pick and learn a framework as well, which adds more overhead. (No, you aren't going to write a social networking app in PHP without a framework.)

* It's easier to get a basic PHP page hosted, but if you're even thinking about scalability and performance, then you need more than Bob's Discount Hosting. Doing PHP hosting right is no easier (or harder) than doing Ruby hosting right.

Basically, it doesn't much matter. At the end of the day, most (not all) programmers who have programmed in both detest PHP and love Ruby, and you'll probably find it easier to hire PHP devs.

Post reply on HN