现代软件神话

Posted on Sat 15 May 2021 in Journal

Thinking

架构之美这本书中有篇文章 “两个系统的故事:现代软件神话”,作者 Pete Goodliffe 罗列了无序系统的几种征兆:

  • 代码中没有显而易见的进入系统中的路径。
  • 不存在一致性,不存在风格,也没有统一的概念能够将不同的部分组织在一起。
  • 系统中的控制流让人觉得不舒服,无法预测。
  • 系统中有太多的“坏味道”,整个代码库散发着腐烂的气味,是在大热天里散发着刺激气体的一个垃圾堆。
  • 数据很少被放在使用它的地方。
  • 经常引入额外的巴洛克式缓存层,试图让数据停留在更方便的地方

我在代码层面补充一下,就是

  • 看不懂:代码逻辑太绕,层次太深,调用路径又长又乱,责任和边界不清
  • 改不动:牵一发而动全身,依赖与被依赖的东西太多,重复和耦合度太高
  • 测不了:搅在一起的代码,没办法做单元测试。模块和接口连接不清楚,集成测试很难,自动化更难

Words

  • We need to buy tickets in order to take a high-speed train or watch a. sports event.

  • Your left brain has nothing right and your right brain has nothing left.

  • the English song I can sing

If you miss the train I'm on you will know that I am gone You can hear the whistle blow a hundred miles.

When You Are Old 当你老了(作者:叶芝)

When you are old and gray and full of sleep,

当你老了,白发苍苍,睡思昏沉,

And nodding by the fire, take down this book,

在炉火旁打盹,请取下这部诗歌,

And slowly read, and dream of the soft look

慢慢读,回想你过去眼神的柔和,

Your eyes had once, and of their shadows deep;

回想它们昔日阴影的浓重;

How many loved your moments of glad grace,

多少人爱你年轻欢畅的时刻,

And loved your beauty with love false or true;

出于假意或真心地爱慕你的美貌;

But one man loved the pilgrim soul in you,

只有一个人爱你那朝圣者的灵魂,

And loved the sorrows of your changing face;

爱你逐渐老去的脸上痛苦的皱纹;

And bending down beside the glowing bars,

躬身在火光闪耀的炉火旁,

Murmur, a little sadly, how love fled.

凄然地低语那爱的消逝,

And paced upon the mountains overhead,

在头顶的山上,爱缓缓踱着步子,

And hid his face amid a crowd of stars.

将脸隐没在群星之中。
  • Proportional

英 [prəˈpɔːʃənl] 美 [prəˈpɔːrʃənl]

adj. 比例的,成比例的;相称的,均衡的 n. [数] 比例项

  • A circle graph , often called a pie graph, is shaped like a circle

  • Line graphs are very good at showing how things change over time.