程序员过失泄露代码违法吗

Ever since the Gang of Four came down from the mountaintop with their stone tablets, life just hasn’t been the same. They gave us 23 canonical design patterns, promising solutions to problems you didn’t even know you had. Some people thought these patterns were a way to talk about complex problems and describe tested solutions — a kind of common language that could help prevent programmers from reinventing the wheel. Other people just treated them like magic pixie dust to sprinkle over questionable code. But everyone agreed that design patterns were a Very Important Topic.

Ë版本,因为四人帮从山顶下来与他们的石碑,生活只是一直没有相同的。 他们为我们提供了23种规范的设计模式 ,为您甚至不知道遇到的问题提供了有希望的解决方案。 有些人认为这些模式是讨论复杂问题和描述经过测试的解决方案的一种方式,这是一种常见的语言,可以帮助防止程序员重新发明轮子。 其他人只是把它们像魔术般的尘土一样撒在可疑的代码上。 但是每个人都同意设计模式是一个非常重要的主题 。

But maybe we made a mistake. Instead of inventing names to describe the common solutions coders create, perhaps we should have coined terms for the most popular disasters we leave behind. Because the only thing more popular than design patterns are these, the 23 enduring patterns of software negligence. Check them out. Are you guilty of practicing them?

但是也许我们犯了一个错误。 与其发明名称来描述编码人员创建的常见解决方案,不如我们应该为我们留下的最流行的灾难创造术语。 因为唯一比设计模式流行的是这些,所以23种持久的软件过失模式。 去看一下。 您对实践有罪吗?

The Chain of Responsibility pattern. When your code is criticized, climb the ladder of convenient excuses. The testers missed the bug. The user used the software wrong. The specs asked for it to be this way! The tools are broken!

责任链模式。 当您的代码受到批评时,爬上方便借口的阶梯。 测试人员错过了该错误。 用户使用软件错误。 规格要求它是这种方式! 工具坏了!

The Forgiveness pattern. When you precede a block of indecipherable code with an apologetic comment that says // This is legacy code or // TODO: Fix this wonky algorithm.

宽恕模式。 当您在一段无法理解的代码之前加上道歉注释,表示// This is legacy code// TODO: Fix this wonky algorithm

The Prototype Promotion pattern. You wrote a fast and dirty prototype. The boss loved it and wants to make it a real product. But rewriting it properly ain’t gonna get you there in time. The only way to get it out as fast as they want it is to recompile your prototype and call it a release.

原型推广模式。 您编写了一个快速而肮脏的原型。 老板喜欢它,并希望使其成为真正的产品。 但是正确地重写它并不能使您及时到达那里。 尽快获得所需的唯一方法是重新编译原型并将其称为发行版。

The Immortality pattern. If code lives long enough, you don’t need to fix it anymore. After all, changing old code is just asking for problems to appear. (Closely related to the Zombie pattern, when you keep around old bits of code “just in case.”)

不朽模式。 如果代码的寿命足够长,则无需再对其进行修复。 毕竟,更改旧代码只是在问问题。 (与僵尸模式密切相关,当您保留旧代码“以防万一”时。)

The Decorator pattern. When you add design patterns to make your solution look more pro. Similar to the way you might accessorize a house with a plastic bowl of fruit, and just as inedible.

装饰器模式。 当您添加设计模式以使您的解决方案看起来更专业时。 类似于您用塑料碗水果装饰房子的方式,并且同样不可食用。

The Random Poke pattern. Your code isn’t working. Maybe change some random details and recompile? You never know…

随机戳模式。 您的代码无法正常工作。 也许更改一些随机细节并重新编译? 你永远不会知道…

The Clone pattern. Ctrl+C on StackOverflow. Ctrl+V in your code editor.

克隆模式。 在StackOverflow上按Ctrl + C。 在代码编辑器中按Ctrl + V。

The Procrustes pattern. Procrustes was an innkeeper in Greek mythology who chopped the legs off his patrons while they slept, so they would better fit in his too-short beds. In software development, the Procrustes patterns is when you set a drop-dead date for your schedule, then cut the software features down to fit.

