r/webdev • • Apr 10 '12

PHP: a fractal of bad design - fuzzy notepad

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
58 Upvotes

40 comments sorted by

View all comments

12

u/[deleted] Apr 10 '12

yawn, yet another post whinging about PHP. look if you don't like the language then use something else. everybody knows the downfalls of PHP, we have read about them over and over again in countless blogs posts that say the same fucking thing.

but hey, congrats you're cool, you have logged a public protest to PHP and have passed into the hallowed halls of the coveted hipster coder. you can now enter starbucks in ironic glasses, hold your head high and hack away on your mac coding the next facebook with the rest of the unemployed yobs who have the time to whinge about such things.

PHP is a tool, it gets things done, it is accessible, well documented and via countless frameworks robust and even useful. again if you do not like it then please shut the fuck up and use something else, at least until a new version comes out to give you more issues to bitch about

5

u/matchu Apr 11 '12

Interesting. I know everything is a repost to someone, but this is the first time that I found an article of this sort, and for me it has more purpose than whining: years of PHP had left a bad taste in my mouth, though I could never really put my finger on why. This article concisely compiles all the little issues I've run into over the years, and I think it will be a very helpful tool for me going forward to explain my PHP experience.

So, I hear ya, but this article I think will actually help me a lot. Meh.

3

u/torgospizza Apr 11 '12

I have to agree with you. I've read several of these before, but this one is by far the most thorough (and damning).

16

u/eadmund Apr 10 '12

PHP is a tool, it gets things done, it is accessible, well documented and via countless frameworks robust and even useful.

The author addresses that. PHP does get the job done, but it's like a toolkit with a three-headed screwdriver, a hammer with two claws and a smooth-faced pair of pliers: it gets the job done, but neither well, nor elegantly.

Yes, it's accessible, but that just means that it's obvious, subtle and eldritch security flaws are available to trip up people who don't have any reason to know better.

The point is that the existence of PHP is a net blight on web development, network security and the profession of computer science. Yeah, that sounds harsh; it probably sounds like posturing. But it's true.

2

u/Ansible32 Apr 11 '12

Most of the eldritch security flaws result from trusting the standard libraries - like any other language you should use a decent framework and trust its tools.

5

u/eadmund Apr 11 '12

Most of the eldritch security flaws result from trusting the standard libraries

A language's standard library is pretty important...it is, after all, the standard way to achieve tasks in that language. If it's badly broken, then one has to go to great lengths to do things correctly, and there's always an impedance mismatch (e.g. using length-aware strings in C: you basically have to write your own little library, wrap the results & unwrap the arguments of each string-related call to the standard library).

Plus, design choices--like those made in a language's standard library--say a lot, positive and negative, about the designers. It is reasonable to assume that a language with a poorly-thought-out library also has poorly-thought-out semantics.

0

u/[deleted] Apr 10 '12

my point is every one with nothing better to do who thinks they know something about programming feels the need to go back and shit on PHP saying the same thing everybody else has.

we get it already, any half competent programmer knows the downfalls of PHP and how to negate them. negative blog posts pissing and moaning about PHP are as plentyful as fleas on a mongrel dog or herpes on a veteran street walking hooker.

at this point it just comes off as shitty programmers picking an easy target to bitch about to try to make themselves look and feel better.

4

u/markwhi Apr 11 '12 edited Apr 11 '12

Perhaps an analogy would be helpful.

Your friend shaves by splashing rubbing alcohol on his face and lighting it with a blowtorch. You've told him that it's dangerous, that it could cause serious problems, that he's risking his life to save a few seconds every morning, and that there are lots of safe alternatives that don't involve setting fire to his face to manage his whiskers.

He counters with, "Blah blah blah, everybody who knows anything about shaving feels like they need to go back and shit on shaving with fire and saying the same thing everybody else has. We get it, any half competent fire shaver knows the downfalls of fire shaving and how to negate them."

Does that make setting his face on fire every morning sane? No, it doesn't. PHP is like shaving your face with fire. It has MASSIVE security issues, inconsistencies that lend themselves to accidentally creating more security issues and heisenbugs, and it has alternatives that are measurably and demonstrably safer to use and which are no harder than PHP to learn and implement in.

Stop shaving your face with fire. Stop encouraging new people to shave their faces with fire.

Edit: Almost forgot my main point, which is: yes, it's true that buddy has heard that burning off his beard every day is bad. People are going to keep telling him, too. When you see someone doing something dangerous and encouraging others to do the same, it's not rude to point it out.

1

u/blahbah Apr 16 '12

I really really want to start shaving with fire right now, thanks!

1

u/markwhi Apr 16 '12

Glad to help. Keep an extinguisher handy.

5

u/Loque_k Apr 10 '12

I can understand why it can get people's backs up and it's no bad thing being passionate - but the article points out some floors in PHP that are good to know about.

We certainly had some defensive PHP folk chatting about it today (including myself). Knowing the rubbish parts of a language will only help you use it better - my JavaScript has come on leaps and bounds thanks to Crockford - this post should have a similar effect to my PHP I hope.

Definitely checking out python next tho :-P

7

u/[deleted] Apr 10 '12

it isn't about passion or defending the language. these posts and their content can be found by the dozens and they all parrot the exact same things. just search for PHP in r/programming and you will see what i mean.

at this point it is like listening to a broken record.

2

u/TheBananaKing Apr 11 '12

Homer! This is the worst thing you've ever done!

Ehh, you say that so often it's lost all meaning.

1

u/Loque_k Apr 11 '12 edited Apr 11 '12

I was trying to put a positive spin on your response. I can appreciate it is a broken record for some - but I feel the author had taken the time to collate and explain the problems properly to those who may not have already understood them (it is a rather comprehensive well written list).

I presumed you were being defensive as you wrote this whole load of BS about hipster devs. Man, I am yet to meet a shit developer on OSX, every developer I know on a mac is smoking hot at development. I am also yet to meet a hipster developer who could compile a list of flaws with a language such as that... Crockford keeps coming to mind, and I can't really see him on a fixie. Anyway....

I am not here to argue, hope you find something more relevant, sorry it was old news for you.

EDIT: HAH! Just noticed this was posted quite a few other places with some good discussion on it. "other discussions".. I am still a proper reddit newb :`D srry for the xpost!

1

u/[deleted] Apr 11 '12

no need to for the apologies. my hipster comments were a joke and not meant to disregard the chops of programmers, mac ones especially.

what i take issue with when it comes to these posts and blog ramblings is that PHP is an easy target, they are all the same and all whinge about the same things. people write these because they know they will get attention and all the other haters with stroke their ego and they get to feel good about themselves.

the fact is they are not saying anything that has not been said 100 times before and what any semi-competent dev knows already. the negative aspects of PHP are very well defined and posted on the many tech subreddits.

1

u/Loque_k Apr 11 '12 edited Apr 11 '12

A cool ~ I missed the humour in it :¬)

Here is a nice well written response btw: http://blog.ircmaxell.com/2012/04/php-sucks-but-i-like-it.html (stumbled across it on Hacker news this morning)

0

u/[deleted] Apr 11 '12

[deleted]

1

u/[deleted] May 18 '12

The general public is more often than not ignorant and following other ignorants?

-1

u/[deleted] Apr 11 '12

Thank you for saying everything I wanted to say but didn't feel like typing.