Live data from Hacker News

Ask HN: Why no love for PHP?

news.ycombinator.com

21–30 of 150 posts

Re: Ask HN: Why no love for PHP?

#21
post #2

holds hand up I use PHP. Indeed I use PHP for most of my commercial web stuff (i.e. stuff I make at work & most of my startup ideas). Mostly I'm a Python fan but for websites PHP is just 100% easier for me because I have a framework I know well (KohanaPHP) and years worth of snippets/experience to use in prototying sites. I bet I can code a simple site faster in PHP than Python. As to why PHP isnt discussed much on h…

I agree with this statement. I've reached a stage where I could code a PHP-based website much quicker that in other languages. Admittedly it's what I started programming on (and has taught me a few bad things, but certainly kept my interest in programming).

I don't agree that there's nothing interesting going on though. I'd like to see some more innovative extensions (which might be because they are coded in C) but PHP Classes (http://phpclasses.org) is constantly producing PHP libraries and snippets for common tasks

Re: Ask HN: Why no love for PHP?

#22
post #19
post #4

It reminds me of Perl. Perl literally gave me a headache last time I coded in it. (Incidentally, this is why I'm wary of Ruby as well.) Besides, I am totally satisfied with Python.

I don't see too much similarity between Perl and PHP. Perl has a the syntax of a loose cannon. PHP's syntax is very Java like. * PHP doesn't have special variables that change things about the language like, the starting index of an array. * Out of the box, Perl requires you to import modules to get functionality that PHP has with a simple function call. * Perl has support for classes, but you feel like it's a hack e…

Perl is also way faster than PHP, and has had nice things like closures since... well, for a long time now. Not that I'd want to use Perl these days, but language-wise, it's a bit more advanced than PHP is.

Re: Ask HN: Why no love for PHP?

#23
post #15

One of the things that I think is relevant to startups hiring is that ( warning experience mixed with opinion ahead) there are lots and lots of PHP developers of wildly varying quality. This makes the initial stages of recruitment time consuming. By looking for people with skills or interest in Ruby, Python or Scala (or whatever is hot that month) you'll probably see less interest but, on average, the quality and ent…

This issue was discussed a while back in the context of hiring Haskell programmers.

http://news.ycombinator.com/item?id=468493

Re: Ask HN: Why no love for PHP?

#24

PHP has a few downsides, everything from poor naming conventions to security vulnerabilities. People around these parts are always looking for the cleanest solutions to their problems and the latest methods available. PHP's relative age and problems make it neither. That said, I coded my first startup in PHP. It's dead simple to make a dynamic web page with PHP, but it's also dead simple to create a huge mess. In tha…

Amusing. Rails as the "Dane Cook" of web frameworks pretty much hits the nail on the head.

I love Rails but the fanboy culture really sucks.

Re: Ask HN: Why no love for PHP?

#25
post #14

I have often thought the same thing as PHP is a fantastic web development language, and it is very well developed. The documentation is very good, and as you mentioned there are useful code examples right in the documentation. The learning curve for PHP is very low, and there is library support for pretty much anything you want to do. Oh, and it is dead simple to deploy. I think RoR is one large reason why PHP is loo…

WHat would you recommend for getting into Ruby? I tried it once but their site is horrible and the "Hello World" example is really babyish and idiotic - and it put me off :) I've never "got" RoR. Python makes sense to me as a killer all-purpose language just as PHP makes sense to me as a niche for-the-web language (I cant get these people that insist on running PHP standalone :o). But I never quite figured the rails…

ErrantX

I would highly recommend learning Ruby before trying RoR. The first time I tried to learn RoR I didn't know any Ruby. I had limited success because I had to battle the framework and the language.

You don't need to know everything about Ruby to start on RoR, but you should be able to write some basic programs.

There are a number of online resources for Ruby:

Unofficial and old, but has a lot of good info: http://www.math.umd.edu/~dcarrera/ruby/0.3/

http://www.whytheluckystiff.net/ruby/pickaxe/

http://www.ruby-doc.org/docs/UsersGuide/rg/

http://qa.poignantguide.net/index.html

For RoR guides online, I didn't find anything that I really liked. I ended up with Sitepoint's Simply Rails 2.0 and followed it. I didn't find any free guides/books that really helped me much. Once you get a basic understanding of MVC you can learn a lot of from http://railscasts.com though.

PS: Sorry to everyone for the RoR/Ruby hijack

EDIT: Wrote a sentence misleadingly, fixed it.

Re: Ask HN: Why no love for PHP?

#26
post #5

PHP is like a mobile phone that's a year old - it's perfectly good, but ain't what the cool kids are playing with.

Except every year the 'cool' phones come and go, and PHP is still around, kick ass and taking names.

And my Nokia 5120 still boots up like it's first day when I pull it out of the discarded gadget drawer.

Re: Ask HN: Why no love for PHP?

#27
People who are really good at their jobs obsess about their tools- artists obsess over their paint, carpenters obsess over their power tools, cooks obsess over their knives.

PHP is like buying a chef's knife at Wal-Mart. You can create a 5 star dish with it, it cuts perfectly fine, but it doesn't inspire the same passion that a Shun knife does.

Most restaurants in fact, don't use fancy-knives, they use just regular knives and it works out just fine.

But, to draw the analogy back to programming, we're not regular restaurants. We're wannabe "rock-star" chefs- coding and "startup-ing" isn't just a job, it's part of our core ethos, so we obsess over all the tools we use, the text editor, the monitor, even the chair- because it makes the experience all that much better.

Most people do this about things they seriously care about. Runners debate intricacies of running shoes or the perfect in race meal. I've had debates with weight-lifters about weight-lifting gloves. Go over to a different forum, and you will hear arguments about the perfect size of a suit lapel.

The "Everyman" tools can always accomplish 100% of the job, but provide 90% of the experience. We spend an inordinate amount of time trying to get that last 10% out.

Is it probably unnecessary? Yeah. But people really bond over passions, and in arguing/debating that last 10%, you can really connect with people, which is why sites like Hacker News are fun and addictive.

Re: Ask HN: Why no love for PHP?

#28
post #22
post #19

Earlier quoted context omitted.

I don't see too much similarity between Perl and PHP. Perl has a the syntax of a loose cannon. PHP's syntax is very Java like. * PHP doesn't have special variables that change things about the language like, the starting index of an array. * Out of the box, Perl requires you to import modules to get functionality that PHP has with a simple function call. * Perl has support for classes, but you feel like it's a hack e…

Perl is also way faster than PHP, and has had nice things like closures since... well, for a long time now. Not that I'd want to use Perl these days, but language-wise, it's a bit more advanced than PHP is.

way faster -- sounds subjective to me. What references say this?

Re: Ask HN: Why no love for PHP?

#29
Back in the day, PHP was exciting. It was free, it was powerful, it was easy to learn. Everyone coming out of college knew C anyway and it has a similar structure. You could suddenly give your circa 1999 web pages a page date in REAL TIME and you could respond to forms without nasty cgi-bin. Eureka!

Nobody gets excited about it anymore because it solved the problem it was aiming to solve a long, long time ago.

Post reply on HN