程序员 改bug 心态_企业家的心态如何帮助程序员设计更好的软件

程序员 改bug 心态

Hey there!

嘿!

You clicked on this article (which is a big success for me because this is my first story) — but the point here is not about my writing endeavors, but rather about programmers. And, more specifically, how an entrepreneur’s mindset can change their approach to solving problems and focusing on the big picture.

您单击了这篇文章(对我来说是巨大的成功,因为这是我的第一个故事),但是这里的重点不是我的写作努力,而是程序员。 更具体地说,企业家的思维方式如何改变他们解决问题和着眼于大局的方法。

Since you are reading this article, most probably you are a programmer just like I am. We have probably gone through some similar programming situations and made the same mistakes in our programming life that would make us completely understand each other even though we have never even met.

由于您正在阅读本文,因此您很可能像我一样是一名程序员。 我们可能经历了一些类似的编程情况,并且在编程生涯中犯了同样的错误,即使我们从未见过面,他们也会使彼此完全了解。

How do I know this?

我怎么知道

Let me try something out. I will list some common mistakes that I have made throughout my programming days. While you are reading this list, if you occasionally nod your head or have your mind blown saying: Hell yeah. I have done the same! then we are not strangers but rather two programmers who have gone through the same stuff. Let’s start.

让我尝试一下。 我将列出我在编程期间遇到的一些常见错误。 在阅读此列表时,如果您偶尔点头或头脑不清地说: 是的。 我也一样! 牛逼母鸡我们不是陌生人,而是两个程序员谁也通过同样的东西不见了。 开始吧。

Have you ever:

你有没有:

  • Acted before actually thinking and understanding the problem?

    在实际思考和理解问题之前采取了行动?

  • Assumed a feature was needed?

    假设需要一个功能?

  • Thought that this new feature implementation would be a piece of cake?

    以为这个新功能的实现将是小菜一碟?

  • Created imaginary problems and tried to solve them?

    创造了想象中的问题并试图解决?

  • Published code without testing?

    未经测试发布代码?

  • Spent too much time on unnecessary things within an overall project?

    在整个项目中花了太多时间处理不必要的事情?

  • Done everything by yourself (hero programmer)?

    自己(英雄程序员)完成所有工作吗?

  • Applied the wrong task separation and management?

    应用了错误的任务分离和管理?

  • Tried to make the first version perfect?

    试图使第一个版本完美吗?

  • Underestimated the scope of the project and the amount of time that would be required to complete it (Deadline nightmare)?

    低估了项目的范围以及完成项目所需的时间(最后期限的噩梦)?

Are you still nodding?

你还在点头吗?

:)

:)

The point is that it does not matter which programming language you know or use, what kind of programmer you are, and how vast your experience is. The point is that you are a programmer, and like all of us you can be easily trapped in one behavior pattern which looks efficient at the beginning and makes you feel smart but that eventually turns into a mess.

关键是,您知道或使用哪种编程语言,您是哪种类型的程序员以及您的经验有多大都无关紧要。 关键是您是一名程序员,和我们所有人一样,您很容易陷入一种行为模式,这种行为模式在开始时看起来很有效率,使您感到聪明,但最终变成一团糟。

Been there. Done that.

到过那里。 做到了。

As every programmer has, I made the same mistakes in my early programming life while working on many different software projects with various other programmers.

就像每个程序员一样,在与其他各种程序员一起从事许多不同的软件项目时,我在早期编程生涯中犯了同样的错误。

Once I reached a certain point where, instead of repeating the same mistakes, I started recognizing behavior patterns, I realized that the majority of programmers were working by the same pattern.

一旦到达某个点,我不再识别相同的错误,而是开始认识到行为模式,我意识到大多数程序员都在按照相同的模式工作。

It was a breakthrough for me.

对我来说是一个突破。

Can you imagine? Instead of spending quality time building great software, we are actually trapped in our own behavior patterns that lead us to lose time day by day and code by line of code.

