秘密潜入2小辣椒_短暂潜入2次,我显然不知道自己作为开发人员正在做什么

秘密潜入2小辣椒

by Zachary Kuhn

扎卡里·库恩(Zachary Kuhn)

那两次我显然不知道我作为开发人员正在做什么 (Those two times where I clearly had no clue what I was doing as a developer)

Last week I had a short conversation with coworkers about how we had messed up in our careers. Being so far removed from those mistakes, it was easy to laugh. More than laughs, though, these screw-ups served as powerful lessons for us.

上周,我与同事进行了简短的交谈,讨论了我们如何陷入职业生涯。 远离这些错误,很容易发笑。 但是,这些笑话不仅为我们提供了有力的教训,还为他们带来了很多教训。

It’s important that we share our mistakes so that others can learn from them and maybe feel more comfortable with their own. So here are a couple of my more recent ones.

重要的是我们要分享自己的错误,以便其他人可以从中学习,并可能对自己的错误感到更舒服。 所以这是我最近的几个。

为什么会有那么多下降的生产数据库? (Why So Many Dropped Production Databases?)

A few months ago, there was the post on Reddit of an entry level developer who deleted the production database on his first day. We all cringe reading stories like this of those who make those big, unforgettable mistakes. We realize it wouldn’t take much for that to be us—most have had close calls.

几个月前, Reddit上有一个入门级开发人员的帖子 ,他在第一天就删除了生产数据库。 我们都喜欢阅读那些犯下那些重大而难忘的错误的故事。 我们意识到,成为我们并不需要太多,大多数人都亲密无间。

In my first job, a senior database administrator dropped the production database on his first day. These stories are everywhere. The team restored his mistake from a week old backup and kept him around. Ten years later they still poked fun at him for it.

在我的第一份工作中,一位高级数据库管理员在第一天就删除了生产数据库。 这些故事无处不在。 团队从一个星期大的备份中恢复了他的错误,并将他留在了身边。 十年后,他们仍然为此取笑他。

One morning earlier this year I was called on to look into a production problem for a client. They were beginning to beta test their site with a small audience when overnight their site’s homepage didn’t have anything on it. I wondered if there was a bug or vulnerability that led to this.

今年早些时候的一个早晨,我被要求为客户解决生产问题。 当他们的网站主页上没有任何内容时,他们开始对一小部分用户进行B​​eta测试。 我想知道是否有导致此的错误或漏洞。

I signed in to the production machine and pulled up the database. The articles table was empty. OK, that confirmed what we were seeing on the website.

我登录到生产计算机并拉出数据库。 文章表为空。 好的,这证实了我们在网站上看到的内容。

The users table still had users. Weird. So we lost all our articles but at least their beta users still had their accounts. We could explain that it’s a beta and these things happen.

用户表仍然有用户。 奇怪的。 因此,我们丢失了所有文章,但至少他们的Beta用户仍然拥有他们的帐户。 我们可以解释说这是一个beta版本,并且发生了这些事情。

The next few moments were a blur. I don’t recall exactly what I did. I don’t think I was dumb enough to type drop table users in the console. But there I was, now with no articles and no users table. I sat there in shock for a bit.

接下来的片刻变得模糊。 我不记得我到底做了什么。 我认为我不足以在控制台中键入drop table users 。 但是我在那里,现在没有文章,也没有用户表。 我震惊地坐在那儿。

Then my mind raced on how to fix this. Did I really drop the users table? Yes. Did we run backups? No. How do we tell the client this? I don’t know.

然后我开始思考如何解决这个问题。 我真的删除了用户表吗? 是。 我们运行备份了吗? 否。我们如何告诉客户? 我不知道。

I remember walking over to the project manager, sitting down next to her, and explaining what had happened. We didn’t have data in our articles table, so that’s why the site looked empty. And oh yeah, I also dropped the users table. They were now going to need to re-invite all those users—if they could figure out who they all were. Yikes.

