News for hackers. Stuff that matters.
Re:Creator of PHP talks to Digg about performance and security by jolan on Monday August 02, 2010 @12:42AM (#1566860)
I really like his rant that starts at the ~62 minute mark and ends with this:

"PHP is just a damn tool. It's just a hammer; it's boring. It's not that interesting. I'm not that interested in it. But I need a working tool to solve problems. I'm really, really interested in problems. The tool itself; if it works great. If it's broken I fix it. But I don't spend my entire life fixing it. PHP is damn ugly. It'll always be ugly because we're not going to spend the time to sit and make it pretty. We're spending our time building actual solutions and fixing problems. And the tool works. You can build really, really fast things with PHP. And yes, it's not pretty. If you're a CS major or if all sort of for the purity of coding; PHP is not for you. But then you're not probably not interested in building things for end users."

Re:Creator of PHP talks to Digg about performance and security by cheald on Monday August 02, 2010 @01:01AM (#1566884)
I'm not much a fan of that sentiment. It's the same sentiment espoused by people who don't have time to design software properly, or test it, or do exception handling. The tool is an important part of solving problems, but having an elegant tool helps keep the tool itself from becoming a problem. There seems to be subtext in that rant which says "prettier languages are inferior because they're written by academic snobs who don't have any experience actually writing real software", which is just patently false.
Re:Creator of PHP talks to Digg about performance and security by scorpioxy on Monday August 02, 2010 @01:53AM (#1566959)
Seconded.

Also, people who usually have that sentiment are not the same people who have to maintain the code. They're usually long gone by then. I have personally suffered many sleepless nights having to maintain projects like that.

I think it's healthy to avoid extremes. Neither a "whatever works" nor a "write everything in lisp because it's beautiful" sentiment. It's up to the good programmer to decide when to be a pragmatist and when to be a purist.

Re:Creator of PHP talks to Digg about performance and security by jolan on Monday August 02, 2010 @02:28AM (#1567028)
My takeaway was that you should use what you're most productive in; even if there happens to be some inconsequential warts.
Re:Creator of PHP talks to Digg about performance and security by cheald on Monday August 02, 2010 @03:29AM (#1567113)
I hear you, but the way he expresses what he does has the net effect of making excuses for PHP and saying "Hey, it's okay that it's an entirely inconsistent language without fundamental features of other real languages because it's just a tool to solve a problem I had at one point, and I hack in new features as the problem-of-the-minute requires them". That's not a well-designed tool. That's a hammer glued to a screwdriver duct taped to a torque wrench welded onto a lawnmower. You can probably properly tension a timing belt with such a monster, but just because you can doesn't mean that it's the right (or most productive) tool.

I'm very productive in PHP; that doesn't change the fact that I discovered I could be more productive in other languages that didn't actively frustrate my development progress due to being well-designed.

Re:Creator of PHP talks to Digg about performance and security by nopassrecover on Monday August 02, 2010 @07:58AM (#1567419)
Agreed. Noone calls a builder fancy for wanting working tools.
Re:Creator of PHP talks to Digg about performance and security by mdg on Monday August 02, 2010 @07:18AM (#1567376)
You are missing the point. The end user does not need to know, and more importantly, doesnt even care what language you use. Just solve their problem.
Re:Creator of PHP talks to Digg about performance and security by generalk on Monday August 02, 2010 @09:31AM (#1567582)
The end user doesn't directly care, but if you solve their problem in a hacky unmaintainable way, they'll care when it takes you days to do what should take hours, weeks to do what should take days.
Re:Creator of PHP talks to Digg about performance and security by mdg on Monday August 02, 2010 @09:46AM (#1567621)
So writing my app in <your preferred language> automatically makes it elegant?
Re:Creator of PHP talks to Digg about performance and security by generalk on Monday August 02, 2010 @10:07AM (#1567672)
No. I didn't say that. The language you write in doesn't matter nearly as much as your attitude about writing the software. If you don't design for maintainability and readability, then modifying the code later will take much longer.
Re:Creator of PHP talks to Digg about performance and security by Volscio on Monday August 02, 2010 @09:13AM (#1567534)
I'm not a coder, and I wouldn't be building stuff today if I didn't have PHP. I think a lot of people probably feel that way.

Programma hatas gon hate.

Re:Creator of PHP talks to Digg about performance and security by kingkilr on Monday August 02, 2010 @08:46AM (#1567483)
I may not care, but I end up knowing every time I see one of those PHP/MySQL error traces in a website. Apparently one of their problems isn't proper exception handling.
Re:Creator of PHP talks to Digg about performance and security by mdg on Monday August 02, 2010 @09:47AM (#1567623)
So writing my app in <your preferred language> automatically ensures my database will be up and all exceptions are handled correctly?
Re:Creator of PHP talks to Digg about performance and security by kingkilr on Monday August 02, 2010 @10:33AM (#1567720)
No, it does, however, ensure that my errors don't randomly get dumped on the page, and that instead an exception is raised and a proper 500 page can be returned.
Re:Creator of PHP talks to Digg about performance and security by jacquesm on Monday August 02, 2010 @03:17AM (#1567093)
For well over a year I've been looking for that 'better hammer', but to tell you the truth I haven't found one yet.

I've built some non-trivial application in a number of environments just to see what the grass is like on the other side of the street. Each and every solution I tried has its own warts and requires you to work around a new set of issues.

PHP is a 'bad' programming language, it smells of band-aids all over. But for all the elegance and brevity of some of the other contenders there isn't a single one that is better on all fronts. So far. Still looking, still trying new stuff. If I find something that makes me really happy I'll feel so much better because the P*/Javascript/CSS/HTML/SQL hodge-podge that we call web applications feels like the absolute wrong way to develop software to me.

We're doing something terribly wrong.

Re:Creator of PHP talks to Digg about performance and security by tomjen3 on Monday August 02, 2010 @08:35AM (#1567460)
You might want to take a look at the lift frame work - it is written in Scala, and is essentially correct most of what I hate about PHP.

The only downside is that it requires Jetty (or Tomcat) to be deployed, which means you can't use it on a shared host.

Re:Creator of PHP talks to Digg about performance and security by bkrausz on Monday August 02, 2010 @03:51AM (#1567139)
Rasmus has been repeating this line to everyone for years now: I actually feel pretty bad for him. He gets quite a bit of flak for the language, when it actually does exactly what it's meant to.

Everyone just likes to hate on it because it's not "proper" enough for the academics and doesn't make enough assumptions (ala RoR) for many of the practicalists (I know I'm making up a word).

Re:Creator of PHP talks to Digg about performance and security by jrockway on Monday August 02, 2010 @06:41AM (#1567324)
No, this is not right. The problem with PHP is that you can't use PHP to fix PHP. If you encounter a problem, there is no way to write a library to fix it.

Perl, on the other hand, was designed with "academic" abstraction mechanisms that can be hooked to change the language. For years, this was a problem -- Perl 5's object system was more like an object system object system. Everyone built their own object system for every application, and then used that. This made a mess, and annoyed everyone, because everyone was doing OO in their own slightly-wrong way. Yuck.

Then someone decided, "hey, let's use this object system object system to write a real object system!", and Moose was born. Now most new Perl 5 apps all use the same object system, and everything works much better. OO modules compose. Objects can be shared. It's possible to write object databases that actually work. (Just look at the MooseX:: namespace on search.cpan. All of these modules fundamentally change how "object oriented programming" works for a particular class or group of classes, but they all compose together cleanly and don't have effect outside of a limited scope. Beautiful! And it makes writing reusable code easy!)

No changes to Perl were ever needed for this, and yet the object system is probably the most flexible and feature-rich of any major programming language.

If PHP had the ability to be changed by PHP programmers, then the massive community would have cleanly fixed all the problems already. The Perl community did it. The Ruby community did it. Even the Java community sort of did it. But since the attitude is that PHP is just a hack on a hack, and web apps should just be hacks, PHP remains a hack on a hack that's too difficult to use for complex projects.

Re:Creator of PHP talks to Digg about performance and security by mootothemax on Monday August 02, 2010 @06:55AM (#1567334)
If PHP had the ability to be changed by PHP programmers, then the massive community would have cleanly fixed all the problems already.

PHP's greatest strength is also its greatest weakness: it's very easy to pick up and start running code. Have you read the huge number of broken tutorials that tell newbie users how cool, for example, variable variables are? Can you imagine the new levels of abuse such a system would introduce? ;)

Re:Creator of PHP talks to Digg about performance and security by jrockway on Monday August 02, 2010 @07:08AM (#1567360)
Can you imagine the new levels of abuse such a system would introduce?

Actually yes, it's called Rails.

But anyway, a system that can't be broken is also one that can't be fixed. PHP programmers switching to Rails did some weird stuff, but without that ability to do weird stuff, Rails wouldn't have even been possible.

Re:Creator of PHP talks to Digg about performance and security by pacemkr on Monday August 02, 2010 @10:06AM (#1567665)
This statement is absolute nonsense. Why should a programmer hate himself so?

I want to have beautiful and powerful tools. The code you write using an elegant language might as well be ugly. This shouldn't stop you from enjoying the process and demanding the best tools to do an already difficult job.

He admits that PHP ain't pretty, but argues that it does the job and that's good enough. Yes, yes it is good enough. However, he also claims that its the way it should be if you are "interested in building software for the end user." No, it really shouldn't, and thankfully we have practical languages and successful projects that prove it.

Re:Creator of PHP talks to Digg about performance and security by baddox on Monday August 02, 2010 @01:08AM (#1566896)
This would only be valid if there weren't any other languages/platforms that can build fast solutions and also be appreciated by CS majors for not being a huge ugly mess of a language. Unfortunately for PHP, there are.
Re:Creator of PHP talks to Digg about performance and security by juser on Monday August 02, 2010 @01:18AM (#1566906)
Well, PHP is obviously doing something right, or everyone else is doing something wrong since PHP still sits near the top of the heap in usage. I noticed this the other day:

http://www.activestate.com/blog/2010/07/growth-dynamic-langu...

which shows PHP is used more than any other dynamic language and it is growing faster than Ruby, but not as fast as Python and Javascript.

Re:Creator of PHP talks to Digg about performance and security by baddox on Monday August 02, 2010 @01:35AM (#1566926)
PHP still has a lot of momentum behind it, but I think that momentum will fade (or PHP will dramatically change). You still frequently see "PHP" as a three letter acronym on job postings, even if the employer doesn't use PHP. "PHP" in those cases basically just means "we want someone who develops software for the web." Or it might mean "we still have some old nasty PHP code that you may have to peek into from time to time."

As for growth rate, I question any study on "programming language usage" because it's very hard to define what that even means. Still, I'm not surprised by their findings. We've all seen the explosion of Python—both with hobbyists and huge corporations. As for PHP still increasing, that could be attributed simply to the persistent increase in web usage in general. It doesn't necessarily mean PHP is "beating" Ruby.

Re:Creator of PHP talks to Digg about performance and security by tomjen3 on Monday August 02, 2010 @08:38AM (#1567465)
The thing PHP has going for it (other than an enormous momentum) is that

1) it is easy to get startet

2) it is supported by just about every single host ever

Re:Creator of PHP talks to Digg about performance and security by smokinn on Monday August 02, 2010 @09:17AM (#1567540)
And from a business perspective: 3) It's easy to hire for
Re:Creator of PHP talks to Digg about performance and security by eru on Tuesday August 03, 2010 @02:03PM (#1572055)
Though it's probably just as hard to get good PHP developers as it is to get good developers in general.
Re:Creator of PHP talks to Digg about performance and security by loewenskind on Monday August 02, 2010 @04:17AM (#1567160)
"If you're a CS major or if all sort of for the purity of coding; PHP is not for you. But then you're not probably not interested in building things for end users."

So if I'm not willing to use a tool that will create a mess that is expensive to maintain then I probably don't care about end users? Fallacy detected.

Re:Creator of PHP talks to Digg about performance and security by snom370 on Tuesday August 03, 2010 @04:22AM (#1570492)
So you're assuming that PHP will create a mess that is expensive to maintain? Fallacy detected. :)
Re:Creator of PHP talks to Digg about performance and security by loewenskind on Tuesday August 03, 2010 @09:57AM (#1571106)
No, I'm not assuming, I've experienced it first hand. The language is ridiculous. I'm not going to rehash the tons of reasons the language is not technically sound, if you wish to believe it's a suitable language then go ahead. When a better designed language actually focuses on this space the different in maintainability will become measurably clear.
Re:Creator of PHP talks to Digg about performance and security by snom370 on Monday August 16, 2010 @03:15AM (#1607094)
PHP might create a mess that is expenesive to maintain for _you_. It might even create a mess for a lot of people, especially newbies. Likewise with Perl.

That doesn't mean that creating maintainable PHP software can't be done - it's actually been done many times. While I agree that languages can make a big difference in maintainability, please stop blaming a programming language for your own mistakes.

Re:Creator of PHP talks to Digg about performance and security by robryan on Monday August 02, 2010 @03:53AM (#1567142)
I get the impression though that he isn't to fussed whether people choose to use PHP or go with something like ruby or python.
Re:Creator of PHP talks to Digg about performance and security by code_duck on Monday August 02, 2010 @10:41AM (#1567744)
I've said about the same myself.

Rasmus is eminently practical. Mucho respect to the man.

Re:Creator of PHP talks to Digg about performance and security by chrismsnz on Monday August 02, 2010 @01:14AM (#1566902)
Unfortunately, PHP is also fundamentally broken in a number of ways. Ways that you're likely not to find out until after it has pissed in your cornflakes.

He doesn't seem that interested in fixing those problems, either.