你可以想象? 实际上,我们没有将大量的时间花在构建出色的软件上,而是陷入了自己的行为模式中,这导致我们每天都在浪费时间,每行代码都在浪费时间。

I decided to try to change this pattern and learn from my mistakes. With the power of will and a bit of luck I somehow managed to do so.

我决定尝试改变这种模式,并从错误中吸取教训。 凭借意志的力量和一点运气,我设法做到了。

从小开始。 想大点。 (Start small. Think big.)

What was my first action?

我的第一个动作是什么?

I started learning from the best.

我从最好的地方开始学习。

I spent every day spending every free minute reading articles, books, watching videos and following best practices on how to improve my coding style and not make the same mistakes again.

我每天都花每一分钟的时间阅读文章,书籍,观看视频,并按照最佳实践来改进我的编码风格,而不会再犯同样的错误。

I noticed a pattern: having great programming skills (even though they are super duper important to have) is not enough when it comes to minimizing these mistakes. Rather it’s something outside of the code.

我注意到了一种模式:要想最大限度地减少这些错误,仅拥有出色的编程技能(即使他们非常重要)是不够的。 而是在代码之外。

To avoid the most common programming mistakes that lead to nightmare deadlines, unnecessary code lines and losing time, you need to expand your perspective and point of view. Instead of just thinking about the software you code only from your perspective, as a programmer, you should look at the software you design from a much bigger perspective.

为了避免导致噩梦般的最后期限,不必要的代码行和浪费时间的最常见的编程错误,您需要扩展自己的观点和观点。 作为程序员,您不仅要只从角度考虑要编写的软件,还应该从更大的角度来看待设计的软件。

This bigger perspective means to focus on the main idea, the purpose of the software, and not only on the code functionality.

这种更大的观点意味着着重于主要思想,软件的目的,而不仅仅是代码功能。

I realized that we should never forget to ask ourselves: Why are we coding this software in the first place?

我意识到我们永远都不要忘记问自己:我们为什么要首先对该软件进行编码?

What does this mean?

这是什么意思?

Programmers tend to lock themselves inside the software they build, which usually leads to shrinking their focus only to the lines of code.

程序员倾向于将自己锁定在他们所构建的软件中,这通常导致他们只将注意力集中在代码行上。

When this happens, you tend to miss the main point which is the purpose of the software. You are building this software to help your users by solving their problems and making their lives easier. When you keep this purpose in your mind while you are coding, you will be able to reorganize your development process in more efficient way. Instead of being trapped inside the code, you are now being guided by the main idea of the software which will give you the ability to cut unnecessary things and focus on the core concepts.

发生这种情况时,您往往会错过软件要旨的要点。 您正在构建此软件,以通过解决用户的问题并简化他们的生活来帮助您的用户。 当您在编写代码时牢记此目的时,您将能够以更有效的方式重组开发过程。 现在,您不再局限于代码的内部,而是被软件的主要思想所引导,它将使您能够减少不必要的事情并专注于核心概念。

When you put things this way, suddenly coding style isn’t the only important thing.

当您以这种方式放置内容时,编码风格并不是唯一重要的事情。

超越代码 (Beyond the code)

While working in a company and leading a team of developers, I also started building my side project that eventually taught me some major lessons on how to reorganize my development process. I went from a code-only perspective to a software purpose perspective.

在公司工作并领导开发人员团队时,我还开始构建我的附带项目,该项目最终教给我一些有关如何重新组织开发流程的重要课程。 我从仅代码的角度转到了软件目的的角度。

How I started was very simple. It is maybe ironic, but to improve my code, the first thing I did was to escape my code. I had to see beyond the code.

我的开始非常简单。 这可能具有讽刺意味,但是为了改进我的代码,我要做的第一件事就是逃脱我的代码。 我不得不看代码之外。

Maybe it sounds weird but it actually works. While working as a programmer, I also had the tendency to focus on the code functionality until I started building my own project.

也许听起来很奇怪,但它确实有效。 在担任程序员的同时,我也倾向于专注于代码功能,直到我开始构建自己的项目为止。

