The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Ruby is a Playground, PHP is a Factory

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Kurt Schrader

Posts: 80
Nickname: kschrader
Registered: Feb, 2008

Kurt Schrader is an entrepreneur and a ruby programmer.
Ruby is a Playground, PHP is a Factory Posted: May 22, 2008 12:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Kurt Schrader.
Original Post: Ruby is a Playground, PHP is a Factory
Feed Title: Schrade.Blog
Feed URL: http://kurt.karmalab.org/atom.xml
Feed Description: Tech and Business Ramblings by Kurt Schrader
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Kurt Schrader
Latest Posts From Schrade.Blog

Advertisement

While reading yet another article on why PHP Sucks (today's witty twist, "but It Doesn't Matter") I realized yet another reason that I'm glad to be programming in Ruby.

Ruby, to me, is like a big open playground, while languages like PHP remind me of big industrial factories. I don't think that any of us would argue that industrial factories are more efficient for most things, but they also suck the creativity and life out of the people working in them.

For instance, why would you ever want to write code like this:

class DescribeNewBowlingGame extends PHPSpec_Context
{
    private $_bowling = null;
    public function before()
    {
        $this->_bowling = new Bowling;
    }

    public function itShouldScore0ForGutterGame()
    {
        for ($i=1; $i<=20; $i++) {
            $this->_bowling->hit(0); // someone is really bad at bowling!
        }       $this->spec($this->_bowling->score)->should->equal(0);
    }

}

when instead you can write this:

describe Bowling do
  before(:each) do
    @bowling = Bowling.new
  end

  it "should score 0 for gutter game" do
    20.times { @bowling.hit(0) }
    @bowling.score.should == 0
  end
end

You wouldn't. The first case is, at best, a bastard representation of the second case.

Of course, being out on the playground means that people get hit in the face with a ball once in a while, and everything isn't as neatly laid out for you as it is in a factory, but you also have the option to be creative, and not just do things like everyone else does.

And, sure, the playground is far more full of assholes than the factory, but these assholes are also more creative and entertaining to work with than people who just put widgets in place in a factory.

Plus the playground has that weird kid in the corner who's doing something totally crazy, but that just might be a genius, and if you get enough of these kids together, you're going to produce something that's much cooler and more creative than anything that gets built in a factory.

So you can talk all you want about big boring websites being written in PHP (or Java, etc).

As for me, I'll keep working in a language that encourages people to be creative.

Read: Ruby is a Playground, PHP is a Factory

Topic: Key_read/uudecode failed when pulling from git Previous Topic   Next Topic Topic: Freezing Rails with Git

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use