软件构建
Has anybody ever told you, “We do it that way because that’s how it’s always been done”It’s time to stop accepting that as an answer.
有没有人告诉过您,“我们这样做是因为这样做总是这样”现在是时候停止接受它作为答案了。
Consider this example: A man and woman are in their kitchen getting ready to cook a ham for dinner. The man takes the ham out of the fridge, puts it on the counter, and cuts both ends off.
考虑以下示例:一个男人和一个女人正在厨房里准备煮火腿晚餐。 该男子将火腿从冰箱中取出,放在柜台上,然后将两端切掉。
Confused, the woman asks, “Why do you always cut the ends off the ham
女人很困惑,问道:“为什么你总是把火腿切掉呢
The man responds, “I don’t know. My mom always did it this way, so there must be a good reason.”
该名男子回答:“我不知道。 我妈妈一直都是这样,所以一定有充分的理由。”
The next day, the man calls his mom to ask why she cuts the ends off a ham. She says, “I don’t know. Your grandma always did it, so I always did it that way too.”
第二天,该男子打电话给妈妈,问她为什么要砍火腿。 她说:“我不知道。 您的祖母总是这样做,所以我也总是那样做。”
The man proceeds to call his grandmother and asks the same question. Again, she says, “My mother always did it. That’s just what we did.”
该男子继续打电话给他的祖母,并问了同样的问题。 她再次说:“我妈妈总是这样做。 那就是我们所做的。”
The following day, the man makes a trip to see his great-grandmother. He asks, “Why do you cut the ends off the ham before you cook it
第二天,那人去看望他的曾祖母。 他问:“为什么在煮火腿之前先把火腿切掉
She looks at him and says in a matter-of-fact voice, “Back then, our ovens were so small a whole ham was too big to put in the oven. I had to cut the ends off to make it fit!”
她看着他,用事实的声音说:“那时,我们的烤箱太小了,整个火腿太大了,无法放入烤箱。 我不得不剪短两端以使其适合!”
For years, this family mindlessly cooked this way because nobody stopped to ask why.
多年来,这个家庭因为没有人停下来问原因而盲目地做饭。
I can’t tell you how many times I’ve seen this with software. Patterns, components, and processes get reused every day because “it works” and nobody wants to bother coming up with the right way to do it. Building software “because it’s the way we always do it” is the antithesis of innovation.
我无法告诉您我已经使用软件查看过多少次了。 模式,组件和流程每天都会被重用,因为“它可以工作”,没有人愿意为正确的方法而烦恼。 “因为这是我们一直做的方式”构建软件是创新的对立面。
So let’s figure out how we can start changing our mindsets to naturally think out of the box.
因此,让我们弄清楚如何才能开始改变思维方式,以自然地跳出思维。
从经验中学习—不要重温他们 (Learn From Your Experiences — Don’t Relive Them)
You learn new things every day. Important things, unimportant things, gossip, current events, things related to computer science — the list goes on and on. You draw ideas and experiences from everywhere. Experiences that might not seem relevant to your day job could turn a design into a one-of-a-kind system. You just have to connect the dots.
您每天都在学习新事物。 重要的事情,无关紧要的事情,八卦,时事,与计算机科学有关的事情-清单还在不断增加。 您可以从任何地方汲取想法和经验。 似乎与您的日常工作无关的经验可能会使设计变成一种独一无二的系统。 您只需要连接点。
What you don’t want to do is replay what you did in the past. Even if it was successful. No two pieces of software are alike. Neither are the teams that are going to build it. What worked in one situation is not guaranteed to work in another. Even if it is for the same company or the same development team.
您不想做的就是重播过去的操作。 即使成功。 没有两个软件是相同的。 也不打算建立它的团队。 不能保证在一种情况下有效的方法在另一种情况下有效。 即使是同一家公司或同一开发团队。
Entropy and the second law of thermodynamics tell us that if you do nothing to change a process/pattern/design over time, it will only get worse. The level of disorder will continuously increase until it is practically unusable.
熵和热力学第二定律告诉我们,如果您不随时间改变过程/模式/设计,只会变得更糟。 混乱程度将不断增加,直到实际上无法使用为止。
If you learn from your past successes and apply lessons to your new project, you will grow not only your understanding but also the process. So think about that gossip you heard or that recent current event. What can you learn from those stories to help you come up with a new way to do something/p>
如果您从过去的成功中吸取教训并将经验教训应用到新项目中,那么您不仅会加深了解,而且会增加过程。 因此,请考虑一下您听到的八卦或最近的时事。 您可以从这些故事中学到什么,以帮助您找到一种新的做事方式
成为专业怀疑论者 (Become a Professional Skeptic)
As an engineer, you’re probably pretty good at this already. But I’m going to say it anyway.
作为工程师,您可能已经很擅长此事。 但是我还是要说。
Always ask why.
总是问为什么 。
Sure, taking things at face value is easy, but is it rightBeing told to do something is the easiest way for “this is the way we always do it” to slip into your project.
当然,让事情变得有面子很容易,但这是对的吗被告知要做某事是“这就是我们一直做的方式”进入您的项目的最简单方法。
Without thinking about it, you could have a pattern that was put in place 20 years ago added into your app. If you had asked why and pushed back on doing something this way versus that way, maybe you could have saved yourself.
不用考虑,您可以将20年前应用的模式添加到您的应用程序中。 如果您曾经问过为什么,然后又坚持以这种方式而不是那种方式做某事,那么也许您可以自救。
Software engineers almost never have an issue explaining why they chose to do something. The ones who hesitate are trying to hide something. The nature of a developer is to be curious and to explain the cool solution they came up with. If someone doesn’t want to go into detail about a solution, that’s a red flag.
软件工程师几乎从来没有一个问题可以解释为什么他们选择做某事。 那些犹豫的人试图隐藏一些东西。 开发人员的性质是好奇,并解释他们提出的出色解决方案。 如果有人不想详细介绍解决方案,那是一个危险信 。
I recently heard a story about a team of engineers who were developing a third-party integration into their system. They couldn’t access the third-party system until their credentials were cleared but had to start building right away to hit a deadline. So they decided to put up a mock server to act as the system until they got their credentials.
最近,我听到一个有关一群正在开发将第三方集成到其系统中的工程师的故事。 在清除其凭据之前,他们无法访问第三方系统,但必须立即开始构建以达到截止日期。 因此,他们决定建立一个模拟服务器作为系统,直到获得凭据为止。
Easy enough… except this team of engineers was following the “this is how we’ve always done it” principle.
很容易……除了这支工程师团队遵循“这就是我们一直以来做到的”原则。
They started coding a mock web service with dummy endpoints, writing deployment scripts to push it to a server, and describing patterns to add new mocks to it. WhyBecause that’s what they had done before.
他们开始使用虚拟端点对模拟Web服务进行编码,编写部署脚本以将其推送到服务器,并描述向其添加新模拟的模式。 为什么因为那是他们以前所做的。
Luckily, an engineer on that team had recently heard about Postman mock servers and was able to build exactly what they needed in minutes — not days. No custom code, no deployment scripts. Just using a better way to solve a known problem.
幸运的是,该团队的一名工程师最近听说了Postman模拟服务器,并且能够在数分钟内(而不是数天)完全构建他们所需的东西。 没有自定义代码,没有部署脚本。 只是使用更好的方法来解决已知问题。
If the engineer hadn’t been skeptical about the decision to build a throwaway dummy service, the team would have been out days of work.
如果工程师对构建一次性虚拟服务的决定不抱怀疑态度,那么该团队将没有工作时间。
拥抱多样性 (Embrace Diversity)
Do you know what’s easyThinking you’re right.
你知道什么容易吗认为你是对的。
Do you know what’s easierHaving people you’ve worked with for years and years telling you you’re right.
你知道什么更容易吗与您一起工作多年的人告诉您您是对的。
If you have worked with the same people for years, chances are you’ve developed a similar mindset as each other. You’ve made the same decisions, learned the same lessons, and picked up on the same gotchas. What you haven’t done is built a diverse set of ideas.
如果您与同一个人一起工作了多年,那么您很有可能会发展出彼此相似的思维方式。 您做出了相同的决定,吸取了相同的经验教训,并且掌握了相同的陷阱。 您尚未完成的工作是建立了各种各样的想法。
You and your team have validated each other into thinking your ways are the best. WhyBecause you always agree on the path to go down.
您和您的团队已经相互验证,认为您的方法是最好的。 为什么因为您始终同意走下坡路。
This is one of the easiest and scariest “that’s the way we always do it” traps. You don’t get challenged when replaying an idea, so you reinforce its validity in your mind.
这是最简单和最可怕的“这就是我们一直这样做的方式”的陷阱之一。 重播创意时,您不会受到挑战,因此可以增强创意的有效性。
Please don’t do that.
请不要那样做。
Ask around. Get ideas from other people. Use Google. Go to Twitter. You literally have some of the world’s best software developers at your fingertips through social media.
问问周围。 从别人那里获取想法。 使用谷歌。 转到Twitter。 您实际上可以通过 交媒体找到一些世界上最好的软件开发人员。
Take the time to ask a question, read up on a new technique, or fire off a tweet. There are people out there who genuinely want to help, and you should take advantage of it.
花时间问一个问题,阅读一种新技术,或者发布一条推文。 那里确实有人想要提供帮助,您应该利用它。
The best thing you can do for yourself and your software is to get a diverse look at the problem. Not only will you learn new ways to approach a problem, but you will also get the opportunity to teach others. Plus, you will tackle a problem in a new, innovative way.
您可以为自己和您的软件做的最好的事情是对问题进行多方面的了解。 您不仅会学习解决问题的新方法,而且还将有机会教别人。 另外,您将以新颖的创新方式解决问题。
愿意改变方向 (Be Willing to Change Direction)
Guess whatYou aren’t going to be right 100% of the time.
你猜怎么了您不可能100%正确。
You’ll make a decision on how to build your project, and once you get in there, you’ll realize it was the wrong call. You’ve made a mistake.
您将决定如何构建项目,一旦进入该项目,您将意识到这是一个错误的电话。 你弄错了
But it’s OK. You recognized it early and are willing to course-correct, right/p>
但没关系。 您很早就意识到了这一点,并且愿意改正,对吧
When exploring uncharted territory, you need to be hyper-aware of your surroundings. Keep a watchful eye on everything. If it starts looking like you went in the wrong direction, identify that as quickly as possible and come up with a solution.
在探索未知领域时,您需要对周围环境有高度的了解。 随时注意一切。 如果开始看起来像您走错了方向,请尽快找出并提出解决方案。
You can’t realistically expect new patterns, processes, and designs to be right on the first try. You build software with full intentions to iterate. And we all know it’s not iteration if you only do it once.
您不可能现实地期望新的模式,流程和设计在第一次尝试时就正确。 您完全有意进行迭代来构建软件。 我们都知道,如果只执行一次,就不是迭代。
Maybe you need to change something small. Maybe you need to abandon this path completely and go down another route. As long as you have caught it in a responsible time frame, do it.
也许您需要更改一些小东西。 也许您需要完全放弃这条路,而走另一条路。 只要您已在负责任的时间范围内抓住它,那就去做吧。
Be flexible. Give yourself a chance to fail. Give yourself a chance to learn.
变通。 给自己一个失败的机会。 给自己一个学习的机会。
现在开始 (Start Now)
The best time to start something new was yesterday. The second-best time is right now. You don’t have to wait until you’re on a brand new project or doing greenfield development to start thinking for yourself.
开始新事物的最佳时间是昨天。 第二好的时间是现在。 您不必等到进行一个全新的项目或进行未开发的项目就可以开始自己思考。
Start surrounding yourself with people from different backgrounds. Ask people on social media for their ideas. Get a diverse group of people to constantly challenge you.
开始与来自不同背景的人在一起。 在 交媒体上向人们询问他们的想法。 吸引各种各样的人不断挑战您。
The world needs people to innovate. We won’t innovate if we are herding a bunch of sacred cows.
世界需要人们创新。 如果要放牧一堆圣牛,我们就不会创新。
Be smart, think unique, build something great.
聪明一点,想想独特的东西,打造出伟大的东西。
翻译自: https://medium.com/better-programming/think-unique-build-the-right-software-not-the-easy-software-ad6615ef58c9
软件构建
文章知识点与官方知识档案匹配,可进一步学习相关知识算法技能树首页概览33983 人正在系统学习中 相关资源:fouro-application:iOSAndroid应用程序,用于发送虚拟拥抱并与朋友…
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!