summaryrefslogtreecommitdiff
path: root/content/cards
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-27 23:48:39 +0800
committerEltrac <hi@guhub.cn>2025-03-27 23:48:39 +0800
commit09f0fc782a820e28428b6dfa36d40dd4b70236c2 (patch)
tree3c447f2c550ff7257cb343db6f98d3b8b7d40596 /content/cards
parentde7c993e63734e5d4bf1f2ce726070bb4615de03 (diff)
docs(blog): new post, fix wrong title, new cards
Former-commit-id: 9d1fb35dae86d6e698ff7e21785761990b260339
Diffstat (limited to 'content/cards')
-rw-r--r--content/cards/全景监狱.md13
-rw-r--r--content/cards/耦合-内聚-解耦.md17
2 files changed, 30 insertions, 0 deletions
diff --git a/content/cards/全景监狱.md b/content/cards/全景监狱.md
new file mode 100644
index 00000000..e83ebb95
--- /dev/null
+++ b/content/cards/全景监狱.md
@@ -0,0 +1,13 @@
+---
+title: 全景监狱
+tags:
+ - 哲学
+date: 2025-03-27 18:56:49
+---
+
+全景监狱(panopticon),也叫圆形监狱和环形监狱,是一个哲学概念。
+
+设想一个圆柱形的建筑,内部的墙面上全是牢房,而内部圆的正中央,是一个监察室。从监察室中能看到外部,但外部的囚犯们看不到监察室里是否有人。因为囚犯不知道自己何时会被监视,所以只好假设自己时时刻刻都被监视着。
+
+全景监狱原本是英国哲学家边沁对监狱建筑形式的一种设想,后来,福柯将**现代权力结构**比作全景监狱,提出了「泛视主义」。==你可以将全景监狱理解为社会纪律下的自我规训,这种规训产生于一个可能存在也可能不存在的观察者==。
+
diff --git a/content/cards/耦合-内聚-解耦.md b/content/cards/耦合-内聚-解耦.md
new file mode 100644
index 00000000..e6f3eb58
--- /dev/null
+++ b/content/cards/耦合-内聚-解耦.md
@@ -0,0 +1,17 @@
+---
+title: 耦合、内聚和解耦
+tags:
+ - 软件
+ - 编程
+date: 2025-03-27 23:09:34
+---
+
+在软件工程中,耦合性(Coupling)度量程序各模块之间信息或参数的依赖程度。耦合程度高的系统会有如下问题:
+
+1. 如果一个模块需要修改,与之关联的模块也需要随之修改,造成**修改的不便**
+2. 由于一个模块依赖多个模块,模块难以被**组合**
+3. 由于一个模块依赖多个模块,模块难以**复用**
+
+相对的是内聚性(Cohesion),指模块内部的凝聚程度。低耦合往往意味着高内聚,「高内聚低耦合」是软件工程领域常见的「好软件」的标准。
+
+解耦(Decoupling)即降低耦合性,提高内聚性,同时模块被复用和组合的能力也会提高。 \ No newline at end of file