程序员命名规则
“The Pareto principle (also known as the 80/20 rule, the law of the vital few, or the principle of factor sparsity) states that, for many events, roughly 80% of the effects come from 20% of the causes.” — Wikipedia
“帕累托原理(也称为80/20规则,少数人定律或因子稀疏性原则指出,在许多事件中,大约80%的影响来自20%的原因。” — 维基百科
In a general sense, 80% means the majority, while 20% is the minority. So even though the exact percentages might not work for every rule, the same approach is applicable.
一般而言,80%表示多数,而20%表示少数。 因此,即使确切的百分比可能不适用于每条规则,也可以使用相同的方法。
Most programmers I know make this big mistake: They work 9-5 office hours despite more flexible hours being offered. They assume that this is how they can be productive, even though many of them feel tired after 1 p.m. Here’s how the 80/20 rule can help: Understand that 80% of your work will be completed in 20% of your daily 24 hours. So your most productive hours might be from 5 a.m. to 9 a.m. By following the norm, you’ll never know how much more work you can get done in a few hours.
我知道的大多数程序员都犯了一个大错误:尽管提供了更多的弹性工作时间,但他们仍工作9-5个工作时间。 他们假设这是他们可以提高工作效率的方法,即使其中许多人在下午1点之后感到疲倦。这是80/20规则可以提供的帮助:了解80%的工作将在每天24小时内完成20%。 因此,您的最高工作时间可能是从凌晨5点到上午9点。按照常规进行操作,您永远不会知道几个小时后可以完成多少工作。
Most of your users will only use 20% of the features you give them. As such, you should put 80% of your efforts into these features and make them your main features!
您的大多数用户只会使用您为其提供的功能的20%。 因此,您应该将80%的精力投入这些功能,并使其成为您的主要功能!
As programmers, we all create to-do lists to finish our tasks. In most cases, 20% of your to-do list will take 80% of your time. So sorting your to-do list might help you finish more tasks faster or finish the biggest part first. Sorting your to-do list according to this rule will help you stay motivated longer and know how long your do-list will take to complete.
作为程序员,我们所有人都创建待办事项列表以完成任务。 在大多数情况下,您的工作清单中有20%会占用您80%的时间。 因此,对待办事项列表进行排序可以帮助您更快地完成更多任务,或者首先完成大部分任务。 根据此规则对待办事项列表进行排序可以帮助您保持更长的动力,并知道您需要完成多长时间。
80% of the time spent on a coding project should be devoted to the first 20% of starting it. Brainstorming the idea, creating the coding structure, and planning will help the project move faster and more easily. So before trying to code everything, make sure to invest enough effort in the first 20% of your project.
花在编码项目上的时间的80%应该用于启动项目的前20%。 集思广益,构思代码结构和计划将有助于项目更快,更轻松地进行。 因此,在尝试编写所有代码之前,请确保在项目的前20%中投入足够的精力。
You only need to learn 20% of something to start using it. So let’s say you want to learn Java. Choosing the right 20% to learn from it will help you get it faster (i.e. learning about the Object-Oriented principle, syntax, etc.). Once you are done with these principles, you may start coding with confidence — even though you don’t know 80% of Java yet!
您只需要学习20%的东西即可开始使用它。 假设您想学习Java。 选择合适的20%来学习它会帮助您更快地获取它(即,学习面向对象的原理,语法等)。 一旦完成了这些原则,就可以放心地进行编码-即使您还不了解Java的80%!
Debugging can take hours of your coding time. So many developers say that 80% of their bugs are in 20% of the code. So it is smart to invest more time in debugging a patch of code when you discover a bug because there might be more bugs in the same code snippet.
调试可能需要花费数小时的编码时间。 如此多的开发人员说,他们80%的错误都在20%的代码中。 因此,发现错误时,花更多的时间调试代码补丁是明智的,因为在同一代码段中可能会有更多的错误。
If you are a developer, you might get hundreds of ideas for a new application. So knowing that 20% of your ideas are worth doing and will work might help you choose which idea is best to implement. Don’t go for any idea out there.
如果您是开发人员,那么对于新应用程序可能会获得数百个想法。 因此,知道您的想法中有20%是值得做的并且会起作用,这可能会帮助您选择最适合实施的想法。 不要在那儿有任何想法。
There is always more. Let me know if you have any other applications of the 80/20 rule.
总会有更多。 让我知道您是否还有其他80/20规则的应用程序。
翻译自: https://medium.com/better-programming/change-your-life-as-a-programmer-with-the-80-20-rule-17c325609343
程序员命名规则