如何成为嵌入式软件工程师

tech2022-09-16  69

如何成为嵌入式软件工程师

In this one-on-one episode of the Versioning Show, David and Tim look at what it means to be a productive software engineer. They discuss the key factors of relevance (keeping focused on what’s important), quality (making sure your code does what it needs to), and time (having the space to code without interruptions), as well as supportive cultures, reviewing code, avoiding (too many) meetings, flipping birds, and La-Z-Boys.

在Versioning Show的这一一对一节目中,David和Tim讨论了成为一名高效的软件工程师的意义。 他们讨论了相关性(保持对重要内容的关注),质量(确保您的代码满足其要求)和时间(具有无中断代码空间)的关键因素,以及支持性文化,审查代码,避免(太多)会议,掷鸟和La-Z-Boys。

Visit the Versioning Show Home Page

访问版本控制显示主页

Subscribe on iTunes | Subscribe on Stitcher | View All Episodes

在iTunes上订阅 | 订阅Stitcher | 查看所有剧集

显示笔记 (Show Notes)

#holidaycode hashtag from Episode 20

第20集的#holidaycode主题标签

Episode 26 with Azat Mardan

第26集与Azat Mardan

Deep Work

深度工作

trigger habits, from Episode 17

触发习惯,摘自第17集

Say hello on Twitter: @mdavidgreen | @tevko | @versioningshow | @sitepointdotcom

在Twitter上问好: @mdavidgreen | @tevko | @versioningshow | @sitepointdotcom

对话重点 (Conversation Highlights)

you could define productivity as getting a lot of things done in a short amount of time, but that doesn’t seem to really encompass what being productive is all about, because I can do a lot of work and that work can be terrible.

您可以将生产力定义为在短时间内完成许多工作,但这似乎并没有真正包含生产力的意义,因为我可以做很多工作,而且工作可能很糟糕。



you need to ensure that the work you’re doing is specifically relevant to a specific set of tasks.

您需要确保您所做的工作与一组特定的任务特别相关。



a gigantic piece of good productivity is a culture that supports it. I can’t be productive at work if every time I’m pulled into a meeting, there’s no meeting agenda enforced. We all need support to be able to ensure that we’re productive. An unproductive organization does not yield productive individuals.

支持生产力的巨大生产力是巨大的。 如果每次参加会议时都没有执行会议议程,那么我的工作效率将无法提高。 我们所有人都需要支持,以确保我们的生产力。 没有生产力的组织不会产生有生产力的个人。



If you work for a company and you have a hard time getting things done, that could be an organizational problem, in which case, sitting here and trying to write down lessons for productivity is not going to be much of a help. What would make sense to do in that situation is talk to someone, talk to a higher-up.

如果您在一家公司工作并且很难完成工作,那可能是组织上的问题,在这种情况下,坐在这里尝试写下有关提高生产力的课程将无济于事。 在这种情况下,有意义的是与某人交谈,与上级交谈。



if I’m focusing on being productive about the work that I’m doing, I’m going to invest in the quality side of the work. Being productive isn’t necessarily always about speed.

如果我专注于提高自己正在做的工作的效率,那么我将投资于工作的质量方面。 生产力不一定总是关于速度。



if what you’re doing is going to break the codebase and cause technical debt in the future, then in terms of the product that you’re building, it is not relevant to the product even if it is relevant to meeting a particular deadline.

如果您正在做的事情将来会破坏代码库并造成技术债务,那么就您正在构建的产品而言,即使与在特定的截止日期之前相关,它也与产品无关。



in some situations, in some scenarios, it is simply not possible to be productive.

在某些情况下,在某些情况下,根本不可能有生产力。



if you are forced to do an insane amount of quick work, in a very short amount of time, and that work that you’re doing is not going to be temporary, meaning there’s no one who is going to look after it to ensure that it is refactored or iterated, but it becomes cemented into your production application, that is more than likely a scenario in which it is impossible for you to be productive.

如果您被迫在很短的时间内完成大量的快速工作,并且您所做的工作不会是暂时的,则意味着没有人会照顾它以确保它是经过重构或迭代的,但是却被牢记在您的生产应用程序中,这很可能是您无法实现生产力的情况。



For me, the problem is that a lot of these meetings come up ad hoc, and they come up randomly, and they come up quickly, and they’re organized by somebody who doesn’t have the authority to organize the meetings.

对我来说,问题在于,其中许多会议都是临时召开的,它们是随机召开的,并且召开得很快,而且是由无权组织会议的人员组织的。



I think a good meeting is something that will prevent ten other bad meetings.

我认为一次好的会议可以防止其他十次不好的会议。



Having uninterrupted time to work is what an engineer likes the most.

工程师最喜欢连续工作的时间。



I recently made the decision to go on a social media fast, because I noticed that I had the tendency to interrupt my day with random little checks on Twitter and Facebook to see what was going on out there.

最近,我决定快速使用社交媒体,因为我注意到我倾向于通过在Twitter和Facebook上进行少量随机检查来看看发生了什么来打扰我的一天。



Of course, those open floor plan workspaces that are so popular these days, that is another issue for productivity for a lot of people.

当然,这些天很流行的开放式平面图工作区,对于很多人来说,这是另一个生产力问题。

成绩单 (Transcript)

David: 大卫:

Hey, what’s up everybody? This is M. David Green …

嘿,大家好吗? 这是大卫·格林(M. David Green)……

Tim: 蒂姆:

… and this is Tim Evko …

……这是蒂姆·埃夫科……

David: 大卫:

… and you’re listening to Episode 28 of Versioning Podcast.

…,您正在收听Versioning Podcast的第28集。

Tim: 蒂姆:

This is a place where we get together to discuss the industry of the web, from development to design, with some of the people making it happen today and planning where it’s headed in the next version.

在这里,我们可以聚在一起讨论从开发到设计的网络行业,其中一些人将其付诸实践,并计划下一版的发展方向。

David: 大卫:

Today, Tim and I are going to be talking a little bit about productivity as an engineer — what it means, what it means to us, the things we’ve seen work, and the things that we’ve seen not work. So let’s go ahead and get this version started.

今天,蒂姆和我将在谈论一些有关作为工程师的生产率的问题-这意味着什么,对我们意味着什么,我们看到的工作正常,以及我们看到的无效工作。 因此,让我们开始安装该版本。

Tim: 蒂姆:

David, we need a philosophical question to ask ourselves.

大卫,我们需要一个哲学问题来问自己。

David: 大卫:

I think a very good philosophical question is What does productivity mean?

我认为一个非常好的哲学问题是生产力是什么意思?

Tim: 蒂姆:

Oh, that is a good one. You know what, I was actually thinking about this before we got ready for the episode.

哦,那是一个好人。 你知道吗,在我们为这集做准备之前,我实际上是在考虑这个问题。

David: 大卫:

Well, given that we agreed that we were going to do an episode on productivity, I’m glad you were giving it some thought.

好吧,考虑到我们已经同意要制作一部关于生产力的影片,所以很高兴您能对此有所考虑。

Tim: 蒂姆:

Hence being productive. I guess you could define productivity as getting a lot of things done in a short amount of time, but that doesn’t seem to really encompass what being productive is all about, because I can do a lot of work and that work can be terrible.

因此富有成效。 我想您可以将生产力定义为在短时间内完成许多工作,但这似乎并没有真正包含生产力的意义,因为我可以做很多工作,而且工作可能很糟糕。

David: 大卫:

Absolutely. Or you can do a lot of work that doesn’t really have any value, like the old joke about paying engineers by the number of lines of code that they write on a daily basis.

绝对。 或者,您可以做很多真正没有任何价值的工作,例如关于按工程师每天写的代码行数向工程师付款的古老笑话。

Tim: 蒂姆:

Yeah that’s very true. Maybe we could say that being productive is about getting quality and relevant work done in the time period that you have allotted for yourself to complete it.

是的,这是真的。 也许我们可以说,富有成效是指在您分配给自​​己的时间内完成质量和相关工作。

David: 大卫:

That works for me. That gives us three factors to play with. We’ve got quality, we’ve got relevant and then we’ve got time factor.

这对我行得通。 这给了我们三个因素。 我们有质量,有相关性,然后有时间因素。

Tim: 蒂姆:

I’m trying to come up with an ironclad legal definition, one that we couldn’t come up with caveats for.

我正试图提出一个铁定的法律定义,我们不能对此提出警告。

David: 大卫:

[Laughs] Let’s start with this one and see if we run into some problems.

[笑]让我们从这一点开始,看看是否遇到一些问题。

Tim: 蒂姆:

All right. So first off, I believe is relevance.

行。 所以首先,我相信是相关的。

David: 大卫:

Okay, relevance as a factor in what is productive?

好的,关联性是什么才是生产性要素?

Tim: 蒂姆:

When I think of relevance, I’ve worked at companies where I see co-workers who are very busy all the time, whether that be getting pulled into side meetings or answering a bunch of emails or volunteering for off-the-cuff tasks. Most people at work are always very busy, but I really feel that if you want to get work done and be productive, then you need to ensure that the work you’re doing is specifically relevant to a specific set of tasks. Meaning, I can’t walk into work on Monday and tell myself, “I’m going to get a lot done today.” I want to go, walk into work on Monday and say, “I’m going to get X done today.” That means that the work I want to be doing is not answering emails or maybe reviewing a whole bunch of pull requests or getting pulled into a thousand different meetings or volunteering to go grab the team lunch. I want to be making sure that the work that I’m doing in order to be productive is relevant to that specific set of tasks.

