Last fall I had some problems with my feeder code project, the project was not progressing, and I couldn't find a way to do more code.
I mainly do my branch on weekends, and of course sometimes at night. This method is not effective for me. I'm under a lot of stress and I need to try to do as much work as possible over the weekend (I'll be frustrated if I don't). Another problem is that I can't guarantee that I'll be free every weekend, and I don't want to spend all of my weekends programming (losing all the opportunities to relax and entertain).
In addition, the gap is too long to encode every other week. It's too easy to forget what you're doing, or what else you need to do (even if you have notes). If you miss a weekend, the problem is even worse, and the interval becomes two weeks. Multi-week context switching can be fatal (I have many side projects that die because of this lack of attention).
Jennifer Dewalt the way she programmed herself last year by creating 180 websites in 180 days, and her approach inspired me. I decided to adopt a simple strategy: encode every day. A front-end UI framework that can 500% improve development efficiency!
I decided to set some rules for myself:
- You must write code every day. I can write a document, write a blog, or write something else, but this is not a substitute for writing code.
- The code must be actually working. Adjust indentation, re-layout is not counted. Refactoring doesn't count if it's possible. (These things can be done, but these cannot be the only encoding of the day.) )
- All code must be completed before midnight.
- The code must be open source and put on GitHub.
Some rules are more arbitrary. For example, the code does not have to be written before midnight. But I'm worried that staying up late causes code quality to degrade. Again, the code doesn't have to be open source or on GitHub. I do this to force myself to write the code when the snack (consider readability, and consider modularity earlier).
This strategy has been effective so far. I basically kept 20 weeks of continuous work. The reason I write this blog is because it completely changes the way I write code and, more importantly, affects my life and mind.
The change in this habit has some interesting results:
the smallest possible encoding. I force myself to spend not less than half an hour a day writing code (if it's less than that, it's hard to write valuable code, especially if it takes a little time to remember what it was written the previous morning). I sometimes write a little more on weekdays (usually not more than one hours), and on weekends I sometimes write code all day.
writing code becomes a habit. It's worth mentioning that I don't really care about the GitHub graphic above. I think this is one of the best things to learn from this experiment: it's a change you make for yourself, not just to meet other people's assessment of your work. Dieting and exercise are also a reason: if you don't care about improving yourself, then you will never succeed.
struggles with anxiety. Before I start this experiment, I often feel anxious about not getting enough work done or getting enough progress (the work and progress are hard to quantify because there is no death limit for my feeder project). I realized that it was just as important to feel the progress and the actual advancement of the work. It was an eye-opener for me. Once I keep pushing the project every day, my anxiety begins to dissipate. I am very comfortable with my workload, and I have no longer the unbearable desire to push the project forward in the wind and rain.
weekend. In the past, finishing the work on the weekends was definitely a key driver of the move (because this is usually the only opportunity for me to push the spur line project a lot.) It's not the same thing now. Expecting to finish all the work a week at a weekend will only disappoint me. I rarely get the job done, so I've turned down other favorite weekend activities (such as dim sum, visiting museums, going to the park, accompanying my partner, etc.) in order to do more work. I deeply feel that while the spur projects are very important, they should not be the whole of life. A front-end UI framework that can 500% improve development efficiency!
background processing. An interesting side effect of writing a feeder project code every day is that your current tasks are often run in the background of your brain. So when I go for a walk or bathe, or do other activities that don't work, I'm thinking about what coding I'll be doing next, and finding a good way to solve the problem. That's not the case when I coded it once a week or two weeks ago. Time was spent thinking about other things, often worrying about the inability to complete any of the spur projects.
context switch. There is always a contextual cost when picking up a project to work on a spur line . Unfortunately, it is extremely difficult to regain a whole week of thinking. It's helpful to do a little bit every day because the interval is much shorter, and it makes it easy to remember what I'm doing.
balancing work. One of the most important aspects of this change is that I have simply learned how to better balance work, life and spur projects. I know I have to do a spur project every day, so I need to manage my time better. If I plan to go out at night and get home late, I need to work in the morning for the spur project before I start working for Khan Academy, my main business. Similarly, if I was outside and I hadn't finished my work, it was very late, so I needed to get home as soon as possible to finish my work (lest I miss the day). What I need to point out is that I find myself spending less time on hobbies (such as woodblock painting), but this is a reasonable price and I have to accept this.
external communication. It's good to communicate with the outside world about your new habits. My partner understands that every job must be done, so there are activities that sometimes need to be adjusted accordingly. So I can easily say: "Yes, we can go out/watch a movie/And so on." But I need to write the code later. "My partner will understand me and take this into account when arranging activities."
How much code did I write? It's hard to believe that I've written so much code in the last few months. I've built several sites, rewritten some frameworks, and created a lot of node modules. I wrote so many pieces of code that I sometimes forget what I wrote--a few weeks ago I felt like I was a long-time memory. I am very, very happy to be able to write so much code.
I think the change of this habit is a great success. I wish I could keep this habit going. At the same time, I try to recommend this strategy to other people who wish to complete a large number of feeder projects. Tell me if this strategy is valid or invalid for you. I'd love to hear something interesting from you.
The father of jquery: Write code every day