过早优化是万恶之源

Has something like this ever happened to you?

发生过类似的事情吗?

You go on a website, and there’s a spinner which loads forever, or an empty screen that forces you to stare. There’s a disabled button that never enables, or a page that drains your battery only for the phone to die in the most inconvenient circumstances.

您进入一个网站,有一个旋转器永久加载,或者一个空白屏幕迫使您凝视。 有一个禁用按钮永远不会启用,或者一个页面会耗尽您的电池电量,以使手机在最不方便的情况下死机。

The software we use today doesn’t work; many of the causes boil down to specialisation.

我们今天使用的软件无法使用 ; 许多原因归结为专业化。

One day, my colleague was refactoring the Big Ball of Mud inside of one of the many API services of their company. Initially, the members of his team were very defensive regarding his approach, so he paired with another colleague to craft a “proof of concept”. After he showcased the POC, the team was impressed. They liked the outcome and agreed that the changes should go to production.

有一天,我的同事正在其公司的众多API服务之一中重构“ 泥泞的大球” 。 最初,他的团队成员对他的方法非常防御,因此他与另一位同事配对以制作“概念证明”。 在他展示POC之后,团队印象深刻。 他们喜欢结果,并同意将更改付诸实践。

The software of his company was serving thousands of users simultaneously around the clock. There were 3 kinds of UI front-ends: the iOS app, the Web app, and the Android app.

他公司的软件全天候为数千名用户提供服务。 UI前端共有3种:iOS应用程序,Web应用程序和Android应用程序。

Everything went fine as the “DevOps Team” deployed the back-end change to production. However, minutes later, customers were unable to login to the iOS app. The Call Center was bombarded with a significant number of angry customers. Everybody was confused, but there were no doubts about what was the cause: the refactoring which had deployed was locking customers out.

随着“ DevOps团队”将后端变更部署到生产中,一切都进行得很好。 但是,几分钟后,客户无法登录到iOS应用程序。 呼叫中心遭到大量生气客户的轰炸。 每个人都感到困惑,但是毫无疑问是什么原因:部署的重构将客户拒之门外。

So what caused the breakage?

那是什么造成了破损呢?

The back-end API and the mobile front-end had an implicit contract. The back-end should return strings in a specific format so that the iOS app would interpret individual tokens from that format as variables. At runtime, clients would replace those variables with some data they had cached. The developers couldn’t observe the problem in any of the end-to-end tests, as the authentication mechanism for the test accounts didn’t require those tokens to be there.

后端API和移动前端具有隐式合同。 后端应以特定格式返回字符串,以便iOS应用将该格式中的各个标记解释为变量。 在运行时,客户端将用已缓存的某些数据替换这些变量。 开发人员无法在任何端到端测试中观察到该问题,因为测试帐户的身份验证机制不需要这些令牌就可以了。

There was no documentation for that functionality. The string format was only consumed by the iOS app, not by any of the other API clients.

没有关于该功能的文档。 字符串格式仅由iOS应用使用,而没有由任何其他API客户端使用。

One of the three front-end clients depended upon a specific string format of a specific server for their login mechanism to work.

三个前端客户端之一依赖于特定服务器的特定字符串格式来使其登录机制起作用。

The company had organised the teams by technology. Each of them was responsible for one client. There was the “iOS Team” owning the iOS app, the “Android Team” owning the Android app, the “Web Team” owning the Web app, and the “Back End Team” owning the API service. Many of the artefacts each of those teams produced had repeated business logic. That means changes in one application would require a developer to touch three to five different repositories to get the work done.

该公司通过技术组织了团队。 他们每个人负责一个客户。 拥有iOS应用的“ iOS团队”,拥有Android应用的“ Android团队”,拥有Web应用的“ Web团队”和拥有API服务的“后端团队”。 每个团队制作的许多人工制品都具有重复的业务逻辑。 这意味着在一个应用程序中进行更改将需要开发人员接触三到五个不同的存储库才能完成工作。

