From: Michael Vondung Date: 2003-05-06T00:39:02+09:00 Subject: Re: Why is PHP so popular? What can we learn from the PHP camp? On Mon, 5 May 2003 19:43:37 +0900, Pablo Lorenzzoni wrote: >If we want, some day, to overpass Ruby firstly we should create a know-it-all >source for information (just like php manual). It's easy to learn PHP since >either beginners or wizards always can refer to php manual since it have >everything. I actually think this is exactly the key. Unlike most of you here, I don't have huge pre-Ruby experiences with programming languages. Sure, I coded in various Basic dialects in the 80s and very early 90s, picked up some Pascal around the same time, but really, I never was what I would call more than a "causal hobby programmer". For instance, I never got into C, and yes, I tried a few times throughout the 80s. Just wasn't my thing: it didn't "speak" to me (or rather, I didn't "speak it"). My background is journalism (not in the English speaking area) and community management/development, so I never needed to know any prigramming languages. I did want to throw together my own quick utilities/script for certain tasks when the available tools or applications didn't do the trick and I grew tired of having to find someone to write them for me, so I frequently looked at newer languages, hoping to some day find one that appeals to me. I discovered Ruby about two years ago, found that the code bits I saw "made sense" (to me, a non-programmer) and I decided that Ruby is going to be "my tool". However, I didn't know the basics, so I started to look for literature -- and found very little that was useful to me, a complete novice. I spent many hours blankly looking at scripts written by others, reading the same passages of the early chapters of the Pickaxe book numerous times and slowly got the hint an idea. Ironically, those 15 years old "Basic basics" did help with this, and of course, something like string.include?("foo") is something even a non-programmer understands simply by looking at it. But all in all, I was still stumbling around blindly until I got my hands on a copy of Mark Slagell's "Teach Yourself Ruby in 21 Days" (this title does the book great injustice). That changed things drastically. I -understood- the way Mark explained things and he did it gently enough to teach me the fundamentals -- and got me started with his book. Once I comprehended the basics, I also started to understand a bit more of this newsgroup's content (I have actually read and achieved it faithfully every day for nearly two years, even though there is still a lot of stuff that goes right over my head!), and the Pickaxe became an actual resource rather than something I knew was important but that didn't help me much. Many moons later, the situation is only slightly better. There finally *is* an online tutorial, Daniel Carrera's "Learning Ruby", and the Windows installer of Dave Thomas and Andy Hunt is a heavenly gift for those of us who need someone to help us with the baby steps. I would not be here today and would not use Ruby as an essential tool for every day task's if it wasn't for this installer. However, compared to what PHP offers to interested neophytes, these are drops of water on a hot rock. PHP is so popular that even kids at ages 14 or 15 pick up PHP basics and use it for their personal web pages (whether or not they need it). It's uncommon to find a teenager on the web today who doesn't know at least some HTML, and the "logical next step" to them seems to be PHP or Perl. Just yesterday I had a sixteen year old walk up to me and ask if I could help with a Perl question. Hell, of course not! I mentioned Ruby, and of course the kid never heard of it. A good friend of mine, a writer, started to pick up Perl because "it seems useful" ... and while I know that she'd understand Ruby better, she isn't interested because it's not popular and there is so very few easy-to-understand Ruby resources available. The point being ... if someone wants to learn PHP or Perl, there are literally dozens of beginner-friendly tutorials out there, and new ones are written daily. There are plenty of starter books, countless web sites. I'm talking about tutorials not only for people -- like most of you -- who know at least one other language (and often more than that, backed by sound IT/CS education), but the "average" person who doesn't know what a command line (thankfully, I was born early enough to know what computers without GUI were/are like ;) is and to whom you have to explain what a variable and an array is (you know: "an array is like a shopping bag, you can throw in different items, take them out, replace them with another item, etc"). If you want popularity, you need to provide more beginner-friendly tutorials and doumentation. You probably also need more technical material for the more advanced folks, those who come from other languages. But I think Ruby will eventually reach those anyway, since it convinces with quality. The "mass market" is another story altogether. I'm not sure if that market is a target at all, but well, PHPs popularity is at least partly based on its availability and accessibility to/by "the average guys". By the way, the mswin32 port of 1.6.8. is still the version that's distributed as latest stable version -- in the Windows One Click Installer for example. There is a good chance that this will be the version that curious average-people who happen to hear about Ruby will find and download. Let's just the say the IO of this version and this port is not very thrilling. Processing a 280 MB text file (just very simple regexp matching) took an embarassing 1097 seconds in 1.6.8. In 1.7.3 it was 53 seconds and 1.8.0p2 completed the job done in 34s. Now, if I had tried to write/execute that script in 1.6.8, and it would have been my first experience with Ruby, it would definitely also have been my last experience with Ruby. (I read about these problems here in the group back when they were first reported -- but the average person who "plays a bit" with Ruby won't be reading comp.lang.ruby or the list.) Perhaps this should be "fixed" or replaced with a different version. Anyway, I'm rambling! Sorry about that. :) (Yes, my scripts are appropriately elaborate too -- working on that!) In summary, I think tutorials and better documention are primary keys to success and "popularity" ... and with popularity comes the jobs. -M.