10 Honest Facts I Want To Share With All Junior Developers

《安第斯山脉火山口雪景》

I started my professional journey as a software developer around six years ago. I remember the struggle in my first couple of years. Everything from coding to process is new for me. I’ve been privileged to have a few mentors who made this journey easier. Yet, there were few lessons I learned the hard way.

大约六年前,我作为一名软件开发人员开始了我的职业生涯。我记得头几年的挣扎。从编码到处理,对我来说都是新的。我很荣幸有几个导师让我的旅程更轻松。然而,我在艰难的道路上几乎没有学到什么教训。

Software development is a complex process that the name hardly justifies. There were many things that I learned about programming, process, and soft skills so far. I wish someone would’ve told me these things a few years back.

软件开发是一个复杂的过程,这个过程很难一两句话说清楚。到目前为止,我在编程、过程和软技能方面学到了很多东西。我希望几年前有人告诉我这些事情。

Now, I’ve become a senior programmer and work with many junior programmers around me. I see them making the same mistakes that I did. Sometimes, it is good to learn from your mistakes, but a little advice can save you the pain as well.

现在,我已经成为一名高级程序员,并与周围许多初级程序员一起工作。我看到他们犯了和我一样的错误。有时候,从错误中吸取教训是好的,但是一点建议也能帮你省去痛苦。

In this article, I want to share ten things from my experience so far with fellow programmers. I hope this can help them to become better programmers.

Let’s get started.

在本文中,我想与其他程序员分享我迄今为止的十点经验。我希望这能帮助他们成为更好的程序员。

我们开始吧。

1. Do Not Rush To Coding

I remember when I started as a junior programmer, I start coding whenever a task was assigned. I do not give enough time to understand the problem. This causes me the trouble of rework, bugs, and last moment changes in my code.

My senior once told me to give enough time for problem analysis before rushing to code. Coding is merely a by-product of a good programmer. Their best quality is to analyze and find a solution.

If you give 70% of your time in problem analysis, then it will hardly take 30% to code it.

Never start coding until you are clear on the problem. Ask queries upfront and then open your editor.

1 不要急于编码

我记得当我还是一个初级程序员的时候,每当分配任务时,我就开始编码。我没有给足够的时间去理解这个问题。这给我的代码带来了返工、bug和最后一刻更改的麻烦。

我的 Senior 曾经告诉我,在匆忙编写代码之前,要有足够的时间进行问题分析。编码只是一个好程序员的副产品。他们最好的品质是分析并找到解决方案。

如果你把70%的时间花在问题分析上,那么编写代码几乎不需要30%。

在清楚问题之前不要开始编码。提前询问问题,然后打开编辑器。

2. Spoonfeeding Won’t Help

I was working on this legacy project as a fresher. It was quite overwhelming for someone having zero experience. The architecture was complex and so was the code.

Every time I was assigned some task, I tried for a while to find out a solution, and then reached out to my seniors within the team. One time, my senior told me during a teak break:

“Shubham, you are doing good. I know it’s difficult for a fresher to adjust in such a complex project. I want you to know we all are here to help you, but you need to deep dive into the problem. If every time we’ll help you, then it is spoonfeeding which won’t help you in the long run.”

That day I realized, I need to give my 200% before reaching out to others. I can’t win the battle if someone else is fighting for me.

2 用勺子喂也没用

我是作为一个新人在做这个遗留项目。对于一个没有经验的人来说,这真是太让人受不了了。架构很复杂,代码也很复杂。

每次我被分配任务时,我都会试着找出一个解决方案,然后向团队中的高年级学生伸出援手。有一次,我的前辈在柚木休息时告诉我:

“舒巴姆,你做得很好。我知道一个新人很难适应这样一个复杂的项目。我想让你知道我们都是来帮助你的,但是你需要深入研究这个问题。如果每次我们都会帮助你,那么从长远来看,这是一匙羹也帮不了你。

那一天我意识到,我需要付出我的200%,然后再去接触别人。如果有人为我而战,我就赢不了这场战斗。

3. Assumptions Are Dangerous

Assumptions are an unnecessary invitation to the bugs in any application. Do not assume anything on your own. I’ve made this mistake as a developer many times in my career.

Do not try to fill the gaps in your tasks with assumptions. Discuss it with your team. Ask questions to your BAs (business analysts), team members, and managers before committing to it.

“Without requirements or design, programming is the art of adding bugs to an empty text file.” — Louis Srygley

This is the most common reason in the software industry for defects. Better communication not only helps the team to deliver their best but also helps to avoid these defects.

3 假设是危险的

代码中的假设,通常导致错误。不要自作主张。在我的职业生涯中,作为一名开发人员,我犯过很多次这样的错误。

不要试图用假设来填补任务中的空白。与你的团队讨论。在承诺之前,向您的BAs(业务分析师)、团队成员和经理提问。

“没有需求或设计,编程就是在一个空的文本文件中添加bug的艺术。”—路易斯·斯利格利

这是软件行业最常见的缺陷原因。更好的沟通不仅有助于团队发挥最佳水平,而且有助于避免这些缺陷。

4. Code for People, Not Machines

Sometimes as a developer sitting in front of machines, we forget that we are coding for people. It is as important to write clean code as writing executable code.

Many developers can write complex code, but it makes a difference when you write readable code. It is important to understand that your code is legacy. Other developers are going to take it up in the future and look upon your work.

“Making your code readable is as important as making it executable.” — James O. Coplien

Give meaningful names to your variables and classes. Comments are important for your code. It should fulfill three purposes: what it does, why it exists, and how it is used.

4 编写可读性强的代码,而不是面向机器编程

有时作为一个坐在机器前的开发人员,我们忘记了我们是在为人编码。写干净的代码和写可执行代码一样重要。

许多开发人员可以编写复杂的代码,但当您编写可读的代码时,情况就不同了。重要的是要理解您的代码。其他开发人员将在将来使用它并查看您的工作。

“使代码可读性与使其可执行性同等重要。”—詹姆斯O.科普林

为变量和类指定有意义的名称。注释对于代码很重要。它应该实现三个目的:它做什么,为什么它存在,以及如何使用它。

5. Read Other Author’s Work

Software development is a continuous journey of learning and improving. You will eventually out-best your past self. Most developers focus on writing code, but reading other programmer’s code is what makes you wiser.

A developer writes code based on their past experiences. Their code is based on their logical ability. Reading other people’s code gives you the privilege to understand how they think. I’ve learned a lot from reading other developers’ code in my team.

It can improve your coding and helps to learn new things. That’s why many projects have policies of peer programming. As a developer, we should share our experiences with our fellow developers to grow ourselves.

5 阅读别人的代码

软件开发是一个不断学习和改进的过程。你最终会超越过去的自己。

大多数开发人员专注于编写代码,但阅读其他程序员的代码是使您更明智的。

开发人员根据他们过去的经验编写代码。他们的代码是基于他们的逻辑能力。阅读别人的代码给你特权去理解他们的想法。我从阅读团队中其他开发人员的代码中学到了很多。

它可以改善你的编码和帮助学习新的东西。这就是为什么许多项目都有对等编程的策略。作为一名开发人员,我们应该与其他开发人员分享我们的经验,以实现自我发展。

6. Back Your Code With Unit Testing

Unit testing is important for developers. It not only helps you to achieve code coverage but also saves from defects in the later stages. It is important to remove unnecessary lines of code without impacting the overall functionality.

As a developer, we should write test cases for every new module. It makes our application more robust. There are several unit testing frameworks out there.

You can discuss test scenarios with other team members to make sure about the code coverage. Many projects have some minimum allowed code coverage. Try to achieve as much as possible in your case.

6 写单元测试

单元测试对开发人员很重要。它不仅可以帮助您实现代码覆盖率,还可以避免后期的缺陷。在不影响整体功能的情况下删除不必要的代码行是很重要的。

作为开发人员,我们应该为每个新模块编写测试用例。单元测试使我们的应用程序更加健壮。

您可以与其他团队成员讨论测试场景,以确保代码覆盖率。许多项目都有一些允许的最低代码覆盖率。试着在你的情况下尽可能多的实现。

7. Don’t Stop at a Single Solution

I’ve observed this quality of good programmers for finding multiple solutions to a problem. I usually stop thinking about a problem once I find a solution.

It might be possible that in some cases, there is no other possibility. But many times, we can find more than a single solution for the given problem. There are several benefits of doing so.

It helps us to think from some different perspectives to find an alternative solution. This improves our logical ability. Also, having multiple solutions gives us the privilege to choose the best among them.