当我想到相关性时,我曾在一些公司工作,这些公司总是很忙,不管是参加旁会,回答一堆电子邮件还是自愿参加即席任务。 大多数工作人员总是很忙,但是我真的觉得,如果您想完成工作并提高工作效率,那么您需要确保您所做的工作与特定的任务特别相关。 意思是说,我星期一不能走进工作去告诉自己:“今天我要做很多事情。” 我想去,星期一上班,然后说:“我今天要完成X。” 这意味着我想要做的工作是不回复电子邮件,也不审查大量的请求请求,或者不参加数千次不同的会议,或者自愿去吃团队午餐。 我想确保为了提高工作效率而进行的工作与该组特定任务相关。

David: 大卫:

Coming up with something that’s relevant to what the team actually needs is definitely going to be a part of that, because I agree, you can’t just go in and start throwing papers around and feel like you’re being productive. If you don’t have an agreement about what everybody wants, everybody has been moving forward on, if you don’t have a shared consensus on what a product will be, you don’t really have a sense of what productive could be. Because you could be very productive on something that you consider, individually, very important, but that isn’t going to be of any value to your team or to your company. That could be as true if you’re working for yourself as it is where you’re working for a larger organization, because you could be going down a rabbit hole in something that’s caught your attention and be very productive on that one rabbit hole, but not be productive in terms of your overall vision for what you want to be accomplishing.

提出与团队实际需要相关的东西肯定会成为其中的一部分,因为我同意,您不能随便投入论文,就好像您正在变得富有成效。 如果您对每个人都想要什么没有达成共识,那么每个人都在前进,如果您对产品将是什么没有达成共识,那么您实际上就不会知道有什么生产力。 因为您可能会非常高效地处理自己认为非常重要的事情,但这对您的团队或公司没有任何价值。 如果您正在为自己工作,就像在大型组织中工作一样,这可能是正确的,因为您可能会陷入困境,这会引起您的注意,并且在那个兔子洞中非常有生产力,但对于您想要完成的事情的整体愿景却没有提高生产力。

Tim: 蒂姆:

I think that would mean that defining relevant work is all about setting up specific tasks. If I want to be productive, I think step one is outlining a specific set of tasks that, if completed, means the job at hand is done.

我认为这意味着定义相关工作就是建立特定任务。 如果我想提高工作效率,我认为第一步是概述一组特定的任务,一旦完成,就意味着手头的工作已经完成。

David [3:57]: 大卫[3:57] :

I think the tasks might be jumping too far ahead, because tasks is once you’ve broken down what the vision and the goal is. I think maybe productivity has to start with having that shared vision and that goal, and part of productivity can be defining those tasks.

我认为这些任务可能进展得太快了,因为一旦打破了愿景和目标,任务就成为现实。 我认为也许生产力必须从拥有共同的愿景和目标开始,而生产力的一部分可以定义这些任务。

I’ve worked as an agile coach, and I love helping teams figure out how to define what it is that they’re trying to accomplish and then how to break it down into something that they can manage to do and figure out how they can estimate it. For me, the productivity starts when the product owner starts thinking about, “What is going to be the next iteration of our product?” Then, funnels out through the different stages until the team actually has come up with tasks and defined them and estimated them and then starts working on them. All of those pieces feel productive to me.

我曾经是一名敏捷教练,我喜欢帮助团队弄清楚如何定义要努力完成的任务,然后将其分解为可以管理的事情,以及如何解决问题估计一下。 对我来说,当产品负责人开始思考“我们的产品的下一个迭代将是什么?”时,生产率就开始了。 然后,分阶段进行各个步骤,直到团队实际提出任务并对其进行定义和估算,然后开始进行工作。 所有这些作品对我来说都是高产的。

Tim: 蒂姆:

I think that makes sense. So then how would we go about defining what we need to get done?

我认为这是有道理的。 那么,我们将如何定义需要完成的工作呢?

David: 大卫:

It’s an authority kind of a thing, I suppose. Somebody needs to have the authority to decide what is or is not relevant, and since relevance is what we’re talking about at this point, you have to be able to have somebody who can say, “This is within the scope of what we need to be working on and this is outside of the scope.” And then you need general agreement on that being the case, so what we need to work on can be defined more clearly and then funneled out to people, so that they can break it down into individual tasks that they can start working on — tasks that they are prepared for, that they have the resources for, that they understand, that they’ve estimated adequately, and that they have the time for.

我想这是一种权威。 某人需要有权决定什么是不相关的,并且由于在这一点上我们正在谈论相关性,因此您必须能够有人可以说:“这在我们的讨论范围之内。需要继续努力,这超出了范围。” 然后,您需要在这种情况下达成普遍共识,以便我们可以更清晰地定义我们需要处理的工作,然后将其集中到其他人,以便他们可以将其分解为可以开始处理的单个任务,即可以他们准备好了,他们有足够的资源,他们了解,他们已经进行了充分的估计,并且有时间。

Tim: 蒂姆:

I’m glad that we’re touching on this, because I really believe that a gigantic piece of good productivity is a culture that supports it. I can’t be productive at work if every time I’m pulled into a meeting, there’s no meeting agenda enforced. We all need support to be able to ensure that we’re productive. An unproductive organization does not yield productive individuals.

我很高兴我们能对此予以关注,因为我真的相信,巨大的高生产率是一种支持它的文化。 如果每次参加会议时都没有执行会议议程,那么我的工作效率将无法提高。 我们所有人都需要支持,以确保我们的生产力。 没有生产力的组织不会产生有生产力的个人。

David: 大卫:

Absolutely, I agree. And you bring up meetings. As somebody who’s done agile coaching, I am guilty of being the person who has organized more meetings than you can count, but I make a point of making sure that they’re productive meetings. You brought up the point of having an agenda: the meeting has to have some result that people are going to walk away with, and everybody has to agree that it’s a good investment of their time to participate in those meetings. Otherwise, the culture has to decide as a group that those meetings are no longer valuable.

当然,我同意。 然后您召开会议。 作为从事敏捷教练工作的人,我组织的会议超出了您的想象,我对此感到内,,但我还是要确保他们是富有成效的会议。 您提到了制定议程的意义:会议必须取得人们不愿接受的某些结果,并且每个人都必须同意参加会议是对他们的时间的很好投资。 否则,文化必须集体决定那些会议不再有价值。

Tim: 蒂姆:

I would say first and foremost, if you’re listening and you are working in an organization that is not productive, don’t beat yourself up if you are finding that you yourself have a hard time with productivity at work. If you’re self-employed, well I’m not going to say anything about that! [Laughter] If you work for a company and you have a hard time getting things done, that could be an organizational problem, in which case, sitting here and trying to write down lessons for productivity is not going to be much of a help. What would make sense to do in that situation is talk to someone, talk to a higher-up. Talk to anyone you can in your organization and outline, “Hey listen, we’re unproductive. It’s built into the company and we need to fix that.”

首先,我要说的是,如果您正在听,并且您在一个非生产性的组织中工作,那么如果发现自己在工作效率方面遇到困难,请不要打败自己。 如果您是自雇人士,那么我不会对此说任何话! [笑声]如果您在一家公司工作,并且很难完成工作,那可能是组织上的问题,在这种情况下,坐在这里尝试写下有关生产力的经验教训不会有太大帮助。 在这种情况下,有意义的是与某人交谈,与上级交谈。 与您组织中的任何人交谈,然后概述:“嘿,听着,我们没有生产力。 它已内置在公司中,我们需要对其进行修复。”

David: 大卫:

That’s excellent advice. When I got into agile coaching myself, I was working as an engineer on a team. I did not have as my formal role being a scrum master, being a coach or anything like that. I saw suffering around me, and I saw engineers working in an unproductive way in an environment, where they were being pushed down and suppressed and not able to get their work done. I teamed up with a bunch of other folks — a designer, a couple of other engineers — and we just pushed the agenda forward — that this was something that needed to change. It took a lot of pushing, because there was an entrenched system in place, but it’s possible to do.

那是极好的建议。 当我开始敏捷地指导自己时,我是团队工程师。 我没有担任Scrum主管,教练或类似工作,这是我的正式职责。 我看到周围有很多苦难,而且我看到工程师在一个被压低和压制而无法完成工作的环境中以无效的方式工作。 我与其他一群人(一个设计师,几个其他工程师)合作,我们只是将议程向前推进了,这是需要改变的。 这需要花很多力气,因为已经建立了一个根深蒂固的系统,但是有可能做到。

When management sees the value to them of having productivity meetings and having the ability to understand what people are working on and have a shared vision, you can spread that out as a culture into an organization.

当管理层看到召开生产力会议并了解人们正在做什么并具有共同愿景的能力时,您可以将其作为一种文化传播到组织中。

Tim [7:50]: 蒂姆[7:50] :

Yeah, I think it makes a lot of sense. First off, hire David, so your organization can be more productive. It’s a lesson we’ve learned. [Chuckling]

是的,我认为这很有意义。 首先,请雇用David,这样您的组织可以提高生产力。 这是我们学到的一课。 [咯咯笑]

Secondly, so let’s say that we are working inside of a productive organization and we have tasks that have been defined for us. Now, moving on to the individual, I’m looking at my JIRA board, or a white board, or something, wherein I have tasks that are outlined for me. Let’s say, I have five of them. How do I go about being productive? I walk on Monday morning, I have these five tasks, then what?

