Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Will Rails be the new PHP? (roy.io)
42 points by roytomeij on Sept 30, 2012 | hide | past | favorite | 46 comments


It's the strangest thing. It's like having a blog and access to Hacker News makes self-proclaimed "seasoned" programers forget that they, too, probably had really crappy code when they started programming.

Instead of bashing green programmers who coincidentally became interested programming at the same time that Rails makes it so easy to start, why not offer them up a list of resources to make them better?

Humans are only born knowing how to cry and swallow. Nobody's born knowing how to program. Let's give Rails the props it deserves for lowering the barrier to entry for making web applications and look forward to the future where these new programmers are making things to make our lives easier.


He's not bashing green programmers. He's bashing on programmers with years under their belt who never got any better, and don't participate in any community.


> "I'm worried about the portion of Rails developers who sucked at their previous language. Or the ones who got started with Rails as their first "language" without finding the proper (or current) resources or guidance"

No, he really isn't. He is totally bashing green programmers.


In gaming this is the difference between a newbie and a noob.


So true. I started off writing really shitty Perl and PHP code. Some of my Java and ActionScript was also nothing to be proud off. Yet I think I write nice code today.

The key is not to be judgemental.

If you think there's a problem, don't point fingers. Go out there and help fix the problem. With compassion and understanding.


Will linkbait be the new inflammatory headline?

Will handwaving be the new fluff?

Will insubstantial murmurings be the new mumbling into whiskers?

Will this turn out to be a useful blog post or is it just a bunch of questions that can't be answered because they're pretty close to meaningless?


um no?

PHP "has a relatively small community, with the majority of people working under the radar and on their own?" ?

Where is he getting these stats? relative to what? For instance

http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

Says PHP the language is more popular than Ruby the language (let alone the subset of Ruby programmers who use Rails). I don't get where that perceived smallness comes from. In all my experience and every way I've seen the PHP community is vastly larger than the Ruby community. Also comparing a language to a Framework seems... weird. It might make more sense to compare Rails to Drupal at least, which again, in the enterprise world, I have seen waaay more Drupal installs than Rails ones. There are a few high profile Rails sites but it quickly seems to drop off into hobby and startup. Meanwhile Drupal is just everywhere. It's surprising.

Also, accusing the PHP community of "writing below par software while charging their clients for it?" is hilarious coming from the Rails camp. Generally lowering the bar for entrance while making it easier for good devs to get good work done faster also allows more "bad" devs to enter as well. Anyone remember earlier this year that core Rails bug that allowed people to overwrite almost all data that most big Rails sites were affected by (including github)

https://github.com/rails/rails/issues/5228

I cannot understand where this viewpoint is coming from, it seems hilarious (and at best, the criticisms seem like the pot calling the kettle black).


I blame the bubble. HN has a bubble, the Ruby community has its bubble, and so does the Rails community. Bubbles intersect but overall I blame the bubble(s).


Php is a scripting language specifically designed for web development. Hence, not fit to be in a head to head comparison with a general purpose programming language.

Thus the comparison is held at that level (web), comparing php with a web framework. If that wouldn't make any sense, then it does make sense to compare php with C++ or Java (which it doesn't). After all, you can write a website in C++.

Putting that aside, your viewpoint is hilarious as well. I find it amusing how you call the issue you linked at, a core rails bug when your knowledge of rails doesn't qualify for such a statement.

It wasn't a bug. If you are a rails developer, have indeed read the issue and replies or at least read the title well enough, you would have concluded that it was a bad coding practice.

The security measure to prevent such mass attribute assignment "was" present for developer's to utilize. It's a single line of code, but some lazy asses wanted that auto-generated/forced/opt-out instead of opt-in.

It's a good practice, an advised practice, a recommended practice to write that single line of code. The fact that a mass majority of rails developers didn't write it, or ignored this warning doesn't mean it's a "core rails bug".

No, the ruby/rails community is not as large as Php.

Yes, the php community has an awkward tendency to write "below" the par software while charging for it.

Any experienced php developer will confirm this sad fact and will probably blame the language for it

(Php "is" flawed on so many levels: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...)


Sort of a tangent here but I've been trying to decide if our organization needs to move away from using Drupal for custom application development. You see to have some experience, what are your thoughts on it for highly customized web applications?


Personally, I've been doing Drupal for a few years now and found the knowledge and skills to be a lot harder-won than the knowledge and skills that I've picked up with Rails in the last few months. The knowledge and skills that I've picked up working with Drupal (HTTP, Databases, etc) more or less translate into general app development, so that surely has something to do with it.

I said this to my wife this morning - "you know what, building stuff in Rails just feels like it accesses my creative brain more than anything I've done before." Having been exposed to some of what Acquia is doing with their cloud hosting stuff I can say with a fair amount of certainty that almost anything under the sun can be accomplished with Drupal, but that's (the creative bit) probably why I'm on a Rails kick lately. It's just more fun (to me). The overhead does feel lower, too.

