Notes on reading "Pragmatic Programmer" by Hunt and Thomas. (Chinese Review)
># -- mode: org; eval: (visual-line-mode) --
1. Review
最近看完了Thomas和Hunt著的“Pragmatic Programmer”第二版。 在这篇书评我要表达我的观点和感受。
这个短评确实会很短,因为虽然作者们的确是很有名的,内容对新手程序员的确好用,但是对我而言,这本书没有特别大的影响。
我要从标题开头。 什么是“Pragmatic Programmer”? 或者谁是”Pragmatic Programmer“? ”Pragmatic“翻译到中文应该是”实用主义程序员”或者“务实的程序员“。
确实,表面上这本书大部分内容是关于如何写程序的。 但是,与大部分技术书不同,在这本书中代码不扮演最重要的角色。 也可以说,这本书的最重要的观点不在于如何写代码,而在于如何避免写代码。 就是说如何避免写僵化的代码。
这本书不分册,但是我自己,非官方的说,可以把这本书分两部:第一个是如何使用已经存在的程序避免重复实现已经存在很久的功能,第二个是如何跟人类交流,以避免写出客户不需要的代码。
这个知识对于领导高级程序员是必要的吗? 肯定是必要的。 我当作团队领导的时候,好几次遇到了和作者一样的困难,问过同样的问题。
那为什么我说这本书没有特别的影响我呢? 因为虽然他们的很多建议有意义,但是动动脑子,就会自己找到这个观点。 而且他们的好几个建议我在我的前公司都尝试过,但是没成功。
虽然计算机很复杂,但是跟真人一起工作更困难。
关于软件工具的话,他们建议学习下列计算模型:
- Actor model
- Event model
- Contracts
其中,contracts我没有见过,其它需要刷新。 其实,他们提到很多,但是大部分我早已学会。
关于社会工作,他们提供了几个建议:
- 如何准备好团队
- 如何计划项目
- 如何分析用户需求
这三个方面每个高级程序员应该擅长。 希望随着我的经验增加,我会更好的理解这三个领域。
这本书最大的缺点,我感觉是:它一点都不涉及跟领导的关系。 就是说,所有在这本书中提到的技巧,不管是技术的还是社会的,如果teamlead不能给老板介绍为什么这种技巧有用,就没办法使用它们。
总而言之,这本书比较简单,高级开发者能在一个周末读完。 可以用以介绍teamlead的工作,但是我不能保证这是最好的说明书。
2. Reading
3. Notes
Interesting things worth looking:
- Contracts (racket)
- Observer pattern
- Pub-Sub
- Streams
- Threading macro (pipelining)
- Delegation/mixins/traits
- Finite state machines
- Actor model
- Parameterized tests
- Fuzzing
- Netflix chaos-monkey
4. Words
- lay of the land :: disposition of circumstances
- hunker down :: stubbornly hold position
- trudge :: walk with heavy, slow steps
- pack rat :: an American hamster, figuratively someone who stores a lot of stuff or knowledge
- homily :: truism, sermon, platitude
- glut :: eagerness to do something (originally to eat, see gluttony)
- petulant :: irritable, childish
- forgo :: leave alone, abandon, renounce
- dead reckoning :: inertial navigation, navigation using a lot of estimates, based on previous position, figuratively trying to make decisions on pre-computing everything
- post-it note :: sticky note
- stout-heart (stouthearted) :: brave, courageous, plucky
rule :: (not a ruler) a carpenter's tool, like a ruler, foldable from many segments
gauge :: (marking gauge) a tool to draw a line parallel to an edge, surface
plane :: a tool for flattening a piece of wood, getting rid of chips and rough edge
- bevel :: an edge of a piece of wood which looks like a wedge
chamfer :: an edge of a piece of wood (like bevel) which has been dulled for a aesthetic or safety reasons
chisel :: a woodworking tool, with a narrow, but long, blade, sort of like a wedge or a knife
mortise and tenon :: male-female connector when used in woodworking, mortise is female, tenon is male
brace :: (not a parenthesis) a tool for drilling huge holes manually, with a П-shaped horizontal handle
mallet :: a tool which looks like a hammer, but with a huge soft (rubber or wooden) head, which is used for bending more than punching in another object
clamp :: (a misleading word) while clamp can mean a small-ish tool, typically used at home to pinch some objects, say, drying clothing to a rope (a clothespin is a clamp), in engineering and technical work it is a kind of a vice, used for temporarily fixing an object by the means of pressure, usually huge. For Anglo-Saxons this is still a clamp.
biscuit cutter/joiner :: a sophisticated carpentry tool, used to join two pieces of wood together using two mortises, and a comparatively small tenon, usually cookie-shaped, thus the name. Usually requires glue.
- router :: no, not a tool for directing packets between computer networks, but a tool, nowadays electric, to carve out a trough, a chute, a spillway. Russian фреза, фрезер
miter (mitre) box :: a tool for cutting wood at definite angles, looks like a box-frame with high-ish walls, which have angular cuts through, which you can put a board in, and insert a saw along the cuts, hence guiding it to that definite angle over the board. Russian стусло.
- jig :: a tool created to guide the direction of another tool. The logic is similar to the mitre, but construction can vary greatly.
- chagrin :: distress, despair, sorrow, often mockingly "to the chagrin"
- to soar :: to fly high, metaphorically to reach a very high number (for a price or a value), to skyrocket, the opposite of "plummet"
- extricate :: to free oneself from something, to escape, to untangle
- awry :: oblique, distorted, wonky, improperly, usually used as "go awry" as "go wrong way"
- drop the ball :: fail in one's responsibilities, comes from ball games where dropping a ball is a mistake
- triplicate :: like "duplicate", but three times
- lark :: жаворонок, Alaudidae
- reproach :: implied mild criticism, with good intention
- equanimity :: state of being calm under stress
- perfunctory :: done superficially, only to match the KPI, not whole-heartedly
- sagacity :: the state of being a sage
- placid :: calm and quiet
- twiddle :: wiggle, play with, twitch
- niggling :: petty and irritating
- keep one's wits about smth :: be aware of something, but still calm
- queasy :: feeling or causing nausea
- cull :: pick some ones from a larger group and kill (usually for population control)
- sullen :: gloomy and foreboding
- reticent :: not disclosing one's thoughts and opinions
- zany :: unusual and comical
- minnow :: small fish, similar to a carp, гольян
- skidding :: when a car is sliding forward because due to a too sharp brakeing the wheels lock, юзить