读后感:真正编程的力量
读到 coding horror (不知道中文翻译是什么,“代码恐慌”?) 中的文章 Real Ultimate Programming Power
文中讲到了软件开发中的方法论和其的演化,但是最让人觉得有意思的是两个引述:
The majority of developers do not suffer from too much design patterns, or too much SOLID, or agile, or waterfall for that matter. They suffer from whipping out cowboy code in a pure chaos environment, using simplistic drag & drop, data driven, vb-like techniques.
翻译: 让大多数软件开发者痛苦的,不是过多的设计模式,过多的SOLID(见注解), 过多的敏捷开发,或者瀑布模型;让大多数开发者痛苦的是在混乱的环境中用低级方式除去代码仙人留下来的古怪代码(好吧,这是我对cowboy code的曲解)。
But here’s the paradox: the types of programmers who would most benefit from these guidelines, rules, principles, and checklists are the least likely to read and follow them. Throwing a book of rules at a terrible programmer just creates a terrible programmer with a bruise on their head where the book bounced off.
翻译:…悖论的是,那些最能够从编程指导,规矩,原则和核对清单等方法中收益的人往往是那些最少读这些东西的人。把一本有关编程原则的书扔向一个烂程序员,顶多也就是让他脑袋上多一块淤青,书被弹回来而已。
流程对生产软件的作用可能是只有站在改造IBM的Peter Drucker那个高度的人才有价值的(但是,当你站在足够远的地方,地球不也就是一个蓝色的小点儿么?) 一个好的软件的产生,往往还是需要英雄人物的带领,剩下来的,还是人的问题。
附录:文中引到了一个很有价值的书目 (reading list): 从《代码大全》,《人月神话》,《点石成金》到《编程珠玑》、《精通正则表达式》,值得一览,在去书店的路上或者在当当网上闲荡的时候可以回顾一下。
SOLID:
five principles are principles of class design. They are:
SRP
The Single Responsibility Principle
A class should have one, and only one, reason to change.
OCP
The Open Closed Principle
You should be able to extend a classes behavior, without modifying it.
LSP
The Liskov Substitution Principle
Derived classes must be substitutable for their base classes.
DIP
The Dependency Inversion Principle
Depend on abstractions, not on concretions.
ISP
The Interface Segregation Principle
Make fine grained interfaces that are client specific.
转载于酷壳CoolShell 无删改 仅以此纪念陈皓(左耳朵耗子)
前年给长辈买了一台红米 NotePro 系列,今年卡得要死,遂刚换了一台荣耀 30X 。 我拿到新机,设置一会都要吐了,无论是第三方 APP 还是系统本身,都争先恐后争抢屏幕这…
下面是一个很“精湛”的JS程序: http://rmd.atdmt.com/tl/DocumentDotWrite.js 这个JS文件中“精湛”之处在于,其只有一行代码,如下所…
如题,之前是 gitee ,后来用不了了,只能考虑用其他方案 首先排除自己部署对象存储服务 看看有没有保密必要。例如有没有一些图片是私密的,有的话上对象存储。没有的直接放服…