6 Life lessons I learned from programming

There are many important things in life that you can learn from programming . Do not believe it? So please read on

Make life simpler with Flow Chart

A lot of programmers started their work by making Flow chart. They did this, because programming an app is a long and complicated string that makes you very confused. From a large project, you will break up into small pieces, then sort by certain topics. From those topics, you will draw a tormenting logic throughout your project. Flow Chart helps you follow the logic you originally set, helping you remember through images, instead of tedious text.

Similarly in life, when you decide to buy a house, buy a car or be a project of your company … All of these jobs will become clearer and clearer when you sit down and draw it out. paper.

Everything has its place

Học lập trình trực tuyến chất lượng

When you start programming, you will have to generate variables. There are many types of variables you can use, and you have to choose the most suitable variable for the job. For example, you want the output of a function (function) to be the person's name, so the string variable will work best.

So is your life. You choose a big, small box depending on the size of the table you need. At work, you leave the documents on the table, but important documents will be put in locked cabinets. Everything has its place – this may become your new motto.

Reuse to save time

Any good developer will realize that there are some code sets that can be reused in the following projects. For example, the function converts temperatures above Fahrenheit to Celsius. This function has a few lines of code, but why do you have to rewrite while you can save it as a code and then insert it into your other projects?

Henry Ford invented the assembly line because he thought he could produce cars faster, if he could reuse the equipment and didn't need to go through the process every time a new car was made. out. In the same way, you can apply the thinking in your life, when you have to do something over and over again. This is the key to success!

Write down what you did

Học lập trình từ cơ bản đến nâng cao

Indeed, for programmers, writing code never goes hand in hand with writing the process again. This is normal, because when the code, you know what you want to do and how to do it. Recording the process takes a lot of time and it is difficult to describe the steps you have taken. However, you should still take the time to do this. A few months later, you decide to reuse the code of the previous project, it will take a lot of time and effort to remember how you did in this section and where the code starts.

You should also record information in your life – like birthdays, appointments … Sometimes work falls on your head as much as autumn leaves fall, and you can't just rely on your memory. Therefore, the manual or schedule is very important, it will burden you with the responsibility to remember your work and calendar!

Always open yourself a way out

One of the new programmer errors is the infinite loop. This happens when the conditions needed to exit the loop do not occur, so the program will be in this never-ending loop and will consume 100% of the computer CPU and will disable the machine. count until you solve this problem.

The lesson for new developers is that when you create a loop to do a certain job, you should have a certain exit. For example, instead of creating a loop on the basis of your calculation that does not exceed a certain value, you can use the basic loop then create the condition that the loop must stop when the number of allowed loops is exceeded.

How to apply this in life? No matter how carefully you create a plan, something will happen. This way of thinking is to think about 'worst situations' and find a way to fix it, in case this happens.

Free up memory when you're done

Học lập trình xin việc làm

The last lesson is to clean up after you finish working. When programming, you will probably have to open many programs, create array files and other things need lots of computer space. The clean software will help you close other software and free up computer memory after you have finished working. This will help you avoid the memory leak problem.

What must have happened, you have to listen to my mother talk a lot. Move the room, clear the table … But this is not a waste. When the room, the desk is neat, you will have plenty of space to work and will probably complete the next project in a shorter time.

Epilogue

In fact, the lessons you can learn from programming are not only six things I wrote here but a lot. When it comes to organization, planning, strategy, resource conservation … programmers have found the answer to these problems. That's great isn't it!

ITZone via Techmaster

Share the news now