5 ms·
To give a serious answer to this: While you are right that php bashing isn't always rooted in informed objectivity, the point you're making is missing something
by jonahx 13y ago
To give a serious answer to this: While you are right that php bashing isn't always rooted in informed objectivity, the point you're making is missing something deeper.
It's sort of like when that person with a crush on you who you just don't like but who insists that if you really got to know them everything would be different. It's just not true.
Even if could prove a 1 to 1 correspondence between features of ruby and php, php would still be... ugly. It would still lack grace. The feeling of looking at a page of php code just wouldn't be as pleasing. I believe it is this raw, irrational difference, this visceral reaction to the physicality of the code, and not a misunderstanding of features (even if they are misunderstood) that accounts for the most of the hate you allude to.
- smsm42 13y agoI personally think if you have raw, irrational, visceral reaction to programming languages, there's some priorities problem here. Those are tools. You're supposed to use them, not fall in deep emotional love (or hate) with them, that's what you do with people, not tools. I know this opinion may be unpopular and I know people do fall in love with tools (and use people) but I think they're doing it all wrong.
- eevee 13y agoTools should be designed to fit with humans; the goal is to minimize how much humans have to contort themselves to fit their tools. There'll always be some degree of learning and adjusting. But a mallet is still an improvement over a rock, because it's designed to fit in a human hand. I doubt anyone scoffed at the mallet and blogged that rocks have 80% market share so why can't we just get over it already.
- smsm42 13y agoThat's fine. People have different needs and preferences. Some drive Honda Accord, some drive BMW convertible and some drive GMC truck. It's just looks a little silly when Accord driver comes out and starts pronouncing that trucks are absolutely useless and he has deep visceral hate with anything that ugly stupid space at the back that nobody ever needs and millions of people that buy trucks are actually idiots just incapable of driving a clearly superior Accord.
- eevee 13y agoI'm not sure how to reconcile this analogy with the existence of government programs (carpool lanes, tax incentives for hybrids) that encourage the use of more efficient cars with more people in them, on the grounds that it's better overall for the ecosystem.
- smsm42 13y agoI sincerely hope you don't imply you'd like government coercion to be used on people "for their own good" when they choose what tool to use for their purposes. Or for the government bureaucrats to select winners in software world and facilitate wealth transfer from actually popular tools to those that are only viable as beneficiaries of government coercion.
- vectorpush 13y agoI think his point is that the truck analogy doesn't favor PHP when he considers that society has made an effort to reduce the use of trucks due to their general inefficiency compared to sedans. I think the analogy fails because trucks and sedans are different tools for different purposes (one is better for transporting people, one is better for transporting cargo), while PHP and Ruby pretty much do the same thing, one is just prettier and streamlined.
- smsm42 13y ago>>> while PHP and Ruby pretty much do the same thing Says who? >>> one is just prettier and streamlined. By which objective measure of "prettier" and "streamlined"?
- vectorpush 13y agoSays who? Says the fact that PHP and Ruby are both object oriented imperative scripting languages that are commonly used for connecting to a DB and spitting out markup. It's impossible to shove a refrigerator into the back of a sedan, but there is no analogous refrigerator that PHP xor Ruby is incapable of hauling. By which objective measure of "prettier" and "streamlined"? Well it is subjective, but the nebulous consensus is that Ruby has a cleaner and more readable syntax than PHP.
- Nekorosu 13y agoIt's not about love. Applied to programming tools beauty/ugliness describes a set of special qualities: expressiveness, readability and mathematical symmetry of it's structure. The process involving the tool which lacks this qualities is more prone to human errors. Also a bit of emotional attachment to the things you do everyday is good for your mental health. The lack of it is a sign you should change your job or even occupation.
- smsm42 13y agoThe problem is that if you look into the things these qualities applied to, you'd find that correlation between virtually any objectively measurable quality and love feelings expressed is minimal to non-existent. There's no objective measure by which you can conclude Ruby (as an example) is "more readable" than PHP. Of course, you can say "it's easier for me to read Ruby", but that's different thing - it's pretty easy for me to read Russian, but that doesn't mean I get to claim Russian language is superior to Mandarin, which I can't read at all, or to English, which I can read as easy, but probably appreciate the subtle meanings of it less. Yet more it doesn't make sense to me to express visceral hate for Mandarin each time it is mentioned anywhere or express my loathing and disgust to anybody that keeps using it, despite its obvious unsuitability to any practical purpose.
- jonahx 13y ago> There's no objective measure by which you can conclude Ruby (as an example) is "more readable" than PHP. Of course there is. You could, for example, survey developers who had experience with both and ask them. If you wanted to be more scientific, you could randomly select a group of freshman computer students, randomly assign half to a ruby group and half to a php group. Teach the ruby group ruby for year 1 and php for year 2, and vice versa for the php group. Then survey everyone. The point is you are trying to make this into an amorphous philosophical issue, when in fact it's a practical question that does have an answer. This is not scientific, but it is a personal observation: Most (not all, but most) of the developers I've met who make the arguments you are making and defend php as "just as good as any other language" and dismiss its detractors as hipster bandwagon followers don't actually have that much experience working with a language like python or ruby. It's rare to find people with lots of experience in both php and ruby/python who prefer php. Again, that's not "proof," but it's what I've observed personally.
- Killswitch 13y ago> The feeling of looking at a page of php code just wouldn't be as pleasing. Speak for yourself. I love looking at PHP code... Ruby? Well when I look at Ruby code, I think of all the condescending assholes in the Ruby world who think they're language is somehow superior because it LOOKS pretty... Then I base all my opinions on another language SOLELY on how it's syntax looks and nothing more. Because my endusers and customers only care how the syntax of the language I built their site in looks.
- jonahx 13y ago> Ruby? Well when I look at Ruby code, I think of all the condescending assholes in the Ruby world who think they're language is somehow superior because it LOOKS pretty This illustrates my point perfectly: Feelings about programming languages are rarely rooted objective analysis. They're rooted in emotional hot points. For some people, those hot points are the aesthetics of syntax. For others, like yourself, they are about social politics.
- smsm42 13y agoI have distinct feeling that some people think they have an objective definition of pretty (and of course it completely fits their favorite tool).
- gnaffle 13y agoWhile I agree with you that some languages can be prettier than others, I don't really get why this would be a problem, if you're talking about syntax. You could say the same about Javascript, yet projects like Node.js are gaining popularity and are quite popular with the HN crowd. Rather, I think a lot of the gut reaction against PHP comes from the fact that there is a lot of crappy PHP code out there. So if you ever had to deal with some PHP code, it would not be a pleasant experience. Likewise, Java has improved a lot over the years, but the popular way of writing Java code with layers upon layers of abstraction, XML config and build files etc. will just turn a lot of people off, regardless of whether it's possible to write elegant and nice code in that language.
- jonahx 13y agoWell clearly language popularity is a more complex beast than mere aesthetics. I'm only saying they do play a part, and probably a bigger part than most admit. As for js in particular, I'd personally argue that it's "merely plain or average" to php's "plug ugly." Although I wouldn't fight too hard for that point, and I'd note that many people who do serious js development actually do have a big problem with how it looks, and write exclusively in coffeescript.
- snom380 13y agoWhat in particular makes PHP ugly, compared to JS (or Java or C)?
- smsm42 13y agoThere is a lot of crappy PHP code out there, it is absolutely true. There is also a lot of crappy English poetry out there and absolutely disgusting and mind-bogglingly stupid English prose out there. And there are people that have to deal with that daily. Should we conclude English is a failure as a language?
- krapp 13y agoThe problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and riffle their pockets for new vocabulary. -- James Nicoll I submit that, indeed, English is the PHP of human languages. It's ugly, its rules are inconsistent and sometimes contradictory, it follows no coherent logical pattern, instead being a hodgepodge of rules and words from various dialects, and it's spoken by too many people who are clearly uneducated, as evinced by their unwillingness to learn to converse in a civilized and syntactically pure tongue.
- jmadsen 13y ago"Grace" is a subjective term. In my mind, it looks just fine. Ruby & Python look weird and choppy. Seriously, your argument is the same as saying "hip hop is bad music because it lacks the X of classical". You are fine in saying, "I don't like hip hop because X ", but to say it is "bad" because to you personally it isn't aesthetically pleasing is a foolish argument