Thanks to the developer turnover rate in the department and the lack of documentation, the team who owned the relevant back-end service had no idea the iOS team was consuming such string format in production. The only way they found out they didn’t have control of their software was after refactoring a critical part of the service, deploying it to production and locking customers out of their accounts.

由于部门中开发人员的离职率和缺乏文档,拥有相关后端服务的团队不知道iOS团队正在生产中使用这种字符串格式。 他们发现自己无法控制软件的唯一方法是在重构了服务的关键部分,将其部署到生产环境并将客户拒之门外之后。

Product development worked like this: the feature started from the User Interface — web or mobile, and then each client had the responsibility to change as many services as they needed to get their work done. The company had multiple teams responsible for implementing similar UI functionality without clear boundaries of who owns what. Each developer was very comfortable with their stack, unwilling to discuss ideas with developers working with other technologies.

产品开发的工作方式是这样的:该功能从Web或移动用户界面开始,然后每个客户都有责任更改完成工作所需的任意数量的服务。 该公司有多个团队负责实施相似的UI功能,而没有明确界定谁拥有什么的界限。 每个开发人员都非常满意自己的堆栈,不愿意与使用其他技术的开发人员讨论想法。

The communication cost for the development of a single feature was so high that each client ended up reinventing their own business rules within their apps. The back-end service ended up becoming a database over HTTP where every system had a direct dependency on it.

开发单个功能的通信成本非常高,以至于每个客户最终都在自己的应用程序中重新制定了自己的业务规则。 后端服务最终成为通过HTTP的数据库,每个系统都直接依赖于该数据库。

The effort to ship features in that company was significantly high; psychological safety was deficient. Everyone involved had all the incentives to produce software in big batches instead of incrementally.

该公司在发布功能方面付出了巨大的努力; 心理安全性不足。 涉及每个人把所有的激励机制在生产软件大批量 ,而不是增量 。

It was a tragedy waiting to happen.

这是一场悲剧,等待发生。

The segregation of people with “Front-End” skills from people with “Back-End” skills had a significant impact on the communication between teams.

具有“前端”技能的人员与具有“后端”技能的人员的隔离对团队之间的沟通产生了重大影响。

Unless you looked from the outside, it was hard to see how the skill segregation was slowing down the software development process. Everybody was delivering their “part” of the job quickly and efficiently. The “other team” was always the problem.

除非您从外部观察,否则很难看到技能隔离如何减慢了软件开发过程。 每个人都在快速,高效地完成工作的“一部分”。 “其他团队”一直是问题所在。

The most straightforward solution to this is to consider the need for “The Architect” — that person sitting in the Ivory Tower dictating what should and should not be. Be careful! “The Architect” may be the right pill to treat the symptom, but it won’t cure the disease. It’s everyone’s job to understand the big picture. How do you expect to work with a purpose if you don’t understand what that overall purpose is?

最直接的解决方案是考虑是否需要“建筑师”,即坐在象牙塔中的人决定应该和不应该做的事情。 小心! “建筑师”也许是治疗症状的正确药丸,但不能治愈这种疾病。 了解全局是每个人的工作。 如果您不了解总体目标是什么,您期望如何实现目标?

“The Architect”, if you must, should be a facilitator rather than a dictator. They should mentor the other developers on how to spot the big picture to ask the right questions.

如果需要,“建筑师”应该是促进者而不是独裁者。 他们应该指导其他开发人员如何发现全局问题 , 提出正确的问题 。

This story happened within a major financial institution that was too big to fail. It didn’t matter how slow they were: as long as the existing system continued producing millions of dollars of revenue, there was no incentive for them to change — technological stagnation at its best.

这个故事发生在一家大型金融机构中,规模太大,无法倒闭。 速度有多慢也没关系:只要现有系统继续产生数百万美元的收入,就没有动力促使他们做出改变-技术停滞处于最佳状态。

They were the lucky ones. Their software was generating enough revenue to outweigh all the costs for the design of new features.