其次,假设我们在一个生产性组织内部工作,并且有为我们定义的任务。 现在,转到个人,我正在看我的JIRA板,白板或其他东西,其中有我概述的任务。 假设我有五个。 我要如何提高生产力? 我星期一早上走,我有这五个任务,那又如何呢?

David: 大卫:

Well, what stops you from being productive when you have these five tasks? Why do you have five and not just one?

那么,当您完成这五个任务时,是什么阻止了您的生产力? 为什么有五个而不是一个?

Tim: 蒂姆:

This is an excellent example, because right now I have about five tasks at work, so I am the lead front-end engineer at the organization that I work at currently, which means I have a couple of responsibilities. Number one is I need to review all pull requests that touch front-end code. I need to make sure that the linting rules aren’t breaking, and the code makes sense and is readable for the next engineer that goes in and looks at it, and that we’re using common design patterns and that we’re not repeating ourselves too often when writing new methods or classes or things of that nature. Then, I need to build out actual features. For example, one of the things that I’ve been working on lately is internationalization, wherein I had to go in and pull out every single user-facing string out of our current application, which was terrible.

这是一个很好的例子,因为目前我有大约五项任务在工作,所以我是我目前所在组织的首席前端工程师,这意味着我要承担几项责任。 第一,我需要检查所有涉及前端代码的拉取请求。 我需要确保插入规则没有违反,并且代码有意义,并且对下一位进入并查看该代码的工程师来说是可读的,并且我们使用的是通用设计模式,并且没有重复编写新方法或类或此类性质的东西时,我们自己经常会遇到问题。 然后,我需要构建实际功能。 例如,最近我一直在努力的事情之一就是国际化,其中我不得不从我们当前的应用程序中抽出每个面向用户的字符串,这很糟糕。

David: 大卫:

I’ve been there.

我去过那儿。

Tim: 蒂姆:

I have a couple of different tasks based on my responsibilities, but they are all tasks that I need to accomplish. So, if I want to be as productive as I possibly can in accomplishing these tasks, I would say my first inclination would be to rank them in order of how much time they take to complete.

根据我的职责,我有几个不同的任务,但这都是我需要完成的任务。 因此,如果我想在完成这些任务时尽可能提高工作效率,我会说我的第一个倾向是按照完成时间所需的顺序对它们进行排名。

David: 大卫:

That’s an interesting approach. Let me come at it a slightly different way. Let me ask you, it sounds to me like one of your tasks — what you’ve defined for me here sounds like two tasks to me actually. One is code quality and one is actual code development.

这是一个有趣的方法。 让我以一种稍微不同的方式来介绍它。 让我问你,对我来说这听起来像是您的一项任务-您在这里为我定义的内容实际上对我来说就像是两项任务。 一种是代码质量,一种是实际的代码开发。

Tim: 蒂姆:

Yes.

是。

David: 大卫:

It feels to me like all of those things that you’re responsible for as the lead front-end engineer, in terms of checking other people’s code, that all comes down to code quality. That’s a sort of thing that comes out of code reviews and pairing sessions with people. Separate from that, you also have some tasks that you’re responsible for developing from the ground up, which then need to be reviewed by somebody else, because you always need a second set of eyes on things.

在我看来,您作为首席前端工程师所负责的所有事情,就检查其他人的代码而言,都取决于代码质量。 这是源于代码审查和与人员的配对会话。 除此之外,您还需要承担一些从头开始进行开发的任务,然后需要其他人进行审查,因为您始终需要对事物进行第二次审视。

Tim: 蒂姆:

Of course.

当然。

David: 大卫:

Unless you’ve been doing them in a pair programming environment, which I also strongly recommend. But I’m curious, when you say productivity, and about this, do you feel that you’re not being productive when you spend time reviewing somebody else’s code?

除非您一直在配对编程环境中进行过,否则我也强烈建议您这样做。 但是我很好奇,当您说到生产力时,关于此,您是否觉得在花时间检查别人的代码时效率不高?

Tim: 蒂姆:

Oh, I think it’s definitely something that is extremely productive — for a number of reasons. Reviewing other people’s code, number one, I learn stuff always. I always learn stuff when I look at other people’s code. Number two, I get to yell at people about writing single-line if statements.

哦,出于多种原因,我认为这绝对是非常有生产力的事情。 回顾别人的代码,第一,我总是学东西。 当我看别人的代码时,我总是学习东西。 第二,我大喊大叫有关编写单行if语句的人。

David: 大卫:

Yelling at people is always fun.

对人大吼总是很有趣。

Tim: 蒂姆:

No, but what I actually mean by that is when I see code patterns that might lead to a bad codebase, for example, writing nested if statements. I’m on this if statement theme now, I don’t know why, but for example, if I see if condition, and inside of that if condition two, and then inside that if condition 1 and condition 2, but not condition 3, I’m going to look at that and say, “Hey, there’s probably a better way that we can do this”. And the reason I’m saying that isn’t because I’m being pedantic. It’s because if this is a pattern that continues throughout the rest of the codebase, eventually somebody is going to look at that and have no idea what’s going on, and have a tough time — spend maybe an extra 15 minutes — having to digest it, when instead they could have looked at three separate and not embedded if statements and clearly understood what was going on. so I see a number of benefits to it, but I think the most important one is making sure a clean and concise codebase stays that way, even though a lot of people are working on it.

不,但是我实际上的意思是,当我看到可能导致不良代码库的代码模式时,例如,编写嵌套的if语句。 我现在正在这个if语句主题上,我不知道为什么,但是例如,如果我查看是否有条件,并且在条件2的内部,然后在条件1和2的内部,但不是条件3 ,我要看一看,然后说:“嘿,可能有更好的方法可以做到这一点”。 我之所以这么说并不是因为我在做书。 这是因为,如果这种模式在整个代码库的其余部分继续存在,那么最终会有人去看那一堆,不知道发生了什么,并且度过了艰难的时光–可能要花15分钟的额外时间–必须消化它,相反,他们本可以查看三个单独的而不是嵌入的if语句,并清楚地了解发生了什么。 因此,我看到了很多好处,但是我认为最重要的一点是,即使许多人正在努力,确保干净简洁的代码库也能保持这种状态。

David [12:02]: 大卫[12:02] :

Where do you come down on ternary operators?

您在哪儿介绍三元运算符?

Tim: 蒂姆:

Well, actually I left a comment today, asking a co-worker to change. There was a variable assignment. We had let variable X equal Y, and then below it, it was if some other condition is true, let variable X equal Z instead of Y. I said, “This is a perfect case for a ternary operator, because rather than conditionally reassigning that variable, we can do it all on one line and say, ‘This variable is equal to either X or depending on what the value of N is, it’s equal to Y.’”

好吧,实际上我今天发表了评论,要求同事进行更改。 有一个变量分配。 我们让变量X等于Y,然后在它下面, 如果其他条件为真,则让变量X等于Z而不是Y。 我说:“对于三元运算符来说,这是一个完美的例子,因为我们可以有条件地重新分配该变量,而不必有条件地重新分配该变量,而是说:'此变量等于X或取决于N的值是多少。 ,它等于Y。'”

David: 大卫:

That’s excellent. What I like about this is that you’ve come down strongly against these nested conditionals, but you recognize the value of ternary operators, because they actually add clarity to the code. I think a lot of people conflate those two.

太好了 我喜欢的是,您强烈反对这些嵌套条件,但是您认识到三元运算符的价值,因为它们实际上为代码增加了清晰度。 我认为很多人将这两者混为一谈。

Tim: 蒂姆:

Yeah. And not to get too off-topic, but I think code clarity is extremely important, and more so than code brevity. I have written code emphasized on brevity only to look at it the next day and delete it all and start over … more than once.

是的 并不是太离题,但我认为代码的清晰度非常重要,比代码的简洁性更重要。 我写过强调简洁的代码,只是为了第二天才看清楚,然后全部删除并重新开始……不止一次。

David: 大卫:

Well, this is interesting. We’ve shifted, sort of. we’ve gone from relevance to quality, which was our second criterion for productivity.

好吧,这很有趣。 我们已经改变了。 我们已经从相关性转向质量,这是我们提高生产力的第二个标准。

Tim: 蒂姆:

Ooh, yes.

哦是的。

David: 大卫:

It makes sense that we’re there, because we’re talking about what is productive, and as you brought up, the process of reviewing other people’s codes is part of productivity. It doesn’t mean that you’re not working just because you’re not working on your own code.

之所以有意义,是因为我们在谈论什么是生产性产品,而正如您所说的那样,审查他人代码的过程是生产效率的一部分。 这并不意味着您不仅仅因为未在编写自己的代码而工作。

Tim: 蒂姆:

Yeah, as far as quality goes, I think it is foundational in terms of being productive, because again I can get six things done in an hour. I can close out all of my tickets, eventually get these six things done in such a way that either I or hopefully not, but another one of my teammates will have to go in and redo it. Then, we’ve just taken twice the amount of time to get one thing done, effectively cutting our productivity in half.

是的,就质量而言,我认为这是提高生产力的基础,因为我可以在一个小时内完成六件事。 我可以关闭所有门票,最终以某种方式完成这六件事,要么我要么希望不这样做,但是我的另一位队友将不得不重做。 然后,我们只花了两倍的时间来完成一件事情,有效地将我们的生产力降低了一半。

David: 大卫:

Yeah that’s probably about half in fact, and that’s one of the reasons why pair programming ends up being so valuable on teams, because you miss those problems. You get much better consistency across your code, and although you have two engineers working simultaneously on the same piece of code, and arguably not producing that particular piece of code any faster than they would have if they’d worked as individuals, the amount of back and forth discussion that goes into creating that and then the sense that both people are learning something from what they’re working on, so that there’s shared knowledge, ends up increasing the productivity of the team as a whole and increasing the quality of the codebase.