Procrustes模式。 Procrustes是希腊神话中的客栈老板,他在睡觉时将顾客的腿砍掉了,因此最好放在他的床太短的地方。 在软件开发中,Procrustes模式是您为计划设置一个失效日期,然后将软件功能缩减为适合的时间。

The Golden Silence pattern. Don’t let exceptions derail your code. Catch them quietly and carry on. Bonus points if you catch the base exception class to suppress all errors (which is known as the Blackout pattern).

金色的沉默模式。 不要让异常破坏您的代码。 安静地抓住它们并继续前进。 如果捕获基本异常类以抑制所有错误(称为停电模式 ),则可得到加分。

The Apology pattern. Similar to the Golden Silence pattern, except you report the exception back to the user with a meaningless error message and stack dump. (See, we didn’t ignore it after all!)

道歉模式。 与Golden Silence模式类似,不同之处在于您通过无意义的错误消息和堆栈转储将异常报告给用户。 (看,我们毕竟并没有忽略它!)

The Retroactive Formalization pattern. Write the program first, then write the specs. That way they always match.

追溯形式化模式。 首先编写程序,然后编写规格。 这样他们总是匹配的。

The Homebrew pattern. There could be libraries that accomplish what we want to do, but someone doesn’t trust/understand/know them. We’re going to build our own. Quality example: homemade encryption.

自酿模式。 可能有一些库可以完成我们想做的事情,但是有人不信任/不了解/不了解它们。 我们将建立自己的。 质量示例:自制加密。

The Insurance pattern. Make the code just weird enough that they’ll always need you to decipher it. Bonus points if you leave out all your comments in the name of “clean code.”

保险模式。 使代码足够奇怪,以至于他们总是需要您对其进行解密。 如果您以“干净代码”的名义遗漏所有注释,则可以得到加分。

The Special Case pattern. Bail out of whatever control structure you’re in if this magic condition/value occurs. This is a pattern of software enhancement — it crops up when you want to change an existing program as quickly as possible. Multiply the special cases, multiply the fun.

特殊情况模式。 如果发生这种不可思议的条件/值,则可以摆脱您所处的任何控制结构。 这是软件增强的一种模式-当您想要尽快更改现有程序时会出现。 乘以特殊情况,乘以乐趣。

The Wall O‘ Buttons pattern. What happens when a developer improvises the user interface.

Wall O'Buttons模式。 当开发人员临时使用用户界面时会发生什么。

The Jenga pattern. How many changes can you make before the whole structure is teetering on the edge of collapse? Also known as the Change Paralysis pattern.

积木图案。 在整个结构崩溃之前,您可以进行多少更改? 也称为“ 更改麻痹”模式

The It Came From Above pattern. This nonsensical feature must stay as-is, because it was requested from the powers that be. This pattern short-circuits all investigation and trumps all other patterns.

它来自上方图案。 这个无意义的功能必须保持原样,因为它是从存在的能力中提出的。 此模式使所有调查短路,胜过所有其他模式。

The Wild West pattern. Everyone picks their own validation rules and domain logic to enforce at various points. You never know how far bad data can travel.

狂野西部模式。 每个人都选择自己的验证规则和域逻辑以在各个时间点执行。 您永远不知道坏数据可以传播多远。

The God Object pattern. You started with an OO design, but for some reason all the logic is now in one very special and very big class.

上帝对象模式。 您从OO设计开始,但是由于某种原因,所有逻辑现在都属于一个非常特殊且非常庞大的类。

The Special Order pattern. Every operation works perfectly, if you use them in the right order.

特殊订单模式。 如果您以正确的顺序使用它们,则每个操作都将完美运行。

The Nudist pattern. When you started, your classes kept things private. But then someone need to peek inside at something, and now you can’t look sideways without seeing the internal state of every object totally exposed and out there in the open.

裸体主义者模式。 开始时,您的课程将所有内容保密。 但是,然后有人需要向内部窥视某些东西,而现在您不能不侧眼看去,而无法看到每个物体的内部状态完全暴露在外面。

