unmaintainable code 如何写出无法维护的代码 - 与他人沟通
Dealing With Others 与他人沟通
Hell is other people. 地狱是别人。
Jean-Paul Sartre 保罗·萨特
There are many hints sprinkled throughout the tips on how to rattle maintenance programmers though frustration and how to foil your boss’s attempts to stop you from writing unmaintainable code, or even how to foment an RWAR (Religious War) that involves everyone on the topic of how code should be formatted in the repository.
游戏中散布了许多关于如何摇摆的提示 维护程序员如何挫败老板的尝试 阻止你写出无法维护的代码,甚至阻止你如何推动 RWAR( 宗教战争 ) 这涉及到所有关于代码仓库格式化的问题。
Your Boss Knows Best 你的老板最清楚
If your boss thinks that his or her 20 year old FORTRAN experience is an excellent guide to contemporary programming, rigidly follow all his or her recommendations. As a result, the boss will trust you. That may help you in your career. You will learn many new methods to obfuscate program code.
如果你的老板认为他或她 20 年前的 FORTRAN 经验是当代编程的极佳指南,那就严格遵循他或她的所有建议。因此,老板会信任你。这可能会对你的职业发展有帮助。你将学习许多新的方法来混淆程序代码。
Subvert The Help Desk 不提供支持
One way to help ensure the code is full of bugs is to ensure the maintenance programmers never hear about them. This requires subverting the help desk. Never answer the phone. Use an automated voice that says “thank you for calling the helpline. To reach a real person press 1 or leave a voice mail wait for the tone”. Email help requests should be ignored other than to assign them a tracking number. The standard response to any problem is “ I think your account is locked out. The person able to authorise reinstatement is not available just now.”
确保代码充满漏洞的一个方法是 确保维护程序员永远不会听说这些。这需要颠覆 帮助台。永远不要接电话。使用自动语音说“谢谢 感谢你拨打了求助热线。要联系真人,请按 1 或留言,等待提示音。”邮件帮助请求应忽略,除了给他们分配追踪号码。对任何问题的标准反应是“我觉得你的账户被锁定了。目前无法授权恢复的人员。”
Keep Your Mouth Shut 闭嘴
Be never vigilant of the next Y2K. If you ever spot something that could sneak up on a fixed deadline and destroy all life in the western hemisphere then do not openly discuss it until we are under the critical 4 year event window of panic and opportunity. Do not tell friends, coworkers, or other competent people of your discovery. Under no circumstances attempt to publish anything that might hint at this new and tremendously profitable threat. Do send one normal priority, jargon encrypted, memo to upper management to cover-your-a$$. If at all possible attach the jargon encrypted information as a rider on an otherwise unrelated plain-text memo pertaining to a more immediately pressing business concern. Rest assured that we all see the threat too. Sleep sound at night knowing that long after you’ve been forced into early retirement you will be begged to come back at a logarithmically increased hourly rate!
永远不要对下一个千禧年问题保持警惕。如果你有点什么 那种可能在固定期限内悄然出现,摧毁西部所有生命的东西 然后,在关键的四年恐慌与机遇事件窗口期之前 ,半球不要公开讨论此事。不要告诉朋友、同事或其他有能力的人你的发现。无论如何,都不要发布任何可能暗示这一新且极其有利可图威胁的内容。请向高层管理发送一份正常优先级、用术语加密的备忘录,让你们承担损失。如果可能,请将专业术语加密信息作为附带,作为一份与更紧迫业务无关的明文备忘录附带。请放心,我们也都看到了威胁。晚上安然入睡,知道即使你被迫提前退休,仍会被以对数级更高的小时费率恳求回来!
Baffle ’Em With Bullshit 用胡扯让他们困惑
Subtlety is a wonderful thing, although sometimes a sledge-hammer is more subtle than other tools. So, a refinement on misleading comments: create classes with names like FooFactory containing comments with references to the GoF creational patterns (ideally with HTTP (Hypertext Transfer Protocol) links to bogus UML (Universal Modeling Language) design documents) that have nothing to do with object creation. Play off the maintainer’s delusions of competence. More subtly, create Java classes with protected constructors and methods like Foo f = Foo.newInstance()that return actual new instances, rather than the expected singleton. The opportunities for side-effects are endless.
不过,细腻是一件美妙的事 有时候大锤比其他工具更为微妙。所以,对 误导性评论:创建类似 FooFactory 的类,包含引用 GoF 创建模式的注释(理想情况下带有 HTTP(Hypertext Transfer Protocol)的链接,指向虚假的 UML(Universal Modeling Language)设计文档)与对象创建无关。利用维护者的自以为是的能力。更微妙地,创建带有保护构造子和方法的 Java 类,比如 Foo f = Foo.newInstance(), 返回实际的新实例 ,而非预期的单例。副作用的可能性无穷无尽。
Book of The Month Club 本月之书俱乐部
I advocate that super programmers who can juggle vastly more complex balls than average guys can, should be banned, by management, from dragging the average crowd into system complexity zones where the whole team will start to drown.
我主张那些能处理远比普通人复杂得多的超级程序员 ,应该被管理层禁止,把普通人拖入系统复杂度区,让整个团队开始被淹没。
Jan V. 简五。
Join a computer book of the month club. Select authors who appear to be too busy writing books to have had any time to actually write any code themselves. Browse the local bookstore for titles with lots of cloud diagrams in them and no coding examples. Skim these books to learn obscure pedantic words you can use to intimidate the whippersnappers that come after you. Your code should impress. If people can’t understand your vocabulary, they must assume that you are very intelligent and that your algorithms are very deep. Avoid any sort of homely analogies in your algorithm explanations.
加入每月电脑图书俱乐部。有些作者似乎忙于写书,根本没时间自己写代码。可以去本地书店看看,看看里面有很多云端图解、没有编程范例的书。浏览这些书,学习一些晦涩且吹毛求疵的词汇,用来吓唬那些跟着你走的年轻人。你的代码应该会让人印象深刻。如果别人听不懂你的词汇,他们就必须认为你非常聪明,你的算法很深奥。在算法解释中避免使用任何肤浅的类比。
Pose as a Genius 伪装成天才
Genius types lead (blindly) without caring much whether the average programmers can fully keep up or not (some even take sadistic pleasure from seeing ferior colleagues suffer) and because such team leaders are on an intellectual high, they fail to see that their project is heading for disaster. You, of course, can pretend to do the same thing, even if you are not a genius. Tell everyone if they were smart enough, they would have no trouble understanding your unmaintainable code.
天才型的人(盲目地)领导,根本不在乎 普通程序员完全跟不上(有些人甚至从中获得虐待狂快感 看到费里奥尔同事受苦),而因为这些团队领导处于智力高涨,他们未能意识到他们的项目正走向灾难。当然,你也可以假装做同样的事,即使你不是天才。告诉大家,如果他们够聪明,他们不会难理解你那无法维护的代码。
Pose as an Idiot 装傻
A clever C programmer chafed at the company policy of insisting on the use of named constants instead of using embedded numerical literals. He followed the letter of the law, but avoided its spirit by defining 100 symbolic constants.
一位聪明的 C 程序员对公司坚持使用命名常量而非嵌入数值文字的政策感到不满。他遵循法律条文,但通过定义 100 个象征常数来避开其精神。
1 |
|
- 标题: unmaintainable code 如何写出无法维护的代码 - 与他人沟通
- 作者: Spike Zhang
- 创建于 : 2026-02-25 08:51:40
- 更新于 : 2026-02-25 08:51:58
- 链接: https://chaosbynn.github.io/2026/02/25/unmaintainable-code-如何写出无法维护的代码-与他人沟通/
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。