每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


今日推荐开源项目:《软件工程技术面试个人指南 interviews》传送门:GitHub链接

推荐理由:准备面试的时候肯定用得上的资源合集,重点在数据结构与算法方面,各种数据结构与算法时间复杂度的相关知识都记在了里面,实际上除了面试前,平时学习中来了解这个巩固知识也未尝不可。另外它还提供了一些在线面试编程的网站,在有时间的时候再尝试这个吧。


今日推荐英文原文:《10 Bad Habits To Avoid As A Developer》作者:Brad Traversy

原文链接:https://medium.com/@traversymedia/10-bad-habits-to-avoid-as-a-developer-64a1677c60fe

推荐理由:对于开发者来说 10 个常见的坏习惯,检查一下自己是不是也有这些坏习惯吧,尽早改掉它们会让你的工作更顺利

10 Bad Habits To Avoid As A Developer

Every developer “develops” some bad habits throughout their career or even their learning experience. In this article we’ll take a look at some of the common bad habits that I have experienced myself and/or have seen over and over. My hope is that if your just starting out, you can avoid this stuff and if you are having these habits, your aware and you can start to work on changing them.

#1 Not Taking Enough Breaks

So the first one, I’m sure many or all of you are guilty of. I’m still guilty of it and that’s not taking breaks or not taking enough breaks. I’ve had periods of time where I’ve sat down at 6am and maybe only got up for lunch around 1 and then gone until 6 or 7 at night, and this was common, almost every day. I've done much more ridiculous things when I was on a time crunch. I think we we all have had those rare occasions when we need something done the very next day, that is not really what I’m talking about, I’m talking about your everyday habits.

I would suggest that each day you try and take frequent breaks. I can’t say a specific plan for everyone cause everyone's different, but in a general sense I’d say around every hour get up and stretch your legs walk around, get a coffee, get something to eat. A lot of times, if your stuck and you take a break and come back to it the solution will come easier after giving your brain a rest. So figure out what works for you. Even if you don’t think you need breaks, just try it, you may find that your more productive.

#2 Refusing To Ask For Help

Number 2 applies to both learning and in the actual workplace. Many of us don’t ask for help. It could be for a number of reasons but I think a big one is pride and the fear of looking like you don’t know what your doing. Many of us have impostor syndrome where we don’t feel fully qualified in our positions. I’ve felt like this both in a company setting and dealing directly with clients. And even doing courses and tutorials. So asking for help just re-affirms that feeling. But in reality, its wasting a lot of time and hindering your growth. Other real developers are just as much of a resource as a video or book. I’d say even better than that stuff. They can directly answer your question and help you really understand it. The only people that would criticize you for asking for help would be a complete asshole and Id try to avoid those people anyway. If you don’t wanna ask for help because you want the experience of finding the answer on your own that’s fine, but give yourself a time limit. Don’t go days searching for a solution when you have peer right next to you that may know or can at least help you out

#3 When You Stop Being A Student

I don’t care if you’ve been a senior developer for 20 years, you should always think of yourself as a student. More so than most professions because this one is always changing. No developer knows everything about anything. The minute they do, something changes and they still have to learn more. If you get complacent and you stop reading and learning, you'll fall behind. Even if you have a job that doesn't require you to learn anything new, like lets say you build the same type of projects with the same software, same version and everything, if you loose that job which is always a possibility, your gonna be way behind. So even with a job like that, id still suggest learning new stuff on the side. Stay up to date with whatever language, frameworks, libraries that your into. There are a lot of jobs like I just explained and its understandable because many team leaders at companies figure if it ain’t broke don’t fix it. So you still see teams using outdated and unsupported technologies because it seems to be working. If your learning new stuff on the side and you can show your team that its possible to make your projects faster and more efficient and easier, you may be able to sway them into updating their technology and bettering the company.

#4 Dirty Code

