PHP and the Lean Startup
blog.mayflower.de
blog.mayflower.de
But there's also a lot to love about RoR. I just needed to calculate the number of business days between two dates - step forward the business_time gem. Five mins later and I've got a stable, tested solution.
I've built and sold businesses on PHP, I run some sites on it still. But I've never got into testing with PHP, it just isn't seamless. And because of that, I've always hated going back into the code and improving things later - projects have tended to stagnate. With RoR you have to make an effort NOT to write tests, and making minor tweaks isn't like moonwalking across a minefield.
If you just want to whack up a prototype right fucking now then PHP and a Framework are for you. But if you think that you're working on something more than a punt then either put in the effort to write decent tests in PHP, or use a framework that will force you to do so.
In summary - PHP and Yii Framework do almost all of what Rails do. It's fast, stable, clean and easily deployed. But the weight of the developer community is now behind Rails. And Ruby is a neat language that I enjoy working with.
So we PHP people are good at failing early, fast and cheap. If you want enterprise grade fail, ask the java guys, if you want scalable fail, ask the c guys. If you want smart fail, ask the clojure guys. But early and cheap, ask us.
The claim here is that one can get to a working product using PHP substantially faster than with other languages. However, the article has no data to back this claim up. Indeed, one of the big goals of newer languages like Clojure, Python, and Ruby (the latter two not being explicitly mentioned) is to write code faster and with fewer errors. Java, while verbose, also has strengths: a great many excellent frameworks and libraries. This is also true for web development (e.g. http://www.playframework.org/). Including C in the argument is a little strange. As far as I've seen, it's one of the least used languages for deploying web applications these days!
In summary, I am wholly unconvinced by the claim of this article. And I say claim as it's missing any substantial argument. Does anyone have any actual data here? There are certainly many case studies for the newer languages and frameworks if you dig a bit. It's an interesting topic.
With proper engineering, PHP can be quick, cheap, AND good (see: Facebook. You want to argue the point, fine, but I don't see you becoming a billionaire on the back of your Haskell application).
Like every language, there is an appropriate place for it -- I would probably not write code for the Space Shuttle or a medical device in PHP. But, a great place for a language like PHP is web applications, especially for businesses who have to consider things like hiring people.
This is true for any language. It is also true for any language that poor engineering can make things really bad. PHP is in a unique position, though - it is so easily accessible to non-engineers that they begin writing applications without the slightest idea what they're getting themselves into.
This results in lots of improper engineering, and people blaming the language for the world's problems.
Javascript and Actionscript have this problem too. They get a lot less flack, though, because I think client-side scripting isn't held to the same standards.
Also, we're stuck with JS for the time being. PHP is easy to ditch by comparison.
I like working with JS but I don't know why the two operands aren't commutative in my example.
The DOM is a headache but luckily smart people have made plenty of libraries to abstract that away. What we're left with is a language with a very expressive and powerful core like you said, but there are still some oddities.
It's really a hybrid language. You can do a lot functional stuff with it if you'd like. You can also do a lot of the OO thing with it. Neither is perfect, but if you stick to the "good parts", it's a strong language.
Closures in JS are broken due to everything being a reference cell by default. This causes closures to be annoying to construct correctly and more expensive than they should be. "Functional" languages typically treat mutation as a side-effect and require reference cells to be explicitly declared. This helps enforce function purity and referential transparency -- functional-ness.
"Being careful about recursion" is like being careful about looping except recursive expressions are a superset of succinct iterative expressions making Javascript weak when it comes to, say, describing state machines. Lack of TCO makes Javascript a terrible compile target as CPS is impossible.
Javascript is an ambiguous, unsafe, difficult-to-analyze language. It supports some constructs that look like constructs in functional languages but because it does not enforce any functional or type systemic restrictions, these features are mostly cargo.
If you write a recursive algorithm in Javascript, you pay like O(n) for stack frames. The same iterative algorithm costs O(1) for stack frames. Thus, many developers eschew recursion in favor of iteration. This means that the logical code that developers write could be both mathematically sound and run efficiently on the machine but instead developers must either resort to temporal reasoning or perform recursion -> iteration transforms in their heads. This is broken.
Just because Javascript is ubiquitous doesn't mean it's good. I don't understand Javascript evangelists -- they seem to be spreading half-truths.
There are good parts though, and if you stick with them, it's not bad. In fact, it can be a pleasant experience to work with. Just because it's ubiquitous doesn't mean it's all bad.
I don't see how the unstructured development of the past has anything to do with using PHP in startups today. It's not about the language capabilities (90% of business aren't doing anything special in code), but developer speed and happiness. If you're happy with PHP then so be it, but that doesn't make it better.
The part that bugs me the most about the post is when it says "that's what we PHP guys do well: fail fast, fail cheap". Basically what he is stating is:
1) PHP developers are going to hit a wall earlier than other developers 2) PHP developers are cheap in general. How is that a positive statement, I don't know.
There's this stupid belief that by paying less for someone who does "a quick job" you can test a feature and then "build from there". It's bullshit.
From my own experience, I've regretted time and again hiring a cowboy (the fact that he was a PHP dev is not unrelated) developer just because we needed something "quick". What was supposed to be a 10-day deliverable turned into a 4-month mess of a codebase that I couldn't wait to rewrite. We ended up being hostage to our own code.
This seems to go a long way with frameworks as well.
Yes, I would say that's the "only" difference. ಠ_ಠ
Indicative of what exactly? A certain type of nerd (emphasis that I mean a sub group) that is likely to never accumulate wealth or create anything particularly successful on their own because they're too anal-retentive to understand that success in building a Web app or business is not defined by whether you use PHP or Ruby or Python or even ColdFusion.
Unless you think you're the next Facebook or Tumblr, then extreme optimization is necessary. Otherwise, the rest of the discussion is bullshit stacked on top of bullshit.
If the common wisdom were followed, Plenty of Fish should have never existed, given their infrastructure and development approach. And Stack Exchange should have never existed with their 'lame' Win stack (popular opinion of the Windows development environment among a certain class of developers =) ).
There are a lot of ways to 'skin a cat'. The only thing that matters is whether you can get to the finish line, build something people want to use, and perhaps monetize it so you can keep putting resources into making it better. Who gives a shit what you use to get there, just so long as you get there.
Bingo. Everything else is just navel-gazing.
To this day i'm still not sure what would be better: telling my boss "sorry, but if we want feature y, it will take 2 months (but it will we done right)" or "yes we can do that in 2 days but don't expect the code to be pretty"
I'm sure some programming book somewhere has said that in a much more elegant fashion.
In fact, there are countless finish lines in business and product development. You're constantly running a new race every development cycle. Trends change, competitors change, the entire landscape can change. Sometimes you're going to find yourself flat footed, and you're going to have to start a whole new race to launch a radically altered product.
It'd be like saying there was no finish line for the iPhone version 1. Of course there was, they had to actually ship it. And every product iteration has a new race to run and a finish line to meet to put the product on a shelf somewhere to be purchased. The same is true with iterating software of any sort, whether you're talking a micro level finish line (adding a feature to Gmail or Firefox 10.1), or a macro level finish line (shipping a completely revamped Firefox version or launching a radically new email concept with GMail beta). Getting from point A (inspiration, idea, task) to point Z (task completed) = finish line.
Try never having a finish line on any task, product, business, etc, and see what happens.
You see, what you call a "certain type of nerd" are actually craftsmen who enjoy things done well. You can be all the IKEA you want, and you're surely gonna rack up some interesting profits. But if I'm the kind of furniture maker who enjoys taking 6 months to build the perfect cabinet, you can be sure I'll pay special attention to selecting tools that I love. And none of your monetization arguments are going to count really.
So the bottom line is that PHP vs Ruby vs Python etc is a craftsmen's discussion. (If it's a serious discussion at all, that is - comparing it to Lean Startups isn't a serious discussion.) Bringing arguments like yours to such a setting just makes you look silly (especially when you think it's about "extreme optimization", then you just look like you really have no idea what you're talking about).
Sure, craftsmen like to discuss their tools, but as an open exchange about their experiences in order to learn from it, or maybe even simply out of professional curiosity.
The whole "my stack is better than your stack", and the "PHP sucks" thing that is commonplace on HN, proggit and other forums is not a craftsmen's discussion. It's a juvenile playground pissing contest that has nothing to do with craftsmanship.
By the way, anybody who thinks that real crafsmen typically use the "best" tools available has never seen neither an artist nor a plumber at work.
Should go on top of proggit/hn (yes, including blinking tags :).
You are correct that they do not pick the "best" tools, but they will deliberately choose the best tools for the job, as opposed to the most convenient tools to aquire and learn.
Although they might not use them, they'll talk endlessly about them. I mention in another comment how I've witnessed very long discussions among my photography and cinema friends about the "nerdy" details of their work. But you're right, there's a lot less emotion than in our community :/
Beautiful analogy, expect that it doesn't work here. You could be a craftsman and build an extremely solid and well designed backend. In the end consumers cannot appreciate your backend. A good example is I have no freaking clue what HN is built on. PHP? LISP? RUBBY?
they all judge their peers on the results they produce.
There's a little bit of a mismatch here:* Posters above are arguing that the end result that programmers are judged upon is revenue. * You're arguing that the end result that craftsmen are judged upon is quality.
If a plumber is doing a terrible job but is doing well business-wise, I'd expect other plumbers to not look upon them so favourably
There are numerous ways to measure the success of a product. It depends on what it is meant to accomplish.
The real point is: it does not matter what tools you use, so long as you are able to reach success (in any number of ways a person may choose to define it).
You can obviously argue about which tools will best get you there, or give you the best chance to succeed.
I've seen plenty of entrepreneurs or developers, use a tool 85% good enough, to hit a homerun. It's little different than a good plan executed today being better than a perfect plan tomorrow. I believe there are exceptionally few cases in life or business where the '85% good enough' won't do the job. I've yet to see the 100% perfection set actually exist anyway.
The reason for that brings me back to my original point that there are too many people jumping in the language debates who really have no business being there. It's the equivalent of me trolling my photography friends saying that Sony makes amazing cameras because when I go on vacation I can just whip one out and take a decent shot, whereas the girl who didn't have her 4000$ SLR with her totally missed out on the opportunity. While 100% true, I'm really just derailing their conversation on the relative benefits of their cameras with something completely besides the point.
I've been dirt poor. Painfully, not actually scratching by, live off of ketchup packets poor. Let's talk about only seeing green some time eh. No matter the cost, I've always chose to do what I loved, and I've paid a helluva price for it at times. I've been an entrepreneur since I was 15. I know a thing or two about the extreme ends of both success and failure.
What I'm saying is: get the job done, whatever it takes. Use whatever tool will accomplish the job for you personally. Don't waste time turning yourself inside out over pedantic debates over 5% efficiencies, while opportunity escapes out the back door.
I wish we could kill the "entrepreneur" meme.
What you did since you were 15 was try (unsuccessfully from what I read) to launch some money making scheme or company.
I've been quite successful, thanks. =) Currently I'm sitting on a seven figure net worth, and I'm in my early 30's. How about you? I've also failed plenty, like anybody that has ever attempted anything difficult.
What I've done since I was 15 is build and create web applications that I thought were useful or that I wanted to see exist. Some of them I hoped would become successful businesses, some of them I created for the hell of it. Out of six web businesses I've started, three of those businesses have been successful and both paid for themselves and paid me a healthy income.
I built what is, per Quantcast, likely the world's #1200x largest web site, starting from $50 on a terrible virtual server, using nothing but an 8 year computer, notepad, and a 12 year old FTP program, on a very slow Verizon DSL line. Gee, if only I had used the right tools, lol!
I just closed an investment round with one of the most successful business people on the planet. Unsuccessful indeed eh. As the agreements I've signed permit it, I'll come back here and update on the progress of my new enterprise. We can compare notes, and see how wildly successful you are too.
Actually I've started my first company while in university, back in 1999. I sold my share in 2003. The company is still going strong today, and has around 30 employees nowadays (which might not sound much, but I'm from an entirely different country/IT environment). I also work for a startup the last two years, although not as a founder. I'm in my early 30s too, thanks for asking.
The whole "entrepreneur" thing, from the very word "entrepreneur", I find pretentious and silly, sort of like the "hipsterism" of the programming world. Oh, I did this and that, ramen, bla, MVP, bla, Rails, bla, exit, bla, VC round, bla, etc. Just build the thing, and STFU.
I admire people building things, from Steve Jobs to Bill Joy, who didn't run around selling the entrepreneur vibe.
Which, as I see it, is a rather recent fad, maybe a decade old at least in this particular form.
For you, as an entrepreneur whipping out MVP after MVP until you strike gold, that couldn't matter less, but for those interested it's a big deal. To jump in the middle of their discussion as an uneducated outsider and judge the whole thing as "bs stacked on bs" is... inconsiderate at best.
But really no one cares about your language except other people with chips on their shoulders too. When people use a product they really don't care about the tech specs no matter what the product may be. They care about what it does for them. I can clone Facebook in Runy or Twitter in PHP with both clones being more "optimized" than the original but no one cares. They just want to write on their friend's wall or retweet something so they'll tell me to go to hell with my .235ms improvements in page load times, DB queries, whatever.
A truly good developer doesn't waste time convincing people his stack is best. He proves his skill instead by shipping and iterating no matter what the language. The rest is just too-cool-for-PHP bragging (looking your way Ruby guys) and sour grapes (looking at you PHP).
I use PHP for almost all web development. However, I'm not against using other languages.
I admit, PHP has its faults, but it's still a great web dev language. PHP 5+ has really added some great OO functionality.
Thank you for lumping all of them together.
I love PHP, but I freely admit there are issues. I love private care, but I also admit it has problems.
It's this sort of intelligent discussions that we need for me to take those sides seriously.
Perhaps the PHP community is different now from when I left it a few years ago. I'd never go back to that.
Not a chance.