Home > headlines > body text

Only when you are in a good mood can you type good code. How should programmers maintain a good attitude?

伊谢尔伦
Release: 2017-07-13 11:23:42
Original
2215 people have browsed it

This is called being in a good mood and doing something to be happy. Having positive emotions every day is positive for work life. If you have too many negative emotions and you don’t like anything, it will be difficult to continue working.

Programmers cannot pretend to be perpetual motion machines, we should be allowed a free range...

What are the effects of unpleasant negative emotions on programmers' coding? What?

First of all, the impact of negative emotions on programmers is predictable. Research scholars from several well-known universities conducted a survey among programmers. The most important consequences of negative emotions on programmers are: low cognitive ability, mental restlessness or disorder, low motivation and even quit work.

Only when you are in a good mood can you type good code. How should programmers maintain a good attitude?

Among these, retirement is a very devastating consequence and often appears in investigations. Work withdrawal is a set of behaviors defined as an employee's attempt to remove themselves, temporarily or permanently, from temporary or permanent work assignments. The importance of this consequence lies in switching to another task, for example,

You spent 2 hours on Google investigating how to solve a similar problem, and you found nothing. The problem is addicting Your mind needs to do other things to clear it.

Or consider quitting development work, "I really started to doubt myself and question whether I am suitable to be a programmer", or even "I left the company."

Another consequence is frequent job-hopping. If programmers believe that interruption is the only solution, then interruptions can result from unpleasant processes that can impact the entire project.

Of course, these are not the most direct. The most obvious thing is that it leads to low code quality for programmers.

As expected from the focus of previous research, the most important consequence of unhappy programmers is poor code quality. Eventually, negative emotions will clutter the programmer's code, where more bugs can be found.

But it is also mentioned that the code is less effective, or the code becomes worse and worse and cannot follow the standard Design Pattern.

As a way to deal with this negative emotion, it is also very alarming:

Research has found some situations that damage task-related code bases, such as:

"I Deleted the code I wrote because I was a little angry",

Until deleting the entire project:

"I have deleted the entire project, and there seems to be no errors when starting again "

Removing these buggy codes seems to make programmers happy.

The main impact of happy programmers is-it makes them more confident, more creative, etc.

0Only when you are in a good mood can you type good code. How should programmers maintain a good attitude?

Programmers don’t just type code! You must learn to discover happiness by yourself. Of course, a person's energy is limited after all, and sometimes one does have to give up some things because of study and career. Next, let’s talk about how to keep yourself in a happier mood.

1. Exercise: Buy a good pair of running shoes and run fast, boy! My studies have been quite heavy recently. I used to insist on running every day, but now I haven’t run for a long time. Be sure to remember to run a marathon wearing the Legion cape from "Attack on Titan"! Or go to the gym. Maybe we can even talk about beautiful women or handsome men. You can also participate in cycling, buy a road bike with a carbon fiber frame, and invite other riders to go riding together on the weekend and enjoy the feeling of the wind blowing between your teeth. Invite a few friends to play football or basketball together and sweat it out.

2. Foodie: Think about what fun things there are around, and the cheap and delicious places hidden in the streets and alleys nearby. Food is also a good thing that can lift your mood. Of course, health is also important. You can also learn to cook by yourself. Making barbecue and cakes by yourself is quite a sense of accomplishment. Or you can make an appointment with a few like-minded friends to have a good meal together, and you can also have a pleasant chat and participate in group activities.

3. Literary fans: Check out what good movies there are in Yichui Cinema. Those with a slightly higher artistic talent can watch operas and dramas. Go to an online store and buy a few books of your favorite genre, learn guitar, piano, painting, etc., and do whatever you want.

4. Photography: It has become more popular in recent years. When you go out, you can sometimes see a bunch of guns and cannons. Buy an entry-level mirrorless camera Sony α6000 with a dog head, and learn to take pictures of people, landscapes, and cats. . The topic owner can join the lofter community or 500px, which has various photography masters. There are some photos of welfare private houses in Lofter, so you can find them yourself.

5. Travel: Set your own small goals, and arrange to go out for a walk every once in a while. The so-called traveling thousands of miles is sometimes more informative than reading thousands of books.

6. Raise animals and plants: If you feel you have plenty of time and experience, you can raise a pet; if you don’t have enough time, you can raise some durable plants, which can freshen the air and change your mood. Why not.

Of course, if you think that playing games all night is also a way, then I have nothing to say. That’s all that comes to mind first. Everyone’s lifestyle is different and their ability to self-regulate is also different. The most important thing is to maintain a good mood and devote yourself to daily work and life. Programmers need to be in a good mood to type good code.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!