懒惰删除_有效程序员的懒惰心态

懒惰删除

重点 (Top highlight)

Bill Gates supposedly said:

比尔·盖茨据说:

I will always choose a lazy person to do a difficult job because a lazy person will find an easy way to do it.

我将总是选择一个懒惰的人去做一件困难的事情,因为一个懒惰的人会找到一个简单的方法来做。

In reality, the quote probably came from Frank B. Gilbreth Sr. and concerned bricklayers, not software developers. Nevertheless, it’s a great quote that makes us think about the nature of good work.

实际上,引述可能来自于Frank B. Gilbreth Sr.,涉及的是瓦工,而不是软件开发人员。 尽管如此,这是一个很棒的报价,使我们思考了良好工作的本质。

So what does it mean to be a lazy programmer? And should you be one?

那么成为一个懒惰的程序员意味着什么? 你应该成为一个吗?

我不应该努力吗? (Shouldn’t I Work Hard?)

You probably think you need to work hard to become a programmer, let alone a good programmer. You’re right. Programming is an intricate craft; it takes thousands of hours of deliberate practice to become competent at it.

您可能认为您需要努力成为一名程序员,更不用说一个优秀的程序员了。 你是对的。 编程是一项复杂的工作; 要胜任,需要花费数千小时的精心练习。

So don’t let anyone fool you. Wherever you are on your career path, you’ll struggle a lot, and you need to be ready for the hurdles. You cannot allow yourself to be lazy; on the contrary, you should work as hard as you can.

所以不要让任何人愚弄你。 无论您走在职业道路上的什么地方,您都会遇到很多困难,并且需要为遇到的障碍做好准备。 你不能让自己变得懒惰。 相反,您应该尽力而为。

But you want to choose your battles wisely. Working smart is as important as working hard. And to work hard on some things, you have to be lazy in other areas.

但是,您想明智地选择自己的战斗。 聪明地工作与努力工作同样重要。 要在某些事情上努力工作,您必须在其他领域保持懒惰。

The hardest part of being a software developer is thinking. You don’t want to be lazy in that department; in fact, you should actively seek new challenges. You need your laziness somewhere else.

成为软件开发人员最困难的部分是思考。 您不想在那个部门偷懒; 实际上,您应该积极寻求新的挑战。 您需要在其他地方保持懒惰。

Image for post
Photo by Jordan Whitfield on Unsplash
乔丹·惠特菲尔德Unsplash拍摄的照片

成为懒惰的程序员意味着什么? (What Does It Mean to Be a Lazy Programmer?)

A lazy programmer doesn’t want to do repetitive and mundane tasks. She gets bored quickly and seeks new adventures. She focuses on being productive, not hardworking. She achieves that by looking for patterns and automating everything to create maintainable and straightforward code.

懒惰的程序员不想执行重复和平凡的任务。 她很快就感到无聊,并寻求新的冒险。 她专注于生产力,而不是努力工作。 她通过寻找模式并自动执行所有操作以创建可维护且直接的代码来实现这一目标。

A lazy programmer knows every new line of code is expensive to write and maintain. Hence, she wants to write as little code as possible and avoids unnecessary frameworks and libraries. She doesn’t reinvent the wheel but uses already existing tools.

懒惰的程序员知道每行新代码的编写和维护成本都很高。 因此,她希望编写尽可能少的代码,并避免不必要的框架和库。 她并没有重新发明轮子,而是使用已经存在的工具。

A lazy programmer likes safety and knows she is error-prone. She understands machine errors are easier to find than human errors.

懒惰的程序员喜欢安全性,并且知道自己容易出错。 她知道机器错误比人为错误更容易发现。

A lazy programmer values her and her client’s time, so she focuses on the vital work, not on the number of hours. She devotes her time to the tasks that provide value for the client.

懒惰的程序员重视她和她的客户的时间,因此她专注于重要的工作,而不是工作时间。 她将时间用于为客户创造价值的任务。

In short — a lazy programmer leverages all the tools at her disposal to create the most value from the least time and code.

简而言之,一个懒惰的程序员可以利用所有可用的工具,以最少的时间和最少的代码创造最大的价值。

惰性程序员的例子 (Examples of Lazy Programmers)

Here are some lazy programmers’ achievements from the past. We should be endlessly grateful to them. They created tools to make theirs and our jobs more comfortable. So take a moment to praise our unsung heroes.

以下是一些懒惰的程序员过去的成就。 我们应该对他们无限地感激。 他们创造了使他们和我们的工作更舒适的工具。 因此,花点时间赞美我们这些无名英雄。

Lazy programmers didn’t want to waste time on code formatting, so they created Prettier.

懒惰的程序员不想在代码格式化上浪费时间,因此他们创建了Prettier。

Lazy programmers wanted to automate the tedious and error-prone deployment process, so they proposed Continuous Integration and Continuous Deployment.

懒惰的程序员希望自动化繁琐且易于出错的部署过程,因此他们提出了持续集成和持续部署。

Lazy programmers were tired of typing this same code over and over again, so they created Emmet.

懒惰的程序员厌倦了一次又一次地键入相同的代码,因此他们创建了Emmet。

Lazy programmers created all developer tools we are using because they wanted to make life easier. Be a lazy programmer; change the world for the better.

