TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Rule of Silence (2006)

338 点作者 riansanderson超过 8 年前

31 条评论

borplk超过 8 年前
To play devil&#x27;s advocate, part of the reason things like The Rule of Silence are talked about is because of the messy unix philosophy of treating everything like plain text.<p>If structured data was embraced we would have developed appropriate tooling to interact with it in the way that we prefer.<p>This runs very deep in unix and a lot of people are too &quot;brainwashed&quot; to think of other ways. Instead they develop other exotic ways of dealing with the problem.<p>Oh you don&#x27;t like that output? Easy! pipe that crap into sed then awk then perl then cut then wc and you&#x27;re golden!<p>When you get tot that point you have to understand that you have chosen to ignore the fact that the data you are dealing with must be represented in something much closer to a relational database than lines of ASCII text.<p>Logging is another area you see the consequences of this. A log is not a line of text. Repeat after me a log entry is not a damn line of text.<p>&quot;Oh but isn&#x27;t it neat you can pipe it to grep?&quot; NO! No it&#x27;s not neat, maybe it was neat 20 years ago. Today I want that damn data in a structure. Then you can still print it out in one line and pipe it to grep all you want.<p>Another area that you see the unfortunate side effects of this philosophy is with the mess of file-based software configuration.<p>Yes I get it, you like your SSH session and Emacs&#x2F;Vim blah blah but that&#x27;s short-sighted.<p>I want my software configuration stored in a database not in a bunch of fragile files with made up syntax that are always one typo or syntax error away from being potentially silently ignored.<p>The fetish for easily-editable ASCII files and escaping from structure is holding us back. Structured data does not automatically imply hidden and inaccessible, that&#x27;s a matter of developing appropriate tooling.
评论 #13166158 未加载
评论 #13166178 未加载
评论 #13166687 未加载
评论 #13167063 未加载
评论 #13166633 未加载
评论 #13167949 未加载
评论 #13167663 未加载
评论 #13167104 未加载
评论 #13166143 未加载
评论 #13166525 未加载
评论 #13166329 未加载
评论 #13171062 未加载
评论 #13167124 未加载
评论 #13166212 未加载
评论 #13167378 未加载
评论 #13166310 未加载
评论 #13166313 未加载
评论 #13166574 未加载
评论 #13167995 未加载
评论 #13166213 未加载
评论 #13169773 未加载
评论 #13166333 未加载
评论 #13167066 未加载
评论 #13166792 未加载
评论 #13167584 未加载
评论 #13167252 未加载
评论 #13166876 未加载
评论 #13166140 未加载
xg15超过 8 年前
Note that the &quot;rule of silence&quot; (combined with the habit of writing documentation like longform essays) is also one factor that makes unix-like systems newbie-unfriendly. (Famous example: trying to exit vi)<p>I think the rule makes sense within the specific constraints *nix programs are usually expected to work in (two output channels with no structure except the one informally defined by the program and the convention that the output should be human- and machine-readable at the same time) but I don&#x27;t see it as a general rule if better ways to filter the output are available.
评论 #13165795 未加载
评论 #13165749 未加载
评论 #13168241 未加载
评论 #13165767 未加载
评论 #13167684 未加载
kbart超过 8 年前
Having debugged Linux kernel and userspace programs extensively, I&#x27;d say this rule is golden. Typical user don&#x27;t need logs, unless something is really f*cked up. On the other hand, if you are running production or development machine, you can enable as many log messages as you want as most of it can be turned on via &#x2F;proc&#x2F;sys&#x2F;kernel&#x2F;printk (kernel messages), program parameters or writing your own specific messages in code if that&#x27;s not enough. Actually, I more often encounter the opposite problem -- there are so many log messages, that it&#x27;s hard to find a specific problem among them.
评论 #13165913 未加载
cyborgx7超过 8 年前
This is a part of the unix philosphy I often forget, but agree with just as much as the rest.<p>As an example: I love curl for piping the data to stdout per default, but I&#x27;m frequently annoyed by the progress bars I didn&#x27;t ask for, especially if a script involves multiple curl commands.
评论 #13165895 未加载
评论 #13165661 未加载
pgt超过 8 年前
Spolsky addressed this cultural difference between the Windows and Unix world in 2003: <a href="https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2003&#x2F;12&#x2F;14&#x2F;biculturalism&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2003&#x2F;12&#x2F;14&#x2F;biculturalism&#x2F;</a><p>At its core, it is about putting humans before computers. Engelbart coined HCI as Human Computer Interface, not CHI. This philosophy steered my product designs ever since I read that as a teenager.
zeveb超过 8 年前
Honestly, I don&#x27;t know if the rule of silence is actually all that good of an idea. Unix already gives us stdout vs stderr; it&#x27;s one thing not to write useless information to stdout, but it could be useful to have a stdinfo or stdlog or what-have-you.<p>Granted, with too many options it could quickly get confusing (should this message go to stdout or stdinfo; is that message more informational or more debugging?), but I think that it could be managed.<p>Similarly, I think that Unix fell down by relying too much on unstructured text (in the sense that the structure isn&#x27;t enforced, not in the sense that it&#x27;s altogether absent): because of this, every single tool rolls its own format, and even very similar formats may have subtle incompatibilities.<p>I&#x27;d love to see a successor OS which builds on the lessons of Unix, Plan 9 and other conceptually brilliant OSes, but I fear the world will never see another successful operating system.
评论 #13165699 未加载
评论 #13165791 未加载
评论 #13165672 未加载
augustk超过 8 年前
One consequence of &quot;the rule of silence&quot; is that sometimes it is not obvious if a command is processing data or waiting for input, there is no visual difference.
评论 #13166403 未加载
评论 #13166121 未加载
评论 #13166117 未加载
评论 #13166927 未加载
dom0超过 8 年前
&quot;Rule of Silence&quot; sounds so dark. Nope, I&#x27;ll stick with &quot;no news is good news&quot;.
评论 #13165878 未加载
pdkl95超过 8 年前
&gt; There is no single, standardized statement of the Unix philosophy<p>They could at least link to tAoUP[1].<p>[1] <a href="http:&#x2F;&#x2F;www.catb.org&#x2F;esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch01s06.html" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch01s06.html</a>
digi_owl超过 8 年前
I love this rule, as it is the opposite of what modern computing does. When i plug something into a Windows PC i get a multitude of beeps and popups saying it did everything right. But if something goes wrong there is a eerie silence and i have to dig into the error hex dumps to hope i find anything useful at all (or just reboot and hope it works right on second try).
martijn_himself超过 8 年前
I wish <i>people</i> would live by this rule more often.
评论 #13166292 未加载
评论 #13166396 未加载
amelius超过 8 年前
Unfortunately, in too many cases, a lot of Unix network tools also abide by the Rule of Silence when they should be giving meaningful error messages instead.
teddyh超过 8 年前
See also the following relevant chapters of <i>The Art of Unix Programming</i>:<p><a href="http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch01s06.html#id2878450" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch01s06.html#id...</a><p><a href="http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch11s09.html" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch11s09.html</a>
dangravell超过 8 年前
The Unix philosophy of small, modular processes feels right to me, as a user and a coder.<p>However the business and product developer in me wonders how I apply this to building more complex systems. Normally this involves building multiple functionalities. Does the philosophy say I shouldn&#x27;t build &quot;systems&quot; that are complex and do multiple things? Or does it talk about how these should be implemented, as co-operating processes?
评论 #13165975 未加载
ghshephard超过 8 年前
I appreciate the overall message the article is trying to communicate &quot;Silence is golden, in many contexts for many reasons - be considerate before you make noise&quot;, but, as an aside, the third reason, &quot;command line programs&quot;, should include the a reference to stderr keeping things out of view of your pipe and doing a good job of making sure you don&#x27;t clutter your command pipes.
emodendroket超过 8 年前
I wish I could find that old thing about ordering a burger at the Unix restaurant, where the clerk keeps giving you cryptic responses when you order wrong and then, when you do successfully order, says nothing, leaving you wondering whether your order has been accepted or not.
评论 #13166918 未加载
fimdomeio超过 8 年前
Can help falling in love with the irony that most smartphones have an underlying unix version with mostly an oposite philosophy
评论 #13165822 未加载
throw2016超过 8 年前
I think using the word &#x27;philosophy&#x27; is like antimarketing. People have a kneejerk reaction to the word as something unchanging and stuck in the past and it lends itself easily to negative connotations.<p>Take an example. Build small components that can be reused. Its like SOA way before SOA came into use and makes perfect sense. Now criticizing that is much more difficult and will require technical depth than just dimissive comments about &#x27;unix philosophy&#x27;.<p>In this case this is the first I&#x27;ve heard of a &#x27;philosophy&#x27; of silence and it is often not golden. From a technical perspective its important for users to get feedback and not generic unhelpful error messages or commands disappearing. Fortunately on Linux logging is usually quite good and most experienced users can pinpoint errors quite quickly but options like -v, --v, -vv, -vvv far from helping often increase technical load.
mojuba超过 8 年前
I always liked how MacOS loads silently without annoying the user even when it does some &quot;hard&quot; stuff like fsck.<p>Generally I think engineers need to fight the temptation to show off the importance and complexity of their software by spitting out all the unnecessary details and logs.
评论 #13167731 未加载
评论 #13167405 未加载
评论 #13172852 未加载
renox超过 8 年前
As with any rule it has good and bad consequences:<p>* good: easy to parse the result, easy to chain.<p>* bad: no progress report, annoying with long duration commands.
评论 #13165906 未加载
评论 #13165929 未加载
bjourne超过 8 年前
It&#x27;s often a stupid rule. If you have a process that is stuck, you type &quot;kill &lt;pid&gt;&quot; to kill it. But kill doesn&#x27;t tell you if the process was killed or not, so you have to double-check with &quot;ps &lt;pid&gt;&quot; to see if it is still alive. If it is, you try again with &quot;kill -9 &lt;pid&gt;&quot;.<p>I suspect the reason is that for most signals, kill can&#x27;t determine if the signal was acted upon or not. But for KILL and TERM it could wait a few milliseconds and then print if the process is still alive or not.<p>Edit: those who are saying that I can write a wrapper script is missing the point. The point of computers is to be useful to their users, not to follow some philosophy people invented almost 50 years ago. Like if someone is bothered by kill showing messages, <i>they</i> can write a wrapper script (kill &gt; &#x2F;dev&#x2F;null how hard is that?) or beg the developers to add a -q option to kill (like grep has) or write a new tool for sending signals.<p>Also, the program is called KILL so one could be forgiven for assuming it&#x27;s main purpose is to KILL things...
评论 #13165804 未加载
评论 #13166526 未加载
评论 #13165962 未加载
评论 #13165839 未加载
评论 #13165820 未加载
评论 #13165923 未加载
评论 #13166358 未加载
评论 #13165858 未加载
评论 #13165857 未加载
评论 #13165892 未加载
评论 #13165813 未加载
评论 #13165847 未加载
评论 #13165851 未加载
评论 #13165855 未加载
评论 #13165838 未加载
kulu2002超过 8 年前
I think this article gives good perspective regarding User Exp of system. Windows is made for much wider audience whereas UNIX is used by skilled people. I think its inappropriate to compare both philosophies with regards to this article.
stratigos超过 8 年前
love this article. the past paragraph is great - i often claim that stores do their best to drive me away by playing horrible music and making sure i am as annoyed as possible with no hope of being able to focus on purchasing something.
return0超过 8 年前
It&#x27;s not some specific &quot;rule of science&quot; , it&#x27;s basically occam&#x27;s razor
kozak超过 8 年前
Simplicity is always a virtue.
kkotak超过 8 年前
It is refreshing to see no author name attributed to the text.
peterfisher超过 8 年前
don&#x27;t forget about the &quot;rule of repair&quot; :p
mvindahl超过 8 年前
[ ... ]
vacri超过 8 年前
Similar to this rule is POLA - the Principle of Least Astonishment. The idea is that if you ask a tool to do something, it should generally do just that and nothing else. If you were to run a tool without args or config, then it shouldn&#x27;t do something unexpected.<p>Even if nothing else, this rule&#x2F;principle&#x2F;whatever is my favourite by name :)<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Principle_of_least_astonishment" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Principle_of_least_astonishmen...</a>
grabcocque超过 8 年前
May as well be called the rule of gratuitously hostile user experience.
评论 #13165972 未加载
bendbro超过 8 年前
This page looks very nice