是的,实际上大约只有一半,这就是结对编程对团队如此有价值的原因之一,因为您错过了这些问题。 您可以在代码中获得更好的一致性,并且尽管您有两个工程师同时处理同一段代码,并且可以说,生成特定代码的速度不会比他们单独工作时要快。在创建过程中进行来回讨论,然后感觉到两个人都在从他们的工作中学习一些东西,以便有共同的知识,最终提高了整个团队的生产力并提高了团队的质量代码库。

Tim: 蒂姆:

So I think it’s important to remember that even though I have maybe a mountain of work to get done, it’s important to focus on not getting it done fast, necessarily. It’s important to focus on being or doing. And the difference there is, if I’m focusing on being productive about the work that I’m doing, I’m going to invest in the quality side of the work. Being productive isn’t necessarily always about speed. It’s about getting things done well. I think we could just stop there. It’s about getting things done well, and part of that means getting it done in a timely manner. Another part of that means getting it done thoroughly and not taking shortcuts.

因此,我认为重要的是要记住,即使我可能要做很多工作,但一定要着重于一定不要将其快速完成。 重要的是要专注于存在或正在做。 而不同之处在于,如果我专注于提高自己正在做的工作的效率,那么我将在工作的质量方面进行投资。 生产力不一定总是关于速度。 这是关于做好事。 我想我们可以就此停下来。 这是关于做好事,其中一部分意味着要及时完成。 另一部分意味着要彻底完成它,而不要走捷径。

David: 大卫:

There are a lot of potential shortcuts, and I think engineers are often encouraged to use those shortcuts, especially when there are deadlines that people are expected to meet. “There’s going to be a release this week, and so we absolutely must get it out the door, so don’t worry about quality for right now, just get it out the door. Then, we can go back and fix it absolutely never.”

有很多潜在的捷径,我认为通常会鼓励工程师使用这些捷径,尤其是在人们预期会遇到最后期限的情况下。 “本周将有一个发布,所以我们绝对必须把它发布出去,所以现在就不用担心质量,只需把它发布出去。 然后,我们可以回去绝对不要修复它。”

Tim: 蒂姆:

I think we should spend a few minutes talking about that, because no matter where you are in your career, you either have gone through a situation like that or you will go through a situation like that. It doesn’t matter if you are self-employed or not self-employed, it happens. Again, like I said, we’ll always run into this situation. What’s difficult is that sometimes there’s no other option. If my manager comes up to me and says, “Hey, this thing needs to get done tomorrow. You’ve never seen it before, it’s new, it’s a little bit confusing, but it has to get done tomorrow, good luck.” I might not have a way out of that. That might be a fire drill and something that just needs to happen. It’s going to be terrible. It’s probably going to turn to technical debt, almost immediately, and it may or may not be something that you get to refactor later on.

我认为我们应该花一些时间来谈论这个问题,因为无论您身在职业何处,您要么经历过这样的情况,要么就会经历过这样的情况。 无论您是自雇人士还是非自雇人士,都会发生这种情况。 再次,就像我说的,我们总是会遇到这种情况。 困难的是,有时别无选择。 如果我的经理走近我说:“嘿,这件事明天需要完成。 您以前从未见过它,它是新的,有点令人困惑,但是明天必须完成,祝您好运。” 我可能没有办法。 那可能是一场消防演习,而这只是需要发生的事情。 这将是可怕的。 它可能几乎马上就会变成技术债务,以后可能需要重构,也可能不是。

David [16:34]: 大卫[16:34] :

It’s one of the things that I appreciate most about having an agile process in place, is that when something like that happens, there’s a scrum master there to say, “Is this urgent enough that we need to break the sprint and start a new sprint in order to support it, or are we losing resources, so we lose points on this particular sprint and therefore, we reduce our overall velocity for the team?” It’s a question of making those trade-offs and making those decisions. How frequently it happens becomes something that needs to be discussed at a retrospective on a regular basis, because if it starts happening regularly, then it’s an issue.

对于实施敏捷流程,我最欣赏的一件事是,当发生类似事情时,那里有一个Scrum管理员说:“这很紧急,我们需要打破冲刺并开始新的冲刺。为了支持它,还是我们正在失去资源,所以我们在这个特定的Sprint上失去了积分,因此,我们降低了团队的整体速度吗?” 这是做出权衡和做出决定的问题。 它发生的频率成为需要定期回顾的问题,因为如果它开始定期发生,那么这就是一个问题。

When you have a team that’s working without any agreement about how they manage their time and what is permissible and what isn’t permissible in terms of taking an engineer off of a task and interrupting their flow in order to work on something that’s urgent, you don’t have the opportunity to make those decisions and to look at it and see what’s happening.

如果您的团队在如何管理他们的时间,允许和不允许的事情上达成一致,就如何让工程师离开任务并中断他们的工作流程来处理紧急事情而言,您会遇到什么?没有机会做出这些决定并仔细研究并观察正在发生的事情。

Tim: 蒂姆:

I would like to posit an idea, David, and tell me what you think about this. I would say that in the case that you get pulled aside and given something that absolutely has to be completed in an impossible amount of time — [David chuckles] — and you have no way of pushing back on that, the idea of productivity itself I think goes out the window.

戴维,我想提出一个主意,然后告诉我您对此有何想法。 我要说的是,如果您被搁置一旁,给出了绝对必须在不可能的时间内完成的工作- [David chuckles] -而您无力推翻这一点,那就是生产力本身想到窗外。

David: 大卫:

I’m supportive of that, actually, because you’ve immediately gotten rid of the quality component of productivity. We’ve agreed that in order to be productive, the work that you’re doing must be of good quality. It’s arguable whether what you’re doing is relevant, because if what you’re doing is going to break the codebase and cause technical debt in the future, then in terms of the product that you’re building, it is not relevant to the product even if it is relevant to meeting a particular deadline.

实际上,我对此表示支持,因为您已经摆脱了生产力的质量组成部分。 我们已经同意,要提高工作效率,您所做的工作必须具有良好的质量。 您正在做的事情是否相关是有争议的,因为如果您正在做的事情将来会破坏代码库并造成技术债务,那么就您要构建的产品而言,它与产品,即使与特定的截止日期有关。

Tim: 蒂姆:

I think we’ve hit a very important breakthrough here. That is the idea that, in some situations, in some scenarios, it is simply not possible to be productive. Now, that is largely dependent on workplace culture. If you work at a startup, for example, and one day, the board says, “We need this feature, we need it now, make it happen,” and, for some reason, it just falls on your shoulders, that is not a scenario in which you can be productive. That might mean that you are working until midnight on a feature that just has to go out, and more than likely is going to be rewritten weeks or months later. That is not a scenario wherein you should think to yourself, “How can I be most productive about this?” Because you are set up, basically; you are given something that, at its core, is of an unproductive nature.

我认为我们在这里取得了非常重要的突破。 那就是在某些情况下,在某些情况下根本不可能产生生产力的想法。 现在,这在很大程度上取决于工作场所的文化。 例如,如果您在一家初创公司工作,有一天董事会会说:“我们需要此功能,现在需要它,使它实现”,由于某种原因,它就落在您的肩膀上,那不是一种可以提高工作效率的方案。 这可能意味着您要一直工作到午夜,而该功能只需要退出即可使用,而且几周或几个月后可能会被重写。 在这种情况下,您不应该自己想:“我如何才能最有效地做到这一点?” 因为您基本上是成立的; 从本质上讲,您所获得的是非生产性的。

David: 大卫:

I like this, and I’m going to throw this one back at you, because you brought up an interesting scenario, because you said, “If you’re working at a startup.” There is a situation that is completely valid and productive, in which writing messy, bad code that would introduce technical debt into a production quality environment is not the same as writing messy, bad code that will allow you to do some user experience testing, evaluate something and then iterate on something, so that you can then decide what would be productive code to write in the future. In that case, I would suggest that it’s possible — writing what we’ve before called hashtag #holidaycode in order to get something done and out the door, so that people can start using it and so you can start getting feedback about it — can actually be productive, not in terms of building your production codebase, but it can be productive in terms of moving the company forwards to the point that they know what you should be writing as production quality code in the future.

我喜欢这个,我将把这个扔给您,因为您提出了一个有趣的场景,因为您说:“如果您是在初创公司工作。” 有一种情况是完全有效和富有成效的,在这种情况下,编写会导致技术债务进入生产质量环境的凌乱,不良代码与编写使您可以进行一些用户体验测试,评估的凌乱,不良代码不同某些内容,然后迭代某些内容,以便您可以决定将来要编写的生产性代码。 在这种情况下,我建议有可能-编写我们之前称为井号标签#holidaycode的代码 ,以便完成并完成任务,以便人们可以开始使用它,以便您可以开始获得有关它的反馈-实际上是有效的,而不是在构建生产代码库方面,但是在使公司前进到使他们知道将来您应该编写什么作为生产质量代码这一点上,这可能是有效的。

Tim [20:02]: 蒂姆[20:02] :

