5 ms·
Looking back on my years of PHP pain, I feel it would be a commendable thing to end this article with just a small sentence on the importance of choosing the ri
by clienthunter 13y ago
Looking back on my years of PHP pain, I feel it would be a commendable thing to end this article with just a small sentence on the importance of choosing the right tool for the job. 10 years ago I would have read this and gone off to learn PHP and MySQL.
- jrochkind1 13y agoI don't know if that's neccesarily the wrong way to get started, PHP and MySQL. It's how most of _us_ got started, right? (Okay, I got started in Perl, and only dabbled in PHP).
- clienthunter 13y agoYou started in Perl? That's hardcore. The PHP/MySQL was ok back then, but there's so many great alternatives with great exposure today. Aside from ease of deployment, I don't see what benefits there are now.
- CWIZO 13y agoMy girlfriend is just starting learning web development. She now has a very basic understanding of HTML and CSS. Then she went to Rails Girls London to learn a bit about the backend. Unfortunately (and I know as I was a mentor at one of this events) RoR is completely unsuitable for a beginner. It took me one hour to explain what a console is, and she still doesn't really know what to do with it. She had all this questions like "what is a controller", "umm how do I open this page now again?", "umm how do I do X", "how do I do Y". Now contrast this with PHP. I setup a simple server, install PHP, get it started and then just tell her "create a new file called 'index.php' save it in this location, then open your browser and enter localhost/index.php". That's it. She doesn't need to know about generating controllers and rakes and db migrations and what not. Open text editor, put html in there, put some PHP in there. That's it. Seriously, PHP is perfect for a beginner. She can learn about MVC later. Right now all she wants to do is to create something and have it work. She really doesn't need to know about adding model validators and what not. And from what I know about Python it's the same deal as with Ruby. You just can't create a file and start writing a web page without pulling in a bunch of boilerplate. So bottom line is: yeah PHP is way relevant today.
- jrochkind1 13y agoEven though I'm the one who suggested that maybe PHP was a good place to start... I think it's probably a mistake to try to learn web programming without learning _programming_ first. Hello world. Loops and conditionals, math, etc. Because while many of us learned web programming with PHP, many of us also learned programming before we learned web programming. And you _can_ just create a ruby or python file and start running it, not for a web app neccesarily, but for learning programming. (In this sense, they are better for this than Java, because there's no compilation or boilerplate, you really can just create a file and run it)
- jrochkind1 13y agoWhen I got started, a perl script in /cgi-bin was not an unusual way to go. :) And that's exactly the thing about when I started. I already knew Perl. Then I learned HTML and how cgi-bin worked. There wasn't even CSS back then. The I learned SQL, and then CSS. Then eventually Javascript. Then Rails, and JQuery. Somewhere in there I learned more about the parts of the Internet and TCP/IP that matter, like DNS. Then fancy things like the Rails asset pipeline (it is useful, and it is very confusing), and increasingly deep knowledge of the DOM, Javascript, ruby, Rails, etc. In the end, I learned a lot, but I learned it over several years. And I already started with basic programming knowledge. I honestly don't even know how to tell someone to get started today -- it's a LOT of things to learn, you just can't learn them all at once (none of us did). So maybe PHP is the place to start. I don't know, I'm not sure, but maybe. I wouldn't want anyone thinking it's a good way to do anything beyond learning and maybe deploying _very_ simple sites, but I don't know a better way to learn -- it's how most of us did. What are the alternatives with great exposure you think would be better for someone to start with? I am curious for real!
- jafaku 13y agoPHP got a lot better. In fact I would say it's the best web platform today, if you pick the right stack (eg: nginx + Symfony2/Silex + PostgreSQL). You just had bad timing.