Programming every day

Source: Internet
Author: User

Original address: http://kb.cnblogs.com/page/536779/

I just hope I can learn this good learning method.

Last fall, my personal project seemed to come to an end: I had not been able to make the necessary progress, and I was unable to complete more personal programming matters without sacrificing my main job (full-time work at Khan College).

There have been several serious problems with my work on my personal project. I put the work mainly on weekends, but sometimes it may be weekend evenings. In fact, this arrangement is simply not appropriate. I'm a little overwhelmed by the stress that I have over the weekend just because I want to do so much work (and I feel frustrated if it's not done). And the question itself is fraught with contradictions-I can't guarantee my free time every weekend, and I don't want to spend the whole weekend programming (losing the chance to relax or do something else).

Another problem is that it takes too long to work on the same piece of code for a week apart. It's easy to forget what you've done (even if you take notes, it doesn't help much). If you happen to miss a weekend, it will lead to a two-week gap. In fact, this multi-week-based work environment switch is very deadly (because of the lack of necessary attention, many of my personal projects have died out).

Last year, Jennifer Dewalt designed and authored 180 Web applications and websites in 180 days for self-study programming. I was inspired and encouraged to think that it was necessary to try a similar strategy: To do a little work for my personal projects every day, instead of focusing on every weekend.

I decided to set myself a few rules:

    1. Write your code every day. I can write a document, blog, or anything else, but I have to finish writing the code.
    2. The code must be available. No need to adjust indents, no reformatting, no refactoring as much as possible.
    3. All code must be written before midnight.
    4. The code must be open source on GitHub.

The above rules are inevitably too arbitrary. The code does not have to be written before midnight, so I'm just saying that to avoid overwork, which leads to bad code generation. Put the code on Github to force yourself to be more careful (Let yourself consider code reuse and modularity as early as possible).

So far, I have been working for nearly 20 weeks and have achieved remarkable success. I want to tell you that this strategy has changed the way I write code and has had a huge impact on my life and spirit.

Here are a few interesting things that happened to me after the habit changed:

  minimum available code. I force myself to write code no less than 30 minutes a day. Sometimes the working hours may be slightly longer (but generally not more than one hours), and on weekends, I often work all day.

  programming is a habit. one thing to keep in mind is that I'm not particularly concerned about the level of attention that the code has on Github. I think the biggest benefit I've got from this experiment is this: it's a change I made for myself, it's nothing to do with anyone else, I don't want to please anybody. It's like nurturing your personal diet and fitness habits: progress occurs only when you really start to care about your progress.

  fight anxiety. before I started this experiment, I was often in a state of high anxiety-always worrying that I couldn't do enough (though I didn't set a deadline for myself). I slowly realized in my experiment that feeling the progress itself was as important as getting real progress. This is an eye-opener, and as long as progress is made every day, the feeling of anxiety will naturally disappear. I don't have too much hope for my work, so I can keep my heart calm.

  weekend. in the past, the weekend work was absolutely critical to me and to the progress of the project (because I was only doing a lot of programming at this time). The situation is very different now, which is really a great thing. I've been working on a certain task for myself every weekend, but it's often disappointing to get things done. I seldom finish these tasks on time, so that I have to return to other weekend activities, such as eating snacks, visiting museums, parks and friends. You know, these activities have a positive effect on my life. I strongly feel that even if personal projects are more important, they should not conflict with other things in life.

  background processing. doing a little work on your personal projects every day will have a side effect-you'll feel your brain is always programmed. When I go out for a walk, shower, or any other non-mental activity, the problem-solving inspiration often emerges. This has never happened before. At that time, my time was heavily consumed by anxiety. In most cases, anxiety does not help me to accomplish more tasks.

  Environment switch. Typically, switching from one project to another requires a certain conversion cost. Unfortunately, when a project has stalled for a week, it's hard to get back to the original state of thought. The shorter the pause time on a project, the better it is to restore memory.

  work balance. one of the most important things about change is learning how to better balance work, life, and personal projects. Knowing your schedule beforehand will allow me to better balance my time. If I plan to go out at night and come back late, I'll start my personal project early. Also, if I haven't finished my work, I'll go out later, or go home early (try not to miss a day's work). I noticed that I spent less time on hobbies (such as woodblock printing, etc.), but it was a reasonable compromise that I had to adapt.

  external communication. the new habit of external communication gives me additional benefits. My partners on personal projects are easy to understand about my work plans and processes, and their work plans are easier to develop. It's more natural to go out and watch movies, and this kind of life is very comfortable.

  The amount of code. I can't believe how much work I've had in the last few months. I created a new website, refactored some frameworks, and built a whole bunch of new modules. I write so much that sometimes I forget what I've done. Even a few weeks ago, for me, it was like a distant memory. I am very satisfied with what I have done.

I think this change is a great success for me. If possible, I hope to keep going. In the meantime, if anyone wants to be like me, I will do my best to show and sell this strategy to you. If you encounter any problems or doubts in the course of applying this strategy, please contact me. I'd love to hear some anecdotes.

  John Resig, programmer, the father of JQuery, now lives in New York, USA.

  Original: Write Code every day

  Thanks: Qingniu Help review and complete proofreading.

Programming every day

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.