This is more of a technical habit and this could be a lot of things. You want to write your code in a way where its visually clean, efficient and secure. This is really hard when your self taught because a lot of the times in tutorials and courses, your not learning the best way to do something because the instructor is trying to make it easy to understand the core concept. So you have to kind of do some extra research and figure out the best way possible to clean up your code. Id definitely suggest always using the DRY principle which is don’t repeat yourself. If you see common blocks of code, create some kind of class or function to consolidate that piece of functionality rather than just repeating it. It makes it much cleaner, saves a bunch of lines and its easier for others to work with. You also wanna pay attention to performance. Do things like compress images, minify JavaScript and CSS. You can use a task runner like gulp or many other tools to do this automatically or if its a small project you can even do it manually with something like minifier.org. Also don’t make unnecessary api calls, structure your full stack app in a way where you can make as little requests as possible and still get the functionality you need. Also testing..This is one I’m a huge culprit of. I don’t do enough testing. As much as I know things like unit testing helps build a more robust app and saves you on potential issues, I just frigging hate it. Its probably one of my worst habits and something I need to work on to be a better developer. Sometimes we cut corners to save time but in reality, were making the application less performant, less efficient, less readable and it will probably cause more of a headache in the future than if you just did it the right way do begin with. So try and keep that in mind.

#5 Bad Work/Life Balance

This is really important, especially if we have families at home and that’s work/life balance. Being a programmer of any kind takes up loads of time. There’s many reasons for this, things are always changing, we run into issues that can hold us up, we need to research and the list goes on. In turn, a lot of the time, we have to work late, work early, work on the weekends or all 3. This takes time away from everything else in your life including spending time with your loved ones as well as anything else you like to do. You may like sports, hiking, going out to eat, whatever it is, and if you’re constantly working you aren’t doing anything else that makes you happy. This is an area I have a lot of experience with. I have a wife and 2 kids, one with autism and I don’t spend the amount of time with them that I’d like to. I have kind of a double whammy because I have all of the issues of dealing with coding as well as the issues of a content creator and having to constantly come up with new ideas and recording and quality and so on. And if any of you guys are freelancers and work for yourself, you know your livelihood depends on getting work done. You only get paid if your getting shit done. As rewarding as working for yourself can be, it’s a constant worry about keeping up and getting things done. It’s really easy to fall off and I think that weighs on us and pushes other things out of our lives. Not to say that people that work for companies don’t go through this but its a whole new level when everything falls on you. So I really empathize with those of you that have your own businesses. But even with that said, you can’t let it control your life. You have to make time for your family and friends and quite frankly, for yourself. Life shouldn’t be just about writing lines of code. Do things you enjoy that bring a good balance to your life.

#6 Bad Office Politics

This next one is for those of you working at a company. You work with other people which in turn can cause conflict, disagreement, arguments and so on. Many developers are arrogant and always wanna be right. Even if they know they made a mistake and they’re wrong, some of them would never admit it. I’m not saying that’s most developers but I think we’ve all met at least one of these guys. I hear from a lot of people that their team is great and they all get along and that’s really good but it’s not always the case. Many times you’re gonna clash on ideas and solutions. Try and be diplomatic and respectful but at the same time, don’t be a pushover, especially if you feel strong about whatever it is you’re proposing. Don’t resort to yelling or name calling or any of that. It doesn’t get you anywhere. If they start doing that to you, just walk away and be the bigger person. Unfortunately, if you have someone on your team that is just a complete dick and won’t listen to reason, there’s really nothing you can do aside from try to avoid them. There may be some cases where you have to talk to someone that is higher up. I would always suggest talking to the person first though.

#7 Not Learning From Mistakes

