📜 ⬆️ ⬇️

What habits make me better as a software developer?

Hi, Habr! I present to you the translation of Sonny Recio's article "What habits made me a better Software Engineer?"

Our habits are daily patterns of behavior in life. They can be both bad and good. Habits can be vital, for example, the need for food 3 times a day. There are also such habits that help to be healthy - exercise in the gym 3-4 times a week. But there are also habits that spoil the body, such as smoking and drinking alcohol daily.

Finally, there are habits that will make you more successful in any profession in which you work. With the help of habits, a person becomes an expert, a genius and gains skills in his profession. This does not happen overnight, but it is possible. The most productive and successful people will say that habits are what made them successful. And I can not disagree.
')
It took me some time before I began to develop habits that made me better as a software developer. Through working with different clients in various industries, I began to develop skills that I now have difficulty giving up, because they allow me to be better every day.

If you are interested in my words, here are some of the habits that I have shaped to become successful. You can also use them:

Create an architecture for each application.


image

I almost never start writing code without initially designing the application architecture properly.

Most of the time, I adhered to the best practices: remembering when to use design patterns and sharing code responsibility using the principles of the SOLID and Domain-Driven Design (DDD) approach. Maybe I’m a bit of a perfectionist when it comes to clean code, because I believe that it will save me a lot of time in the future and further reduce the frequency of spaghetti code, which increases the entropy of software over time.

I believe that every program you do needs a good architecture. Most likely you will be productive if you try to write code as independent and clean as possible. When I learned how best to separate my repository and the level of business logic in the application, I was able to improve the speed of writing code at an incredible pace. Also, I was able to insert unit tests into mixins, thanks to a better division of responsibility.

The software architecture became much more obvious when I switched to the MVC paradigm and transferred DDD to mixins. This simply shows how important the concept of separation of responsibility (SoC) is in application development, especially when developing large-scale enterprise applications. It was the most productive moment in my life as a software developer .

The only exception is when I write simple snippets or demo applications that I need to test for demonstration. Or some experimental application for testing.

Always write tests


image

Another thing I practice in my work as a software developer is to always write tests. Test-Driven Development (TDD) , in my opinion, is a very important discipline for the implementation of Unit tests .

The idea of ​​this approach is to allow tests to design your functions and predict the result of functions before they are implemented. At first, it may seem confusing and have no meaning. But when you begin to practice this approach, you will begin to understand its benefits and advantages, which outweigh its disadvantages.

Moreover, TDD allows you to create cleaner code and architecture, which prevents your code from becoming unmanaged (spaghetti code) in the long run through the implementation of Interfaces and SOLID principles . If done correctly, you can use stubs as a dummy replacement for a specific implementation of logic.

It is also worth noting that you cannot create tests for each scenario. For this reason, many developers mistakenly abandon TDD. You need to know in advance which scenarios can be covered with tests and which ones are not.

Take for example the function Add () . You probably know how to create a test for this function and apply the TDD methodology. But what if you need to write a test that checks the display of information in the ViewModel? You can of course do it. But is it necessary?

In general, the test creation habit allows me to better refactor my application and architecture. It also allows me to lay out the features I made with great confidence and some delays.

Write articles about what you learned.


image

I think some people ignore the idea of ​​writing what they realized / found out on a piece of paper, as scientists do. Or creating a blog article .

As I understand it, writing articles about what you just understood in programming will actually make you better. Especially when you share them with programmers around the world.
Not only were you able to share your ideas and help programmers with their problems, but you were also able to express your uniqueness and quirks.

Another benefit of writing articles is that you hold the information in the brain for longer . Studies have shown that the more you write about any information, the more it remains in your head and the better it is processed. Based on this data, I write a blog and articles for the whole world.

As an added bonus, you communicate with programmers and show that you are open to criticism. Thus, you become better and learn from their advice. Or correct them. All this allows you to have a dialogue that benefits both you and them.
You've probably noticed that good programmers are blogging. This is what they may aspire to, besides demonstrating their skills and selling themselves as a personal brand.


Maybe you should practice the discipline of "Feyman technique"?

Use a version control system like git


image

I do not quite understand why the majority of developers in my city still do not perceive the version control system as a norm in everyday development. For me, using git was the biggest discovery I made in my entire life as a developer. This saved me a lot of headaches.

