by Xiaokang Zhang | Jun 25, 2018 | Sociology
对于流行的东西我总有意无意保持一定的距离,《自私的基因》也属于此类。这本书在我上大学时就已十分流行,我在许多场合、听许多人谈起过这本书,但一直没有下定决心去读。大概因为这个名字过于标新立异,透漏着一种想要以奇特的理论来震撼读者的刻意。最近重点在读人类学的书,于是终于决心翻出来认真读一读。 这本书主要从基因的自私性出来解释个体和群体中的行为,尤其是最受传统进化论困扰的利他的行为。 简单的说,这本书的理论框架是这样的:...
by Xiaokang Zhang | Jun 21, 2018 | Computer Science
Why Python use GIL Python uses reference count for memory management. Each objects in python has a reference count variables that keep track of the number of reference to the object. When the reference count goes back to 0, Python would release this object from...
by Xiaokang Zhang | Jun 19, 2018 | Computer Science
By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it. Built-in decorators such as @staticmethod, @classmethod, and @property work in the same way. How decorator works?...
by Xiaokang Zhang | Jun 18, 2018 | Computer Science
Per history of python blog, everything in python are first class objects, that means all objects that could be named in the language (e.g., integers, strings, functions, classes, modules, methods, etc.) to have equal status. Th:at is, they can be assigned to...
by Xiaokang Zhang | Jun 18, 2018 | Sociology
马尔萨斯是十八世纪英国的人口学家和政治经济学家。他最被广为人知的作品是《人口论》,而其中又以马尔萨斯人口陷阱这一概念最为人所熟知。 马尔萨斯陷阱 马尔萨斯人口陷阱(Malthusian Trap)是说: 在没有限制的情况下,人口会呈现指数型增长食物只会呈现现行增长人口的增长一定会超过食物增长,从而导致食物不足 马尔萨斯认为,人类有两种方式会避免或者延缓这一情况的出现: 有意识的晚婚晚育。缩减人类寿命的时间,比如战争,瘟疫,饥荒等。...