Sorry if that didn't lend any insight to your actual question.


eh, I've only lightly dabbled in Rails and Django, nothing serious, where as for work I use a lot of Drupal, so I don't have the most balanced or informed view.

Drupal is kind of a framework and a CMS in one, it's somewhat unique. It also seems that in PHP land a lot of the frameworks are converging on a standard, it seems like Symphony 2 will be used as a base for other projects (like Drupal 8). The point is, Druapl gives you a lot more out of the gate than any other framework in PHP or any other language.

The "con" would be that you have to work in PHP and work with their relatively straightforward imperative API instead of cooler OO APIs with ORM (Though Drupal 7's revamped DB API offers some new interesting options). If those barely register as cons with you then the only reason to change and abandon already built infrastructure would be something those languages have PHP/Druapl doesn't like some binding for some cool feature.

Ah, one other con for Drupal, it does have a lot of over head and can at times be slow. But then again, easily if not more so can Rails have overhead and be slow. They like to brag about their > 1000 lines of pluralization code, others cringe. Smaller frameworks might be faster. Django possibly, but I really have no idea.

So it comes down to what you are doing and the requirements. I want to learn them all so I can better evaluate them all and in the future more knowledgeably pick the best tool for each new job


You always need to move away from using Drupal for "highly customized web applications". Drupal is a CMS with something vaguely resembling a framework bolted on.


I've used Rails and I've used Drupal for custom applications (not just out-of-the-box cms sites). It would be a cold day in hell, where I picked Drupal over Rails.


1) userbase is not a community, usergroups and such are.

2) the sub-par php code thing? go post on place like craig's list, where the uninformed who need developers might post things, and see what kind of developers respond. go look at wordpress plugins. go look at tutorials and examples on blogs. while yes, there are certainly well qualified php programmers, you're going to see a lot of horrifying code.


... and all the rails code of the world is better? How has the rails community gotten this "my shit don't smell" attitude? Like I said, the barrier to entry for ails is even lower, it stands to reason that there would be even more horrifying Rails code out there. Every language and framework is going to have horrifying code, I don't understand how you can ignore the Rails communities code while singling out PHPs


eh, i honestly always thought the rails community had a pretentious streak running through. can't defend them too much. same goes for python, and many other communities too.

there's a lot going on there. however i think most of what the post is talking about is how as a community grows it's cohesiveness wanes.


While new developers are coming up learning Ruby as their first language and in the context of Rails, keep in mind that Rails introduces you to much of the core Ruby language, idioms and at least a few design patterns and useful abstractions. It also adds Sass and Coffeescript. There's much more complexity and therefore knowledge required for a "whiz kid" to build a useful Rails app that it's hardly a fair comparison. This "subpar software" meets a need that seasoned developers can't or won't.

Also of note: it's no longer 1999. People expect a bit more out of their website than during the glory days of the independent 19-year-old PHP developer. These novices are orders of magnitude more capable than PHP developers of a decade ago. These folks building one-off websites for clients are also often doing both design and development—something many developers are awful at.

This elitism should stop. Programming is a means to an end, and we should welcome any and everyone despite their level of commitment, talent, or focus.


Does Tiger Woods sit around thinking about how all of the weekend hackers at the local country club are making the game of golf worse?

Nope, its the exact opposite, the more popular the game is the more the people at the top of it stand out. If you think you are the shining example of the elite Ruby programmer you should be doing everything you can to get more people involved in the ecosystem, the bigger that gets the better opportunities you'll have in the future.


There's really only one paragraph here that remotely tries to explain the headline:

"The PHP where there are lots of people writing below par software while charging their clients for it? The PHP that has a ton of websites with crappy advice and crappy code to copy/paste? The PHP which has a relatively small community, with the majority of people working under the radar and on their own?"

I'm a Python developer. Do you have any idea how much crappy Python code and crappy advice is on the internet? Take a look at the StackOverflow homepage at any given moment. Every language has developers at every stage of the learning process. And every language has developers who have stunted in the learning process.

So, this is ridiculous. The answer is no. Rails provides infinitely better tools in a better language than PHP.


> So, this is ridiculous. The answer is no. Rails provides infinitely better tools in a better language than PHP.

You're making a highly subjective and unqualified comparison of a language to a framework, and (given past citations in similar discussions) probably using information to do so that's at least five years out of date. This after saying you're a python dev so presumably not especially well versed in either language/framework (do correct me if I'm wrong)

Like you say, there's a lot of bad code out there. PHP is notorious for it due to its shallow learning curve and widespread availability on cheap servers. The authors point is that the barrier to entry on ruby/rails appears to be quickly dropping and asks whether it will suffer the same fate.


The level of elitism in the Ruby and by extension Rails communities never ceases to amaze me. Having attended several ruby and rails conferences over the last few years, the belief that Ruby is the language of "good programmers" is so prevalent as to be off putting.


They aren't mere programmers, they're "rockstar ninjas" (in their own minds).