我记得走到项目经理那里,坐在她旁边,解释发生了什么。 我们的文章表中没有数据,因此这是该网站看起来空的原因。 哦,是的,我也删除了用户表。 现在,他们需要重新邀请所有这些用户(如果他们可以弄清楚他们是谁)。 kes

I went back to my desk feeling defeated.

我回到办公桌前感到沮丧。

Something didn’t sit right with me, though. How did we lose all those articles in the first place?

但是,有些事情与我不对。 我们是如何首先丢掉所有这些文章的?

I kept digging. Part denial, part wanting to save face. Shortly afterwards, I noticed something important.

我一直在挖。 部分拒绝,部分希望节省面子。 此后不久,我注意到了一些重要的事情。

There were five other databases on the server. One of them had a name similar to the database I had just been looking at.

服务器上还有其他五个数据库。 其中一个的名称类似于我刚刚查看的数据库。

When I checked it out, all the articles were there. The users table was fine. It turns out a configuration change had inadvertently made it to production, causing the site to point to a brand new database. Those users I saw? Seed data.

当我检查出来时,所有的文章都在那里。 用户表很好。 事实证明,配置更改已无意间将其投入生产,从而导致该站点指向全新的数据库。 我看到的那些用户? 种子数据。

What a relief! A morning of nerves and stomach acid making me feel sick, but we were able to “recover” all the data and I had found the real issue before we were to communicate the bad news.

终于解脱了! 紧张的早晨和胃酸使我感到恶心,但是我们能够“恢复”所有数据,在我们传达坏消息之前,我已经找到了真正的问题。

Lots of lessons learned from the episode. One of the simplest: now we always do backups… perhaps a developer’s most effective antacid.

从这一集中学到了很多教训。 最简单的方法之一:现在我们总是进行备份……也许是开发人员最有效的抗酸剂。

冲而永不超越 (Rushing And Never Getting Ahead)

One of my other recent mistakes that stands out wasn’t near as dramatic. In fact, it was tiny mistake after tiny mistake that led to a mess in the end.

我最近突出的其他错误之一没有那么严重。 实际上,这是一个小小的错误,一次又一次的小错误最终导致了混乱。

Our challenge was a project on a tight timeline. (Aren’t they all, though?)

我们面临的挑战是时间紧迫的项目。 (不是全部吗?)

In our first meeting, we agreed as a team this would take twice the time we had. With the deadline bearing down on us from the very beginning, I breezed through the authentication piece so we could move on to the functionality the client really cared about.

在我们的第一次会议上,我们作为一个团队同意这将花费我们两倍的时间。 由于截止日期从一开始就迫在眉睫,所以我轻而易举地通过了身份验证,因此我们可以继续进行客户真正关心的功能。

I had only implemented authentication once before in a single page app and still didn’t fully understand how it was supposed to fit together.

我以前只在一个页面应用程序中实施过一次身份验证,但仍然不完全了解它应该如何组合在一起。

What a mistake to hack it out as fast as I could. I missed a few important things:

尽可能快地破解它是一个错误。 我错过了一些重要的事情:

  1. The user loaded from a cookie after sign in, but the page tried to load without waiting. Depending on the order of these events, you’d get responses from the server saying you were unauthorized. The error was rare and tough to reproduce because most of the time, things completed in the right order.

    用户登录后从Cookie加载,但是该页面尝试加载而没有等待。 根据这些事件的顺序,您将从服务器收到响应,称您未经授权。 该错误很少发生并且很难重现,因为在大多数情况下,事情都是按正确的顺序完成的。

  2. The authentication also never checked whether the token had expired. If you didn’t visit the site often, when you’d return the site wouldn’t work and you’d have to sign out and sign back in.

    身份验证也从未检查过令牌是否已过期。 如果您不经常访问该站点,那么当您返回站点时将无法正常工作,因此您必须先注销然后重新登录。
  3. The token was supposed to update with every request, but I never had the time to understand the rules around it. So this once again produced a timing issue. If we sent several requests at the same time, depending on the order they returned you’d get the wrong token being used in future requests.

    该令牌应该随每个请求进行更新,但是我从来没有时间去了解它的规则。 因此,这再次产生了时间问题。 如果我们同时发送多个请求,则根据它们返回的顺序,您会在以后的请求中使用错误的令牌。