So I would say, my counterpoint is this. It is a gamble, because you don’t actually know if this holiday code that you’re writing is going to be something that doesn’t break a core feature, or that it doesn’t cause an intense user experience issue that is going to drive users away from your product. Is this type of behavior something that happens often? Are users often logging on to your products to find that some new decision that has been made that is not well thought out and causes clashes in their UX and drives them away from the goals that you as the business has set for them, the user. I think there are a lot of factors that can make or break this sort of holiday code process. Now, if it’s something for example like, “Hey, let’s turn the email address capture thing into a tooltip instead of a modal”, and you write some messy code to do that, well then maybe, yes. Maybe in that scenario, the process that has been set about won’t trickle down into some sort of technical debt. But if it does trickle down into technical debt and not some sort of iterative and getting better over time process, then I would say it’s still in that non-productive state.

所以我要说的是,我的反对意见是。 这是一场赌博,因为您实际上并不知道您正在编写的假日代码是否会破坏核心功能,或者不会引起严重的用户体验问题使用户远离您的产品。 这种行为是否经常发生? 用户是否经常登录到您的产品,以发现一些新的决策没有被深思熟虑,从而导致其UX发生冲突,并使它们偏离了企业为用户设定的目标。 我认为有很多因素可以影响或破坏这种假日代码流程。 现在,例如,“嘿,让我们将电子邮件地址捕获内容转换为工具提示,而不是模式提示”,然后编写一些凌乱的代码来做到这一点,也许吧,是的。 也许在这种情况下,已经确定的过程不会陷入各种技术债务之中。 但是,如果它确实陷入了技术债务之中,而不是经过某种迭代并且随着时间的流逝而变得越来越好,那么我会说它仍然处于非生产状态。

I think again, depending on how it’s presented, it’s a gamble in terms of whether or not it will actually be beneficial.

我再想一想,取决于它的呈现方式,这实际上是一次赌博是否有益。

David: 大卫:

It sounds to me like what we’re coming down to is that, if you’re going to be in the situation where you have to write unproductive code — what we’ve defined as unproductive code, something that is temporary, something that is urgent — it’s critical that you have a system in place that allows you to isolate that code from the rest of your codebase, so that it can be rolled back independently to the previous state if it needs to be, so that it can maybe be put on a canary server, so that it can be fed out to 10% of your audience and see how they respond to it, see if there’s a problem that comes up. But that testing process is essential if you’re doing this against the code that already has a userbase and already has production quality in place.

在我看来,我们要做的就是,如果您将不得不编写非生产性代码,即我们所定义的非生产性代码,那是临时的,那是临时性的。紧急—至关重要的是,您必须拥有一个系统,使您可以将该代码与其余代码库隔离开来,以便在需要时可以将其独立回滚到以前的状态,以便可以将其放回原处。在金丝雀服务器上,以便可以将其反馈给10%的受众,并查看他们的React,看看是否有问题。 但是,如果您要对已经具有用户库并且已经具备生产质量的代码进行此测试,则此测试过程至关重要。

Tim: 蒂姆:

I think you touched on something key, and that is the idea of its being temporary. I would argue that if it’s temporary, it can still definitely be productive. If, for example, suddenly your deadlines have been shifted up and you need to finish 75% of your application in three days, that’s not temporary. Therefore, I’d say that’s not productive.

我认为您触及了一些关键,那就是它是暂时的。 我要说的是,如果这是暂时的,那肯定还是有生产力的。 例如,如果您的截止日期突然被调高了,而您需要在三天内完成申请的75%,那不是临时的。 因此,我想说这没有效果。

David: 大卫:

Honestly, I can say that there is code in production that I wrote to be temporary as long ago as 2008 [chuckles], and that is still out there. You can go to the domain and you can click on the URL and you can see that code right there in the browser. Temporary is very hard to define. Once you’ve got something out there, it’s going to stay out there until there’s something to replace it, unless somebody takes ownership of making sure that the temporary thing gets replaced with something permanent and robust. Taking ownership of that is part of productivity, in my opinion.

老实说,我可以说生产中有一些代码,我早在2008年就写过临时代码[咯咯地笑] ,而现在仍然在那里。 您可以转到域,然后单击URL,然后可以在浏览器中看到该代码。 临时很难定义。 一旦您有了东西,它将一直待在那儿,直到有替换它的地方为止,除非有人负责确保将临时性东西替换为永久且坚固的东西。 我认为,拥有所有权是生产力的一部分。

Tim: 蒂姆:

I think we can agree that there is a situation in which it is impossible to be productive, but that situation itself can vary. What we know is that if you are forced to do an insane amount of quick work, in a very short amount of time, and that work that you’re doing is not going to be temporary, meaning there’s no one who is going to look after it to ensure that it is refactored or iterated, but it becomes cemented into your production application, that is more than likely a scenario in which it is impossible for you to be productive.

我认为我们可以同意,存在无法实现生产的情况,但是这种情况本身会有所不同。 我们知道的是,如果您被迫在很短的时间内完成大量的快速工作,并且您正在做的工作不会是暂时的,这意味着没有人会去找之后,以确保它可以重构或迭代,但已被牢牢地整合到您的生产应用程序中,这很有可能使您无法实现生产。

David: 大卫:

I would agree. And, interestingly, I notice that we’ve managed not to talk about the one aspect of productivity that I think was the first one that we both brought up right at the very beginning, which was organizing your time to be productive. At the very beginning of this, we started talking a little bit about meetings, and how they interrupt our flow when we’re trying to work as engineers. I think that it’s something that we need to bring up more specifically, because the third component of productivity, we had quality, we had relevance, and then we had time in terms of being able to get things done. That means giving an engineer the focus and the time to work on something without interruption.

我会同意的。 而且,有趣的是,我注意到我们一直没有谈论生产力的一个方面,我认为这是我们俩在一开始就提出的第一个方面,这是在组织您的时间来提高生产力。 从一开始,我们就开始讨论一些会议,以及在我们尝试作为工程师工作时它们如何中断我们的流程。 我认为这是我们需要更具体地提出的问题,因为生产力的第三部分是质量,有关联,然后才有时间完成事情。 这意味着要给工程师以重点和时间来进行某些工作而不会受到干扰。

Tim [24:16]: 蒂姆[24:16] :

I have something to share, and it might be bad, it might be good — I’m going to have to rely on you, David, to tell me if it’s bad. Here it goes. Everyone I have ever worked with, past and present, knows that I despise meetings at the very core of my being. I sort of allow that tidbit about me to persist, because it means that I at least get invited to meetings as optional, meaning if someone wants me to attend a meeting, they will say, “This is optional, you don’t have to come,” or it comes from higher up and I just have no excuse and I have to go. But this is a strategy that’s worked for me. This is a strategy that ensures I am not asked to attend a lot of meetings, only the really important ones, where usually I don’t have a choice of attending or not attending. But it’s also something that allows me to spend a lot more of my time on doing the actual work.

我有一些要分享的东西,它可能不好,也可能很好–我将不得不依靠您,David,告诉我它是否不好。 来了 过去和现在,我曾经与之共事的每个人都知道,我鄙视会议是我生命的核心。 我有点允许保留关于我的花絮,因为这意味着我至少被邀请参加会议是可选的,这意味着如果有人要我参加会议,他们会说:“这是可选的,您不必来”,或者它来自更高处,我只是没有借口,我必须走。 但这是对我有用的策略。 这是一种策略,可确保不要求我参加很多会议,只有真正重要的会议,通常我没有选择出席或不参加的机会。 但这也使我可以将更多的时间用于实际工作。

David: 大卫:

And next year, there will be the SetPoint book How to Avoid Getting Invited to Meetings, by Tim Evko.

明年,蒂姆·埃夫科(Tim Evko)将出版《 SetPoint》一书《 如何避免被邀请参加会议》 。

Tim: 蒂姆:

It’ll even be illustrated. Most of the illustrations will be me flipping over desks.

甚至将进行说明。 大部分插图将是我翻过桌子的。

[Laughter]

[笑声]

David: 大卫:

Or flipping the bird.

或翻转鸟。

Tim: 蒂姆:

Well, we’ll see. I can’t really draw hands, but we’ll try.

好吧,我们拭目以待。 我真的不能画手,但我们会尽力的。

[Laughter]

[笑声]

David: 大卫:

It’s interesting. I think the way that you feel about meetings is the way that a lot of engineers feel about meetings. I’ve felt that way about them myself. The issue comes up about whether or not that meeting has an agenda and is relevant and I can add value to it, I think. When I get invited to a meeting in which I’m just there in order to be a placeholder and to make sure that everybody in the room hears what the one person was saying that could have been summarized by somebody and emailed out to everybody afterwards, that’s a meeting that I do not need to attend. On the other hand, if I’m at a meeting where my expertise is required in order to give feedback about something that’s being discussed, and if a decision is made at that meeting that didn’t have my input, it might affect me and my job later, then I damn well want to be at that meeting.

这真有趣。 我认为您对会议的感觉就是许多工程师对会议的感觉。 我自己对他们有这种感觉。 问题在于该会议是否有议程并具有相关性,我认为可以为其增值。 当我被邀请参加一个我只是在那里参加的会议时,要确保房间中的每个人都能听到一个人的发言,而这个发言本可以由某人进行总结并随后通过电子邮件发送给所有人,那是我不需要参加的会议。 另一方面,如果我正在开会时需要我的专业知识才能提供有关正在讨论的事情的反馈,并且如果在那个会议上做出的决定没有我的投入,则可能会影响我和以后我的工作,那我该死的很想参加那个会议。

Tim: 蒂姆:

Yeah, that is true. It’s a delicate balance. I am introverted, so I don’t often try to get into situations wherein I get to be in a room for three hours where everybody’s talking about something. I try to keep that to a minimum. But there are often times where I do feel that I should probably be in the room for this because we’re talking about a feature that a front-end developer is going to have to build, and it is going to impact a lot of users. And, I don’t know, I want to make sure that we don’t make half the page fixed position to the window, so that when somebody scrolls, there’s like a landslide that happens. You know, stuff like that.

