自行车棚 (Bikeshed) 今天在 V2EX 看到一个词:自行车棚问题。查了一下,在 FreeBSD 社区中有特殊含义,指 某些简单到所有人都可以发表观点,并且几乎所有人都会去发表观点的问题。
然后在 Wikipedia 上找到了 帕金森琐碎定理。
帕金森琐碎定理 帕金森琐碎定理(英语:Parkinson’s Law of Triviality),又译为帕金森氏凡俗法则,或称芝麻蒜皮定律、芝麻绿豆定律,由英国历史学者与政治学者西里尔·诺斯古德·帕金森(Cyril Northcote Parkinson)于 1957 年所提出,用来说明大型组织会花费大量时间在讨论无关紧要的琐事,但是真正重大的决议反而可以轻松过关这种现象。这是由于人对大议题较难有全面性的理解,故怕贸然提出异议,可能会失言;相反地,对于一些简单琐碎的小事,有相当的认识,因此意见特别多,造成组织在各事项上讨论所花费之时间,通常与事项本身的重要程度呈现反比。
— from Wikipedia
是啊,人们总是在争论一些不重要的事。
… May the peace be with you.
Here is an example of running a flask app in docker.
Write the Dockerfile # Use an official Python runtime as a parent imageFROMpython:2.7-slim# Set the working directory to /appWORKDIR/app# Copy the current directory contents into the container at /appCOPY . /app# Install any needed packages specified in requirements.txtRUN pip install --trusted-host pypi.python.org -r requirements.txt# Make port 80 available to the world outside this containerEXPOSE80# Define environment variableENV NAME World# Run app.
Read more
Why write the docs You will be using your code in 6 months You all know why!!!
If only I had written down why I had done this, life would be much simpler.
– someone
Documentation allows you to transfer the why behind code. Much in the same way code comments explain the why, and not the how, documentation serves the same purpose.
You want people to use your code You released your code into world, and thought that others might use it.
Read more