So being a developer, you’re going to make a ton of mistakes. It’s inevitable and there’s nothing wrong with that. There is a problem if you keep making the same mistakes and you don’t learn from them. The process I would suggest when you make a mistake is to figure out what the ultimate cause of the mistake was, figure out if there could a process be put in place to prevent it from happening again and then figure out if the mistake had been found sooner could you have prevented the consequences? If you think about these 3 things when you make a fairly big mistake, chances are it won’t happen again or at least you’ll catch it sooner. Also, don’t be too hard on yourself for making mistakes. It happens to the best of us.

#8 Giving Up Too Soon

Frustration is a huge part of programming. I’ve made a couple videos on frustration and dealing with some of the issues that arise in both projects and learning. I’ve seen many people give up too soon in both specific projects and on programming in general due to frustration. Some projects are really difficult and it seems once you fix something it causes another thing to break and it just keeps happening. You may start to think you’re in over your head, you could be doing something else, you’re loosing money and many other negative thoughts. If you give up to soon though and you scrap the project or you quit your job, then everything you put into that project or job was for nothing. I’m not saying there aren’t projects that should be given up on but I’ve seen it many times where people have given up and from an outsiders point of view I could tell if they stuck with it for just a little longer, it probably would have been successful. So before you give up on anything, make sure you’ve exhausted all routes. You've searched up and down, asked for help, started over trying something different, maybe using a different technology, taken a long break to get your thoughts back in order, maybe even putting it to the side for a bit if possible. You want to do absolutely everything you can before quitting. If you still are failing, then maybe it is time to move on, but all avenues should be taken before that happens. Success could be right around the corner and it would be a shame if you gave up just before that turn.

#9 Being A Know It All

So I talked a little about arrogant developers earlier and I think what makes many of them arrogant is that they think they know it all. They don’t listen to other developers because why would they, they already have all the answers. Being this way sucks for the people that are around you and it also hurts yourself because if you think you know it all, your not actively learning more and bettering yourself and I guarantee you’ll have a horrible wake up call someday when something goes really wrong because you failed to listen to anyone else and or do your research. Most of these guys are the trolls on Stack Overflow that will make fun of a new developer asking a question or make fun of someone else’s answer, down voting every chance they get. I have a deep annoyance for these people. I think many of them got picked on in school and they use their knowledge to now pick on other developers that may be having issues or aren’t getting something. They seem to forget how it felt for them to be picked on and want revenge. I could be wrong but that’s my theory. Regardless of why they do it, I think that if they were more open minded and welcomed in the ideas of others and respected others, they would be much happier than just always trying to be right. They could be the smartest person on a team but also the worst person on the team, because nobody wants to work with them and there’s no good communication going on. For a team to be successful, there needs to be communication and unity and being a know it all, just destroys that. So if this is you, try and take the stick out of your ass and be a bit more open minded and more respectful, you’ll go further in life.

#10 Not Taking Constructive Criticism

Ok, so number 10 is sort of related to the last one and it’s not being able to take constructive criticism. There’s a big difference between a know it all troll and someone that is genuinely trying to help you. Sometimes it’s hard to see the difference because having someone point something out to you that you did wrong or you could’ve done better, doesn’t feel good and may feel like an attack but a lot of the time it’s not, it’s just someone that is showing you a better way or just sharing an opinion. It took me a while as a content creator to figure out the difference of who is trolling and who is helping. At first I found myself being defensive to anyone that said anything about how I did something. But I realized that many of these people are legitimately just trying to help. If they aren’t being disrespectful or just nit picky over something that doesn’t really matter and is just preference, then I need to take it as something that can benefit me and my knowledge on whatever it is. Constructive criticism is a fantastic resource for learning, and the reason for that is because it’s targeted. It’s something that you are directly having issues with and someone is offering a specific solution. That’s invaluable. In fact code reviews are great because you get other peoples suggestions and influence on your code and how you can improve it and better yourself. So don’t take things personal unless you are actually being attacked or intentionally made fun of and disrespected. It’s hard to hear that you were wrong or you could do better but ultimately it’s going to make you a better developer.

I hope this advice helps some of you who are both new to development as well as seasoned developers.


每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg