Posts

一部表面上很精彩的科幻片 — 《流浪地球2》观后感

  剧透慎点 这是一部表面看上去很棒的电影。电影各种特效拉满,从视觉到听觉,在amc 的高端放映厅里还能感受到陨石撞击地面的震动冲击感,有种身临其境的感觉。剧情也很丰富,有国际会议演讲的大场面,有惊险刺激的太空航行和战斗,也有细腻的个人亲情、友情、师徒情的纠葛,且这些场面互相穿插,节奏时急时缓,控制得当,没有明显长时间过于缓和无聊的片段,也没有长时间过度紧张激烈的片段。 但是看完之后,表面的冲击在我心里褪去之后,感觉什么也没留下,我的心立刻恢复了往日的平静。为什么呢,也许是因为没有什么真正打动我、让我认同的地方吧。 主旋律 这部片子毕竟是国产片,很多主旋律的内容不知道是主动或被动得被插入剧情之中。例如表现中国比西方更加人道,更有长远规划,突出西方的短视,自私自利,不团结,只顾眼前利益。然而现实呢,最近这一百年的历史,谁更人道不言自明。各种多边协议虽然执行的不完美,但还是起到一定作用,各国也都有付出,例如核武控制的系列协议。而那些目标宏大的长远计划则多缺乏可行性而烂尾收场。 责任 电影中有很多强调责任的场景。例如当一些国家的首脑面对汹涌的民意而不想执行流浪地球计划,周站出来,说我们要负起责任,让人类文明延续。例如对于国际分工,周的属下常常抱怨说不公平,为什么中国付出多,其他国家付出少。周则回应说要讲责任,他们要负起人类兴亡的责任。 责任是什么呢?责任是个人对他人对社会的付出。但是国际层面,国家交往的过程中,领导人承诺国际责任,对他们个人而言确实挣足了道德上的脸面,但最终那些责任都会成为人民的负担。人民具体到每个个体是否真的愿意担负那些责任呢?大部分普通百姓都只是想过完自己的一生,人类文明能否延续对他们来说真的有意义吗?反正人类早晚都会灭亡。文明的延续更多是精英的追求,因为他们的低级欲望都已经满足,所以开始追求更加宏大的东西。 另一个和责任相关的场景是最后要引爆核弹炸毁月球拯救地球,只能人去引爆,且有去无回。在招募志愿者时,中国的队长主动要求50岁以上的出列去执行任务。为什么要50岁以上的人呢?也许是中国文化中年长者自己觉得比年轻人地位更高,所以要担负更多责任。也许是觉得老年人剩下时间不多了,能发挥的作用少了,所以应该在关键时刻被当作炮灰牺牲。 对于个人而言,一般大家确实会认为强者、社会地位高的人要担负更多责任,关键时刻做更多牺牲,例如泰坦尼克...

Software Architecture Books Summary And Highlights -- Part 1 Goal, Introduction And Index

  Goal And Target Audience This is a summary and highlights of 6 software engineering and architecture related books I recently read. All the 6 books are very heavy and interesting. Reading real contents of them is always recommended. The target audience is experienced software engineers who want to learn more in larger system design and architecture. The goal of this article is to provide summaries of the 6 books as well as brief highlights of interesting or important contents from the 6 books so that the target audience could learn the 6 books’ important ideas quickly and read only important chapters and save time. The highlights and summaries will be divided into several general categories. Each category contains a highlight section and a related chapters section. The related chapters section contains all chapter references which are related to the category’s topic. The highlight section contains a brief summary of interesting or important or enlightening contents from the r...

Software Architecture Books Summary And Highlights -- Part 14 Testing

Image
  Highlights Beyoncé Rule: If a product experiences outages or other problems as a result of infrastructure changes, but the issue wasn’t surfaced by tests in our Continuous Integration (CI) system, it is not the fault of the infrastructure change. SWG ch 1 what is software engineering? Test Goal If a fault is present in a system, then we want it to fail during testing as quickly as possible. More emphasis should be placed on finding the most severe faults than on finding other faults. Test writing guideline Control and observe system state record and playback store states in a single place so that it is easy to start a system, subsystem, or component in an arbitrary state for a test, Preprocessor macros, when activated, can expand to state-reporting code or activate probe statements that return or display information, or return control to a testing console. limit nondeterminism Replace real implementation with test mocks usin...

Software Architecture Books Summary And Highlights -- Part 13 Dependency Management

  Dependency Management Highlights Shared Library vs Shared Service The shared library technique is a good approach for homogeneous environments where shared code change is low to moderate. One distinguishing factor about the shared service technique is that the shared code must be in the form of composition, not inheritance. The shared service technique is good to use in highly polyglot environments (those with multiple heterogeneous languages and platforms), and also when shared functionality tends to change often. SAH ch 8 Reuse Patterns Sidecar pattern and service mesh Share common operational lib such as logging, monitoring, service discovery, auth… and connect these lib among services. SAH ch 8 Reuse Patterns Source control vs Dependency-management All else being equal, prefer source control problems over dependency-management problems. Source control problems are a lot easier to think about and a lot cheaper to deal with than dependency-management ones. SWG C...

Software Architecture Books Summary And Highlights -- Part 12 Code Base Management

  Code Base Management Highlights Version controls and branch management branches are a drag on productivity. In many cases we think complex branch and merge strategies are a perceived safety crutch—an attempt to keep trunk stable. As we see throughout this book, there are other ways to achieve that outcome. Long-Lived dev Branches are expensive to maintain and sync developers must not have a choice when adding a dependency onto some library that is already in use in the organization. One native advantage of a many repo approach is that separate repositories are obviously capable of having different sets of authorized developers, visibility, permissions, and so on. Stitching that feature into a monorepo can be done but implies some ongoing carrying costs in terms of customization and maintenance. VCSs will focus on allowing larger repositories with better performance scaling, but also removing the need for larger repositories by providing better mechanisms to stitch them toge...

Software Architecture Books Summary And Highlights -- Part 11 Cloud

  C loud Highlights Container vs VMs: container is smaller so easier to transfer on the internet container layers make it lighter to move from one machine to another by only moving the changed layer e.g. an app could contain 4 layers and images of a container: pure linux distribution, apache server, db, php server; if only php server is changed, then only that layer of image need to be moved and others don’t need to be moved which has smaller network throughput one service per container VM can host more different types of software because it doesn’t rely on any OS SAP ch 16 Virtualization Autoscaler Configurations to add and remove an instance The new VM image configurations and settings The CPU utilization threshold The network I/O bandwidth thresholds The minimum and maximum number of instances you want in this group process of autoscaler removing an instance autoscaler notify the load balancer to stop sending request to that instance autoscaler notify t...

Software Architecture Books Summary And Highlights -- Part 10 Scaling

Image
  Scaling Highlights Ways to scale up business model integration: Open host service When a subsystem has to be integrated with many others , customizing a translator for each can bog down the team. Define a shared protocol with shared a shared domain language Use a one-off translator to augment the protocol for that special case so that the shared protocol can stay simple and coherent. Published Language Use a well-documented shared language that can express the necessary domain information as a common medium of communication, translating as necessary into and out of that language. DDD ch 14 Maintaining Model Integrity Large scale domain model evolving order Too complicated and restrictive architecture based on up-front design assumption could prohibit developers from switching to better architecture based on better domain model. Don’t overconstrain the detailed design and model decisions that must be made with detailed knowledge. Let this conceptual ...