While designing my own software, I started reading many articles about how entrepreneurs should approach problems in order to solve them and how they can grow their business with limited resources and limited time.

在设计自己的软件时,我开始阅读许多文章,内容涉及企业家应如何解决问题以及如何利用有限的资源和有限的时间发展业务。

I saw that the strategies entrepreneurs follow can help programmers change their mindset and help them develop better and bug-free software.

我看到企业家遵循的策略可以帮助程序员改变思维方式,并帮助他们开发更好且无错误的软件。

I went and applied the same concept at work and it showed great results.

我去了,并在工作中应用了相同的概念,它显示了很好的结果。

Lets take a closer look at each common mistake made by programmers and see how entrepreneur mindset can help us avoid them.

让我们仔细研究一下程序员犯的每个常见错误,看看企业家的心态如何帮助我们避免这些错误。

1.考虑问题之前采取行动 (1. Acting before thinking about the problem)

Have you ever jumped straight into coding instead of thinking about the problem you are trying to solve? Without considering all the requirements of the software? Yeah, I have, too. Then we realize in the end that we chose the wrong tools and wrong architecture to code the software.

您是否曾经直接进入编码而不是思考要解决的问题? 不考虑软件的所有要求? 是的,我也有。 然后,我们最终意识到我们选择了错误的工具和错误的体系结构来对该软件进行编码。

As a result, we face even bigger problems than the problem that we tried to fix in the first place. These problems come in the from of complex design, which makes the solution unmanageable and results in hard to maintain program structures.

结果,我们面临的问题比我们一开始要解决的问题还要大。 这些问题来自复杂的设计,这使得解决方案难以管理,并导致程序结构难以维护。

So now, let’s try to approach this problem from an entrepreneur’s perspective.

因此,现在让我们尝试从企业家的角度来解决这个问题。

An entrepreneur would do deep research to understand the market and problems that the customers experienced. They would know that without exactly understanding the problem and analyzing it from each perspective, eventually it would lead to bigger problems like wasting time and resources. After all, with already limited time and resources, wasting time on unnecessary things is definitely not part of their plan.

企业家将进行深入研究,以了解市场和客户遇到的问题。 他们会知道,如果不完全理解问题并从各个角度分析问题,最终将导致更大的问题,如浪费时间和资源。 毕竟,由于时间和资源已经有限,浪费时间在不必要的事情上绝对不是他们计划的一部分。

Main point: Don’t act before understanding the problem.

要点:在理解问题之前不要采取行动。

2.假设需要一个功能 (2. Assuming a feature is needed)

If you don’t understand the exact expectations and features that are required by the software you need to build, you might misunderstand the concept and invent an unnecessary feature which is totally irrelevant to the overall software’s purpose. So what happens is that you waste your time on that unnecessary feature while missing the core feature’s implementation.

如果您不了解需要构建的软件的确切期望和功能,则可能会误解该概念,并发明了与整个软件用途完全无关的不必要功能。 因此,发生的事情是您在浪费不必要的功能时浪费了核心功能的实现。

From an entrepreneur’s point of view, this is not acceptable.

从企业家的角度来看,这是不可接受的。

While building software you should first focus on the feature that solves the customer’s problems. By listening to the customer’s voice and analyzing their needs, you can then build software from essentially required features while others come later on.

在构建软件时,您应该首先关注解决客户问题的功能。 通过听取客户的声音并分析他们的需求,您可以从本质上必需的功能中构建软件,而其他功能则可以在以后使用。

Main idea: Don’t assume. Question everything.

主要思想:不要假设。 质疑一切。

3.假设新功能将易于实现 (3. Assuming new features will be easy to implement)

As programmers, we have a keen ability to underestimate the feature implementation process. Sometimes we believe that we know how to solve the problem without even thinking about it.

作为程序员,我们有敏锐的能力低估功能实现过程。 有时我们认为,即使不考虑问题,我们也知道如何解决问题。

Again — wrong.

再次-错误。