是的,是的。 这是一个微妙的平衡。 我性格内向,所以我不会经常尝试进入一个在每个人都在谈论某事的房间里三个小时的情况。 我尝试将其最小化。 但是有时候我确实觉得我应该留在这方面,因为我们正在谈论的是前端开发人员必须构建的功能,它将影响很多用户。 而且,我不知道,我想确保不将页面固定位置的一半固定在窗口上,这样当有人滚动时,会发生滑坡。 你知道的,像那样的东西。

David: 大卫:

For me, the problem is that a lot of these meetings come up ad hoc, and they come up randomly, and they come up quickly, and they’re organized by somebody who doesn’t have the authority to organize the meetings. That’s again — I’m going to say it — why I keep on gravitating back toward agile, because I am one of those people who has called an entire engineering team into a two to three hour meeting to sit down in a room and talk about things, annoying all of the introverts in the room at the time. But that meeting had an agenda, and it had a very clear purpose, and it moved forward. It organized things in such a way that a lot of the other meetings that would have come up randomly that would have interrupted engineers in the middle of their work were eliminated — by the fact that we had this one meeting once a week, once every two weeks, once every sprint, that everybody went to and that everybody had a chance to participate in and voice their concerns in.

对我来说,问题在于,其中许多会议都是临时召开的,它们是随机召开的,并且召开得很快,而且是由无权组织会议的人员组织的。 再说一遍-我要说的是-为什么我继续朝着敏捷方向发展,因为我是召集整个工程团队进行两到三个小时的会议并坐在一个房间里谈论话题的人之一事情,当时房间里所有性格内向的人都很讨厌。 但是那次会议有一个议程,它有一个非常明确的目的,它向前发展了。 它以这样的方式组织事情:消除了许多其他本来会随机召开的会议,这些会议本来会中断工程师的工作,因为我们每周召开一次该会议,每两次召开一次会议每个星期都要进行一次冲刺,每个人都去了,每个人都有机会参与并表达他们的担忧。

Tim: 蒂姆:

Yeah, I agree. I think a good meeting is something that will prevent ten other bad meetings.

是的,我同意。 我认为一次好的会议可以防止其他十次不好的会议。

David: 大卫:

Yes, meetings that eliminate other meetings are the meetings that I’m talking about. The idea that nobody wants to be in the meeting, because, except for the people who enjoy hearing themselves talk and see it as a power play, meetings are generally not terribly productive for anybody. Having uninterrupted time to work is what an engineer likes the most. I think — what have the studies said? — if you’re working on something and you’re focusing deeply, but you get interrupted by somebody who just taps you on the shoulder and says, “Hey, you want a cup of coffee?” you’ll have 20 minutes getting yourself back into that flow state that you were in before you get interrupted.

是的,消除其他会议的会议就是我正在谈论的会议。 没有人愿意参加会议的想法,因为,除了喜欢聆听自己的谈话并将其视为有影响力的人之外,会议通常对任何人都不是很有效。 工程师最喜欢连续工作的时间。 我认为-这些研究说了什么? —如果您正在做某事并且正在集中精力,但是您会被某个人打断,他只是轻拍您的肩膀并说:“嘿,您想喝杯咖啡吗?” 您将有20分钟的时间让自己回到被打扰之前的状态。

Tim [28:20]: 蒂姆[28:20] :

Yeah, I would have probably about 20 minutes or so. I’ve never really enjoyed that. I don’t know why, but it’s just the act of tapping — that throws me off pretty big, yeah.

是的,我大概有20分钟左右。 我从来没有真正喜欢过。 我不知道为什么,但这仅仅是轻拍的行为–是的,这让我望而却步。

But anyways, it’s not just meetings. There are other things that … Well, let’s say this, if we want to get something done very intently and devote a lot of focus towards getting a specific task done, we want to set for ourselves, I don’t know, a few hours of focus. I’m just going to work on this one thing for two or three hours. After that, maybe I’m going to take a break, maybe have lunch, or just — I don’t know — do what they used to do in the old times and stand up from your seat.

但是无论如何,不​​只是会议。 还有其他事情……好吧,这就是说,如果我们要非常专心地完成某项工作,并专注于完成一项特定任务,我们想为自己做好准备,我不知道,几个小时的重点。 我将在这件事上工作两三个小时。 之后,也许我要休息一下,也许要吃午餐,或者只是-我不知道-照旧做他们过去做的事情,然后从座位上站起来。

David: 大卫:

Standing up is a good thing in all sorts of ways. I recently made the decision to go on a social media fast, because I noticed that I had the tendency to interrupt my day with random little checks on Twitter and Facebook to see what was going on out there. I realized that I would get caught in these tiny little whirlpools that would suck me in, and afterwards my mind would be distracted by what I had seen and I wouldn’t be able to focus back on what I was trying to think about for my work.

站起来在各种方面都是一件好事。 最近,我决定快速使用社交媒体,因为我注意到我倾向于通过在Twitter和Facebook上进行少量随机检查来看看发生了什么来打扰我的一天。 我意识到我会陷入这些微小的漩涡中,这些漩涡会吸引我,然后我的脑子会被我所看到的东西分散注意力,而我将无法专注于自己正在为自己思考的东西工作。

So I decided to schedule myself out periods of time during which I simply wouldn’t check my social media — you know, turn off the notifications on things. That goes as far as email and anything, but go for several hours and focus. I was surprised because I assumed that it would give me more productivity, but I was amazed at how much more productivity it actually inserted into my day. At the end of the day, I looked at what I had accomplished, I had done more than I had been able to do in a week, trying to think about all of these other things while simultaneously trying to do my work.

因此,我决定将自己安排在一段时间内,在此期间我根本不会检查我的社交媒体-您知道,请关闭有关事物的通知。 涉及电子邮件和其他任何内容,但要花几个小时并集中精力。 我很惊讶,因为我以为它可以给我带来更高的生产力,但是我惊讶于它实际上为我的一天带来了多少生产力。 归根结底,我看着自己所取得的成就,做了一周之内无法完成的工作,试图同时考虑其他所有事情。

Tim: 蒂姆:

Yeah, that’s an excellent point. It adds up to hours at the end of the day, really. When you think about it, somebody tweeted about politics, and I’m going to spend 30 minutes pondering the conclusion of their tweet, and then all of a sudden, it’s the end of the day, and I worked on maybe three things.

是的,这是一个很好的观点。 实际上,到一天结束,它总共要花几个小时。 当您考虑这件事时,有人在推特上发表有关政治的推文,而我要花30分钟的时间来思考他们的推文的结论,然后突然之间,这一天结束了,我可能在做三件事。

One of the things that you actually reminded me of, David, is that it’s not just social media. For example, one of the things I recently realized, and that’s helped me become a lot more productive, is work emails. I get maybe 50 of those a day, and for some reason, I had always had it in my head that as soon as I get a work email, I need to read and respond to said work email.

您实际上使我想起的一件事,大卫,这不仅仅是社交媒体。 例如,我最近意识到的一件事情就是工作电子邮件,这帮助我提高了工作效率。 我一天可能收到50封邮件,由于某种原因,我总是想起了收到一封工作电子邮件后,就需要阅读并回复所说的工作电子邮件。

The more I thought about it, that doesn’t really make any sense. If I am working on coding some UI feature, reviewing a pull request or whatever I’m doing, or if I’m in the middle of one of the many three-hour works sprints that I’ve set for myself to accomplish a specific set of tasks, I can let those work emails go. When I’m done with that three-hour time block, look at the emails that I need to, because if at some point someone comes to my desk and says, “Hey Tim, did you not see the email that I sent to you 30 minutes ago?” I say, “No, sorry. I’m working on this feature.” That seems like a fair response, because I’m doing work.

我想得越多,那实际上就没有任何意义。 如果我正在编写一些UI功能的代码,正在审查请求请求或正在执行的操作,或者我处于为自己设置的三个小时的工作冲刺之一,以完成特定的任务组任务,我可以放手处理那些工作电子邮件。 当我完成了这三个小时的时间安排后,请查看我需要的电子邮件,因为如果有人在某个时候来到我的办公桌前说:“嗨,蒂姆,您没有看到我发送给您的电子邮件吗? 30分钟前?” 我说:“不,对不起。 我正在研究此功能。” 这似乎是一个公平的回答,因为我正在工作 。

I think we get it into our head that a lot of the time someone’s going to come up to us and say, “You didn’t respond to my email. You’re a bad employee.” If you’re actually working on something relevant and you didn’t respond to an email, you’re actually doing better than if you responded to one email. If the person who asked you to check that email expects you to break away from your work whenever something comes in, they would really need to re-examine that behavior, I think.

我认为,很多时候有人会来找我们说:“您没有回复我的电子邮件。 你是个坏员工。” 如果您实际上正在做一些相关的事情,但没有回复电子邮件,那么实际上比比回复一封电子邮件要好。 我认为,如果要求您检查电子邮件的人希望每当有事情出现时您就会离开工作,那么他们真的需要重新检查这种行为。

David [31:42]: 大卫[31:42] :

I agree. This is another one of those cultural issues very much like agreeing what is worth working on and what the goal of the team’s work should be.

我同意。 这是文化问题中的另一个,非常像是商定值得进行哪些工作以及团队工作的目标应该是什么。

