注重代码效率
by Harshdeep S Jawanda
通过Harshdeep S Jawanda
如何提升质量:注重态度 (How to skyrocket quality: focus on attitude)
When it comes to discussing quality and how we can improve, the most common things that come to peoples minds are tests, processes, procedures, QA departments, and so on. But they leave out the most important, basic thing, the pre-requisite for achieving high quality: the right attitude. Quality is all about having the right attitude. That’s the starting point.
在讨论质量以及我们如何提高质量时,人们最常想到的是测试,流程,程序,质量保证部门等。 但是他们忽略了最重要,最基本的东西,即达到高质量的前提: 正确的态度 。 质量就是拥有正确的态度。 那是起点。
Sure, you need all the other things mentioned above — tests, processes, and procedures — to achieve and maintain a high quality standard. But if you and/or your people don’t have the right attitude, all of the aforementioned things can just become a bullet list on a presentation slide. People can go through the motions of running the relevant tests and following the prescribed processes, but without the right attitude it all becomes a farce of ticking off checkboxes. ?
当然,您需要上面提到的所有其他内容(测试,过程和规程)才能达到并保持高质量的标准。 但是,如果您和/或您的员工态度不正确,上述所有内容都可能会成为演示幻灯片上的项目符号列表。 人们可以进行运行相关测试并遵循规定流程的动作,但是如果没有正确的态度 ,一切都会成为勾选复选框的闹剧。 ?
追求完美 (Pursuing perfection)
When it comes to the pursuit of perfection, I’ve always had the belief that:
在追求完美时,我一直坚信:
That’s my mantra and I swear by it. So much so, that I even have it as part of my Twitter profile. ?
那是我的口头禅 ,我发誓。 如此之多,以至于我什至将它作为我的Twitter个人资料的一部分。 ?
The first part simply means that no matter what you may think, nothing is ever really, truly perfect. If you think something is perfect, wait for five minutes, or two days, or two weeks, and you’ll start to see the small imperfections.
第一部分只是意味着,无论您怎么想,都没有什么是真的,真正的完美。 如果您认为某事是完美的,请等待五分钟或两天或两周,然后您会开始看到一些小的缺陷。
However, this does not mean that you should lose hope or become disheartened. Just because your thing (product, process, art, whatever) is not perfect doesn’t mean that it can’t be improved upon. This is where the second part comes in: by pursuing perfection you can move closer towards achieving perfection. And eventually, you’ll progress to such a state that you’ll surprise yourself by the progress made.
但是,这并不意味着您应该失去希望或灰心。 仅仅因为您的东西 (产品,过程,艺术品等)不完美,并不意味着就不能对其进行改进。 这是第二部分的目的:通过追求完美,您可以进一步接近实现完美。 最终,您将进步到这样一种状态,即您会对所取得的进步感到惊讶。
Psst. It still won’t be perfect, so what?
Psst。 它仍然不是完美的 ,那又如何呢?
This line of thinking has grown out of my background as a computer engineer/scientist. With every passing day, I find many more examples that make me think that it is generally applicable. Unless you can disprove this mathematically, I am going to claim that my mantra is universally true. ?
这种思路已经超出了我作为计算机工程师/科学家的背景。 随着时间的流逝,我发现更多的例子使我认为它普遍适用。 除非您能从数学上证明这一点,否则我将宣称我的口头禅是普遍正确的。 ?
This mantra is the basis for developing the right attitude, achieving high quality, and continuing to improve upon it. Never be satisfied with the quality you have, always be trying to improve.
这种口头禅是发展正确态度,实现高质量并持续改进的基础。 永远不要对自己的质量感到满意,而要不断努力。
要进步,要悲观 (To improve, be pessimistic)
Strange as it may sound, I find this an invaluable attitude to have towards the quality of whatever it is that you are doing.
听起来可能有些奇怪,但我发现这是一种无价的态度,对您所做的任何事情都具有质量。
Assume that whatever you have made is not going to work, or that it is of low quality. Be pessimistic about the quality of your work.
假设您所做的一切都不起作用,或者质量低劣。 对工作质量感到悲观。
Then — systematically — prove your pessimism wrong!
然后-系统地证明您的悲观主义是错误的 !
Yeah, that’s right (can’t help but picture David Puddy). ?
是的,没错(不禁为David Puddy拍照)。 ?
You may think of this as a roundabout way of doing things, but it works! It ensures that in working to overcome your pessimism (even if it’s a manufactured one) you’re actually improving/ensuring quality.
您可能会认为这是一种绕行的处理方式,但它确实有效! 它可以确保在克服悲观情绪(即使是制造过的悲观情绪)的过程中,您实际上正在改善/确保质量。
For a developer, this means writing tests to prove that the code actually works. For an author, this could take the form of soliciting feedback from an experienced editor. Tailor the prove-your-pessimism-wrong step to your particular situation, but do it.
对于开发人员而言,这意味着编写测试以证明代码确实有效。 对于作者而言,这可以采取征求经验丰富的编辑反馈的形式。 为您的特定情况量身定制证明您悲观的错误步骤,但是要这样做。
All too often, I have seen (and occasionally been a victim of it myself) people suffering due to overconfidence in their work. “It’s just a one-line code change, not even going to create a ripple in the pond”!
我经常看到人们因对工作的过度自信而遭受苦难(有时自己也是受害者)。 “这只是单行代码更改,甚至不会在池塘中造成涟漪”!
Wrong! Unless you have regression-tested and proven that everything still works, assume that even your tiny change is going to wreak havoc on the larger system. Be pessimistic!
错误! 除非您经过回归测试并证明一切仍然有效,否则请假设即使您的微小更改也将对更大的系统造成严重破坏。 悲观!
反馈是金色的 (Feedback is golden)
This may come as a surprise to many, but you get feedback from only 4% of dissatisfied customers! Putting it another way, for every customer that bothers to complain, 26 others are quietly unhappy and at high risk of leaving without giving you the chance to improve. As you can imagine, unless you listen very carefully to what little feedback you get and take heed, you run a very high risk of living in a fool’s paradise.
这可能会让许多人感到意外,但您只会从4% 的不满意客户那里获得反馈 ! 换句话说,对于每个烦恼的客户, 其他26个客户都非常不高兴,并且极有可能在没有给您改善机会的情况下离开。 可以想像,除非您非常仔细地听取所获得的反馈并注意,否则您将有很高的生活在傻瓜天堂中的风险。
That’s why customer feedback is pure gold. I can’t stress enough that you’ve got to really listen to it!
这就是为什么客户反馈是纯金的原因。 我无法承受的压力是您必须真正聆听它!
倾听并内化,即使很痛 (Listen and internalize, even if it hurts)
As a creator, it may hurt to listen to people criticize one of your creations. But think of it as invaluable feedback (we know how important that is ?). The feedback may come from a customer, or it may come from within your organization. Either way, it’s an opportunity to learn, improve, and grow.
作为创作者,听别人批评您的作品之一可能会很痛苦。 但是,将其视为宝贵的反馈(我们知道这很重要吗?)。 反馈可能来自客户,也可能来自组织内部。 无论哪种方式,这都是一个学习,改进和成长的机会。
Creators who take umbrage at feedback and become defensive and non-receptive will never be able to achieve the highest quality standards. These are the people who will either:
虚心于反馈的创作者将变得防御和不接受,将永远无法达到最高的质量标准。 这些人将要么:
- start looking for excuses as to why the failure happened (with the basic theme being “It wasn’t me”), or 开始寻找失败原因的借口(基本主题是“不是我”),或者
- become non-receptive and internally keep insisting there’s nothing to improve and that nothing could have been done any better. 变得不容易接受,并且在内部不断坚持,没有什么可以改善的,没有什么可以做得更好的。
These are the sorts of people who will not deliver good quality and will continue to fall further behind their peers in terms of expertise and skill.
这些人不会提供高质量的产品,并且在专业知识和技能方面将继续落后于同龄人。
硬币的反面 (The flip side of the coin)
On the other hand (you knew this was coming, right? ?), don’t let a single-minded focus on quality give you tunnel vision and make you blind to everything else.
另一方面(您知道即将到来,对吗??),不要一味专注于质量给您带来视野,并使您对其他所有事物都视而不见。
务实 (Be Practical)
One has to balance the need and desire for quality against other factors like cost and time.
人们必须在对质量的需求和期望与其他因素(例如成本和时间)之间取得平衡。
As an example, let’s say your company already has an electrical switch that can take a million on/off operations without failing. You want to improve this switch so that it can handle 10 million operations. But the development, usage of newer and more expensive materials, and testing combined will take an additional two years, with the resultant switch costing 3x that of the million-operation switch. Considering all that, is that quality improvement still worth it?
举例来说,假设您的公司已经有一个电气开关,可以完成一百万次开/关操作而不会失败。 您需要改进此开关,使其可以处理1000万次操作。 但是,开发,使用更新和更昂贵的材料以及将测试组合在一起将花费额外的两年时间,其最终成本为百万操作开关的三倍。 考虑所有这些,质量改进仍然值得吗?
In most cases, the answer would be a resounding “no”. Maybe your time will be better spent developing a version that is water-resistant, making it more suitable for outside use, and opening up your product to a whole new market.
在大多数情况下,答案将是响亮的“否” 。 也许您会花费更多的时间来开发一种防水的版本,使其更适合在外部使用,并向全新的市场开放您的产品。
当心异常值 (Beware of the outliers)
The “listen to your customer feedback” advice also comes with a caveat: “Beware of the outliers”. These are the people who will never be satisfied, will always be complaining, and will make you run around trying to satisfy their every whim. Such customers will increasingly start complaining about super-specific scenarios (things that affect a very small percentage of users) or about things that are very subjective (specific to personal taste).
“听客户反馈”建议还带有警告:“当心异常值”。 这些人永远不会满足,总是会抱怨,会让您四处奔波,尽力满足他们的每一个异想天开。 这样的客户将越来越多地开始抱怨超级特定的场景(影响很小比例的用户的事物)或非常主观的事物(特定于个人品味)。
If you try to satisfy these outliers, you might end up spending time on features (for example, adding “skins” to your software) that do not have universal appeal. In the process, you’ll take resources away from developing the product in directions that will give the greatest benefit to the greatest number of people.
如果您试图满足这些离群值,那么您可能最终会花时间在没有普遍吸引力的功能上(例如,在软件中添加“皮肤”)。 在此过程中,您将在开发产品时剥夺资源,而这些开发方向将使最多的人受益最大。
In the end, this often comes down to a judgement call about when to de-prioritize a customer’s feedback. There’s no sure-shot formula to get it right every time.
最后,这通常归结为关于何时降低客户反馈的优先级的判断电话。 没有确定的公式可以每次都正确。
结论 (Conclusion)
Adjust your attitude to enable you to pursue perfection relentlessly, with eyes on practicality and ears receptive to feedback.
调整自己的态度,使您能够不懈地追求完美,同时注重实用性和接受反馈的耳朵。
If you found this article helpful, please don’t forget to clap! ?
如果您发现这篇文章对您有所帮助,请别忘了鼓掌! ?
In keeping with with spirit of this article, constructive discussions and corrections are most welcome!
按照本文的精神,非常欢迎进行建设性的讨论和更正!
翻译自: https://www.freecodecamp.org/news/how-to-skyrocket-quality-focus-on-attitude-bd5fadc4dc7f/
注重代码效率