Earlier quoted context omitted.
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 P…
God I hate phpclasses.org The code is great, but the site is awful, just awful. Mirrors? What is this 1999? How much bandwidth can downloading ZIPPED php scripts use? Oh yeah, and there's registration required and big, ugly, flashing banner ads. If someone knows of a site with the same contents, please, please let me know :)
Ask HN: Why no love for PHP?
81–90 of 150 posts
Re: Ask HN: Why no love for PHP?
#82Earlier quoted context omitted.
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 P…
God I hate phpclasses.org The code is great, but the site is awful, just awful. Mirrors? What is this 1999? How much bandwidth can downloading ZIPPED php scripts use? Oh yeah, and there's registration required and big, ugly, flashing banner ads. If someone knows of a site with the same contents, please, please let me know :)
Re: Ask HN: Why no love for PHP?
#83People 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 k…
Your analogy reminds me of the greatest cook ever, my grandmother. She used no technology whatsoever. All of her tools had been her mother's which were probably manufactured in the 1800s. She chopped everything by hand in a wooden bowl. (If anyone else helped her with the chopping, everyone at dinner could tell.) She never used pencil or paper and measured nothing. She stood in line at the farmer's market, the butcher, or the grocery store and inspected every item. And absolutely nothing I have ever eaten since, in any restaurant or home, has been remotely close to hers. It was magnificent! And I miss it so much.
I'd like to think I have almost as much passion about my work. I use the most primitive tools, 24 x 80 green screen editor, no framework, no IDE, no debugger, and mostly pencil and paper. I savor every byte just as I imagine my grandmother savored every little detail of her cooking. I'm not trying to save time or be fast, I just aspire to creating Grandma-quality software. I only hope my software brings someone the same joy her food brought all of us.
I've used many different tools, including php. And I rarely care how fancy they are. Ironically, the simpler, the more joy I have found along the way.
Re: Ask HN: Why no love for PHP?
#84There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
If you're new to programming, don't waste your precious memory to inventorying an ugly mass of built-in PHP functions. Just pick Python, Ruby, C# or something else--anything else. If you have to learn it for your job, well, learn one of the other languages anyway.
Re: Ask HN: Why no love for PHP?
#85Re: Ask HN: Why no love for PHP?
#86There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
For example, about typing... your argument is that when you cast a string to an int, it returns 0. What would you have it return, null?
Typing is jank in a number of ways, but in most cases I See the logic in the original decision. To a noice, the idea that false == "false" (because "false" casts to 0) but true != "true" just seems broken. But what else would you have it do?
About namespaces, people are complaining that PHP should use the dot operator like every other language. PHP uses dot for concat, which eliminates the ambiguity of using + for both concat and addition that exists in other languages. Now, they're going to use a backslash for namespace resolution. And that does create operator ambiguity. So PHP trades one ambiguity (dot) for this other.
And what do you possibly mean by "older style language"? Do you mean functional features? As you probably know, lambad's and closures will be available in 5.3. I agree that Python (my language of choice) and even C# (my 2nd fave) seem cleaner. But of course they do. They're new. Java seemed clean in 1997, too.
And finally.. I do value consistency in userland code and in the runtime. And PHP is horribly inconsistent. A salvation army of a language. But that stopped actually affecting me about 8 years ago when I left behind VIM for a real IDE with intellisense.
Re: Ask HN: Why no love for PHP?
#87Earlier quoted context omitted.
It's not just the experience. Languages like Ruby and Lisp tend to be a lot more concise and have more functionality than PHP, so it's more like comparing a blunt knife to a razor sharp one. You can still cut with a blunt knife, but it takes longer and is harder work.
I would argue that PHP and the LAMP stack have more functionality than any other language by an order of magnitude when you're talking about web development tasks. For anything else, PHP is pretty much irrelevant, but when you're doing web development, it's definitely the swiss army knife. Without a single import or require, you can send emails, query a database, download a web page, handle session data, get post var…
Previous customers have wanted lots of functionality in as few (and fast) page reloads as possible, with lots of reporting on each page. This results in a small number of mega pages backing onto a 'Service Layer' which in turn sits on top of a schema. Multiple applications can be hooked into the domain model to preserve data integrity.
I'm not as strong as many geeks I know at keeping complex things in my head. My experience of PHP (I've shipped apps from 3.0 to 5.0, but I've never invested enough time to know it well) is that it has weak language structures and weak object relational modelling capabilities - this makes it difficult to manage the sorts of complexity that I've encountered.
For anything else, PHP is pretty much irrelevant, but
when you're doing web development, it's definitely the
swiss army knife.
By way of comparison - in python there's a http interpreter in the standard library that you can bind to a webserver in seconds, and you can write a simple templating library in a couple of minutes too. It's got XML-RPC in the stdlib too that makes it ridiculously easy to offer services to other applications. Perl has similar stuff via cpan, ruby via rails. What more functionality could you need for a web app?
I've found powerful object modelling to be critical. The Java platform has always been strong in this.One thing that is nice about PHP is that you instantly get to the point that you change something and then reload - bang you can see your changes. CGI approaches aside, that's not such an easy point to get to with the other languages I know.
Re: Ask HN: Why no love for PHP?
#88People 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 k…
Great argument, nice analogy, makes a lot of sense, and I completely (and respectfully) disagree. Your analogy reminds me of the greatest cook ever, my grandmother. She used no technology whatsoever. All of her tools had been her mother's which were probably manufactured in the 1800s. She chopped everything by hand in a wooden bowl. (If anyone else helped her with the chopping, everyone at dinner could tell.) She nev…
Re: Ask HN: Why no love for PHP?
#89Earlier quoted context omitted.
I agree with more or less with what you said but a downside of PHP is not security vulnerabilities, that's really just a myth. I can't remember the last vulnerability which could be directly attributed to PHP as a language. Sure, there are plenty of apps containing holes but those are not caused by PHP but by not coding correctly, eg not checking input making SQL injections possible etc. Which might confirm what you…
http://osvdb.org/search?request=PHP http://osvdb.org/search?request=Python http://osvdb.org/search?request=Perl http://osvdb.org/search?request=Ruby "One of these things, is not like the others, one of these things is not the same..." No, there's nothing "mythical" about bad PHP security. At the point where there is a two order-of-magnitude difference between PHP and Python/Perl/Ruby, I stop even really caring about…
Anybody using PHP seriously in a production environment is also using Suhosin and PHP is secure enough at that point to just be a consideration and not a problem.
Re: Ask HN: Why no love for PHP?
#90People 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 k…
Great argument, nice analogy, makes a lot of sense, and I completely (and respectfully) disagree. Your analogy reminds me of the greatest cook ever, my grandmother. She used no technology whatsoever. All of her tools had been her mother's which were probably manufactured in the 1800s. She chopped everything by hand in a wooden bowl. (If anyone else helped her with the chopping, everyone at dinner could tell.) She nev…
Many hobbyists who have reached the utmost peak level in their art go totally primitive. Cooks grow their own food. Carpenters make hand-made furniture, people really serious about clothes go bespoke.
Just because we spend more time agonizing over things doesn't mean we have to spend more money on them. More "expensive" and "fancy" doesn't make them better- in cooking, look at the revival of cast-iron cookware and the people learning how to sharpening their own knives. The coffee snobs don't buy the most expensive starbucks brands- instead they go order fresh coffee beans, roast themselves, and then grind them. A person really into clothes doesn't get the latest Tom Ford/Armani suit- they instead get a bespoke suit from an English tailor, which is often far cheaper. There has been a movement away from $150 running to shoes to shoes like the vibram five-fingers to even barefoot!
Why do masters of the art do that? I think it's because of the idea that you can create something from nothing. This is very easy to do with computers (programming is the only profession where you can truly create something from nothing, limited only by your mind). You're not limited to someone else's vision when you do this- you can have everything exactly the way you want, the way you care about, the way that lets you exude your passion the most.
The guy who uses Ruby on Rails is no different from you, you just create your art in different ways. Using a green screen editor doesn't matter to them- they're not stirred up by it.
Instead, they get stirred up by using RoR. Maybe RoR solves a unique problem that they've been dealing with. Similarly, the guy tired of dealing with Java switches to Clojure and experiences the same light that you're experiencing- going simpler doesn't matter that too much to him.
There's no right or wrong answer in simplicity vs. complexity. Someone out there (Wozniak) is more of a purist than you and is writing everything in Assembly. The guy writing the latest and greatest web application is using Django because it's the simplest, most purest way to solve their problem- and when they get passionate enough about it that this is no longer the case, they'll go write their own.
You can get caught up in the tools and the techniques, but the one thing that really matters is that the examples I gave (and the example that you gave, which I love and will definitely remember) are of people expressing their passion. We may express it in different ways, but at least we're exuding it.
People that don't exude any passion drive me crazy.