读后感:真正编程的力量
读到 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 无删改 仅以此纪念陈皓(左耳朵耗子)
自己试水开发了个微信小游戏,接近于无后台 类似于这种整个代码运行在客户端的项目,如何防止被破解(别人会不会破解是另一回事)? 一般做法是怎么样的,求解答 单机游戏不需要防,…
想升级万兆 NAS 突然发现 Mac mini 加万兆网口意外的有性价比。Mac mini 丐版:M2 芯片,10Gb 以太网,两个雷雳 4 端口。官网价格 5249 ,不比 …
struct DV_COMMON_EXPORT product_config { int detect_delay_ms = 0; int reject_delay_m…
合速度