Earlier quoted context omitted.
The same thing could have been said about visual basic... one of the worse language ever made.
Yup! Yet it helped millions achieve their goals. :)
High Quality PHP
51–60 of 98 posts
Re: High Quality PHP
#52I think a valid point to make here is that what has propelled Ruby, Python, JS, etc, forward has not been the language, but the frameworks that have put context and boundaries around using those languages. Its entirely possible to write a poorly organized bowl of spaghetti using Ruby if you leave Rails out of the picture. I would venture to say the same is true for any programming language. PHP was born before the id…
You can easily write one with Rails over just a few months of maintenance. I hate, hate having to do a damned autopsy to trace all the @instance (read, global) variables copied and inserted into the objects that you never create yourself, -because Rails devs are apparently above having to endure the savagery of passing arguments to their methods- and having to grep every single function that gets automatically included from everywhere in the project into the namespace.
Re: High Quality PHP
#53Earlier quoted context omitted.
That's true. But why make it worse by choosing a bad language. Surely you have good practice and a language that makes it easier.
You wanna know why PHP is so popular and why many people chooses it? Because it's so easy to get started using. Compare that to almost any other language out there that is a nightmare to set up. At the end of the day the code if it works it works and PHP just simply works. Not for everything but for most things.
Reminds me of some of my friends who will obsess over the specs on a digital camera (or the power of a particular model of PC or Mac) and completely ignore setting up and composing a good photo. Wanna be purists I guess.
Many years ago I put together some shell scripts using awk, sed and an early shell. The were used to do an estimating system in the business that I was involved in at the time. They were crude and the code was really bad and I had at the time really little clue on how to do things the correct way. Had I had to learn c to do the same thing (which I did somewhat a bit later) I would have never ended up with anything at all. Professionals laughed but the people who bought the business ended up using the system that I wrote for about 4 or 5 years until they found something to replace it. It got the job done. Under the hood what was going on (in this particular case I have to stress as this was pre-net and only used internally) wasn't really a factor.
Re: High Quality PHP
#54Earlier quoted context omitted.
> how easy it integrates with HTML, JavaScript, CSS No more than any other language or product written in such. > Of course it's ugly, but who besides a bunch of snobs and people who actually can't use it really cares? Who should care? You see, this is a big part of what's wrong with the PHP community, the apathy and immaturity. How on Earth is dismissing the reasoned criticism from professional peers and academics a…
Critique is fine but it just need to be based on other things than taste. Point to a thing you cant do with PHP and you have valid criticism. Critiquing PHP because you you think it's ugly or not elegant enough is only valid if you care about such things and then you are by definition a snob.
> Point to a thing you cant do with PHP and you have valid criticism.
s/PHP/Brainfuck
Does your argument still hold? Are you now a snob?
Re: High Quality PHP
#55It is really easy to talk smack about PHP because as a language it is not the prettiest, best designed, or cleanest language out there. It often leads to some very gross code. However, programmers write ugly code in every language and even in a much more beautiful language like Ruby, there are so many projects that end up with ugly codebases, poor performance, etc. that PHP by no means holds an exclusive ownership of…
You can trot out the trope about how you can write good code or bad code in any language as many times as you wish but it will not change the fact that php makes it unnecessarily difficult to write good code and, through both the language's and its standard library's misfeatures as well as the surrounding culture of sloppiness, encourages writing bad code.
I won't argue that there are large pockets of PHP developers who do fit the bill of encouraging a culture of sloppiness, but to paint the entire userbase this way is just ignorant.
Re: High Quality PHP
#56Earlier quoted context omitted.
> how easy it integrates with HTML, JavaScript, CSS No more than any other language or product written in such. > Of course it's ugly, but who besides a bunch of snobs and people who actually can't use it really cares? Who should care? You see, this is a big part of what's wrong with the PHP community, the apathy and immaturity. How on Earth is dismissing the reasoned criticism from professional peers and academics a…
Critique is fine but it just need to be based on other things than taste. Point to a thing you cant do with PHP and you have valid criticism. Critiquing PHP because you you think it's ugly or not elegant enough is only valid if you care about such things and then you are by definition a snob.
Re: High Quality PHP
#57Author here. I wrote this article as a guestblogger for Acquia, which is the company behind Drupal. I don't work at Acquia. The article obviously uses Drupal as an example, PHPBB and Wordpress as comparison because they are all in the off-the-shelf, customizable category of PHP applications. Both Drupal and phpBB (contrast to Wordpress) have massively modernized their code bases in the last years and improved the qua…
[edit]It's since been fixed. That was an impressively quick response.[/edit]
Re: High Quality PHP
#58I believe "high quality PHP" is an oxymoron. It's just impossible to be aware of all the pitfalls PHP contains. Here is just one example among many: > if( '33333333333333333333' == '33333333333333333334' ) echo "equal"; Output: "equal" The "reason" for this very odd behaviour is that the two strings are automatically converted into integers, which leads to an int overflow, which PHP ignores (ignoring errors is very P…
If you're encountering this pitfall, the problem isn't the tool being used, but the person writing the code.
Re: High Quality PHP
#59It is really easy to talk smack about PHP because as a language it is not the prettiest, best designed, or cleanest language out there. It often leads to some very gross code. However, programmers write ugly code in every language and even in a much more beautiful language like Ruby, there are so many projects that end up with ugly codebases, poor performance, etc. that PHP by no means holds an exclusive ownership of…
The difference is that PHP was not really designed for the type of use it gets. It began as one guy's hobby project and somehow snowballed to power some of the biggest sites on the internet without really having the backing necessary to support that position. PHP maintainers have been desperately attempting to backport the type of functionality that Serious Business people need, but it's never going to be as organized or clean as something that was conceived to serve that purpose.
If you care about code quality, choosing PHP already puts you at a disadvantage. It's not that people can't write adequate PHP code, or that people can't write ugly code in other languages. It's just that most other languages give you a pretty healthy head start over PHP when it comes to cohesion of organization, presence of important language features, etc.
Re: High Quality PHP
#60It is really easy to talk smack about PHP because as a language it is not the prettiest, best designed, or cleanest language out there. It often leads to some very gross code. However, programmers write ugly code in every language and even in a much more beautiful language like Ruby, there are so many projects that end up with ugly codebases, poor performance, etc. that PHP by no means holds an exclusive ownership of…
You can trot out the trope about how you can write good code or bad code in any language as many times as you wish but it will not change the fact that php makes it unnecessarily difficult to write good code and, through both the language's and its standard library's misfeatures as well as the surrounding culture of sloppiness, encourages writing bad code.