Thanks to a version control system such as git, I can create branches that relate to certain features that I need to work on. In this case, you will not need to roll back, because most likely you will not be able to combine the branch with features and the master branch until you have thoroughly tested your code and made sure that it works fine. If something went wrong, you can exit this branch without merging with the master branch.

The version control system is a powerful tool. This is what makes remote work very successful so far. Imagine working with developers from different time zones without a version control system that will log / monitor your changes and simply copy / paste your projects into the cloud storage. It will be a disaster!

As a bonus, when you publish your open source project on github, especially if it is useful, there will likely be many people who will want to join your project and improve it.

Use Kanban Board


image

When I am seriously engaged in a project or idea, I use an app with a kanban board, for example trello. I place on it all my ideas / bugs / problems that I encounter when creating my MVP (minimum viable product, minimum viable product). In teams, I usually see that developers use trello as their usual practice to display the ideas and features that need to be taught.

In Kanban boards, you usually see the following columns according to the status of the task you are currently working on: To-do (to be done), In Progress (running) and Done (completed). You can also expand the set of columns. Some teams in which I worked on the task board (trello board) have “For Discussion” status, in which tasks get for discussion by developers before they become “To Do” and ready to be implemented by programmers.

As an individual user who is working on several projects (whether it is my own project or a startup or something like that), it saved me a lot of headaches. I began to better understand where I'm going at the moment and what ideas have already been implemented.

I can not imagine my life as a programmer without trello. It allowed me to save a lot of time while keeping the projects more organized than just keeping notes, for example, in OneNote.

Solve problems from a different angle


image

You could say that I am a little obsessed with the idea of ​​solving problems from a different angle. Especially with regard to optimization, I constantly ask myself if I can still optimize the query, even if it is already optimized.

There are several scenarios in which queries should really be optimized, for example when displaying 100 lines or so. It is worth pondering over such examples, as the implementation may be too far-fetched or impractical when the user uses this feature. In this case, it would be better to discuss this feature with your client and solve the problem from a different angle.

I'm also trying to analyze the speed of the algorithm in my code using the O notation great.

Having acquired such a habit, I began to better solve problems, even those that seem to be impossible, but it is our duty as developers. It also allowed me to improve performance with fewer bugs or no bugs at all.

Work out in the gym


image

I usually go to the gym 3-4 times a week. Thus, my brain becomes more healthy, which allows me to better think and solve complex problems for my clients.

Scientists have made the discovery that exercise can make you smarter. According to the study, endurance exercises improve cognitive abilities (memory, attention, concentration, imagination, logical thinking) and protect the brain from degeneration .

I love to train in the gym, and this is paying off. We do not need to work and tire ourselves 24/7 in front of the computer screen. We need to exercise and be healthy.

Remember that without a healthy body, we can not be effective at work. This is one of the few ways I can optimize myself, and not just optimize the code all the time.

Avoid procrastination


image

In today's world, avoiding procrastination sounds like a challenge, especially if you have no great reason. One of the aspects for eliminating or minimizing procrastination is to have a really important reason why you want to succeed or improve yourself.

I told one of my friends who works in another city, that if he can reduce the time of using social services. networks, such as Facebook, for example, he can independently improve his future.

Let's take a bit of how much time you spend on Facebook: you are on Facebook for about 2 hours a day. You usually do this 30 times a month. Now multiply 2 hours by 30 days. It turns out 60 hours, right? It is almost three days. This may not sound so scary. So let's do the counting for the year.

Now, suppose you spend 3 days a month on Facebook. Multiply it by 12. And it turns out that you spend 36 days just using Facebook .

Imagine if you could minimize the time spent on Facebook and spend this time on self-development. On things that are really important. You can quickly grow than spend time on meaningless stories on Facebook.

Deactivating my Facebook account allowed me to improve my skills as a programmer and use these 36 days for self-improvement. It changed my life.

read books


image

Finally, this is the habit that I hated most. Reading of books. But now I appreciate her. I read books every day.

Reading books allows you to learn new information, which you can correlate or combine with your current skills and solve problems more effectively than anyone who does not read books at all.

Usually I do not read fiction, in most cases I read self-development books, business books, software books or books that I can relate to my career.

It makes me think better and makes me better as a programmer as a whole.

Final thoughts


I could not become better and more successful as a software developer without these habits.

What about you? What habits make you a better developer? Share them in the comments below.

Source: https://habr.com/ru/post/348158/


All Articles