I really enjoy when arrogant geeks tries to bash language X. They will never learn their language is just a tool and as long as you follow best practices it doesn't matter what language you are using.

And i really don't understand why particularly rails developers looks down to newcomers. If you want to help your community just write tutorials, share your experiences from real life, help to newbies and make other's life easier. If you want to entertain other peopler, well , just write crappy blog posts with such title like " Will X be new Y ? "[1]

[1] : But please read first the article about "Betteridge's Law of Headlines" on Wikipedia.


Usage of server-side programming languages for websites (30 September 2012):

  PHP      78.1%
  ASP.NET  21.0%
  Java     4.0%
  ColdFusion  1.1%
  Perl     0.9%
  Ruby     0.5%
  Python   0.2%
http://w3techs.com/technologies/overview/programming_languag...


I'm not sure what your point is to begin with, but I am highly skeptical of the scientific nature of this report.


"See technologies overview for explanations on the methodologies used in the surveys."


I saw it, it's totally hand wavey.


This not in my backyard eliteism is a problematic mindset, especially geeks hating on geeks, who probably weren't that popular in school themselves.

Kind of ironic.

Tools are just tools. Most are capable and have good web frameworks.

Opinion and preference is largely what most posts like these are based on, while it's free to have your opinion and preference of what tools you use, judging others, and how and if they may learn is another thing.


If you want to compare rails to something compare it to Yii.

If you want to compare something to PHP compare it to Ruby.

Comparing Rails and PHP is just plain dumb.


Maybe. If Ruby / Ruby on Rails is a good language for web-development, easy for beginners to learn, the community is helpful, beginners feel welcome, and experienced developers invest in teaching; you'd expect to find a small army of 'just get it to work' developers knocking out small projects and charging too little.

I'm ok with that. Small projects get done. Not everyone needs a $125/hr consultant. Some of those projects will grow and need more experienced developers. All of those beginner developers will gain experience. Some of those beginner developers will continue to grow, learn testing, learn better software design principles and start contributing to the community.

If Ruby on Rails has, or were to have, a small army of beginner developers writing poor code on small projects and charging too little for it; I think it would be a healthy thing.

Disclosure: I got started as a Rails-first-language developer and have loved every second of it. And I try to get new people started with web-development using Rails and hope to see them get their first small projects that they can write bad code for and get paid anything for.


> If Ruby on Rails has, or were to have, a small army of beginner developers writing poor code on small projects and charging too little for it; I think it would be a healthy thing.

Hmm, well I see your point, but disagree. It's just like the WordPress situation for small businesses.

Someone comes in (usually a "designer") and cobbles some WP plugins and a template into a seemingly okay site for $500, but eventually the small business owner hits the limitations of that arrangement, and (from what I've observed) good programmers won't even take $5,000 to salvage a mess like that.

And not only does the customer end up feeling burned, it also leaves behind some toxic consequences, e.g., the customer has no idea what programming costs nor the difference between a prototype and production quality. So while we all start somewhere, this kind of low-rent ecosystem has certain enduring negative consequences (evident on Craigslist).


Taking just the title, not likely. The lesson of PHP is that it is easy to get something running for a beginning programmer, and (probably more importantly) it is very simple for a system administrator to setup. I get the feeling that the first web framework that spends and equal amount of time figuring out how to make system installs and administration easy will take over for PHP.


Rails has a steeper learning curve than PHP. And I can't see Rails (easily) being sloppily-disorganized like PHP can.

So I'm going to go with no.


You can program messy Ruby as easily as messy PHP. Rails is an MVC framework. PHP has plenty of those as well.


Right, but Rails will always have some sort of organization. That being said it is possible to go against the grain and not use Rails' default directory structure - but that's difficult.

I'm comparing Rails to vanilla PHP - just as the author is. People are exposed to PHP's low barrier of entry (again, vanilla here) because you can write an application with PHP/Apache/mySQL very quickly. However, because of this, most instances are very hacky.


Please don't compare a framework with a language, even someone before did it.


I'm comparing RoR to the act of running PHP scripts on Apache. Both are processes - this is also what the article addresses.


You don't think Ruby on Rails requires the overhead of a server???

There are perfectly good and very sophisticated MVC frameworks available for PHP, such as CakePHP (one of the closer to Rails, even down to the command-line "baking" of models, controllers, etc.).

There are meaningful differences to development using both languages, but criticizing PHP because it was popularized independently of any specific framework is not one of them. Especially since there are plenty of situations (think dumb but scalable web services) in which the last thing you want to do is invoke the overhead of a framework in any language.


Do some people who do some stuff do stuff better than other people who do stuff worse?

Yes.


tl;dr - the author plans to switch to node


Where's my $4/month rails hosting?



I've seen this playing out for at least five years.

For a long time rails has attracted developers who are strong in design but weak in programming.


No, that's unlikely. PHP's main advantage is its ease of deployment on shared web hosts: upload your files and you're done.


This article has unresizable font as the main font. How am I even supposed to read that?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: