Live data from Hacker News

Coding Horror: The PHP Singularity

codinghorror.com

241–250 of 341 posts

Re: Coding Horror: The PHP Singularity

#241
post #237

Earlier quoted context omitted.

I have to ask, because it's really been getting at me for a while honestly. How do your developers react to that? I mean, you guys are known for going after the best and the brightest. People who have worked hard to perfect their craft. These people tend to have strong opinions when it comes to language design. How do you get them from that point to "ok, now write some php code" ?

The aspects of PHP that are bad (and there are more than a few) are easily tooled around. We have a review-time tool that parses your PHP, symbolically executes it, and looks for dubious idioms, flagging them for you and your reviewer. Meanwhile, PHP gets a number of things very right. For instance: * State: there is none across requests. Oh sure, there's APC, and the filesystem, and databases, etc., but those are al…

Is that tooling you mentioned related to/uses 'pfff' ? (https://github.com/facebook/pfff)

Re: Coding Horror: The PHP Singularity

#243
post #48

I seriously groaned when I saw this post (title). I was expecting an elitist diatribe about PHP (because this is perennially popular amongst particular programmers) but that's not what this post is intended to be. Interestingly Jeff does take the usual potshots at PHP almost like he thinks he'll lose street cred if he doesn't but the basic message I agree with: if you want someone to stop doing something you consider…

His post irritated the hell out of me. For 90% of it, he rips on PHP, then at the end he says, "how about bloggers stop ripping on PHP?" Hey guys, Jeff said his piece about PHP, everyone else shut up about it now.

I am damn tired of his takes on PHP. It's damn pissing off to see the kind of points he puts in his posts.

I don't even get the part where he says that we need to come up with better solutions. So, if we want better solutions when are they going to arrive. It's not like that the solutions are getting baked in some oven or something.

We have new solutions that we can use. We may even call them better, but I don't think that I will quit a language just for the fun of using something new.

PHP might be st, it might even break at times, but there are some wonderful frameworks which have come up lately. Laravel is one of them and a number of developers are contributing to the code. One cannot just ignore the fact that so many people have gone mad and not even a single one of them actually felt the need to quit PHP forever and build a new language that is better than it.

Re: Coding Horror: The PHP Singularity

#244
post #161

Earlier quoted context omitted.

I have to ask, because it's really been getting at me for a while honestly. How do your developers react to that? I mean, you guys are known for going after the best and the brightest. People who have worked hard to perfect their craft. These people tend to have strong opinions when it comes to language design. How do you get them from that point to "ok, now write some php code" ?

That's easy: the best recognize languages are just a means to an end. Language snobbery, in my experience, tends to be highly correlated with being a "wannabe" rather than "great" and a useful filter. You will find any number of C/C++ programmers who think you can't write anything in Java. Many Java programmers think you can't write anything (beyond 100 lines) in Python. Many Python programmers think you can't (or si…

You have obviously never worked on a million-line codebase.

When you have crap like this in your language:

> E.g., $i = 0; $a[$i] = $i++; makes a different array than $i = 0; $a[$i + 0] = $i++;

you have no hope of making a truly large program work. There are just too many sources of itsy bitsy bugs; you'll never find them all.

(I'm not a PHP user; I have no idea why those are different arrays. Don't bother explaining; I don't want to know.)

Re: Coding Horror: The PHP Singularity

#245

Earlier quoted context omitted.

Life is full of tempting shortcuts. Take them at your peril.

Well that's basically saying nothing at all. Again, from the brother's perspective, perhaps learning Ruby is the tempting shortcut ( "I'll just learn this awesome language first and my website will be super easy to upgrade and modify" ) ... and then it takes him too long to get back to his website, which has floundered and is no longer popular or making money. Or ruby was too hard for him so he went back to tweaking…

Simple versus easy [1]. Getting started with minimal friction is a great virtue for the beginning of a project's life, particularly when it allows amateurs to produce something of value. Software development professionals with stronger requirements (reliability, maintainability, ease of code reading) are not always going to reach for the easiest tool. There's a reason most of the software on your machine isn't written in Visual Basic.

The people who prefer PHP are right. The people who avoid PHP are also right. They are solving fundamentally different problems.

[1] http://www.infoq.com/presentations/Simple-Made-Easy

Re: Coding Horror: The PHP Singularity

#246
post #114

Earlier quoted context omitted.

If I make a string: ' ' . $var . ' ' - does it know to encode the variable, and not the entire string? What if I assign that string in a variable, and then output it later? I'm not convinced this can be done well. Maybe if all you do is make some templates and fill them in you could do it. But I do a lot more than that, I output dynamically built html all the time. Just give people a very easy and shortly named funct…

Perhaps what we need is a language/platform that has built in strings that track not just the code page type encoding, but some kind of "intent assertion" as well -- is the string intended to be encoded for a particular output? Combining an "unknown" string with an HTML (or SQL, or PostScript, or JSON/JavaScript, ...) string would produce an exception. Such a mechanism would have to include encoding functions (and as…

The Haskell frameworks do this, more or less: www.snapframework.com, for instance.

Re: Coding Horror: The PHP Singularity

#247

Earlier quoted context omitted.

Way to talk down to people. I use PHP as my main language for web development, but also am a frequent C user. I have done projects in C# and Python. While I like C# and Python - actually for scripting I tend to go for Python rather than PHP, prefer the CLI modules of Python- , I found that in context of web dev PHP still get the job done faster and in a maintainable manner. As for C, I use it for writing PHP extensio…

I'm not talking down to anybody. Based on experience I asserted that many programmers feel that PHP is an inferior language because they've experienced "cleaner" languages such as Ruby. It's not wholly unreasonable that chez17 had only programmed using PHP, as PHP is commonly a programmer's first language. I therefore wanted to find out if chez17 had used other languages and to see what their thoughts are on PHP vs t…

Good, just the way it read.

As for constantly mocking other languages, that was not directly pointed at you, but at the constant swarm of people always going about php sucks, php this, php that... We got it, you people don't like PHP, try to see if I care.

Re: Coding Horror: The PHP Singularity

#248
post #237

Earlier quoted context omitted.

I have to ask, because it's really been getting at me for a while honestly. How do your developers react to that? I mean, you guys are known for going after the best and the brightest. People who have worked hard to perfect their craft. These people tend to have strong opinions when it comes to language design. How do you get them from that point to "ok, now write some php code" ?

The aspects of PHP that are bad (and there are more than a few) are easily tooled around. We have a review-time tool that parses your PHP, symbolically executes it, and looks for dubious idioms, flagging them for you and your reviewer. Meanwhile, PHP gets a number of things very right. For instance: * State: there is none across requests. Oh sure, there's APC, and the filesystem, and databases, etc., but those are al…

>These three things turn out to be among the most important parts of a server-side language

So the language does two of these three things by not doing them at all ? State: oh there's no state across requests. Concurrency: No shared resources, no threads, but we'll call it shared-nothing concurrency and then say it looks like Erlang!! Amazing. An Erlang actor holds mutable state and sends immutable messages. A web request in PHP does neither.

> If you want to run some code in parallel, Why do you even bring up parallelism in a post about concurrency ? ( http://news.ycombinator.com/item?id=3837147 )

> PHP gets them very, very right. The rightness was accidental.

Completely agree. Here you have a language that decides to tackle hard problems in CS by not tackling them. Then it becomes uber-pervasive because you can do "hello world" over the web by just doing Once the traction is a given, we argue about why not tackling hard problems is actually "very, very right".

Re: Coding Horror: The PHP Singularity

#249
post #241
post #237

Earlier quoted context omitted.

The aspects of PHP that are bad (and there are more than a few) are easily tooled around. We have a review-time tool that parses your PHP, symbolically executes it, and looks for dubious idioms, flagging them for you and your reviewer. Meanwhile, PHP gets a number of things very right. For instance: * State: there is none across requests. Oh sure, there's APC, and the filesystem, and databases, etc., but those are al…

Is that tooling you mentioned related to/uses 'pfff' ? ( https://github.com/facebook/pfff )

Yes, exactly. Thanks for mentioning it.

Re: Coding Horror: The PHP Singularity

#250
post #161

Earlier quoted context omitted.

I have to ask, because it's really been getting at me for a while honestly. How do your developers react to that? I mean, you guys are known for going after the best and the brightest. People who have worked hard to perfect their craft. These people tend to have strong opinions when it comes to language design. How do you get them from that point to "ok, now write some php code" ?

That's easy: the best recognize languages are just a means to an end. Language snobbery, in my experience, tends to be highly correlated with being a "wannabe" rather than "great" and a useful filter. You will find any number of C/C++ programmers who think you can't write anything in Java. Many Java programmers think you can't write anything (beyond 100 lines) in Python. Many Python programmers think you can't (or si…

I like how people who exemplify the Dunning-Kruger effect are entirely willing to cite it in order to look smart.
Post reply on HN