新足迹

 找回密码
 注册

精华好帖回顾

· 纪念我曾经的工作:挂蛋! (2009-9-15) 魔头 · [虎妞看戏] 整理一些以吃为主题的影视,欢迎大家一起来补充~ (2008-8-16) Tiger_Karen
· 交作业啦,墨尔本宝宝聚会! (2008-10-23) 念念 · 我也开始漫漫买房历程(悉尼) (2007-4-2) benben
Advertisement
Advertisement
查看: 1462|回复: 8

Why I hate PHP [复制链接]

发表于 2011-12-5 11:56 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
http://who.wants.in/2008/06/why-i-hate-php.html

PHP itself has not too much to with it actually, well, it has, but the biggest problem with that language is the entry barrier. it is too low. every 10 year old can learn how to write basic php code and then starts to mess around with it, writes broken stuff and wonders why on earth software design is told to be complicated.
i got one of those php projects on the desk in the moment. a customer needs to get that project online and "just needs some bugs fixed". end of the story is that they refuse to have it rewritten because they sank too much money in it already and now got only the budget to fix the remaining bugs. turns out there is no "remaining bugs" there is just broken code around broken design around missing experience around no f**ing clue what software design is in the first place.
i saw lots of broken code in my live and i am well aware that i wrote broken code as well when i was a teen, probably even later. i wrote php as well as other stuff but i learned programming with real languages. programming is more than knowing the syntax, it is software design. it is the concept of how to optimize not only how to bump lines of code into an editor. this code rejects every idea of design. it has nothing to do with programming it is only inconsistent lines of code that happen do display things (at least from time to time).
why blame php? i think php is a language that can be used by guys knowing their business (even then it is a pain). it does not try to force you to a clean design. it does not provide you with a consistent API (positional parameters are interchanged every now and then) and it does not force you to actually design your code. this leads to the problem that every teen thinks to be able to write an application 10 times too big for him and the result even does nearly what was required. the problem is that the code is not maintainable because it was not planned, the code will never scale because the concept of scaling has never been considered. the code is cluttered and not readable because a codebase normally reflects the state of mind of the programmer this is a bad picture for the poor guy who cranked out those lines.
if all that sounds a bit frustrated then you are probably right. i never saw such bad code before not even in perl. most probably because perl has a higher entry level (replace perl with the language of your desire, i just used perl as it is often referred to as write only code).
it is embarrassing to know that someone paid good money for such a mess!
Advertisement
Advertisement

发表于 2011-12-5 11:57 |显示全部楼层
此文章由 o2h2o 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 o2h2o 所有!转贴必须注明作者、出处和本声明,并保持内容完整
典兄现在 专攻 js ?

发表于 2011-12-5 12:08 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 o2h2o 于 2011-12-5 10:57 发表
典兄现在 专攻 js ?


谈不上专攻,搞JS是因为工作里用得多,
现在年底了没多少事,做做Support就可以了,明年关注什么还不知道 ,

发表于 2011-12-5 21:41 |显示全部楼层
此文章由 dcc82 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dcc82 所有!转贴必须注明作者、出处和本声明,并保持内容完整
(monkey08)  提醒一下这是08年的日志了,那时php刚刚步入5.2,bug众多,安全性都有很大问题,08年的时候framework都还没怎么上呢,mvc在08年根本也没人用,那时广泛流行smarty模版,至少表面上把逻辑和显示相分离了,把php带入第二阶段

看了一下这个作者写的东西,感觉这个人怎么这么弱啊!倒数第三段的话十足表明了这人还只是处在初级阶段,感情是odesk做php freelancer做的太多了吧,难怪这么怨恨。

我认为任何一个把责任归咎于编程语言的人都是很蠢,很弱,很无知的。再先进的语言也能写的像屎

发表于 2011-12-5 21:58 |显示全部楼层
此文章由 xji 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 xji 所有!转贴必须注明作者、出处和本声明,并保持内容完整
反正只要php,js这些东西还是主流web开发语言,就绝不搞web开发。不过,搞后台也不需要用这些东西,Java和C就很好。趁年轻搞点别的吧,搞开发太毁人生。实在喜欢网络考虑曲线救国也行,想想Jobs也不太会写程序不是...

发表于 2011-12-6 09:30 |显示全部楼层
此文章由 porcorosso 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 porcorosso 所有!转贴必须注明作者、出处和本声明,并保持内容完整
看完这篇,我还是不厚道的笑了。。。
Advertisement
Advertisement

发表于 2011-12-6 09:37 |显示全部楼层
此文章由 hywyh 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 hywyh 所有!转贴必须注明作者、出处和本声明,并保持内容完整
典兄莫不是要搞一个"hate“系列?!

发表于 2011-12-6 09:37 |显示全部楼层
此文章由 karaoke_oz 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 karaoke_oz 所有!转贴必须注明作者、出处和本声明,并保持内容完整
php还好阿,免费,开发简单。
头像被屏蔽

禁止发言

发表于 2011-12-6 10:36 |显示全部楼层
此文章由 linkspeed 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 linkspeed 所有!转贴必须注明作者、出处和本声明,并保持内容完整
以后就js+c#吧

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部