6 ms·
obligatory X is better than php flames on the way.. php just works.. end of story
by vinight 13y ago
obligatory X is better than php flames on the way.. php just works.. end of story
- jrockway 13y agoPHP just works... if you're willing to spend more time on it, find more bugs in production, have a less readable, extensible, and maintainable codebase, and have no taste. PHP is the dream of a one-man team that gets paid by the hour. Get contract, slap something together that makes the client willing to pay, throw it all away and do it again when the client wants a change.
- goshx 13y agoJust checking: do you have any experience with it? When was the last time you tried working with PHP in a team?
- jrockway 13y agoI've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more time checking for regressions than actually adding that one feature you want. That's not how you do large scale software development, that's how you add pack on billable hours by charging your client for the same work 100 times. Really, it's boils down to taste more than anything else. I've yet to see a tasteful application written in PHP. If I were to summarize it with one anti-pattern, it's that PHP encourages people to mix unrelated parts of the program into one place, making testing, maintenance, and understanding nearly impossible. I should be able to test your app's interface without having a database. I should be able to write a database query without reading any code that touches HTML. And it's something I never see in PHP code.
- LeafStorm 13y agoAnecdata: I just wrote a PHP application where the HTML never touched the database at all. And I'm right now working on a Java application where the database is mixed into the HTML just like the worst of the worst PHP, except because it's Java all the code is two times longer.
- jtreminio 13y agoThat's because you're stuck writing crap code in crap libraries. Really, you judge PHP off of Wordpress and Joomla?
- jasonlotito 13y agoEver notice how everyone who complains about PHP are usually complaining about WordPress, Joomla, or other such apps?
- sergiosgc 13y agoBecause these apps exist. WordPress, for example, is unparalleled in other language domains. What is the WordPress of Ruby? And in python? Is it Django? Where's the plug-in directory for Django, equivalent to [1]? I work with WP, I'm the first to recognize it's an old codebase with all defects this entails, but popularity has value. Value that PHP critics dismiss too lightly. [1] http://wordpress.org/plugins/ http://wordpress.org/plugins/
- jasonlotito 13y agoI'm not dismissing WordPress's value. Rather, I'm dismissing those that dismiss PHP out-of-hand and their lists of reasons include WordPress.
- badclient 13y agoExactly. He's comparing php to a framework. PHP isn't a framework. If he tried to write code in python or ruby without a framework or template engine, he'd have the same complaint. If he tried php with a framework or template system, he'd realize its not all that different. I just rewrote a Django app in php with very tiny modifications to the templates thanks to codeigniter and smarty.
- rorrr2 13y agoIs that what Facebook is doing? Throwing all the code away and rewriting from scratch when they want to make a change? You're full of shit and have no clue what you're talking about. Huge web projects are written in PHP, and they work just fine.
- harshreality 13y ago$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.
- pests 13y agoAs a PHP developer I entirely assume that is going to print 8. I'm sure every PHP developer has had it happen or ran across it in the manual: when strings are forced into int positions PHP uses the numbers from the front of the string. Its unexpected, but consistent.
- rhizome 13y agoKeying it to an int via the tip of the string? Let's call it iceberg-typing.
- memla 13y agoThings like this and some interesting developments from Facebook concerning them are mentioned in the presentation, so it would be nice if people would actually discuss that. Just a suggestion.
- wwweston 13y agoSecond this -- it's not only mentioned, they talk about a path to addressing this and other problems.
- jasonlotito 13y agoIt's PHP. Unfortunately, enough developer got bit by the fact that PHP doesn't prevent you from shooting yourself in the foot, and shot themselves in the foot. So, you'd probably be pretty ornery too when other people had more discipline to use the language without shooting their foot and were also employing it successfully. You'd probably want to make assumptions, and word hard to belittle them. Insult them. And they'll talk about beauty. And zen. And wonder, and joy in a language. And they'll gloss over the major problems that it suffers from. They'll imagine all is well. And they'll try and tell you that nothing good can come from the tool they once used to shoot themselves in the foot. Just walk away. Because you still have two feet.