他们是幸运者。 他们的软件产生了足够的收入,超过了设计新功能的所有成本。

However, your company probably won’t be as lucky as them.

但是,您的公司可能不会像他们那样幸运。

Nowadays, it’s prevalent for developers to follow the technical path of major successful organisations. However, that doesn’t mean their path also works for you. There are many reasons why major tech companies have reached their state of success, many of them unrelated to technical excellence.

如今,对于开发人员而言,遵循主要成功组织的技术道路已十分普遍。 但是,这并不意味着他们的道路也对您有用。 大型科技公司取得成功的原因有很多,其中许多与卓越技术无关。

If the software works and the company is too big to fail, then it’s hard to push any change. However, if you’re not too big to fail, then you better act. Fast.

如果软件能够正常运行,并且公司太大而无法倒闭,那么很难推动任何改变。 但是,如果您不是太大而不能失败,那么您最好采取行动。 快速。

The idea of specialisation comes from the traditional mindset of a manual a production line. There are people positioned at different stages of the ramp, each responsible for constructing different parts of the product. Maybe that works for a production line, but it doesn’t work for an intellectually demanding task like software development.

专业化的想法来自手工生产线的传统观念。 有些人位于坡道的不同阶段,每个人负责构造产品的不同部分。 也许这适用于生产线,但不适用于诸如软件开发之类的智力要求很高的任务。

Nowadays, specialisation seems to be the root of the most significant communication problems among software teams and their shift in culture. It doesn’t matter if you’re the best “iOS” developer or “React” developer in the world. If you can’t solve a problem that spans across multiple stacks, either by doing it yourself or pairing with those who know more than you in that area, then it’s harder to justify the value you’re bringing into the table. Pushing work over the wall to “the other team” doesn’t work, you have to own it to the end.

如今,专业化似乎已成为软件团队之间最重大的沟通问题及其文化转变的根源。 您是世界上最好的“ iOS”开发人员还是“ React”开发人员都没有关系。 如果您无法解决跨多个堆栈的问题,无论是您自己解决问题,还是与在该领域中比您了解更多的人结成对子,那么很难证明您要带入表格的价值。 将工作推到“另一个团队”是行不通的,您必须拥有它直到最后。

That doesn’t mean everyone should be the “Jack of all trades, master of none”.

这并不意味着每个人都应该成为“万事通,无精打采”。

Here’s the trick:

这是窍门:

The best programmers I’ve met prioritise learning fundamentals and techniques, not technologies. They learn the trade-off of those techniques even before they understand the details of how to apply them using the tools they have. When they face a situation where one of those techniques makes sense, that’s when they invest the time to research and look up the details of how to apply them.

我遇到的最好的程序员优先考虑学习基础知识和技术,而不是技术。 他们甚至在了解如何使用现有工具应用这些技术的细节之前就已经学会了权衡这些技术。 当他们面对其中一种技术有意义的情况时,那就是他们投入时间进行研究并查找如何应用这些技术的细节。

Learn fundamentals, not technologies. That's how you prevent becoming specialized in one thing while not having to understand everything.

学习基础知识,而不是技术。 这样一来,您不必了解所有内容就可以避免专注于一件事。

It’s impossible to know everything; you optimise to learn what the options are so that you can dig deeper when necessary.

不可能一无所知。 您可以进行优化以了解选项是什么,以便在必要时可以进行更深入的研究。

So what are you going to do?

你接下来打算怎么办?

Are you going to follow the trend of big companies and hire that great “React Developer” which is also a great “C# Developer” and “CS Guru”? Or are you going to work towards hiring that “Software Developer” who regardless of the programming language, understands the basics about architecture, software design, and other areas?

