3 ms·
PHP is what you can trivially easily outsource Yes, you can... but be careful - you might end up with this: http://paste.lisp.org/display/76132 http://paste.li
by Zak 17y ago
PHP is what you can trivially easily outsource
Yes, you can... but be careful - you might end up with this: http://paste.lisp.org/display/76132 http://paste.lisp.org/display/76132
That's real production code I removed from an application I was hired to extend and debug. Eventually, I convinced the client to scrap it and let me write a replacement with Rails.
- ams6110 17y agoSadly that resembles most of the ASP/PHP code I've ever worked with. The very low barriers to entry of PHP and ASP means you have (had) a lot of very inexperienced folks writing code. That said, I agree with the original point that PHP can be very productive. No compiles, no builds... just edit code/refresh browser to immediately see the effect of a change. That's nice if you have the discipline to not do stuff like the linked example.
- Zak 17y agoIt's important to note that the above-linked code could be written in any language that has printf or something like it. That includes Lisp, Python and Haskell. Of course, people who know those languages don't write things like that. I think it's due to pg's "Python Paradox"; I'm inclined to think outsourcing is actually easier with "smart" languages because the percentage of bad providers will be very low.
- deleted 17y ago[deleted]
- robryan 17y agoI think for people looking for outsourcing to it probably comes down to price, on average it's going to be cheaper to get get some php that works that get some python that works. Just look at rentacoder and the like, most of those people don't care how it's written or think about how much trouble the code base could give them in the future as long as it get's done and works.
- Jach 17y agoI think one of the problems comes from trying to use PHP too heavily as a template language, and then people try and do the shortest thing possible even if their source looks horrible. (I know I've done some icky things in the past to make the HTML look nice at the expense of the PHP file looking worse, or vice versa.) It's very easy to fail in separating code and visible content in PHP, which is great for some cases but bad for others.
- Zak 17y agoWhat I initially wrote to replace The Printf wasn't exactly pretty; it was a PHP function containing mostly HTML, with a few snippets of PHP interspersed. I consider that sort of thing excusable, especially if there's external time pressure. There's not much of an excuse for using an impenetrable 22-arg printf call to generate a table row though.