Writing code like Zazen: What kind of programmer are you?

Source: Internet
Author: User

What do you do when compiling takes up your time. Not just compiling, but even waiting for the end of any short-term computer operation, what will you do during this time?

This time is negligible compared to your workday break, but in general it can be a great help to your productivity and well-being.

By the way, the content of this article is not only for developers and programs. It works for any smart person who uses a computer. A picture is attached to the back. Now let's get started!

Why did you write this article?

I've recently started using some sort of time management technique in my work habits to improve my productivity, reduce stress, and help my body and brain get a rest. I basically want to work in the one or two hours of uninterrupted 100% attention, and then it's a 20-30-minute break.

However, I almost immediately entered a huge problem: when I was compiling or deploying something, I would automatically open the mail client, Facebook, news reader, one or several of the news sites. It's a bad habit. It's hard to get rid of. It disturbed my undivided attention.

So I decided to search for the relevant information. In Stackexchange there is a forum on "What to do when compiling". The most frequently voted answer is "reduce compilation time" category. However, these answers do not solve more common problems: there are always things that need time to wait while working on a computer.

In contrast, people on the forum tend to suggest what time they can do (like sending and receiving emails or watching news), which is a bad idea. A good suggestion is this--"It's not good to do many things at the same time." I agree with this view. But what about the others? This answer is disappointing. So in this article, I'm going to delve into the problem and show you the ideal approach.

Two types of programmers

There are two extreme prototypes of programmers-"Zen programmers", the programmers we call inner peace, and "programmers who can't restrain distractions," which we call the erratic programmer. Both are very extreme, so they should be at both ends of the bell-shaped curve, right?

Wrong. In fact, uncertain programmers are incredibly ubiquitous.

The effect of the picture is more useful than the text, so I now use the picture to understand the state of the mental world of the two programmers.

Inner Peace's programmer

What will the inner peace programmers do?

He wrote the code. This is the only thing he does, and that explains everything. Perhaps the more important question is what he did not do: he was not affected by distractions. Focus on attention, focus on change, focus on coding. An hour or so of pure code time, then 20-30 minutes of rest, usually away from the computer. He will then continue to start writing code. (The time mentioned above is only an example.) He can arrange his time in other ways-but he can always balance and fix long-time productivity. )

His mind flowed slowly like a calm water. Of course it's not like the constant freezing ice.

This is what the Inner peace Programmer's mental world looks like:

A programmer of uncertain moods

Even if your mental world now looks like a inner peace programmer, if you open Facebook at compile time or check your email or do something else. A few minutes later it will look like this:

Ladies and gentlemen, this is the situation after you check your email and open Facebook. If you also have a bunch of real-time notifications, instant messaging, and checking your RSS feeds and tweets, the result is that the brain is like a fragment of a disaster in the image above.

You may not have fully recovered from this picture yet. Not on a particular day, it can happen at any time. Even if you minimize all the useless things in the mental world to the taskbar, it will remain there, constantly luring you, consuming your spiritual resources. Friend, time goes on like this, you will be puzzled how it is disappeared.

By the way, if you are a person of uncertain mood, you can still look at the Web page of our website comics! You don't have to come back and finish reading this article right away. Don't forget to subscribe to the comic book source! After reading all the comics, you can share it with your friends and chat! It's not too distracting to do these things, really!

The difference between a inner peace programmer and an unstable programmer

Inner peace programmers tend to have a long-term sense of well-being and productivity. He has the ability to concentrate and focus on his goals.

Uncertain programmers tend to have a momentary sense of satisfaction, which in the long run does not reach the full potential and will hurt his own body and mind in two ways. He could not settle his mind to concentrate.

In order to understand this thoroughly, we first need to know how our brains work.

How our brains work.

In fact, we don't fully know, but based on what we have now, psychologists have come up with some useful analogies that can help us understand complex things.

A computer analogy

Your brain is like a computer. Of course, it's a lot more complicated than a personal computer, but the analogy of computers allows us to describe many of the processes that run in the brain. Some things are like hard disks, some things like memory and CPU, and processes and threads, and they do take some time to access information and calculate data.

It's obvious that our brains have a certain capacity to concentrate at any moment. You can concentrate on something well, or not concentrate on a few things, but you can't do both. Transferring attention from one task to another can even affect cognitive abilities, especially two unrelated tasks.

As long as you focus on something, you take the time to deal with it and the resources it allocates and initialize it from memory and background processes. It can exist for several hours or even days. Things that have recently come to mind will continue to emerge at any time. Instantly you don't notice that they're flowing in your brain, they're always there-and they're taking up resources to keep you distracted.

The analogy of drawers

Another useful metaphor is the drawer in the cupboard. Your brain is like a drawer where things are stored. Each drawer has data and is interconnected, based on a contextual relationship and concept. At certain times, some of the drawers are open and some are closed. The open drawer represents your current mental space, which is easy to access.

The main problem is that it takes a long time to close the drawer, and opening them is very fast.

So when you're at work and your attention goes to a new place, it opens up a pile of drawers immediately. When you get back to work, those drawers are still open. The only benefit is that you can improve your creativity and brainstorm--but the unwanted drawer will have an impact. They suppress left-brain thinking and reduce attention.