This kind of behavior leads to missing deadlines, because nothing is easy and everything has to be planned carefully. An entrepreneur would know that without having a clear implementation plan, invisible problems may appear which can eventually lead to many other troubles.

这种行为导致错过最后期限,因为没有什么容易的事,所有事情都必须仔细计划。 企业家会知道,如果没有清晰的实施计划,可能会出现看不见的问题,最终可能导致许多其他麻烦。

Main idea: Never underestimate the problem. Think, plan and than act.

主要思想:永远不要低估问题。 思考,计划而不是行动。

4.创造想象中的问题并设法解决它们 (4. Creating imaginary problems and trying to solve them)

As programmers we like challenges :) (you know what I mean).

作为程序员,我们喜欢挑战:)(您知道我的意思)。

Sometimes we like to implement code that has no other purpose but to satisfy ourselves and prove to everyone that we could overcome this challenge.

有时,我们喜欢实施没有其他目的的代码,但要使自己满意,并向所有人证明我们可以克服这一挑战。

There are moments when we even try to predict features that will solve imaginary problems that we created.

有时候,我们甚至尝试预测可以解决我们创建的假想问题的特征。

Crazy, huh?

疯了吧?

While programmers are inventing imaginary problems, entrepreneurs are avoiding them. Simple enough.

当程序员发明想象中的问题时,企业家正在避免它们。 很简单。

They would focus on the problems that actually already exist and try to solve them as soon as possible. In that way, they gain the ability to invest their time in things which are essential for their business.

他们将专注于实际已经存在的问题,并尝试尽快解决它们。 这样,他们就有能力将时间投入到对其业务至关重要的事情上。

Main idea: Don’t predict future problems. Focus on the ones you already have.

主要思想:不要预测未来的问题。 专注于您已经拥有的那些。

5.发布代码而不进行测试 (5. Publishing code without testing)

Do you remember the last time you pushed some code to production without testing it?

您还记得上次未经测试将代码推入生产环境的时候吗?

Sometimes we make this mistake because we are excited about our code. Sometimes even senior programmers can make this mistake. Many programmers see testing as a burden, and after coding it’s easy to skip it. But what they are not aware of is that skipping this step will create troubles for them in the future: instead of being productive, they will become bug hunters with sleep deprivation.

有时我们会犯此错误,因为我们对代码感到兴奋。 有时,即使是高级程序员也可能犯此错误。 许多程序员将测试视为负担,并且在编码后可以轻松跳过它。 但是他们不知道的是,跳过此步骤将在将来给他们带来麻烦:他们将不再富有成效,而会成为睡眠剥夺的Bug猎手。

When we look at entrepreneurs, they tend to verify and test everything before execution. This is because they don’t want to ship a product that is not wanted or needed by their potential customers. Before shipping, they always test whether the problem they are trying to solve really exists and if there is a market for that product or not. In this way, they will minimize the possibility of failure.

当我们看企业家时,他们倾向于在执行之前验证和测试所有东西。 这是因为他们不想运送潜在客户不想要或不需要的产品。 在发货之前,他们总是测试他们试图解决的问题是否确实存在,以及该产品是否有市场。 这样,它们将使故障的可能性降到最低。

Main idea: All code lines must be executed at least once.

主要思想:所有代码行必须至少执行一次。

6.在不必要的事情上花费太多时间 (6. Spending too much time on unnecessary things)

Generally this happens when programmers are obsessive about a certain issue. Doesn’t matter if this issue is important or not. They try to overcome this issue again and again because — as mentioned above — they like challenges. In the end maybe they will succeed, but at what cost?

通常,这发生在程序员沉迷于某个特定问题时。 不管这个问题是否重要,都没有关系。 他们试图一次又一次地克服这个问题,因为-如上所述-他们喜欢挑战。 最终他们也许会成功,但是付出了什么代价呢?

The problem? Determining whether the issue really needs to be solved. If they stop to question it and see the big picture, they would never waste their time fixing an issue that is not important.