The Gone Fishing pattern. When your program hasn’t crashed, but it isn’t responding either. It’s doing something, but what?

消失的捕鱼模式。 当您的程序没有崩溃时,它也没有响应。 它正在做某事,但是呢?

The Optimism pattern. That won’t happen. The user won’t do that. You’ll never get that kind of data. Also known as the Fuzzy Outline pattern, because you don’t have any edge cases to test.

乐观模式。 那不会发生。 用户不会这样做。 您将永远不会获得此类数据。 也称为“ 模糊轮廓”模式 ,因为您没有要测试的边缘情况。

To get more programming humor in your life, go here. Or, for a more serious (but almost as much fun) take on design patterns, read Is It Time to Get Over Design Patterns?

要获得生活中更多的编程幽默, 请转到此处 或者,如果要更认真地(但几乎是那么有趣)接受设计模式,请阅读 是否该克服设计模式了

翻译自: https://medium.com/young-coder/the-design-patterns-programmers-really-use-c2e7790a900e

程序员过失泄露代码违法吗


http://www.taodudu.cc/news/show-4262117.html

相关文章:

  • 移动开发的软件开发生命周期介绍(二)
  • 设计模式超简单的解释!
  • java常见的设计模式
  • 设计模式之六大设计原则【入门】
  • 应用程序编程接口大全_应用程序编程接口101
  • Linux内核网络结构,和收发数据基本流程
  • Flutter之extension
  • 查看PostgreSQL数据库Extension
  • 设备扩展(DEVICE_EXTENSION)
  • PostgreSQL数据库扩展包——原理CreateExtension扩展控制文件解析
  • Chrome Extension 介绍
  • extension(类扩展)和 category(类别)
  • iOS开发中extension的用法(延展)
  • 《Hands-On Machine Learning with Scikit-Learn TensorFlow》读书笔记(二):端到端的机器学习
  • 【Linux】Linux input子系统之Input event codes
  • 怎么生成自动参考文献(简单 有图)
  • 论文参考文献GB/T 7714格式生成
  • 参考文献格式生成器(GB/T 7714-2015)
  • LaTex如何自动生成参考文献
  • 如何自动生成参考文献格式
  • LaTex 自动生成IEEE格式的参考文献
  • 写论文自动生成参考文献的方法
  • 参考文献格式自动生成器
  • vi编辑器详速查
  • 二极管总结
  • 解决数据库日期返回格式不是yyyy-MM-dd HH:mm:ss 的问题
  • CXF 处理yyyy-MM-dd HH:mm:ss日期失败
  • 中国荫罩对准器市场深度研究分析报告
  • Win 11 预览版虚拟机安装
  • HP-OMEN-暗夜精灵8,安装WIN10