We rushed and we still ended up taking twice the time given. The difference was many more bugs, and then spending even more time tracking down and fixing those bugs.

我们赶时间,但最终还是花了两倍的时间。 区别在于有更多的错误,然后花费更多的时间来跟踪和修复这些错误。

My work embarrassed me. Then being shamed in public for it made the whole experience that much worse.

我的工作使我感到尴尬。 然后因为在公众场合受到羞辱而使整个体验变得更加糟糕。

I will say one thing: since then, I took the time to learn authentication. I now understand OAuth, JWT, refresh tokens, and expirations. I pored over authentication code others had written in a number of libraries. I built authentication flows in a few different languages and frameworks.

我会说一件事:从那以后,我花时间学习认证。 现在,我了解了OAuth,JWT,刷新令牌和有效期。 我仔细研究了其他人在许多库中编写的身份验证代码。 我用几种不同的语言和框架构建了身份验证流程。

将失败转化为未来的成功 (Turning Failures into Future Successes)

That’s the one thing I take away from everything that goes bad. Almost always something good comes from it if you will it.

那是我摆脱一切不幸的一件事。 如果您愿意的话,几乎总是从中得到好处。

If someone learns from their mistake, they are now better than they were before. I try not to get down on a teammate who makes a mistake the first time. They usually already know they messed up.

如果有人从错误中吸取教训,那么他们现在会比以前更好。 我尽量不让第一次犯错误的队友失望。 他们通常已经知道自己搞砸了。

I’m working on not being so hard to those who repeat the same mistake over and over, though. They still deserve compassion.

但是,我正在努力不让那些一遍又一遍重复相同错误的人变得如此努力。 他们仍然值得同情。

You’ll continuously grow if you can do four things with mistakes:

如果您能做四件事有错误,就会不断成长:

  1. laugh at having made one

    嘲笑自己做了一个
  2. learn from it

    从中学习
  3. destigmatize making them

    贬低他们
  4. and share your mistake so others can benefit from it, too

    并分享您的错误,以便其他人也可以从中受益

I’ll leave you with a final anecdote about the value of mistakes. IBM’s CEO during the early 1900s, Thomas J Watson, once encountered an employee whose series of bad decisions cost the company greatly. When asked whether Watson was going to fire this employee, Watson responded:

我将为您提供关于错误价值的最后轶事。 1900年代初期,IBM的首席执行官Thomas J Watson曾经遇到过一名雇员,其一系列的错误决定使公司付出了巨大代价。 当被问及沃森是否要解雇该雇员时,沃森回答:

“No, I just spent $600,000 training him. Why would I want somebody to hire his experience?”
“不,我刚刚花了60万美元训练他。 我为什么要有人雇用他的经验?”

Have an interesting mistake in your past? Share it!

您过去有过有趣的错误吗? 分享它!

Thank you for reading the article! If you find it helpful and would like to show your support, then please share it and be sure to hit that ? button. For more articles like this, follow the publication and the author on Twitter.

感谢您阅读本文! 如果您觉得它有帮助并希望显示您的支持,请与我们分享并确保实现目标? 按钮。 有关更多此类文章,请关注其出版物以及在Twitter上的作者 。

Zach Kuhn is a Director of Development at Smashing Boxes, a Durham, N.C.-based digital agency. He has built web and mobile apps for over a decade, and is involved with startups and emerging technologies like blockchain, IoT, and machine learning.

