5 ms·
Engineering is not computer science. A sane engineer don't pick technology based on what is most theoretically pure, but based on what can deliver on the requi
by vidarh 14y ago
Engineering is not computer science.
A sane engineer don't pick technology based on what is most theoretically pure, but based on what can deliver on the requirements on time and on budget.
If you are building a simple CRUD style application, for example, there's likely nothing in your technical requirements that precludes PHP in any way. Then the question turns to ease of deployment and maintenance, operational costs, cost and availability of developer time, and there PHP tends to score quite well, not least because there's a huge pool of relatively skilled engineers that know it.
I personally prefer Ruby and don't like writing PHP at all, but I'd be a horrible engineer if I wrote it off in situations, where, e.g., it is hard to hire Ruby developers at a reasonable price, or there's a lot of existing PHP knowledge within a team that is already in place.
- iguana 14y agoCost and availability of developer time is much more of a factor in platform choice than a lot of people think, especially engineers who don't have to worry about the business end. If you can find RoR developers, they are not cheap. If you're building a v1 product on a limited budget, and don't want to spend 80 hours per week writing it yourself, PHP is an excellent choice. Having to read the code with a clothespin on your nose is a small price to pay.
- astrodust 14y agoFor the question "I want to build a web application", PHP is not the answer. It is the worst in nearly every category you cite. Are there automated deployment tools written in PHP for PHP applications? I mean ones that can be taken seriously. What optimization options do you have for PHP? What latitude do you have with hosting? If you're not Facebook, writing your own PHP engine, you're going to be stuck with one of a few that are generally crappy. Cost and developer time are non-factors since the time you'd need to learn PHP is probably higher than other languages that make more sense and aren't filled with anachronisms you will spend half your time working around. You can train someone up in Ruby on Rails in two weeks. Django or Node would take about double that time, but only because the platforms aren't by default as feature complete and the tooling will vary from project to project.
- iguana 14y agoSoftware snobbery. "Cost and developer time are non-factors" Bro, do you even startup?
- pestaa 14y agoDon't quote and cut half of his sentence off. You tried to change the meaning substantially. His point was that learning PHP properly with all the shenanigans takes at least as much as time as learning a well thought out environment.
- iguana 14y agoHis definition of properly is nothing but an ever moving goal post of software snobbery.
- astrodust 14y ago"Unit tests? SQL escaping? What are you? A snob?" It's not snobbery. It's called doing your job like a professional. This is harder in PHP than it is in other languages. The only language more cantankerous and difficult than PHP is C. Learning PHP properly is hard. There are hundreds of little things you will have to be very careful about because they are easy to get wrong and the cost of failure can be enormous. If you can't see this, you're basically a PHP snob. You're holding your pet language to a different standard than others.
- vidarh 14y agoWhat you miss is that I can source a dozen qualified PHP candidates in ten minutes just by searching my inbox for e-mails from recruiters I haven't yet deleted, that already know these things, and that charges substantially less than equivalently skilled candidates in a lot of the languages we both might agree are more elegant, if I'd even find those candidates - contrary to PHP, I don't have recruiters beating down my door to place candidates that are skilled in Ruby, and when I've helped friends find candidates for Ruby work, it's always far harder, and they end up paying a lot. I detest PHP from a language writers standpoint. Programming language design is a hobby of mine, and I am a real snob about programming languages from a personal preference point of view, and PHP certainly does not measure up. But I don't let my pet ideas about what a programming language should be like stop me from doing my job, which is to ensure we have an environment and team where we can get projects in on time and on budget with a staff that is both skilled enough and cost effective enough to keep us profitable. Is it possible to do this with Ruby? Sure. But the dynamics are very different, and the potential customers tend to be quite different. I've written web services in a number of languages, including C and C++, and been responsible for systems in a mix of PHP and Perl that handled ~$50 million worth of card payments and invoicing, and I've developed Ruby based systems and hybrid PHP - Ruby - C++ stacks. When I can justify picking Ruby, I do, because I love the language. But I refuse to pick Ruby just because I personally like it and it has a higher coolness factor in the face of economics where it doesn't make sense, such as when there's installed bases or teams that are already skilled at PHP. It'd be irresponsible.