问题? 确定问题是否真的需要解决。 如果他们停止质疑并看到全局,他们将永远不会浪费时间来解决不重要的问题。

On the other hand, entrepreneurs know that they don’t have the luxury to waste their time on unnecessary things. Basically they question everything and make their priorities straight.

另一方面,企业家知道他们没有奢侈地将时间浪费在不必要的事情上。 基本上,他们对所有问题都提出了质疑,并明确了他们的优先事项。

Main idea: Don’t waste your time. Use it wisely.

主要思想:不要浪费时间。 明智地使用它。

7.自己做每件事 (7. Doing everything by themselves)

In this paragraph I am not talking about programmers who work in well organized companies. If you have a good team leader who knows how to delegate jobs, it’s not an issue. But in some companies — especially small ones or startups — programmers have a tendency to do every task by themselves. They believe that if they delegate their tasks to other team members they will make mistakes. Basically they don’t trust them.

在这一段中,我不是在谈论在组织良好的公司工作的程序员。 如果您有一个懂得如何委派工作的优秀团队负责人,那不是问题。 但是在某些公司(尤其是小型公司或初创公司)中,程序员倾向于自行完成每项任务。 他们相信,如果将任务委派给其他团队成员,他们会犯错误。 基本上他们不信任他们。

Eventually they become overloaded with work and the development process starts to become very slow.

最终,他们变得工作量大,开发过程开始变得非常缓慢。

Entrepreneurs are typically well aware that they can’t do everything by themselves. They tend to create an environment based on trust where everyone can ask for help. Task delegation and working in teams can lead to an increase in work efficiency.

企业家通常很清楚,他们自己不能做任何事情。 他们倾向于创建基于信任的环境,每个人都可以寻求帮助。 任务委派和团队合作可以提高工作效率。

Main idea: Trust your team. Don’t forget that everyone needs help.

主要思想:信任您的团队。 不要忘记每个人都需要帮助。

8.错误的任务分离和管理 (8. Wrong task separation and management)

I believe that the task creation process is one of the most important steps in designing better software. Instead of separating a certain project into smaller tasks, programmers or team leaders sometimes group all tasks into a single project.

我相信任务创建过程是设计更好的软件的最重要步骤之一。 程序员或团队负责人有时不将某个项目分解为较小的任务,而是将所有任务归为一个项目。

In this way, when they start with task implementation, the task itself can look bigger than it really is and they don’t know how to approach it or where to even start.

这样,当他们开始执行任务时,任务本身看起来可能比实际情况大,而且他们不知道如何执行任务甚至不知道从哪里开始。

On the other hand, if you separate one big task into smaller tasks, you can always choose to start with small steps. Going step by step and completing each sub task will lead to completing the big picture and solving the task fully in the end.

另一方面,如果将一个大任务分成多个小任务,则始终可以选择从小步骤开始。 一步一步地完成每个子任务将导致完成全局并最终完全解决任务。

Separating a task into sub tasks helps in solving complex problems and allows you to manage tasks in a more efficient and simple way.

将任务分为子任务有助于解决复杂的问题,并允许您以更有效,更简单的方式管理任务。

I believe that every entrepreneur has a “start small” mindset.

我相信每个企业家都有一个“ 从小做起 ”的心态。

Main idea: Start small than extend.

主要思想:从小开始而不是扩大。

9.试图使第一个版本完美 (9. Trying to make the first version perfect)

Programmers often try to implement everything in the first software version. They believe that without giving everything to customers in the first version, those customers will be disappointed and they will not like the product.

程序员经常尝试在第一个软件版本中实现所有功能。 他们认为,如果没有在第一版中向客户提供所有产品,这些客户将感到失望,他们将不会喜欢该产品。

This approach leads to a deadline nightmare and delay of the first release.

这种方法导致最后期限的噩梦和首次发布的延迟。

However, entrepreneurs tend to strongly believe in the feedback cycle. They follow the principle of “Build it, ship it, iterate it.” They know that they have to ship their product into market as soon as possible. Once they release the first version, they will listen carefully to their customers and analyze their feedback. In this way they will make their product better and avoid the implementation of unnecessary features.