程序员过失泄露代码违法吗_软件过失的23种模式相关推荐

  1. 程序员python代码打招呼方式_某编程少年说他是Python大神,神级程序员不用一行代码教他做人!...

    听君一席话,胜读十年书. 1.扎实的python基础 个人的技术基础知识是否扎实,决定了个人是否能够做的工作层次. 比如某些Python半吊子,只能够纸上谈兵,和Python小白谈谈人生理想,而只要涉 ...

  2. python绘制生日快乐图片_程序员如何用代码祝自己生日快乐(多用模板)

    原标题:程序员如何用代码祝自己生日快乐(多用模板) 本文教你如何用代码为自己庆祝生日,当然你也可以用来讨好女神,具体如何应用大家可以发散思维,例如情人节给暗恋的女孩发一个 JS 文件过去表白,或者给女 ...

  3. 极客日报第 13 期:因未发项目奖金,一名程序员决定删代码泄愤;2020年最常用密码TOP200出炉,你都用过吗?

    文章目录 互联网快讯 程序员专属 Github 每日精选 CSDN 社区优质博文精选 互联网快讯 1.三大运营商或于年底联合宣布 5G 消息商用 据报道,在 2020 中国移动全球合作伙伴大会期间,从 ...

  4. 技术总监谈好的程序员如何写代码

    要判断一个程序员是不是好的程序员,主要看他写的代码,因为程序员最重要的事是写代码. 即便不去理解代码的意图,只要看一眼,好的程序员写的代码与差的程序员写的代码基本上就可以看出来.好的程序员写的代码,整 ...

  5. 简单的计算机程序代码,优秀程序员通过简单代码,窥探电脑编程中强大的数组操作功能...

    优秀程序员通过简单代码,窥探电脑编程中强大的数组操作功能.编程语言中,数组是一个非常重要的概念,也是一种很常用的类型.本文中通过javascript语言的代码实例,展现编程中数组的魅力.在javasc ...

  6. 当程序员说“这代码写的可真烂”,他们的意思是“这烂代码不是我写的”。而当他们说这段代码有些“小问题”时,很可能这代码是他们自己写的...

    英文原文:What Programmers Say vs. What They Mean 你是否听到过同事说"这段代码不言自明"?你的同事的这句话的实际意思是这段代码不需要写注释. ...

  7. 不会写代码也能当程序员?无代码来了,是福还是祸?

    现阶段程序员都是自己写代码,"无代码"这种技术尚未引起太大的关注,有的人认为无代码编程会把简单的问题搞复杂,有的人认为无代码的发展可能会断送程序员的饭碗.那么无代码到底意味着什么? ...

  8. 卖掉 3000 平房子,50 岁程序员回国写代码,三个月内融资 2000 万美元

    2019年7月12日,10多万行C代码的中国物联网大数据平台 TDengine 在 GitHub开源,立即冲上 GitHub 榜首,整整五天霸榜 GitHub.目前该项目在 GitHub 上 Star ...

  9. 程序员除了编代码,还能做哪些职业规划?

    点击上方"CSDN",选择"置顶公众号" 关键时刻,第一时间送达! 不思进取的程序员不是好的程序员.无数的开发者都梦想着可以加入 Google.Facebook ...

最新文章

  1. PC行业为何需要华为们被搅局?
  2. c语言 lis的nlogn算法,ACM竞赛高级算法讲义.doc
  3. 不使用临时表,仅使用select实现查询出多行常数
  4. 服务器安全防护和保护措施方案—Vecloud
  5. android人脸识别技术浅析
  6. Vue组件通信原理剖析(一)事件总线的基石 $on和$emit
  7. java json 易用_Java中 Json的使用
  8. 【HDU - 1254 】推箱子 (双bfs)
  9. 假设以带头结点的循环链表表示队列_JavaScript数据结构之链表--设计
  10. 《简明python教程》_简明Python教程
  11. labview如何安装modbus离线模块_Chrome73如何下载和安装扩展离线文件crx
  12. ,PLCSIM、SIMIT、Amesim、NX MCD、 Process Simulate、Plant Simulation,一文带你了解西门子整个虚拟调试与仿真软硬件体系
  13. IDEA利用wsdl文件生成WebService调用接口的方法
  14. 数据库课程设计 医院管理系统 SQL
  15. 吃一口肥肉之小程序牛刀小试(一)
  16. 京东JD App签名/加密算法研究
  17. 矩池云 | Tony老师解读Kaggle Twitter情感分析案例
  18. tup,list,dict,set的创建
  19. html5 加速球 效果,css 渐隐渐现、echarts 圆环图、百度地图覆盖物、echarts水球图(360加速球效果)...
  20. logo是啥_logo是什么意思

热门文章

  1. 苹果授权登录绑定手机号被拒绝
  2. 使用PHP获取网站Favicon的方法
  3. 从员工到总经理的成长笔记:自慢(6)
  4. 【相机标定系列】相机sensor传感器尺寸,CMOS靶面尺寸,分辨​率​和​镜头​焦距,畸变处理效果,相机主点
  5. 将投影矩阵P利用QR分解分解出摄像机内外参数(Opencv)
  6. 项目经理面试中可能遇到的问题(持续更新)
  7. 项目经理职业生涯的五道坎
  8. WinCC RT Professional网络通讯配置步骤
  9. 如何将图片表格转换为excel表格?
  10. es6删除对象的某个属性