Zach Kuhn 是位于北卡罗来纳州达勒姆的数字代理商Smashing Boxes的开发总监。 他已经建立了Web和移动应用程序超过十年,并参与了初创公司和新兴技术,如区块链,物联网和机器学习。

翻译自: https://www.freecodecamp.org/news/the-times-ive-messed-up-as-a-developer-3c0bcaa1afd6/

秘密潜入2小辣椒

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/395295.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

提高你的javascript代码逼格系列之函数与数组

不知道大家有没有一种感觉,那就是自己写的javascript代码虽然能完全解决工作上的需要,但是,一眼望去,too simple!!!简直就是一个傻子都能看懂的水平,于是,在工作之余&…

印度评论九章量子计算机,张礼立:中国 “九章”量子计算机到底厉害在哪?...

【背景信息】12月4日,《科学》杂志公布了中国“九章”的重大突破。 这台由中国科学技术大学潘建伟、陆朝阳等学者研制的76个光子的量子计算原型机,推动全球量子计算的前沿研究达到一个新高度。尽管距离实际应用仍有漫漫长路,但成功实现了“量…

手机web网页制作的认识(有关meta标签)

近日以来一直在看JQuery Mobile 一个手机开发框架&#xff0c;说实话真的很头疼的~~~~ 因为里面有很多的属性、方法和事件~~~ 下面是手机网页的一些认识&#xff1a; 一、<meta name"viewport" id"viewport" content"widthdevice-width, initial-s…

包打包和解析过程 unity_Unity学习—资源管理概览

本文介绍了 Unity 常用四种默认路径&#xff0c;以及 AssetDataBase、Resources、AssetBundle 和目前最新的 Addressable 四种资源管理方式文中所有 API 均以版本 2019.3 为准本文原地址&#xff1a;Unity学习—资源管理概览资源路径Application.dataPath官方文档只读&#xff…

graphql tools_声明式GraphQL:编写更少的代码,并使用graphql-tools完成更多工作

graphql toolsI’ve been working with GraphQL for a few months now, but only recently began using Apollo’s graphql-tools library. After learning a few idioms, I am able to mock up a functional API quickly. This is largely due to its low-code, declarative a…

用idea搭建SSM项目,原来这么简单

目录 前言软件环境创建项目数据库文件配置文件pom.xmllog4j.propertiesjdbc.propertiesapplicationContext.xmlspring-mvc.xmlweb.xml运行项目编写代码前言 前阵子突发奇想&#xff0c;想学习下SpringMVC的源码&#xff0c;于是打算用idea搭建一个简易的maven版SSM案例&#xf…

浙江理工大学计算机组成原理试卷,浙江理工大学计算机组成原理设计试题.doc...

计算机组成原理课程设计报告2013/2014第二学期指导教师&#xff1a;许建龙 张芳班级&#xff1a;12计科2班姓名&#xff1a;学号&#xff1a; 计算机组成原理大型实验任务书(计算机12级1、2、3班和实验班)实验目的&#xff1a;深入了解计算机各种指令的执行过程&#xff0c;以及…

mac vagrant 虚拟机nfs挂载点

需求&#xff1a;在mac 上安装了虚拟机&#xff0c;虚拟机系统为centos6.5&#xff0c;现在希望讲虚拟机上点目录通过nfs共享给mac使用 下面主要描述通过nfs共享目录给mac调用的过程 过程参考网址&#xff1a; http://www.moqifei.com/archives/1534 &#xff08;我主要参考的这…

nodejs中require的路径是一个文件夹时发生了什么

node中使用require的时候如果路径是一个文件夹时&#xff0c;或者特殊的情况require(..);require(.); 这是node实战这本书里说的情况&#xff0c;但是我在node6.9版本中发现不完全是这样&#xff0c;可能是后来做了修改。下面说说在6.9下require路径的过程。 这里以require(.)说…

python调用ctypes中windll中的方法超时处理_python中使用ctypes调用MinGW生成的动态链接库(dll)...

