Live data from Hacker News

Coding Horror: The PHP Singularity

codinghorror.com

91–100 of 341 posts

Re: Coding Horror: The PHP Singularity

#91
>The best way to combat something as pervasively and institutionally awful as PHP is not to point out all its (many, many, many) faults, but to build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible.

This is clearly not the case. The alternatives are already compelling. They are equal to or better than PHP in every single respect. Yet they are not as widespread. The idea that pointing out the flaws of PHP doesn't help is absolutely incorrect. Demonstrating the flaws of PHP, and the practical impact that has on producing useful software has been very successful for me in convincing PHP users to try something sane. I find only a very small minority of PHP programmers are actually unwilling to try anything else, most of them will give something else a shot if you simply demonstrate why it is in their best interests. Some people certainly get upset when you point out that they are using a bad tool due to ignorance of better tools, but most are able to get over themselves and realize the better tool will make their life easier.

The overall effect of convincing individuals to use better languages is that those alternatives do become as pervasive as PHP. How does someone say "I want the alternatives to be as pervasive as PHP" right after saying "stop trying to make the alternatives as pervasive as PHP" without realizing how ridiculous that is?

Re: Coding Horror: The PHP Singularity

#92

Earlier quoted context omitted.

Debatable. What's your end goal? If your primary goal is making money (through the web) and you are non-technical, easier does in fact equal better. The GP's brother isn't going to stop what he's doing and learn Ruby so he can rewrite his whole website in gloriously succinct and elegant code. He's going to tweak his site, continue making money and stop caring about whatever the hell his site is written in.

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 his site with PHP. Or

My point is that it is all about perspective, something that a lot of HN misses. Not everyone cares about technology. Most people just care about getting the job done and making money, using whatever tool is easiest for them to personally use, at the time they need to use it. So to that guy, it isn't a tempting shortcut: it's the best route to prosperity.

Re: Coding Horror: The PHP Singularity

#93
post #73

Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…

The setup time issue is an advantage of PHP over many languages. But, I will let you in on a little secret, once you know how to do it 'setup' time is a drop in the bucket on all platforms. And in the rare case where it might otherwise be hard, people setup a shell environment they can use as the template on any project and it just works.

That said, there are popular languages worse than PHP for most web development tasks, Java for example.

Re: Coding Horror: The PHP Singularity

#94

Earlier quoted context omitted.

"Or what about the damage that proprietary platforms like .NET (which Jeff uses if I'm not mistaken) or iOS do to the programming world by restricting progress to a single company." PHP is used for web development. Microsoft's best alternative for web development is ASP.NET MVC which is open source.

No, PHP is a language with some framework-like aspects. Your nitpicking is quite poor.

[deleted]

Re: Coding Horror: The PHP Singularity

#95
post #73

Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…

What other languages besides PHP have you used? I think a lot of us dislike PHP because we're putting it in the context of better designed languages.

Re: Coding Horror: The PHP Singularity

#96
post #93
post #73

Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…

The setup time issue is an advantage of PHP over many languages. But, I will let you in on a little secret, once you know how to do it 'setup' time is a drop in the bucket on all platforms. And in the rare case where it might otherwise be hard, people setup a shell environment they can use as the template on any project and it just works. That said, there are popular languages worse than PHP for most web development…

Bash is another example! I've always wanted to create a web app using Bash on Balls [1]

[1] https://github.com/jayferd/balls/

Re: Coding Horror: The PHP Singularity

#97
PHP is basically the latest example of "Worse is better"(http://en.wikipedia.org/wiki/Worse_is_better).

----

Simplicity: The design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.

Correctness: The design must be correct in all observable aspects. It is slightly better to be simple than correct.

Consistency: The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either complexity or inconsistency in the implementation.

Completeness: The design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.

----

I don't know about you, but IMHO, this is PHP in a nutshell.

Edit: One other little thing I forgot to mention. PHP is like Java in that it is really hard for a metaprogramming or type system nerd to do something tricky and clever that another novice programmer brought in to replace him would not have a chance of unravelling.

Re: Coding Horror: The PHP Singularity

#98
post #89

Earlier quoted context omitted.

Try getting Django to run on various hosting sites. Dreamhost - been with them for ten years, gave up trying to get Django to work after a month of poring thru the docs, trying to get tab A into slot 3x. Mind you, I really like Python, but it's not worth the effort for a couple more years. PHP is the A-10 of languages. It's a slow, ugly and easy target. It works pretty much everywhere.

For pretty much every language these days, there is a hosted service that will handle deployment for you, and you can just push code to them and they'll take care of the rest. Better yet, they're perfect for beginners, who usually don't know much about database tuning, firewalls, etc.

Which kind of leaves me not understanding how it's deployed, etc., which I kind of feel like I need to know.

There isn't any one perfect solution, just workable ones.

Re: Coding Horror: The PHP Singularity

#99
post #86

Earlier quoted context omitted.

>Raw PHP usually beats Rails handsdown, and most PHP frameworks are usually comparable Being able to keep up with the slowest competitor in existence isn't very good.

The reason I cited Rails is that its usually proposed as the better alternative in these anti-PHP threads. Most "high" performance PHP doesn't use one of the usual-suspects in the framework world and can easily beat Rails (and usually plain ruby too). Edit: I should add "in my experience" to the end of that, I have no stats to hand.

>Most "high" performance PHP doesn't use one of the usual-suspects in the framework world and can easily beat Rails (and usually plain ruby too).

If you skip a framework on both languages, they end up as the two slowest languages. Hard to say if either is faster overall, but they are both awful. Using jruby provides a huge performance increase, and PHP really has nothing to compare with that.

Post reply on HN