Hacker News new | past | comments | ask | show | jobs | submit login

>Why is PHP so threatening to so many developers

Because we inherit the horrible mess of shit PHP developers leave behind when the company finally releases they've painted themselves into a corner and can no longer move forward because every time they try to fix a bug in their software they add two more.

>Don't take jobs where it's the primary tool.

It is so widely used that even avoiding jobs where it is the primary tool, you will still almost certainly be stuck dealing with some PHP mess.




"horrible mess of shit PHP developers" has nothing to do with anything. Horrible mess of shit Ruby developers can be just as ugly if not more.


It can be but in my anecdotal experience the mess left by PHP developers is the worst. Especially when it comes to blatant XSS and SQL injection vulnerabilities PHP holds a clear lead.


There is a strong correlation. PHP makes it very difficult to write correct code. An app written in a language that goes out of its way to help you create more bugs is going to have, on average, more bugs than one written in a language that does not.


That "mess" your talking about is called technical debt. Technical debt is a real thing in any language not just PHP. I usually try to take this approach: make that "mess" less of a mess. Even just a little bit less of a mess. If not for your sanity, at least for the next developer behind you.


>Technical debt is a real thing in any language not just PHP

Oranges are a citrus fruit.

Does my argument strike you as being somewhat flawed? Making a true but irrelevant statement is not an argument. PHP is worse than other languages, not equal to them. You create more debt, and it is harder to fix. That is why experienced developers spend the time explaining to beginners that PHP is bad, rather than just ignoring PHP as the original poster wondered.


> ... explaining to beginners that PHP is bad

But what makes it "bad"? Everyone says it, but I don't think I've seen any solid arguments behind it. If it's just because you get a lot of less experienced developers using it (for the reasons mentioned in the article), then I fail to see how that is a flaw at all. If you're 12 years old and trying to get started with web development, then you're probably going to use Apache and PHP to do your first "Hello world".

In the grand scheme of things, there are very few websites that actually require a more robust back-end than PHP. Unless you're pulling in millions of hits, you don't have to worry about the inefficiencies of the language.



True story: Worst code I've ever inherited in my life was in Python / Django.


It's possible to design and structure something poorly in any language. Conversely, it's possible to write clear and concise individual sections of code in any language as well (assuming knowledge of that language, within reason).

That's why I never put too much stock into python arguments that feature syntax readability prominently. Unfortunately, being a perl guy I've heard quite a lot of those. There are plenty of other language features that could be used to make a point that have less well understood solutions (for perl, those are Perl::Tidy and Perl::Critic).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: