初级开发人员的缺点_在您作为初级开发人员的第一年获得此建议
初級(jí)開(kāi)發(fā)人員的缺點(diǎn)
Are you a junior developer embarking on your software development career?
您是從事軟件開(kāi)發(fā)事業(yè)的初級(jí)開(kāi)發(fā)人員嗎?
Or a recent computer science graduate who has recently started a new job?
還是最近剛開(kāi)始從事新工作的計(jì)算機(jī)科學(xué)專業(yè)的畢業(yè)生?
Maybe a self-taught developer wondering what to do next?
也許一個(gè)自學(xué)成才的開(kāi)發(fā)人員想知道下一步該怎么做?
Starting your software development career can be scary, but also very exciting.
開(kāi)始您的軟件開(kāi)發(fā)生涯可能會(huì)令人恐懼,但也非常令人興奮。
I know the feeling, having been there myself. Over the past 4 years, I have gone from junior developer to lead developer at a SaaS startup, learning lots along the way.
我自己去過(guò)那里就知道這種感覺(jué)。 在過(guò)去的四年中,我從初級(jí)開(kāi)發(fā)人員轉(zhuǎn)到SaaS初創(chuàng)公司的首席開(kāi)發(fā)人員,在此過(guò)程中學(xué)到了很多東西。
I have written this guide with my top tips, to not only survive but strive in your first year as a junior developer.
我已經(jīng)用最重要的技巧編寫(xiě)了本指南,不僅可以生存,還可以在您成為初級(jí)開(kāi)發(fā)人員的第一年努力。
知識(shí)上的差距也可以 (It’s OK to have gaps in your knowledge)
University degrees, coding boot camps, and online courses do a great job at teaching you how to code.
大學(xué)學(xué)位,新手訓(xùn)練營(yíng)和在線課程在教您如何編碼方面做得很好。
Yet, the truth is that in the real world of software development there is a bit more to it than writing code. You’ll have to understand:
然而,事實(shí)是,在軟件開(kāi)發(fā)的現(xiàn)實(shí)世界中,除了編寫(xiě)代碼之外,還有很多其他事情。 您必須了解:
- Which technologies are best for different problems 哪種技術(shù)最適合不同問(wèn)題
- Code written by other people 其他人編寫(xiě)的代碼
- Design patterns and best practices 設(shè)計(jì)模式和最佳實(shí)踐
- How to test code 如何測(cè)試代碼
- CI/CD, source control, and branching strategies CI / CD,源代碼控制和分支策略
- The software development lifecycle and different methodologies 軟件開(kāi)發(fā)生命周期和不同的方法
- Working not only with your team, but with other teams, management, and clients 不僅與您的團(tuán)隊(duì)合作,而且與其他團(tuán)隊(duì),管理層和客戶合作
…to name a few things.
……僅舉幾例。
You may already know some of this stuff, or you may have never heard of any of it before. And that’s OK. You are there as a junior software developer, your manager and your teammates know this.
您可能已經(jīng)知道其中一些內(nèi)容,或者您??以前從未聽(tīng)說(shuō)過(guò)其中任何內(nèi)容。 沒(méi)關(guān)系。 您是初級(jí)軟件開(kāi)發(fā)人員,您的經(jīng)理和您的隊(duì)友都知道這一點(diǎn)。
So there will be gaps in your knowledge. Every developer has them! Don’t feel overwhelmed if it all doesn’t make sense straight away.
因此,您的知識(shí)將存在空白。 每個(gè)開(kāi)發(fā)人員都有! 如果這一切都沒(méi)有直接意義,請(qǐng)不要感到不知所措。
In fact, part of the beauty of being a software developer is that technology is always changing. We will always be learning, regardless of what level we are at.
實(shí)際上,成為軟件開(kāi)發(fā)人員的好處之一就是技術(shù)總是在變化。 無(wú)論我們處于什么水平,我們將始終在學(xué)習(xí)。
問(wèn)題很好,因此尋求幫助 (Questions are good — so is asking for help)
You have your first task, you get excited and dive straight in. But then…you’re stuck. Your code doesn’t work as expected, and all you have to go by is a strange, confusing error message.
您有第一個(gè)任務(wù),就感到興奮并直接潛水。但是然后……您陷于困境。 您的代碼無(wú)法按預(yù)期運(yùn)行,您所要做的只是一條奇怪的,令人困惑的錯(cuò)誤消息。
Stumped, you think about asking one of the other developers on your team for help, but you think:
陷入困境,您考慮向團(tuán)隊(duì)中的其他開(kāi)發(fā)人員之一尋求幫助,但是您認(rèn)為:
“What if they think I’m dumb? or that I can’t code? and laugh at me?!”
“如果他們認(rèn)為我愚蠢怎么辦? 還是我無(wú)法編碼? 嘲笑我?!”
But in reality, that will never happen. What they will actually think is:
但實(shí)際上,這永遠(yuǎn)不會(huì)發(fā)生。 他們實(shí)際上會(huì)想到的是:
“OK, I’ll take a quick look and see if I can help. Ah! Yes, I’ve encountered this issue before, you can use someMethod() from somePackage() to fix it.”
“好的,我會(huì)快速看一下,看看是否能幫上忙。 啊! 是的,我之前遇到過(guò)此問(wèn)題,您可以使用somePackage()中的 someMethod() 對(duì)其進(jìn)行修復(fù)。”
Which isn’t so bad right?
哪個(gè)還不錯(cuò)吧?
Your team is there to support you, especially in the early parts of your career, so ask them for help.
您的團(tuán)隊(duì)會(huì)在那里為您提供支持,尤其是在您職業(yè)生涯的早期階段,因此請(qǐng)尋求他們的幫助。
Likewise, if you don’t understand something, ask questions. I’m still asking loads of questions every day! There is no such thing as a stupid question. Your team would rather help you instead of having you stare at your screen with confusion for most of the day.
同樣,如果您不懂某事,請(qǐng)?zhí)岢鰡?wèn)題。 我仍然每天都在問(wèn)很多問(wèn)題! 沒(méi)有愚蠢的問(wèn)題。 您的團(tuán)隊(duì)寧愿為您提供幫助,也不希望您在一整天的時(shí)間里困惑地盯著屏幕。
代碼評(píng)論是您的朋友 (Code Reviews are your friend)
I’ll never forget my first code review as part of my first junior developer job. My code was being reviewed by an experienced senior developer. At the time I found this nerve-wracking. And, of course, there were more comments from him than I could count!
在我的第一個(gè)初級(jí)開(kāi)發(fā)人員工作中,我永遠(yuǎn)不會(huì)忘記第一次的代碼審查。 經(jīng)驗(yàn)豐富的高級(jí)開(kāi)發(fā)人員正在審查我的代碼。 當(dāng)時(shí)我發(fā)現(xiàn)了這種令人不安的東西。 而且,當(dāng)然,來(lái)自他的評(píng)論超出了我的想象!
But in hindsight, this was a good thing.
但是事后看來(lái),這是一件好事。
Code reviews are not a stage for criticism, but for learning and giving feedback on all sides.
代碼審查不是批評(píng)的舞臺(tái),而是各個(gè)方面的學(xué)習(xí)和反饋。
The senior developer sat down with me and explained what each of the comments meant, and also why he had made them. Needless to say, I learned a lot. So when your code is being reviewed, remember that any feedback is to help you learn and improve as a software developer.
高級(jí)開(kāi)發(fā)人員與我坐下來(lái),解釋了每個(gè)評(píng)論的含義,以及他為什么要發(fā)表這些評(píng)論。 不用說(shuō),我學(xué)到了很多東西。 因此,在審查代碼時(shí),請(qǐng)記住,任何反饋都將幫助您以軟件開(kāi)發(fā)人員的身份學(xué)習(xí)和改進(jìn)。
Likewise, when you come to review code for other people, you will be able to see how different people approach different problems. You will even help them improve by making suggestions of your own!
同樣,當(dāng)您查看其他人的代碼時(shí),您將能夠看到不同的人如何處理不同的問(wèn)題。 您甚至可以通過(guò)提出自己的建議來(lái)幫助他們改進(jìn)!
分解,再分解 (Break it down, and break it down some more)
Ok so you have your first real task, depending on the size of the task, you might feel a bit overwhelmed:
好的,因此您有自己的第一個(gè)實(shí)際任務(wù),具體取決于任務(wù)的大小,您可能會(huì)覺(jué)得不知所措:
“Where do I start? I guess I’ll start with doing X, but what about Y? But then if I do Y there’s A, B, and C….what’s happening with X again?!”
“我從哪說(shuō)起呢? 我想我先做X,但是Y呢? 但是,如果我做Y,則有A,B和C…。X又發(fā)生了什么?!
Don’t worry we’ve all been there. It’s easy to get lost in the proverbial rabbit hole when trying to solve a problem. The next time you have a large problem to solve, try remembering this quote,
不用擔(dān)心我們都去過(guò)那里。 嘗試解決問(wèn)題時(shí),很容易迷失在眾所周知的兔子洞中。 下次您遇到大問(wèn)題要解決時(shí),請(qǐng)記住該報(bào)價(jià),
“How do you eat an elephant? One bite at a time.”
“你怎么吃大象? 一次咬一口。”
In other words, make a task which seems impossible more manageable by breaking it up into smaller tasks.
換句話說(shuō), 通過(guò)將任務(wù)分解為較小的任務(wù) , 使似乎不可能完成的任務(wù)變得更易于管理。
So how do you do that?
那你該怎么做呢?
Before writing any code, try writing out the steps in plain English (or language of your choice). Let’s take an example.
在編寫(xiě)任何代碼之前,請(qǐng)嘗試以簡(jiǎn)明英語(yǔ)(或您選擇的語(yǔ)言)寫(xiě)出這些步驟。 讓我們舉個(gè)例子。
How do you pour a glass of water?
您如何倒一杯水?
A plain English approach would be
普通的英語(yǔ)方法是
By writing out the steps, it is easier to visualize each part of the problem and come up with a solution for each step.
通過(guò)寫(xiě)出步驟,可以更輕松地可視化問(wèn)題的每個(gè)部分并為每個(gè)步驟提出解決方案。
把事情簡(jiǎn)單化 (Keep it simple)
A common mistake many junior developers make (myself included when I started) is to try and reinvent the wheel.
許多初級(jí)開(kāi)發(fā)人員經(jīng)常犯的一個(gè)錯(cuò)誤(嘗試時(shí)包括我自己)是嘗試重新發(fā)明輪子。
It might look impressive to solve a problem by using a super-fancy technique within your code.
通過(guò)在代碼中使用超級(jí)技巧來(lái)解決問(wèn)題可能看起來(lái)令人印象深刻。
But this causes other problems:
但這會(huì)導(dǎo)致其他問(wèn)題:
- Code that is completely different from how similar parts of the system work is harder to maintain 與系統(tǒng)相似部分的工作方式完全不同的代碼更難維護(hù)
- Your code may become more verbose that it needs to be, and there will be an increased risk of bugs 您的代碼可能變得更加冗長(zhǎng),并且存在更大的錯(cuò)誤風(fēng)險(xiǎn)。
- It may take you longer to complete your task 完成您的任務(wù)可能需要更長(zhǎng)的時(shí)間
So how exactly do you keep it simple?
那么,如何使它保持簡(jiǎn)單呢?
Make it work. Don’t overthink too much, and do whatever your gut says to get your code working
讓它起作用。 不要考慮太多,盡一切所能使代碼正常工作
Refactor. Now that your code is working, it’s time to refactor. Make your code easy to read by naming things well, and use of proper formatting. More on this in ‘Learn how to write clean code’ below
重構(gòu)。 現(xiàn)在您的代碼可以正常工作了,該重構(gòu)了。 通過(guò)適當(dāng)?shù)孛褪褂谜_的格式來(lái)使代碼易于閱讀。 有關(guān)更多信息,請(qǐng)參見(jiàn)下面的“學(xué)習(xí)如何編寫(xiě)簡(jiǎn)潔的代碼”
Speed it up. Once you have finished refactoring, you might notice bottlenecks in the performance of your code. Now is the time to optimize it. Be wary not to fall into the trap of over-optimizing too early! Only do this if you need to.
加快速度。 重構(gòu)完成后,您可能會(huì)注意到代碼性能的瓶頸 。 現(xiàn)在是優(yōu)化它的時(shí)候了。 注意不要過(guò)早陷入過(guò)度優(yōu)化的陷阱! 僅在需要時(shí)這樣做。
BONUS TIP. Consider writing some failing tests before writing any code. This is called Test Driven Development. Not only will this give you good test coverage, but it will help you think about the structure of your code.
獎(jiǎng)金提示。 在編寫(xiě)任何代碼之前,請(qǐng)考慮編寫(xiě)一些失敗的測(cè)試。 這稱為測(cè)試驅(qū)動(dòng)開(kāi)發(fā) 。 這不僅可以為您提供良好的測(cè)試覆蓋范圍,而且可以幫助您考慮代碼的結(jié)構(gòu)。
了解如何編寫(xiě)簡(jiǎn)潔的代碼 (Learn how to write clean code)
Mastering clean code will make you stand out as a software developer.
掌握干凈的代碼將使您成為軟件開(kāi)發(fā)人員。
So what exactly do we mean by Clean Code?
那么,清潔代碼到底是什么意思?
- Follows the S.O.L.I.D principles 遵循SOLID原則
- It is testable and maintainable 可測(cè)試且可維護(hù)
- It is easy to read and follow 易于閱讀和遵循
In other words:
換一種說(shuō)法:
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. — Martin Fowler
任何傻瓜都可以編寫(xiě)計(jì)算機(jī)可以理解的代碼。 好的程序員編寫(xiě)人類可以理解的代碼。 —馬丁·福勒(Martin Fowler)
I won’t go into too much detail here, like the book, Clean Code: A Handbook of Agile Software Craftsmanship by Robert C Martin will give a much deeper insight into this area. If you are serious about writing clean code and breaking out of the junior developer level, I highly recommend this book.
我將在這里不做過(guò)多介紹,例如Robert C Martin所著的《 干凈代碼:敏捷軟件技巧手冊(cè) 》一書(shū)將對(duì)該領(lǐng)域提供更深入的了解。 如果您真的想編寫(xiě)干凈的代碼并突破初級(jí)開(kāi)發(fā)人員的水平,我強(qiáng)烈推薦這本書(shū)。
Writing clean code shows that you are passionate about what you do, and can create maintainable reliable software. Not to mention that you will be making life a bit easier for the next person who comes along to add to your code.
編寫(xiě)干凈的代碼表明您對(duì)所做的事情充滿熱情,并且可以創(chuàng)建可維護(hù)的可靠軟件。 更不用說(shuō)您將使下一位來(lái)添加您的代碼的人的工作更加輕松。
“有一個(gè)圖書(shū)館” (“There’s a library for that”)
Have you ever told a friend about a problem you were having, and they respond with “Yeah, there’s an app for that”?
您是否曾經(jīng)向朋友介紹過(guò)您遇到的問(wèn)題,然后他們回答“是的,有一個(gè)適用的應(yīng)用程序”?
Software development is a bit like this.
軟件開(kāi)發(fā)有點(diǎn)像這樣。
There are already a lot of answers to the problems you are trying to solve. So when you are trying to complete a task, check to see if someone else has already solved the problem.
您正在嘗試解決的問(wèn)題已經(jīng)有了很多答案。 因此,當(dāng)您嘗試完成任務(wù)時(shí) ,請(qǐng)檢查是否有人已經(jīng)解決了該問(wèn)題。
You can do this by:
您可以通過(guò)以下方式做到這一點(diǎn):
- Looking for existing packages and libraries 尋找現(xiàn)有的軟件包和庫(kù)
- Browsing sites such as GitHub and StackOverflow for similar solutions to your problem. 瀏覽類似GitHub和StackOverflow之類的網(wǎng)站來(lái)解決您的問(wèn)題。
Hold it right there! This doesn’t give you free rein to copy and paste code without a thought. If you are using someone else’s code as an example, it is important that you understand what their code is doing and why.
放在那里! 這不會(huì)讓您隨意地復(fù)制和粘貼代碼。 如果使用的是別人的代碼為例,它是重要的,你了解他們的代碼在做什么, 為什么 。
- Why is it using a particular design pattern? 為什么使用特定的設(shè)計(jì)模式?
- Why is it written in a particular language? (Node.js vs Python for example) 為什么用特定語(yǔ)言編寫(xiě)? (例如,Node.js與Python)
What are the drawbacks? Will it work with your current codebase?
有什么缺點(diǎn)? 它可以與您當(dāng)前的代碼庫(kù)一起使用嗎?
If you’re not sure, you can ask someone on your team for some guidance. Searching Google for an answer is a common approach to solving coding tasks. So don’t be afraid to turn to your teammates and say:
如果不確定,可以向團(tuán)隊(duì)中的某人尋求指導(dǎo)。 搜索Google的答案是解決編碼任務(wù)的常用方法。 因此,不要害怕轉(zhuǎn)向您的隊(duì)友說(shuō):
“I’m thinking about using this library X or this package Y, I have seen some examples on here, what do you think?”
“我正在考慮使用這個(gè)庫(kù)X或這個(gè)包Y,我在這里看到了一些示例,您對(duì)此有何看法?”
Not only will this show that you are proactive, but it’ll also spark some conversation/debate from the team. You might have discovered something awesome no one else knew about yet!
這不僅表明您很主動(dòng),而且還會(huì)引起團(tuán)隊(duì)的一些對(duì)話/辯論。 您可能已經(jīng)發(fā)現(xiàn)了其他人所不知道的棒極了!
了解如何閱讀代碼 (Learn how to read code)
We have all seen those movies. The ones where a hacker types rapidly as pages of code scroll down the monitors in front of them.
我們都看過(guò)那些電影。 當(dāng)代碼頁(yè)被黑客滾動(dòng)時(shí),黑客會(huì)Swift鍵入這些信息。
In the real world, developers spend more time reading code than actually writing code.
在現(xiàn)實(shí)世界中,與實(shí)際編寫(xiě)代碼相比,開(kāi)發(fā)人員在閱讀代碼上花費(fèi)的時(shí)間更多。
When adding new features or fixing defects, you will have to understand the current codebase you are working on. How do you do this? Read, read, read!
添加新功能或修復(fù)缺陷時(shí),您將必須了解正在使用的當(dāng)前代碼庫(kù)。 你怎么做到這一點(diǎn)? 閱讀,閱讀,閱讀!
Reading code is also a beneficial learning technique. Reading existing code lets you see how others have developed a certain feature.
閱讀代碼也是一種有益的學(xué)習(xí)技術(shù)。 閱讀現(xiàn)有代碼可讓您了解其他人如何開(kāi)發(fā)特定功能。
Things to keep an eye out for:
需要注意的事情:
- The use of design patterns 設(shè)計(jì)模式的使用
- The naming of methods, classes, and variables 方法,類和變量的命名
- The use of comments 使用評(píng)論
- How to structure project files 如何構(gòu)造項(xiàng)目文件
- The use of tests and how they are structured 測(cè)試的使用及其結(jié)構(gòu)
So where do you find code to read?
那么,您在哪里找到要讀取的代碼?
- Repositories in your source control at work 您的源代碼管理中的存儲(chǔ)庫(kù)在工作
- Projects on GitHub GitHub上的項(xiàng)目
- Read answers/questions on StackOverflow 閱讀關(guān)于StackOverflow的答案/問(wèn)題
- Code challenge websites such as codewars.com, which show the answers to challenges 代碼挑戰(zhàn)網(wǎng)站,例如codewars.com,可顯示挑戰(zhàn)的答案
玩得開(kāi)心! (Have fun!)
If you take one thing away from this article, let it be this — is it important to have fun. Enjoy writing code, solving problems, and continuing to learn. You are at the start of an exciting career, so sit back and enjoy the ride!
如果您從本文中刪除一件事,那就順其自然吧–獲得樂(lè)趣很重要。 享受編寫(xiě)代碼,解決問(wèn)題并繼續(xù)學(xué)習(xí)的樂(lè)趣。 您正處于令人興奮的職業(yè)生涯的開(kāi)始,所以請(qǐng)坐下來(lái)享受旅程!
獎(jiǎng)金提示 (BONUS TIPS)
- Learn the lingo. We developers have our own funny language (“creating a branch” has nothing to do with trees!) so make sure you understand the key terms 學(xué)習(xí)行話。 我們的開(kāi)發(fā)人員有我們自己的有趣語(yǔ)言(“創(chuàng)建分支”與樹(shù)木無(wú)關(guān)!),因此請(qǐng)確保您了解關(guān)鍵術(shù)語(yǔ)
- Get to know your IDE. Learn the hotkeys, shortcuts, and customize it until you are comfortable with it. This will increase your productivity. 了解您的IDE。 學(xué)習(xí)熱鍵,快捷方式并對(duì)其進(jìn)行自定義,直到您習(xí)慣為止。 這將提高您的生產(chǎn)率。
- Working on bugs is a great way to learn about the codebase. So don’t be afraid to pick these up! 處理錯(cuò)誤是學(xué)習(xí)代碼庫(kù)的好方法。 因此,不要害怕?lián)炱饋?lái)!
- Bring a notebook, listen with intent and write everything down. 帶上筆記本,專心聆聽(tīng)并寫(xiě)下所有內(nèi)容。
- Take on some side projects in your spare time. It’s a great way to learn different technologies you don’t learn in your day job and will boost your CV. 在您的業(yè)余時(shí)間從事一些輔助項(xiàng)目。 這是學(xué)習(xí)日常工作中不會(huì)學(xué)到的各種技術(shù)的一種好方法,它將提高您的簡(jiǎn)歷。
- Getting involved in work events is a great way to get to know your colleagues. Why not organize one yourself? 參與工作活動(dòng)是認(rèn)識(shí)同事的好方法。 為什么不自己組織一個(gè)人呢?
Thanks for reading!
謝謝閱讀!
I’m currently creating a bunch of guides, articles, and video courses to help you along your journey into web development. If you would like to be a part of it, make sure to join the mailing list over at chrisblakely.dev!
我目前正在創(chuàng)建大量指南,文章和視頻課程,以幫助您進(jìn)行Web開(kāi)發(fā)。 如果您想加入其中,請(qǐng)確保通過(guò)chrisblakely.dev加入郵件列表!
翻譯自: https://www.freecodecamp.org/news/ace-your-first-year-as-a-junior-developer-with-this-advice-bbc68b6fe2d9/
初級(jí)開(kāi)發(fā)人員的缺點(diǎn)
總結(jié)
以上是生活随笔為你收集整理的初级开发人员的缺点_在您作为初级开发人员的第一年获得此建议的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 算法训练营 重编码_您在编码训练营期间可
- 下一篇: 开源 数据仓库_使用这些开源工具进行数据