您是否要顺应大公司的趋势,并聘请出色的“ React Developer”(同时也是出色的“ C#Developer”和“ CS Guru”)? 还是您将努力聘请“软件开发人员”,无论该编程语言是什么,他们都了解有关体系结构,软件设计和其他领域的基础知识?

It’s time to look at software as an essential part of our lives and start to apply things that work, not to repeat the same thing over and over again, expecting different results. Specialisation creates silos; broad knowledge-sharing creates opportunities.

现在是时候将软件视为我们生活中必不可少的一部分,并开始应用有效的东西,而不是一遍又一遍地重复同一件事,以期获得不同的结果 。 专业化会产生孤岛; 广泛的知识共享创造了机会。

Don’t be like that tribe, waiting for the planes that’ll never come.

不要像那个部落那样 ,等待永远不会来的飞机。

You’ll be waiting for a long, long time.

您将等待很长一段时间。

Thanks for reading. If you have some feedback, reach out to me on Twitter, Facebook or Github.

谢谢阅读。 如果您有任何反馈意见,请通过Twitter , Facebook或Github与我联系。

翻译自: https://medium.com/@fagnerbrack/specialisation-is-the-root-of-all-evil-b9079d718bea

过早优化是万恶之源


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

相关文章:

  • IOS---UIColor RGB颜色对照表
  • iOS开发之RGB对照表
  • 【iOS】Web Color 的 OC 实现
  • iOS RGB 颜色对照表
  • iOS 常用的rgb颜色表-精华版
  • 【Henu ACM Round #13 C】 Ebony and Ivory
  • iOS UIColor RGB 颜色对照表
  • pytorch搭建卷积网络(以minist数据集为例)以及如何查看输出每层的权重和特征图
  • com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.zyw
  • mybatis报错:Result Maps collection already contains value for model.dao.UserMapper.BaseResultMap
  • 【转】电脑新装Java的流程
  • Container 控件设置渐变色问题
  • Kotlin第一课Hello World —— Package、main、fun、import、变量、注释
  • 【Qt 开源音视频框架模块QtAV】03:QTAV主要接口展示以及播放器源码分享
  • SSM框架简单搭建 不涉及权限
  • http://www.cnblogs.com/zyw-205520/archive/2013/02/17/2914190.html
  • 操作系统实验(1)—— Linux命令解释程序设计与实现
  • http://www.cnblogs.com/zyw-205520/p/4771253.html
  • c#编写外卖系统_ZYW邻家小厨网上订餐系统源码 Web端 订餐系统 ASP.NET C#语言开发 - 下载 - 搜珍网...
  • http://www.cnblogs.com/zyw-205520/p/3762954.html
  • mysql advisor github_GitHub - zyw/sqladvisor-web: 美团SQLAdvisor SQL优化建议工具的Web版,告别命令行...
  • VMware中配置NAT方式上网 by.zyw
  • 关于android性能,内存优化 http://www.cnblogs.com/zyw-205520/archive/2013/02/17/2914190.html
  • Mysql的组复制
  • 处理Android中的点击冲突
  • 定义C++类对象的方法
  • SQL 定义变量
  • java中如何定义接口_java中如何定义一个接口
  • google protobuf 定义服务(service)
  • 【软件定义汽车】【服务篇】SOA服务及接口设计、服务部署、序列化

过早优化是万恶之源_专业化是万恶之源相关推荐

  1. 过早优化是万恶之源_单身是万恶之源

    过早优化是万恶之源 For 20 years I have been teaching software at the University of Buenos Aires. In the softw ...

  2. dashboard 镜像源_使用国内docker镜像源

    在国内,通过Docker的pull和push命令访问hub.docker时,网络十分慢,而且会出现各种各样的网络连接问题.因此这里介绍下如何使用国内的镜像源,这里以DaoCloud为例. 注册完成后, ...

  3. 扩展源_视觉框架SimpleCV - 图像源

    关联知识 Python SimpleCV SimpleCV框架支持大多数通过各种接口(例如USB,FireWire或内置网络摄像头)连接到计算机的摄像机. 它可以访问通过有线或无线连接连接的网络IP摄 ...

  4. python的pip换源_浅析Python3 pip换源问题

    pip安装源 背景# 在实际开发中, 可能要大量使用第三方模块(包), 更换至国内下载源, 可大幅提升下载速度 """ 1.采用国内源,加速下载模块的速度 2.常用pip ...

  5. conda 换成清华的源_[mcj]conda设置清华源以及更换删除源|conda常用命令集锦

    全文包括: 显示目前使用的源channel 增加channel 删除channel 其他命令 1 显示channel: 首先,conda config --show能够显示出所有conda的confi ...

  6. docker镜像指定安装源_配置docker镜像仓库源

    docker安装完成后,默认配置为官方镜像仓库. 但,默认官方网站下载镜像缓慢,可以切换到官方国内镜像源: 参考自https://www.docker-cn.com/registry-mirror 通 ...

  7. 【干货人生篇】过早优化的陷阱!

    来自:DataWhale 作者:桔了个仔 我的专栏叫作「面向人生编程」,一直以来,只做到「编程」,很少讲「人生」.今天灵感突然来了,那就编程的同时讲讲人生. 在软件工程领域,有个词叫做「过早优化」.指 ...

  8. SLAM编程:优化问题求解(1)_程序设计

    SLAM编程:优化问题求解(1)_程序设计 前言 一.大量的问题都是优化问题 二.如何以朴素理论手写优化问题的程序 1.程序总体设计 2.编写大循环:更新参数并输出信息 3.编写小循环:前向传播,计算 ...

  9. ensp大型网络环境设计与实现_mongodb内核源码设计实现、性能优化、最佳运维系列-网络传输层模块源码实现三...

    1. 说明 在之前的<<Mongodb网络传输处理源码实现及性能调优-体验内核性能极致设计>>和<<mongodb内核源码设计实现.性能优化.最佳运维系列-tran ...

最新文章

  1. python怎么读文件夹下的文件夹-如何使用Python读取文件夹中的文件数量?
  2. java基础不好框架能学会吗_转行Java能学会吗?零基础学习Java的学习路线
  3. C#中的thread和task之Task
  4. ABB机器人 系统参数配置
  5. leetcode1233. 删除子文件夹
  6. 关于C语言中继承和多态的实现
  7. mysql 连接查询分组_详解MySQL中的分组查询与连接查询语句
  8. Spring框架最终注解标签注入方法
  9. HDOJ--1248--寒冰王座
  10. java自动识别文件编码格式
  11. TS Moly Lubricants TSMoly
  12. 形式语言与自动机 图灵机
  13. 计算机信息检索工作的原理,2021年湖北自考计算机信息检索课程考试大纲
  14. pdf文件如何生成目录 wps_怎样快速为WPS文档增加目录
  15. LabVIEW开发气体调节器
  16. 双非计算机研究生要不要读,“双非”大学研究生,到底值不值得读?
  17. 开发者硬核:Web3 DApp 最佳编程实践指南
  18. 【全】nginx中间件原理实践学习笔记
  19. 【昊泽爷爷】六一儿童节礼物——学做简单机器人的工作台
  20. 指针 转 智能指针_智能指针-它们真的那么聪明吗?

热门文章

  1. linux var mqm权限,Linux MQ中间件/var/mqm文件系统结构与错误日志分析
  2. php生成手机桌面图标,教你把手机桌面图标和名字,更改成自己喜欢的
  3. 内核二分缺陷_缺陷跟踪
  4. 基于jQuery的软键盘
  5. 浅析微信支付:开通社交立减金活动、创建立减金及领取使用的相关文档和源码...
  6. 家庭媒体中心解决方案(三、 群晖系列nas基本功能使用指南篇1)
  7. 杭电多校3-Hdu6797 Tokitsukaze and Rescue
  8. 5个中国大陆城市入选QS最佳留学城市榜;只有不到一半的美国父母打算给孩子接种新冠疫苗 | 美通社头条...
  9. 51单片机的蓝牙电子秤设计
  10. 使用Synergy控制实现一套键盘鼠标控制多台电脑(windows+linux)