关于gcc编译dll的我就不说了&#xff0c;网上举例一大堆&#xff0c;下面以g为例。假设有一个test.cpp文件如下&#xff1a;extern "C" {__declspec(dllexport) double add(double x,double y);}double add(double x,double y){return xy;}在MinGW中使用g编译&#x…

惯用过程模型_惯用的Ruby:编写漂亮的代码

惯用过程模型Ruby is a beautiful programming language.Ruby是一种美丽的编程语言。 According to Ruby’s official web page, Ruby is a:根据Ruby的官方网页&#xff0c;Ruby是&#xff1a; “dynamic, open source programming language with a focus on simplicity and …

采用晶体管为基本元件的计算机发展阶段是,计算机应用基础知识点

第一章 计算机基础知识1、计算机发展阶段第一代&#xff1a;电子管计算机采用电子管为基本元件&#xff0c;设计使用机器语言或汇编语言。要用于科学和工程计算 第二代&#xff1a;晶体管计算机采用晶体管为基本元件&#xff0c;程序设计采用高级语言&#xff0c;出现了操作系统…

springcloud系列三 搭建服务模块

搭建服务模块为了模拟正式开发环境,只是少写了service层直接在controller里面直接引用,直接上图和代码:更为方便: 创建完成之后加入配置: pom.xml文件: <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM…

P1801 黑匣子_NOI导刊2010提高(06)

题目描述 Black Box是一种原始的数据库。它可以储存一个整数数组&#xff0c;还有一个特别的变量i。最开始的时候Black Box是空的&#xff0e;而i等于0。这个Black Box要处理一串命令。 命令只有两种&#xff1a; ADD(x):把x元素放进BlackBox; GET:i加1&#xff0c;然后输出Bla…

MySql模糊查询

常规like的使用限制&#xff1a; 1. like %keyword &#xff1a;索引失效&#xff0c;使用全表扫描。但可以通过翻转函数like前模糊查询建立翻转函数索引走翻转函数索引&#xff0c;不走全表扫描。 2. like keyword% &#xff1a;索引有效。 3. like %keyword% &#xff1a;索引…

python psycopg2使用_python 操作数据库:psycopg2的使用

1 conn psycopg2.connect(database"testdb", user"postgres",password"cohondob", host"127.0.0.1", port"5432")这个API打开一个连接到PostgreSQL数据库。如果成功打开数据库时&#xff0c;它返回一个连接对象。2cursor c…

软件测试人员棘手的问题,Èí¼þ²âÊԵļ¬ÊÖÎÊÌ⣺ÈçºÎ±ÜÃâÖظ´ÌύȱÏÝ...

¡¡¡¡£££©£¡££¡££££©©£¡¡¡¡¡BUG£££¢¡£££¡££¡£¡£——£…

机器学习实用指南_机器学习方法:实用指南

机器学习实用指南by Karlijn Willems通过Karlijn Willems 机器学习方法&#xff1a;实用指南 (How Machines Learn: A Practical Guide) You may have heard about machine learning from interesting applications like spam filtering, optical character recognition, and …

本地仓库settings.xml中使用阿里的仓库

背景 当前使用eclipse自带的maven碰到两个蛋疼的问题&#xff1a; maven在国内使用如果不进行FQ则会痛苦不堪如便秘。maven下载大量jar包导致某盘不够用&#xff0c;需要换大的分区。因此为了解决这个问题就介绍两个eclipse配置&#xff1a;maven本地路径配置和maven外部路径配…

day6_python之md5加密

#md5是不可逆的&#xff0c;就是没有办法解密的 Python内置哈希库对字符串进行MD5加密的方法-hashlibimport hashlib def my_md5(s,salt): #用函数&#xff0c;为了提高代码的复用率s ssalt #1.必须是字符串news str(s).encode() #2.字符串需要encode编码后&#xff0…