Live data from Hacker News

PHP: A fractal of bad design

me.veekun.com

111–120 of 514 posts

Re: PHP: A fractal of bad design

#111
I can't believe this article is on the top of this site. At least 50% of what's written in there is totally wrong/false. Other information is terribly out of date. And even more information is merely half-truths and lack of understanding of the language. Even pure supposition like "PHP was originally designed explicitly for non-programmers" is incorrect.

This article is garbage -- don't be taken by it.

I'm not going to argue that PHP is a great language, but this article is a complete disservice to anyone who has bothered to read it.

Re: PHP: A fractal of bad design

#113
post #99

A client's system has PHP scripts in its crontab. Just imagine the wonders those files have inside.

I work for a very large ISP. When I get there I found that a lot of tools are done with PHP, and I'm not talking fancy PHP. mysql_, no APC, no framework, almost no objects, no web services etc.

The other day I was asked to do a cron task and I was able to do it with Zend Framework very quickly and quite elegantly. It was surely not the perfect tool but since it integrates with the culture of devs and sysadmin there it was certainly good enough and very maintainable.

Re: PHP: A fractal of bad design

#114
My major gripe with PHP is the lack of predictability. I end up having times where I say, "I know there's a method to do this" but my fuzzy autocomplete is drawing a blank. I google it, and it's named something completely different than what it should logically be. mysql_escape_string is a good example.

Re: PHP: A fractal of bad design

#115

I regularly, (all over this thread), see people swear that PHP is great for beginners. Everything in this article seems to indicate the opposite. You have to trip over PHP's poor design while trying to learn to program. Outside of the wide availability of PHP servers for cheap, what makes PHP so great for beginners? With Ruby, Python, Go, hell, even JSP for the "instant", in-HTML effect, I just don't see PHP as some…

> what makes PHP so great for beginners?

From what I can see and aside from the ease of install, it is the namespace. You type Sometimes everything not being an object helps, but only in the short run.

It's not great, but it's the easiest to grasp.

Re: PHP: A fractal of bad design

#116

Sure, PHP is full of inconsistencies and irregularities. You know what else is? English.

What English is good at is expressing a huge variety of ideas. I once heard someone argue on NPR (sorry, no citation) that English is perhaps the /best/ language at expressing absolutely any idea to another person precisely because it has such a huge vocabulary and so many idiomatic phrases.

I've sometimes heard of programming as an art, like poetry, but if so I'd prefer to maintain that it is a minimalist art that enjoys pragmatism and flourishes when reduced.

Put another way - I don't want to write 'A Tale of Two Cities' in PHP, I want to write a website in PHP. Or more correctly, I don't want to write a website in PHP.

Re: PHP: A fractal of bad design

#117

I can't believe this article is on the top of this site. At least 50% of what's written in there is totally wrong/false. Other information is terribly out of date. And even more information is merely half-truths and lack of understanding of the language. Even pure supposition like "PHP was originally designed explicitly for non-programmers" is incorrect. This article is garbage -- don't be taken by it. I'm not going…

Please enlighten me! I'm interested in correctness.

The "non-programmers" remark refers to a quote from the PHP 2.0 documentation. I tried to minimize the editorializing.

Re: PHP: A fractal of bad design

#118
post #117

I can't believe this article is on the top of this site. At least 50% of what's written in there is totally wrong/false. Other information is terribly out of date. And even more information is merely half-truths and lack of understanding of the language. Even pure supposition like "PHP was originally designed explicitly for non-programmers" is incorrect. This article is garbage -- don't be taken by it. I'm not going…

Please enlighten me! I'm interested in correctness. The "non-programmers" remark refers to a quote from the PHP 2.0 documentation. I tried to minimize the editorializing.

Nearly every other item is wrong; I didn't bother listed them all because it would just take too long. I'm actually still reading the article since I posted that comment and I'm still finding errors.

Re: PHP: A fractal of bad design

#119
post #115

I regularly, (all over this thread), see people swear that PHP is great for beginners. Everything in this article seems to indicate the opposite. You have to trip over PHP's poor design while trying to learn to program. Outside of the wide availability of PHP servers for cheap, what makes PHP so great for beginners? With Ruby, Python, Go, hell, even JSP for the "instant", in-HTML effect, I just don't see PHP as some…

> what makes PHP so great for beginners? From what I can see and aside from the ease of install, it is the namespace. You type Sometimes everything not being an object helps, but only in the short run. It's not great, but it's the easiest to grasp.

from * import

Re: PHP: A fractal of bad design

#120

Earlier quoted context omitted.

I find it odd how many people keep saying it's that simple to push PHP code to a box and get it working. Sure, if you've got crazy simple requirements it's generally a cinch. Once you do anything remotely non-trivial (want to read from a file? use some third party library, handle errors in a consistent manner) then you start hitting into issues with file permissions, PHP version differences, modules not compiled in b…

I think you're mistaken to assume the beginner even has such a thing as a local development environment. When first learning PHP I wrote all my code on a $10/month web hosts, saving directly to the FTP server. Only later did I install a local dev (now made very easy with MAMP), learn about version control, PEAR etc.

Yes, this is why PHP is easy for beginners. The standard practice is to edit directly on the server. It's a hard habit for a lot of PHP devs to break. It's very straightforward and direct: Edit a file, hit reload, see the result live.

Something like, e.g., Heroku is awesome, yes, but not only do you need to learn how to debug a thing which you can't really touch in production, not only do you have to master the distinction between "the file I just edited here" and "the file on the remote machine"… but you have to use Git for that. I love Git, but years of watching PHP devs try to figure out Git have taught me just how intuitive it isn't.

Post reply on HN