7 useful programming habits

7 useful programming habits

Bartlomiej Karalus, currently a senior web development engineer at Zonal, Zonal provides data analysis system solutions for the retail industry. This article is translated by Wei Jia, the original link: https://dev.to/binarforge/seven-useful-programming-habits

I have been reading books on "how to develop habits" recently. After reading and digesting, I couldn't help thinking about what habits I have at the moment. Some of them are about life, while others are all about work. Many of these habits are closely related to programming, and this is what I think is worth sharing with you next.
7 useful programming habits

  • Uncontrolled automatic saving-this habit has been with me for many years. Even though many IDEs nowadays don't even require users to save files (actively), I still press the key combination "Ctrl + S" with great pleasure. If I remember correctly, I would have nothing to do every time I stop typing, so I would act like this uncontrollably.
  • Some developers like to compare themselves "in a state" to "Nirvana rebirth" or to "Valhalla Hall". In my opinion, this is more like a "runaway mode." Obviously, this is a period of amazing production efficiency, but then you should take a short break to adjust the recovery (hormonal levels in your body). Just like a Formula 1 car, a short burst of sprint will directly affect the final result, but it is more important to ensure "regular pit stops (rest/recovery)". Prolonged hyperactivity can numb the brain and make it easier to get into trouble.
  • Make sure to isolate all sources of interference-when I am working on something very important, I will simply turn off the phone to avoid any interruption from social applications or media. Of course, if you have children, locking them in the basement may not be a good solution :).
  • Think about the expected results before you start work-visualization and measurability are crucial. It helps me to clarify the list of goals for today, and at the end of the day can reduce the frustration and disappointment of my "doing nothing". So, for whatever you are doing at any time, first clarify the benefits you expect to get. This sounds very simple, but in fact we often miss this point.
  • For me, another good habit is to "maintain regular training." For example, it is a very good habit to keep going for fitness. I really like having to do some programming exercises from time to time, which allows me to keep my saw extremely sharp. Remember, stick to this habit, although it will not pay you now, but it will definitely give you huge benefits in the future.
  • "Test first"-This is similar to the point mentioned earlier, organizing and building test cases first can help me see my destination before I start. At the same time, it can also contribute to the two processes of design and documentation. But in reality, few developers agree and practice this view.
  • Avoid excessive "future-oriented programming". Every time I started programming before, I always strived for perfection on the first day, and tried to cover all possible edge cases in design and implementation. Over time, I realized that this often leads to overly complex design and code implementation, and consumes more time.

    So, I hope you can learn from them. These are all very useful habits that I have slowly formed in my career. The best and only way to develop and build a good habit is to start practicing it.

Finally, don’t forget to share some of your good habits with me! (Welcome to leave a message after the article)

Recommended reading

  • Why are a billion lines of code on Google all in the same warehouse?
  • Why are chat tools such as Slack not suitable for communication between open source project development teams?
  • If programming languages ​​also come to play the game of power, how to arrange the roles?
  • Thinking about engineer culture

The author of this article Bart Karalus, translated by Wei Jia. Technical originality and architecture practice articles are welcome to submit via the "Contact Us" menu of the official account.

Highly available architecture

Changing the way the internet is built

7 useful programming habits

Guess you like

Origin blog.51cto.com/14977574/2547017