但是,企业家倾向于坚信反馈周期。 他们遵循“ 构建,运送,迭代 ”的原则 他们知道他们必须尽快将其产品投放市场。 一旦发布第一个版本,他们将认真听取客户的意见并分析他们的反馈。 这样,他们将使产品更好,并避免实施不必要的功能。

Main idea: Build it, ship it, iterate it.

主要思想:构建,运输,迭代。

10.低估了项目的范围和完成项目所需的时间(最后期限的噩梦) (10. Underestimating the scope of the project and time required to complete it (Deadline nightmare))

How many times have you felt pressure and stress because of a missed deadline?

由于错过了截止日期,您有多少次感到压力和压力?

Did you ever ask yourself why you missed this deadline?

您是否曾经问过自己为什么错过这个截止日期?

I believe, as a programmer, deadlines have always been a nightmare for us. Generally we tend to underestimate the scope of the requirements which brings us to a point where we can’t accurately estimate the required amount of time needed to complete the project.

我相信,作为一名程序员,截止日期一直是我们的噩梦。 通常,我们倾向于低估需求的范围,这使我们无法准确估计完成项目所需的时间。

I believe that 80% of the development process should be dedicated to establishing software requirements and designing a feature list and appropriate architecture to build the project. The other 20% percent should be dedicated to coding.

我认为,开发过程的80%应该专门用于建立软件需求,设计功能列表和适当的体系结构以构建项目。 另外20%应该用于编码。

However, this is easier said than done. In practice, this is always a challenge for a team of developers.

但是,这说起来容易做起来难。 在实践中,这始终是开发人员团队面临的挑战。

To a person with an entrepreneur mindset, time is the most valuable resource. Therefore, they define their business scope carefully and estimate their project time in a more accurate way.

对于一个有企业家思维的人来说,时间是最宝贵的资源。 因此,他们仔细定义了业务范围,并以更准确的方式估算了项目时间。

Main idea: Everything takes longer than you think.

主要思想:一切花费的时间超出您的想象。

结论 (Conclusion)

I’ve seen many programmers who had to rewrite their software from scratch because of mistakes made in the early stages of the development process.

我已经看到许多程序员由于开发过程的早期阶段的错误而不得不从头开始重写软件。

Re-coding software that was created by bad development processes is a waste of time.

由不良的开发过程创建的重新编码软件是浪费时间。

Imagine a scenario where the development process has been planned and organized in a better way from the start. Now instead of rewriting the software, programmers could dedicate their time to developing new products or improving existing ones.

想象一个场景,从一开始就以更好的方式计划和组织了开发过程。 现在,程序员无需重写软件,而可以将时间专用于开发新产品或改进现有产品。

I always believe that if we can focus on the purpose of what we are doing and why we are doing it, everything will be much clearer for us. I,f we always keep the big picture in our mind we will develop better and higher quality software that will be designed to fulfill a certain purpose.

我始终相信,如果我们能够专注于我们正在做的事情的目的以及我们为什么要做的事情,那么对于我们来说,一切都会变得更加清晰。 我,如果我们始终牢记全局,我们将开发旨在满足特定目的的更好,更高质量的软件。

Don’t waste your time. It’s precious and your most valuable resource.

不要浪费你的时间。 这是宝贵的资源,也是您最宝贵的资源。

Each ? is welcomed if you enjoyed this article!

每个? 如果您喜欢这篇文章,欢迎您!

I write about programming, technology, AI, startups and self-growth. If you follow me on Twitter I won’t waste your time with unnecessary posts. ?

我写有关编程,技术,人工智能,创业公司和自我成长的文章。 如果您在Twitter上关注我,我不会在不必要的帖子上浪费您的时间。

翻译自: https://www.freecodecamp.org/news/how-entrepreneur-mindset-can-help-programmers-design-better-software-620482435e56/

程序员 改bug 心态

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值