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“翻译到中文应该是”实用主义程序员”或者“务实的程序员“。

确实,表面上这本书大部分内容是关于如何写程序的。 但是,与大部分技术书不同,在这本书中代码不扮演最重要的角色。 也可以说,这本书的最重要的观点不在于如何写代码,而在于如何避免写代码。 就是说如何避免写僵化的代码。

这本书不分册,但是我自己,非官方的说,可以把这本书分两部:第一个是如何使用已经存在的程序避免重复实现已经存在很久的功能,第二个是如何跟人类交流,以避免写出客户不需要的代码。

这个知识对于领导高级程序员是必要的吗? 肯定是必要的。 我当作团队领导的时候,好几次遇到了和作者一样的困难,问过同样的问题。

那为什么我说这本书没有特别的影响我呢? 因为虽然他们的很多建议有意义,但是动动脑子,就会自己找到这个观点。 而且他们的好几个建议我在我的前公司都尝试过,但是没成功。

虽然计算机很复杂,但是跟真人一起工作更困难。

关于软件工具的话,他们建议学习下列计算模型:

  1. Actor model
  2. Event model
  3. Contracts

其中,contracts我没有见过,其它需要刷新。 其实,他们提到很多,但是大部分我早已学会。

关于社会工作,他们提供了几个建议:

  1. 如何准备好团队
  2. 如何计划项目
  3. 如何分析用户需求

这三个方面每个高级程序员应该擅长。 希望随着我的经验增加,我会更好的理解这三个领域。

这本书最大的缺点,我感觉是:它一点都不涉及跟领导的关系。 就是说,所有在这本书中提到的技巧,不管是技术的还是社会的,如果teamlead不能给老板介绍为什么这种技巧有用,就没办法使用它们。

总而言之,这本书比较简单,高级开发者能在一个周末读完。 可以用以介绍teamlead的工作,但是我不能保证这是最好的说明书。

2. Reading

3. Notes

Interesting things worth looking:

  1. Contracts (racket)
  2. Observer pattern
  3. Pub-Sub
  4. Streams
  5. Threading macro (pipelining)
  6. Delegation/mixins/traits
  7. Finite state machines
  8. Actor model
  9. Parameterized tests
  10. Fuzzing
  11. Netflix chaos-monkey

4. Words

  1. lay of the land :: disposition of circumstances
  2. hunker down :: stubbornly hold position
  3. trudge :: walk with heavy, slow steps
  4. pack rat :: an American hamster, figuratively someone who stores a lot of stuff or knowledge
  5. homily :: truism, sermon, platitude
  6. glut :: eagerness to do something (originally to eat, see gluttony)
  7. petulant :: irritable, childish
  8. forgo :: leave alone, abandon, renounce
  9. dead reckoning :: inertial navigation, navigation using a lot of estimates, based on previous position, figuratively trying to make decisions on pre-computing everything
  10. post-it note :: sticky note
  11. stout-heart (stouthearted) :: brave, courageous, plucky
  12. rule :: (not a ruler) a carpenter's tool, like a ruler, foldable from many segments

    2024-12-13_09-34-46_screenshot.png
  13. gauge :: (marking gauge) a tool to draw a line parallel to an edge, surface

    2024-12-13_09-39-00_screenshot.png
  14. plane :: a tool for flattening a piece of wood, getting rid of chips and rough edge

    2024-12-13_10-22-54_screenshot.png
  15. bevel :: an edge of a piece of wood which looks like a wedge
  16. chamfer :: an edge of a piece of wood (like bevel) which has been dulled for a aesthetic or safety reasons

    2024-12-13_10-25-24_screenshot.png
  17. chisel :: a woodworking tool, with a narrow, but long, blade, sort of like a wedge or a knife

    2024-12-13_10-31-46_screenshot.png
  18. mortise and tenon :: male-female connector when used in woodworking, mortise is female, tenon is male

    2024-12-13_10-33-09_screenshot.png
  19. brace :: (not a parenthesis) a tool for drilling huge holes manually, with a П-shaped horizontal handle

    2024-12-13_10-37-53_screenshot.png
  20. 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

    2024-12-13_10-41-53_screenshot.png
  21. 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.

    2024-12-13_10-46-48_screenshot.png
  22. 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.

    2024-12-13_11-03-24_screenshot.png
  23. 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 фреза, фрезер
  24. 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 стусло.

    2024-12-13_11-28-26_screenshot.png
  25. jig :: a tool created to guide the direction of another tool. The logic is similar to the mitre, but construction can vary greatly.
  26. chagrin :: distress, despair, sorrow, often mockingly "to the chagrin"
  27. to soar :: to fly high, metaphorically to reach a very high number (for a price or a value), to skyrocket, the opposite of "plummet"
  28. extricate :: to free oneself from something, to escape, to untangle
  29. awry :: oblique, distorted, wonky, improperly, usually used as "go awry" as "go wrong way"
  30. drop the ball :: fail in one's responsibilities, comes from ball games where dropping a ball is a mistake
  31. triplicate :: like "duplicate", but three times
  32. lark :: жаворонок, Alaudidae
  33. reproach :: implied mild criticism, with good intention
  34. equanimity :: state of being calm under stress
  35. perfunctory :: done superficially, only to match the KPI, not whole-heartedly
  36. sagacity :: the state of being a sage
  37. placid :: calm and quiet
  38. twiddle :: wiggle, play with, twitch
  39. niggling :: petty and irritating
  40. keep one's wits about smth :: be aware of something, but still calm
  41. queasy :: feeling or causing nausea
  42. cull :: pick some ones from a larger group and kill (usually for population control)
  43. sullen :: gloomy and foreboding
  44. reticent :: not disclosing one's thoughts and opinions
  45. zany :: unusual and comical
  46. minnow :: small fish, similar to a carp, гольян
  47. skidding :: when a car is sliding forward because due to a too sharp brakeing the wheels lock, юзить