懒惰的程序员创建了我们正在使用的所有开发人员工具,因为他们想让生活更轻松。 成为一个懒惰的程序员; 让世界变得更好。

Image for post
Photo by sydney Rae on Unsplash
悉尼RaeUnsplash上的 照片

您如何成为Lazier程序员 (How Can You Become a Lazier Programmer)

Imagine being able to do your days’ work with one click. Feeling useless? Well, your job is to make it happen. The best way to avoid making mistakes is not to do anything. So you need to automate and simplify your work as much as possible.

想象一下,一键就能完成您的工作。 觉得没用? 好吧,您的工作就是实现这一目标。 避免犯错误的最好方法是什么也不做。 因此,您需要尽可能地自动化和简化您的工作。

To become a lazy programmer, use the tools others provided. I mentioned some earlier (Prettier, Emmet, CI/CD tools), but you can find tons of others. Look for code snippets and extensions for your IDE that will help you find bugs and enable autocompletion. Use linters to analyze your code and addons to autoclose brackets.

要成为懒惰的程序员,请使用其他提供的工具。 我之前提到过一些(Prettier,Emmet,CI / CD工具),但您可以找到很多其他工具。 查找您的IDE的代码段和扩展,这些代码段和扩展将帮助您查找错误并启用自动补全功能。 使用linters分析您的代码,并使用附加程序自动将方括号括起来。

Remember, you can write your shell scripts for repetitive commands. Always look for patterns in your daily job. If you have to do something several times a day or a week, try to automate it. Even if it takes just a few minutes each time, that automation will be worth it.

请记住,您可以为重复的命令编写Shell脚本。 始终在日常工作中寻找模式。 如果您必须每天或每周执行几次操作,请尝试使其自动化。 即使每次只需花费几分钟,这种自动化也是值得的。

Document your solutions. When you struggled for hours and solved a hard problem, you may feel you’ll remember that glorious fight forever. But you won’t. And you’ll reencounter this same bug. Wouldn’t it be nice to have a solution documented?

记录您的解决方案。 当您奋斗了数小时并解决了难题时,您可能会觉得自己会永远铭记这一光荣的战斗。 但是你不会。 而且您将遇到同样的错误。 记录解决方案不是很好吗?

Have you ever heard about testing? Everyone says it’s excellent, and everyone’s right. But how many of us write tests? Tests seem to take the time from the “real work.” But they save you the time you’d spend on debugging. So be a lazy programmer and write tests.

您听说过测试吗? 每个人都说这很棒,每个人都是对的。 但是,我们当中有多少人编写测试? 测试似乎要花费一些时间来进行“实际工作”。 但是它们可以节省您在调试上花费的时间。 因此,成为一个懒惰的程序员并编写测试。

Don’t automatically assume that every task you get should be done. Be brave enough to think if it’s necessary and brings real value. Challenge your superiors if you believe it’s not. We often work on autopilot, taking the next task on the list. By challenging others, we may learn that the task isn’t necessary, and you’ll have less work. Or maybe the task is crucial, and you’ll have a chance to learn why. Either way, you win.

不要自动地认为应该完成所有任务。 勇于思考是否有必要并带来真正的价值。 如果您认为不是的话,挑战上级。 我们经常进行自动驾驶,将列表中的下一个任务执行。 通过挑战他人,我们可能会了解到该任务不是必需的,并且您的工作量将减少。 也许任务很关键,您将有机会学习原因。 无论哪种方式,您都赢了。

The time you devote to streamlining your work and making it easier is the most productive time of the day. So, make it a priority.

您致力于简化工作并简化工作的时间是一天中最有生产力的时间。 因此,将其作为优先事项。

这不是危险的吗? (Isn’t It Dangerous?)

You may wonder: isn’t it dangerous to automate your job away. If someone can do your job with one click, aren’t you obsolete? No, you’re not.

您可能会想: 自动完成工作不是很危险 。 如果有人可以一键完成您的工作,您不是过时了吗? 不你不是。

You’re someone who can automate your job, so you’re skilled enough to have more demanding tasks. You provide real value to your client or employer, so finding a new job or a position will be a breeze.

您是可以使您的工作自动化的人,因此您足够熟练,可以执行更多艰巨的任务。 您为客户或雇主提供了真正的价值,因此轻松找到新工作或职位。

You’re not employed because you can do mindless assignments or code some trivial algorithms. Your job is to solve problems, and by automating your work, you prove you’re great at it. Problem solvers don’t need to worry about their careers. The employers fight for them.

您没有被雇用是因为您可以进行随意的工作或编写一些琐碎的算法。 您的工作是解决问题,并通过自动化工作来证明自己很擅长。 解决问题的人不必担心自己的职业。 雇主为他们而战。

The real danger is someone else automating your job. If that happens, you’re in trouble. So dodge the bullet, and automate it first. After all, you know your job best.

真正的危险是其他人会使您的工作自动化。 如果发生这种情况,那您就麻烦了。 因此,躲开子弹,并首先使其自动化。 毕竟,您最了解自己的工作。

翻译自: https://medium.com/better-programming/the-lazy-mindset-of-an-effective-programmer-68f4b70e3aac

懒惰删除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值