7 不要停留在一个单一的解决方案

我观察过优秀程序员在寻找问题的多种解决方案方面的这种品质。一旦我找到解决办法,我通常会停止思考问题。

可能在某些情况下,没有其他可能性。但很多时候,对于给定的问题,我们可以找到不止一个解决方案。这样做有几个好处。

它有助于我们从不同的角度来思考,找到一个替代的解决方案。这提高了我们的逻辑能力。此外,拥有多种解决方案使我们有权从中选择最好的解决方案。

8. Refactor Your Old Code

I’ve learned this practice from one of my seniors. I once saw him making code changes to an already closed task. I asked him why he’s doing so, and he said:

“I’ve developed this habit of changing my old code when I don’t have enough on my plate. I analyze my past code. If refactoring possible, then I create a change request and update the code. It helps me to improve as a developer and also keeps the codebase up to date.”

As a practice, you should try to look out for possibilities in your codebase. It is not necessary that you have to change your own code, but anything you find in the solution that could be refactored.

8 重构你的代码

我是从一个学长那里学的。我曾经看到他对一个已经结束的任务进行代码更改。我问他为什么这么做,他说:

“我养成了这样一个习惯,当我手头上没有足够的代码时,我会修改我的旧代码。我分析我过去的代码。如果重构是可能的,那么我创建一个变更请求并更新代码。这有助于我作为一名开发人员进行改进,并使代码库保持最新。”

作为实践,您应该尝试在代码库中寻找各种可能性。您不必更改自己的代码,只要您在解决方案中找到任何可以重构的东西。

9. Don’t Stress Out at Once

There were times when I was constantly glaring at my screen till the time my eyes were about to fall off. Sometimes, it happens that after trying multiple things, we are nowhere close to the solution. That’s completely OK.

It happens to almost every developer. You need to understand when to walk away from the system. A small break can help you to think from a different perspective rather than reiterating with the same approach.

I’ve found solutions to many problems after taking a break. A fresh mind can help you to see things more clearly that were not visible earlier. Take a break instead of breaking the code.

9 适当放松一下,跳出格子

有几次我一直盯着屏幕,直到眼睛快要掉下来。有时候,在尝试了很多事情之后,我们离解决方案还很遥远。那完全没关系。

几乎每个开发人员都会遇到这种情况。你需要明白什么时候离开这个系统。稍作休息可以帮助你从不同的角度思考,而不是用同样的方法重复。

休息之后,我找到了许多问题的解决办法。一个新鲜的头脑可以帮助你更清楚地看到以前看不见的东西。休息一下,而不是破坏代码。

10. Roll Out Your Updates

As we have discussed, software development is a continuous journey of learning. It is a challenging career where new technologies and frameworks come every other year.

Programmers need to update themselves, just like their software, to stay relevant in the market.

Good programmers keep themselves updated by reading official docs, tech blogs, and news. Stay updated with current trends in your technical skills. It helps you to learn, grow and improve as a programmer.

Your ability to learn and adapt defines you as a programmer. You are as good as your code. If you are updated, so will your code be.

10 不断学习,提升水平

正如我们所讨论的,软件开发是一个不断学习的过程。这是一个充满挑战的职业,每隔一年就会有新的技术和框架出现。

程序员需要更新自己,就像他们的软件一样,以在市场中保持相关性。

优秀的程序员通过阅读官方文档、科技博客和新闻来不断更新自己。随时了解您的技术技能的最新趋势。它帮助你学习,成长和提高作为一个程序员。

你的学习和适应能力决定了你是一个程序员。你和你的代码一样好。如果你被更新了,你的代码也会被更新。

Final Thoughts

These are some of the lessons that I’ve learned in the last couple of years. It is important to understand that companies hire good engineers, not good coders.

As a junior programmer, you will eventually learn these things. Don’t hesitate to make mistakes. It helps you to improve and grow in your career. Keeping these things in mind will make the journey more fruitful.

Thanks for reading!

最后的想法

这是我在过去几年里学到的一些经验。重要的是要明白,公司雇佣的是好的工程师,而不是好的程序员。

作为一个初级程序员,你最终会学到这些东西。不要犹豫犯错误。它能帮助你在职业生涯中进步和成长。把这些牢记在心会使旅途更有成效。

感谢阅读!

猜你喜欢

转载自blog.csdn.net/universsky2015/article/details/113764914