One of the things that I know, I’ve worked on a number of teams, where they’ve agreed, everybody is going to be working uninterrupted for several hours at a time, buuuut everybody has Slack running in the background. And everybody’s having these little side chats about things. And of course, every time something comes up on Slack that you need to read, or a GIF comes up that you want to comment on, it distracts you from your work and you create a great social team environment there. But you’re not allowing people to have their productive, uninterrupted time to work on things. I’m a big fan of Slack in terms of the way that it helps teams document and communicate, but it can be an incredible distraction to have that running in the background.

我知道的一件事是,我已经在多个团队中工作,他们都同意,每个人一次将连续几个小时不间断地工作, 但是每个人都会在后台运行Slack。 每个人都在谈论这些事情。 当然,每当您需要阅读Slack上出现的任何内容时,或者您要评论时出现GIF时,它都会使您分心,并在其中创建一个很棒的社交团队环境。 但是,您不能让人们有生产力,不间断的时间来处理事情。 就帮助团队记录和沟通的方式而言,我是Slack的忠实拥护者,但是让它在后台运行可能会令人难以置信。

I recently interviewed a fellow. He’s an independent contractor, and he has his clients sign an agreement when he starts working with them that he simply will not respond to any requests for work that come through an email. He has a system set up in place, whereby they can submit a ticket and the ticket has to have certain parameters in it. When that ticket comes into the system, it will be channelled and it’ll be dealt with. But if somebody writes to him by email, he does not respond. Then, when they come back to him and say, “Hey, why didn’t you get back to my emails,” he points out, “You agreed to this. This is the way that we’ve agreed to work.” Having that kind of an agreement upfront makes sense.

我最近采访了一位研究员。 他是一个独立承包商,在与客户合作时,他让客户签署了一项协议,即他将根本不响应通过电子邮件提出的任何工作要求。 他已经建立了一个系统,通过该系统,他们可以提交故障单,并且故障单中必须具有某些参数。 当该票证进入系统时,它将被引导并得到处理。 但是,如果有人通过电子邮件给他写信,他不会回应。 然后,当他们回到他身边说:“嘿,为什么不回到我的电子邮件中呢?”他指出,“您同意这一点。 这是我们同意的工作方式。” 事先达成这样的协议是有道理的。

Tim: 蒂姆:

Oh yeah, I want that agreement very badly, not because there’s another system that I would have in place. Just because emails aren’t fun.

哦,是的,我非常希望达成该协议,不是因为我会拥有另一个系统。 仅仅因为电子邮件不好玩。

David: 大卫:

Well, JIRA tickets, for example.

好吧,例如,JIRA门票。

Tim: 蒂姆:

Yes, yeah, of course. I’m really glad you mentioned Slack, because the jury is still out for me on whether or not Slack helps to increase productivity. Because, much like the email conundrum, Slack is even more demanding in terms of attention, because if someone messages me, two things happen. I get a notification on my phone five minutes later if I don’t respond, and then an email maybe like 10 minutes later, which means that every time I get a Slack message, I need to respond immediately. Maybe what I should do is, again, I have this concept of like three hour blocks, wherein I am working on a specific thing and specific thing only. During said block, I should probably set Slack to like do not disturb mode or something.

是的,是的,当然。 我真的很高兴您提到Slack,因为对于Slack是否有助于提高生产率,我仍然不愿意接受。 因为就像电子邮件难题一样,Slack在关注方面的要求更高,因为如果有人给我发消息,则会发生两件事。 如果五分钟后我没有回应,我会在手机上收到通知,然后大约十分钟后我会收到一封电子邮件,这意味着每当我收到Slack消息时,我都需要立即回应。 同样,也许我应该做的是,我有一个像三个小时的时间段这样的概念,其中我仅在处理特定的事物和特定的事物。 在上述期间,我可能应该将Slack设置为“请勿打扰”模式。

David: 大卫:

When I discovered that Slack had the option to quit … It’s an application you can actually turn off occasionally, and I started turning it off when I was trying to work. My productivity soared.

当我发现Slack可以选择退出时...这是一个实际上可以偶尔关闭的应用程序,当我尝试工作时,我便开始将其关闭。 我的生产力猛增。

Tim: 蒂姆:

Yeah, I would imagine so. I work in an incubator, so my co-workers are directly across from me on a small wooden table. So the absence of Slack is not going to cause our company to implode.

是的,我会这样想。 我在孵化器中工作,所以我的同事们正对着我坐在一张小木桌上。 因此,缺少Slack不会导致我们的公司崩溃。

David: 大卫:

That’s true. Of course, those open floor plan workspaces that are so popular these days, that is another issue for productivity for a lot of people.

确实如此。 当然,这些天很流行的开放式平面图工作区,对于很多人来说,这是另一个生产力问题。

Tim: 蒂姆:

Yeah, I would say, because I think it pushes you into this weird sort of state, wherein if you want to get work done, you have to tune out noise. You listen to music, which is not neutral on your concentration.

是的,我会说,因为我认为它会将您推入这种怪异的状态,在这种状态下,如果您想完成工作,则必须消除噪音。 您会听音乐,这对您的注意力不是中性的。

David: 大卫:

No. I can’t listen to music that has any words in it and focus at all. I think one of my favorite things is coffee shop ambience sounds when I’m in an environment like that.

不。我听不出任何带有单词的音乐,根本无法集中精力。 我认为我最喜欢的事情之一是当我处于这种环境中时,咖啡店的氛围会发出声音。

Tim: 蒂姆:

Yes, definitely. I’m not sure if there is any science behind this, but I do believe that listening to music is not necessarily a matter of opinion, but it does take your attention away from the task at hand to varying degrees. If there are lyrics in the music, then it’s going to definitely pull more of your attention. If it is for background music or classical, it’s going to pull less of your attention. But I think the existence of it just in the background still pulls a little bit of your focus out of what you’re currently doing.

当然是。 我不确定这是否有科学依据,但是我确实相信听音乐并不一定是见仁见智,但确实会使您的注意力从不同程度上转移到手头的工作上。 如果音乐中有歌词,那肯定会吸引您的更多注意力。 如果是背景音乐或古典音乐,那么您的注意力就会减少。 但是我认为它只是在后台存在,仍然使您的注意力从当前的工作中抽离出来。

David: 大卫:

Sure. If I’m listening to Frozen and I start crying, then I’m going to be distracted.

当然。 如果我在听《冰雪奇缘》并且开始哭泣,那么我会分心。

Tim: 蒂姆:

Yes, and you absolutely cannot listen to Frozen and not be distracted. That is a fact. There’s definitely science behind that.

是的,您绝对听不到《冰雪奇缘》,也不会分心。 这是事实。 这背后肯定有科学。

David: 大卫:

So okay, we’ve talked a little bit about these factors in productivity. What have we come to, then? We’re talking about relevance, we’re talking about quality, and we’re talking about time, right?

好的,我们已经讨论了生产力中的这些因素。 那我们要做什么呢? 我们在谈论相关性,在谈论质量,在谈论时间,对吗?

Tim [35:36]: 蒂姆[35:36] :

Yeah, so I think to sum up, first off, most important thing, it’s not just about getting a lot of work done. The work has to be relevant. It’s not just about answering a thousand emails and then go into a thousand meetings. You will feel like you’ve done a lot, you will feel busy, but when you look back on it, you will see that a very small amount of work has gone to the actual tasks at hand. It’s spread too thinly to be of any major value. So the work has to be related to a larger goal.

是的,所以我想总结一下,首先,最重要的是,这不只是完成许多工作。 这项工作必须是相关的。 这不仅是回答一千封电子邮件,然后参加一千次会议。 您会觉得自己做了很多事情,会感到很忙,但是当您回头看时,会发现很少的工作已经完成了手头的实际任务。 它的传播范围太窄,没有任何主要价值。 因此,这项工作必须与更大的目标相关。

David: 大卫:

Right. And then, the work also has to be of adequate quality. You have to be able to say that what you’re doing is of the appropriate quality level for the stage of the work that you’re working on. If you’re doing something that’s for a quick test, that can be taken out and put back in, then it can be slapdash, and it needs to be thrown together quickly and it’s appropriate. And that’s still productive. If it needs to be production-quality code, then it needs to be reviewed and tested and it needs to go through the whole integration process. It needs to be given that much respect in order to meet those quality standards.

对。 然后,作品还必须具有足够的质量。 您必须能够说出您所做的工作在所从事的工作阶段具有适当的质量水平。 如果您要进行快速测试,可以将其取出并放回去,那么它可能会很麻烦,需要快速地将其放在一起,这样才是合适的。 而且仍然有效。 如果需要使用生产质量代码,则需要对其进行检查和测试,并且需要经历整个集成过程。 为了达到这些质量标准,必须给予极大的尊重。

Tim: 蒂姆:

And then that led us into the idea that in some cases, it is impossible to be productive, which is a very important thing to realize, because you are definitely wasting your time if you are trying to be productive when given tasks and scenarios that make it impossible to be productive. In those cases, you’re just going to stress yourself out.

然后,这导致我们想到,在某些情况下,不可能实现生产力,这是非常重要的事情,因为如果在给定任务和场景的情况下尝试进行生产力提高,那肯定是在浪费时间不可能有生产力。 在这些情况下,您只会感到压力。

David: 大卫:

Finally, you need to be able to have the time to work in a focused manner, and you have to have everybody’s agreement on what that means, because everybody has to work together as a team. So communication still needs to happen. There need to be channels for that, but those channels need to be set up in such a way that everybody can share what they need to share without interrupting the flow of an engineer.