What to do when compiling

While waiting for the computer to perform the operation, your behavior can determine whether you are a inner peace programmer or a mentally unstable programmer.

The main points of view are:

1. Don't be distracted

2. A short break

It's not that hard to keep your attention-you have to cut off the power of your brain or keep your focus on your code. However, turning off the brain works better. This will enter a micro-meditation state, which will still work after a short break.

Why go into meditation? Well, your brain is chewing the code every day, why not give it a break? In addition, meditation is scientifically proven to continuously increase the level of happiness. Imagine the long-term advantages of a two-time, 30-60-second, seemingly unimportant meditation day.

Now, what should I do for a short break? Select anything from the following and group them together as you think. You can do it all in this order, depending on (or not) the time it takes for these behaviors to be done.

1. Stand Up

2. Overlook the distance

3. Put your hands behind your head and lean against the Chair

4. Stretch your legs and lift your hands as high as possible.

5. Close your eyes

6. Lightly rub the eyes

7. Slowly turn your head in all directions and stretch the cervical spine

8. Close your eyes and take a deep breath

9. Pour a glass of water (be careful not to be distracted by coworkers on the way)

You can also do any major physical involvement without affecting the mind-static exercise, juggling, duel, haha

By the way, if your boss doesn't give you enough time to do anything above, then recommend him to come to this article. It's much better to get back to your mind faster and stay focused than you seem to be distracted by the job and feel tired quickly.

Stretching and relaxing is very beneficial. The last time I saw my therapist, she found that my shoulder was tight in many places. She told me it was probably because I was sitting in front of my computer and my hands were always bent, so my muscles were short and I couldn't force them. So what should I do best? Lift up my hands and try to lift the highest. This is something I often do when I compile or wait for the computer to perform the operation.

You may have heard that it is a good idea to have regular stretches of relaxation and a short rest when you are using your computer. The question is how do you do it--even if you set a timer, but what if you're in a complicated situation and you're halfway through it? That's not going to happen. However, if you take a short break at compile time, you can do it well, and you may even develop a habit to make it more "natural"! Now the compilation starts to remind you to stretch and relax. This is incredible.

Things you shouldn't do at compile time

I actually want to hit my home page hard, and it makes things simple, and here's a list of things you shouldn't do at compile time. Think in this way: these things not only make you unable to concentrate, but also make your mind and body unable to rest very well.

1. Read your RSS feeds

2. Read the news (any news)

3. Send and Receive mail

4. Browse various social media (FACEBOOK,TWITTER,GOOGLE+,LINKEDIN,REDDIT)

5. Watch the video

The following two things are better than the above, but still not recommended:

1. Chat with colleagues

2. Read a physics book

Focused attention and change of focus

I'm about to end this ideal method of the daily workflow that I think-the Zen Programmer's article.

The key to ensuring productivity and efficiency is that attention 100% is focused on what you're doing right now, and then turning your attention completely elsewhere. The transition of attention from one thing to the next cannot be any more than a muddy.

Divide your working hours into 1-2 hours. Attention 100% is focused on these time periods. Then there is a 20-30-minute rest, which can do anything at all. You can browse your email and social media during the break, and of course it's better to take a nap and have a healthy snack. After the break, check the task management software (for example, I'm using my swift to-do List) for the next job, and then start another job that needs to be focused. To a large extent, this is somewhat similar to the tomato work law.

The rest is not optional. Don't try to jump over it. Your body needs a rest. Even if you're doing your favorite job, you need to take a break-in which case, you'll be motivated to do more in the next period of time.

Your workflow should look like this:

(Task 1-Task 2)-Rest-(Task 2-Task 3-Task 4)-Rest-(another 1-2-hour period)-Rest ...

Do not let it complete is like this chaotic random, let the people do not look down:

Task 1-mail-Task 1-facebook-Task 1-Task 2-short break-Facebook-Task 2-mail-Reddit-task 3-mail-Rest-Task 2-mail-Task 3-Twitter-Hacker News- Twitter-Task 1-Task 3-Rest-Task 4

If your workflow is like this, you can neither relax nor finish what you can accomplish. This is the lowest-level method. This not only wastes your potential and time, it also makes your long-term health uncomfortable.

I don't want to lie. It's really not easy to focus attention. It's difficult because when you're not concentrating, you're basically moving in the opposite direction. Habits and entrenched practices are as difficult to change as the subconscious.

The good news is that you can still practice. You can learn how to focus your mind. It's a skill that everyone can learn, and it's very useful and worth working for.

--Reproduced in Jiri Novotny+, the author of the Windows Platform task management software troubled. He posted this user article in componentowl.com because his swift to-do list would use the. NET Framework-based better ListView on Component Owl as its core component.

Additional: Do you have people around you will check the mailbox 50 times a day? Send him this article. He'll thank you later.

Originally from: http://www.componentowl.com/blog/2012/02/zen-coder-vs-distraction-junkie/

Translation from: http://www.ituring.com.cn/article/1087

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.