Why did you choose Ruby considering the popularity of PHP?

Modern PHP is better than the old days for sure. But I would not call it a hell of a language by any stretch of the measure. The best way I’ve seen it described is the shell scripting of the web – horribly ugly, lots of warts but gets the job done.

Now, I, myself, have started writing my shell scripts in ruby or python as they will get you to the same place and you feel a lot better doing so.

“shell scripting of the web” isn’t too far off, in my opinion. I think “ugly” is very subjective; and kind of irrelevant. Beautiful code to me is when you take a complex task, and when you are done with it, it is easy to follow and read, without thinking “what is this clever fellow doing here?”…has nothing to do with curly brackets vs. indentation and all that jazz.

PHP sucks as an actual scripting language, in the sense that Python or Ruby are scripting languages, where it is used for many things not web-related. I think it rocks when used for web development though.

So I ended up having to write some samples using “modern” php – guzzle / phar / etc.

The good was that phar works as advertised and that is a huge win in and of itself. The bad is that it seems libraries all take loosey-goosey arrays.

The other ugly part is dealing with so much low level stuff. Granted the standard libraries for other things I spend more time in are far richer but still – manually sniffing post data and handling url tokenization isn’t worth it in 2014.

This… I actually came across an RPG game development software in which each game developer uses Ruby as scripting language, I’ve also seen Python used as crawler converters for some forums(ie. zetaboards). PHP’s usefulness, on the other hand, is pretty much all about web development. I know there was a PHP-gtk project, but doubt how successful it was. I agree that Python and Ruby are much more useful for non web-based applications than PHP.

I am more the python/Django guy rather than the ruby/rails guy but I do have some things to say about php.

  1. It doesn’t matter so much where a language is as far as where its going. I just feel Zend lack direction as a technology company. Granted they are trying to fix the warts of PHP but they still seem to be committed to PHP as a kind of “better” C/C++ language. C/C++ are not the best languages to model after (imho) and yet Zend seems to be hero worshipping those languages for some reason.

  2. Why did they ever bring in traits into the language. I really don’t get what purpose that has in a dynamically typed language.

  3. They really need a better system than those half baked references when dealing with PDO calls. Their only purpose seems to be in accommodating C API calls.

  4. PHP is the legacy language of the web. I must admit it does have one advantage (which is arguably a disadvantage) in that software written in PHP is able to install itself. (Like wordpress 5 minute installs). This is probably a major security issue but it does make easy install software to the web.

Ruby/Rails seems to have lost momentum is the market these days and I don’t know if there is much work going on in Ruby outside the web.

I suspect something in the future will both surplant both PHP and Ruby. Maybe it will be something like javascript which can run both on the browser and the web server but at this stage that is only a guess.

Sent from my XT316 using Tapatalk 2

1 Like