最后,您需要有时间专注于工作,并且必须在每个人的意思上达成一致,因为每个人都必须作为一个团队一起工作。 因此,交流仍然需要发生。 为此,需要有一些渠道,但是这些渠道的建立方式必须使每个人都可以共享他们需要共享的内容而不会中断工程师的流程。

Tim: 蒂姆:

That means that distractions need to be kept to an absolute minimum — again, if possible — because if that is not possible, that means you’re not working in an environment where it is possible to be very productive.

这意味着,分心需要保持在最低限度-再次,如果可能的话-因为如果这是不可能的,你不是在有可能的环境中工作是手段, 是非常有成效的。

David: 大卫:

It’s funny. We interviewed Azat Mardan recently, and one of the books that he mentioned was Deep Work, which is a good classic on the subject, and it’s worth reading about that level of focus and how you can achieve that.

这很有趣。 我们最近采访了Azat Mardan ,他提到的其中一本书是Deep Work ,这是该主题的经典著作,值得一读,它涉及到关注的重点以及如何实现这一目标。

Tim: 蒂姆:

Yeah, that’s definitely one that I should probably take a look at. But that being said, I think it’s fair to note that, in some cases, productivity is something that is a privilege. It does largely depend on the environment that you work in. If you find yourself in a bad work environment, wherein you have micromanagement just constantly, or you have no real agile process, you could very well be working in an atmosphere where productivity is just not possible in your current situation. Listening to a productivity podcast under that scenario would really only serve to tell you that there’s not much you can do about productivity when you are set up to be unproductive.

是的,那绝对是我可能应该看看的。 话虽这么说,但我认为应该公平地指出,在某些情况下,生产力是一种特权。 它确实很大程度上取决于您所处的环境。如果您发现自己处于恶劣的工作环境中,在该环境中您只能不断进行微管理,或者您没有真正的敏捷过程,那么您很可能会在仅能提高生产率的环境中工作在您当前的情况下是不可能的。 那情景下听播客生产力真的只会告诉你,当你被设置为非生产性的是没有太多可以做的生产力。

David: 大卫:

At least then you know it’s not your fault. But there things you can do to help encourage an environment of productivity, and having some definitions in mind, and having some resources that you can refer people out to, is a good place to start.

至少那么你知道这不是你的错。 但是,您可以采取一些措施来鼓励鼓励一个高效的生产环境,并且牢记一些定义以及一些可以让人们参考的资源,这是一个很好的起点。

Tim: 蒂姆:

Yes, I would say so. That might mean looking for a new place. We’ve all been stuck in places where productivity is just not a possible thing. And that’s frustrating. It doesn’t allow you to take great pride in your work when you know that you’re building a mess.

是的,我会这样说。 那可能意味着寻找一个新的地方。 我们都被困在生产力根本不可能实现的地方。 真令人沮丧。 当您知道自己正在制造一团糟时,它并不能使您为工作感到骄傲。

David: 大卫:

And sometimes that place can also be when you’re working alone.

有时那个地方也可能是您一个人工作的时候。

Tim: 蒂姆:

Yep, which is why I don’t work alone.

是的,这就是为什么我不孤单的工作。

[Laughter]

[笑声]

David: 大卫:

Well, which is why I use a Kanban board to keep track of my own tasks, so that I don’t get sunk in those situations myself.

好吧,这就是为什么我使用看板来跟踪自己的任务,以免自己在这种情况下陷入困境。

Tim: 蒂姆:

Very true, very true, those are extremely helpful. Again, productivity is great if you are in an environment where productivity is possible. It’s not always a pick-yourself-up-by-your-bootstraps scenario.

非常真实,非常真实,这些都是非常有用的。 同样,如果您处于可以提高生产率的环境中,那么生产率就很高。 这并不总是由引导程序来解决的。

David [39:50]: 大卫[39:50] :

And productivity doesn’t always feel productive, especially when you’re working on something that might not feel like I’m writing a lot of original code. Like Tim, you were saying how you were doing code reviews for other people, but recognizing where that is productive, and why it’s productive, and then focusing on those aspects of it can help.

生产力并不一定总能带来生产力,特别是当您从事的工作似乎并不像我在编写大量原始代码时。 像蒂姆一样,您说的是如何为其他人进行代码审查,但要认识到在哪里有效,为什么有效,然后专注于这些方面可以有所帮助。

Tim: 蒂姆:

It’s a really, really good point. Because, again, I think when we say productivity, everybody always thinks, “Oh, I’m going to get a million things done in 10 seconds.” That’s not necessarily the case.

这是非常非常重要的一点。 因为,再次,我认为当我们说生产力时,每个人都会想到:“哦,我将在10秒内完成一百万件事情。” 不一定是这样。

So I think what we’ve discussed today is we have explained what it means to be productive. We talked about the three qualities of great productivity. Well, we spoke about what it means to be unable to be productive. There are cases wherein productivity is not actually possible.

因此,我认为我们今天讨论的是我们已经解释了富有成效的意义。 我们谈到了提高生产率的三种品质。 好吧,我们谈到了无法生产力的含义。 在某些情况下,实际上无法实现生产率。

So, what we’d like to do later on, is we’d like to share personal productivity tips, meaning now that we understand what productivity is, how can we actually go about being more productive? What are the things that we can … What are the habits — like David previously mentioned trigger habits — what are the habits that we could take on that will allow us to maximize our productivity?

所以,我们想以后做什么,是我们想分享个人生产力的提示,现在这意味着我们理解的生产力是什么,我们怎样才能真正去了解更加富有成效? 我们可以做些什么……这些习惯是什么—就像大卫前面提到的触发习惯一样 —我们可以采取哪些习惯以使我们的生产力最大化?

David: 大卫:

You know, Tim, that sounds like a good topic for a show all by itself.

蒂姆,你知道,就其本身而言,这听起来像是一个好话题。

Tim: 蒂姆:

I think it does. I think we should find an expert, because it’s clearly not me. I worked from home today and didn’t leave my couch. I guess maybe that doesn’t mean I wasn’t productive, but …

我认为是的。 我认为我们应该找到专家,因为显然不是我。 我今天在家工作,没有离开沙发。 我想也许这并不意味着我没有生产力,但是……

David: 大卫:

That certainly doesn’t mean you weren’t productive. I also worked from home today, and sitting here in my La-Z-Boy chair, very comfortably produced a lot of code. Not a lot of great code, but it was code that I wouldn’t have produced otherwise, and I can go back and I can refine it.

那当然并不意味着你没有生产力。 我今天也在家工作,坐在我的La-Z-Boy椅子上,非常舒适地编写了很多代码。 并不是很多很棒的代码,但是那是我以前不会生产​​的代码,我可以回去并对其进行优化。

Tim: 蒂姆:

Well, clearly we need somebody to help me out with my definitions of productivity, but in all honesty, we should definitely have someone on the show to tell us about productivity habits. I’m going to start calling it personal productivity, rather than what we’ve been discussing today, which is more along the lines of organizational productivity.

好吧,很明显,我们需要有人帮助我提出关于生产率的定义,但是老实说,我们绝对应该在展会上找人告诉我们有关生产率的习惯。 我将开始称其为“ 个人生产力” ,而不是我们今天一直在讨论的,这更像是组织生产力。

David: 大卫:

So we need to find somebody out there who’s a productivity expert, who can come and talk with us. If anybody out there knows somebody who can give us their expertise on this subject, please tweet us @VersioningShow and recommend them to us.

因此,我们需要找到一个有生产力专家的人,可以与我们交谈。 如果那里有人认识可以在此主题上为我们提供专业知识的人,请在@VersioningShow上发推特,并将其推荐给我们。

Tim: 蒂姆:

Or send us an email. Write us a handwritten letter.

或给我们发送电子邮件。 给我们写一封手写的信。

David: 大卫:

That’s true. We also accept gifts.

确实如此。 我们也接受礼物。

Tim: 蒂姆:

Yeah, we do accept gifts. We haven’t actually talked about this. [Laughter] The types of gifts! We should start an Amazon wish list.

是的,我们确实接受礼物。 我们实际上没有谈论过这一点。 [笑声]礼物的种类! 我们应该启动一个亚马逊愿望清单。

David: 大卫:

We need an entire show to be devoted to the types of gifts that we want, but I think we can deal with that next time.

我们需要一个完整的节目来专门介绍我们想要的礼物类型,但是我认为我们下次可以处理。

Tim: 蒂姆:

Yes, next time.

是的,下次。

[Musical interlude]

[音乐插曲]

David: 大卫:

Well, thank you so much for listening everybody. We always enjoy getting to talk technology with all of you.

好,非常感谢您的倾听。 我们总是喜欢与大家交谈技术。

Tim: 蒂姆:

We’d also like to thank sitepoint.com and our producers Adam Roberts and Ophelie Lechat, with production help from Ralph Mason. Please feel free to send us your comments on Twitter @VersioningShow, and give us a rating on iTunes to let us know how we’re doing.

我们还要感谢sitepoint.com及其制作人Adam Roberts和Ophelie Lechat,以及Ralph Mason的制作帮助。 请随时在Twitter @VersioningShow上向我们发送您的评论,并在iTunes上给我们评分,让我们知道我们的情况。

David: 大卫:

We’ll see you next time, and we hope you enjoyed this version.

下次见,我们希望您喜欢这个版本。

翻译自: https://www.sitepoint.com/productive-software-engineer/

如何成为嵌入式软件工程师

最新回复(0)