
Write Code Every Day - slig
http://ejohn.org/blog/write-code-every-day/
======
munificent
I am a total convert to the "don't break the chain" idea. I started writing a
book on game programming[1] about four years ago. At the time, I was working
at EA, miserable, and highly motivated to have the book done so it could help
pad my resume. I got a book deal (O'Reilly) then, when that fell through,
another (Apress). I had a real writing schedule, and a very supportive wife,
and I would work on it for hours at a time.

Then I left the game industry, moved across the country, and had another kid.
Suddenly, motivation and time were scarce. I backed out of the book deal and
basically put it on hiatus for two years. I still really wanted to finish it
but it just wasn't happening.

About a year ago, I realized that if I didn't finish it soon, I never would.
My familiarity with the domain was fading every day. I didn't want the project
to be a failure, so I decided to try writing every day.

I didn't have a set goal each day, but I try to do around 30-45 minutes. That
ends up being ~500 words of first draft, ~1,000 words of later revisions.

In the past 309 days, I've finished 12 chapters. That's 59,568 words, plus a
few thousand more for intro sections. I've redesigned the site twice, set up a
mailing list, gotten a business license, and a bunch of other grunt work.

I'm about halfway through the very last chapter now (!). In less than a month,
I should be able to say the book is done. (Though what I mean is that the
_manuscript_ is done, I'll be doing ebook and print versions after that.)

I absolutely could not have done this without working on it every day.

    
    
        [1]: http://gameprogrammingpatterns.com/

~~~
mhartl
The "don't break the chain" rule is brittle: if you _do_ break the chain, your
motivation can crater. I think
[Beeminder]([http://beeminder.com/](http://beeminder.com/)) has a clever
solution to this problem; it gives you a way to track and enforce your goals
while being robust to the occasional lapse.

~~~
dools
I haven't found this. Because I can still see a calendar that shows all the
days I hit my goal, my motivation doesn't suddenly evaporate if I miss a day.
One of the keys I think is setting goals that you can't fail at. So rather
than "go to gym" which is a hard habit to form, you could start with "do 10
pushups". Eventually once the habit has formed you can step it up, but it's
far more valuable to win/succeed every day than it is to accomplish lots on
one day then laps for 5.

EDIT: for example here are my current widgets for the My Chains app on
android: [https://db.tt/pYRrrPZs](https://db.tt/pYRrrPZs) you'll notice
they're pretty quick and easy, but there are quite a few of them. This gives
me a tremendous sense of achievement and progress which has been invaluable in
the quest to form better habits.

~~~
groby_b
Another side note - where is the "My Chains" app? The app store doesn't know
it...

~~~
dools
[https://play.google.com/store/apps/details?id=se.lixi.mychai...](https://play.google.com/store/apps/details?id=se.lixi.mychain)

Sorry it's MyChain

------
hawkharris
Telling a programmer to write code every day is a bit like asking an aspiring
carpenter to swing a hammer: it's a necessary component of improving your
skills and building things, but it is also a narrow, technical task that has
limited value in isolation.

Having said that, programmers should spend _at least_ as much time _reading_
and _thinking about_ code as they do writing it. You can write code for hours
each day and do nothing but revert to the technologies and techniques that you
find most comfortable.

~~~
jeresig
I'd agree with you if my primary desire were to improve my ability as a
programmer. Unfortunately, at least at this time, it's not. My major concern
is getting meaningful work done. I spend far too much time thinking and
reading about technologies, techniques, and planning for the future - more
time needs to be spent on actually implementing all the amazing stuff that you
want to exist.

~~~
cschneid
I agree. I have the habit of constantly learning, without producing. So I'll
pick up side projects, suck the learning-marrow from their bones, and discard
them without finishing.

I have so little to show in terms of actual work product, which I am
attempting to fix with a similar "don't break the chain" approach.

~~~
MattHeard
I have been in the same boat as you when it comes to side projects, but I'm
curious about your use of the metaphor of "sucking the marrow from the bones"
because that metaphor is typically used to describe completion to an extreme.
For example, if "eating an animal" was your metaphor for working on a side
project, I think that a more apt extension to that metaphor would be "leaving
meat on the bone" rather than "sucking the marrow from the bones". However
your metaphor refers to the marrow as "learning-marrow" which confuses the
larger metaphor that is "eating an animal".

Have I completely misunderstood the extended metaphor you were trying to use?

~~~
cschneid
Yeah, probably. Also I didn't think it through either.

I extract the goodies from whatever I'm learning, and never finish the project
I'm learning from.

My attention shifts as soon as the project stops being interesting & new, and
becomes "work" to finish up.

~~~
visarga
You gotta think of your project as you think of a woman you are in love with,
otherwise, there's no sex. I think there is a lot in common between love,
advancing in a project and even picking a movie to watch - they all involve a
kind of 'sexual' openness towards the subject.

~~~
WickyNilliams
i know it's usually frowned upon to make jokes on HN, but it's amusing that
this comment seems be sexualising everything and your user name is an anagram
of "viagras"

~~~
visarga
It's actually a word in Sanskrit, meaning creative energy, but it has a
secondary meaning of seed / discharge. And my comment sexualizing the
relationship between a dev and his work is not a joke - I really believe that
thing that allows us to enjoy such work that other find repulsive is a kind of
attraction similar to sex. I'm using this insight for finding a good attitude
towards my work - you know, you gotta admire the curves before you get into
the mood. :-P

------
tibbon
I was onboard with this school of thought for a while, right now it isn't my
flow.

I work hard as-is teaching WDI at GA. I commit code frequently, but I also
really want to focus more on work-life balance at the expense of getting more
done. This summer, I'm taking two months off to do Burning Man and travel the
country via motorcycle. During that time I expect no code to be committed. Do
I feel bad about that at all? Not in the least bit, in fact I'm super excited
to do it.

Currently, I try to _not_ do much work on weekends. I like working hard during
the week and then stepping away from the computer. I'll go and play music,
ride my motorcycle, hang out with friends, travel, etc. The more time spent on
my laptop on weekends feels like I'm missing out on things that matter
strongly to me right now.

Now I am nowhere near the prolific coder that John is, and nowhere near his
skill. I don't think he's wrong for doing it this way, but it isn't right for
me and I'm glad that its producing results for him. I also go through periods
of wanting to code daily, and other times where I'm ok with not coding for
several days at a time.

To each their own. Also, Hi John!!! I haven't seen you since betahouse or you
holding a Jelly at your place in Cambridge.

~~~
jeresig
Hey David! It's been too long :)

I agree with your sentiment -- I've been through long periods of little-to-no
side project hacking. Like multi-year, long. I've been working on my current
side projects for over two years now but I finally made the decision last fall
to make the hard decision: either this is going to be something that I REALLY
want to get out there (and thus, I need to work really hard to make it happen)
or I need to be comfortable with letting it slowly progress over a long period
of time. I made the decision to go for it, so I'm writing the code to make it
happen!

But yeah, for every season there is definitely a different formula. In the
next phase of my life hopefully I can find other things to bring this level of
excitement and stimulation!

~~~
tibbon
You're absolutely right in that its critical to either kick things into gear,
or know that its going to take a long time for things to happen. That's
excellent focus. I look forward to shifting back to the other side at some
point. Maybe in 2015 ;)

------
gdubs
This "don't break the chain" approach has worked extremely well for me,
particularly during busy periods of high stress. I first learned about it in
my college writing classes, where you're supposed to write something,
anything, meaningless jibberish even, every single morning. Recently I read
about Seinfeld using this approach to great successs. Every day he works on
material, and puts a big, fat, "X" on the calendar.

~~~
jeresig
An important change that I made, compared with these techniques, is that I
require myself to write meaningful code. It's certainly much harder to do that
but as a result I find myself developing good time management skills. Knowing
that I have to be mentally "present" for my work forces myself to schedule and
plan my days better, resulting in higher quality work all around!

~~~
FLUX-YOU
How do you define meaningful code? I feel like I'd quickly run out of
approachable ideas without reinventing some wheel. I'm also not to the point
that I can write Node/Python/other packages and have them be useful or unique.

~~~
watmough
Pick something in your domain and write something useful.

------
kyro
Do everything you want to excel at everyday.

One big problem I've learned with not working consistently at any one task is
that after dropping and returning to a project, I find myself being familiar
enough with areas I last touched that I want to speed through them to reach a
point where I begin working on new ideas and concepts. But in most cases,
those areas I left off at were the very reasons I jumped ship, either because
they were too difficult or mind-numbing to wade through, leaving them
incomplete/unlearned, and resulting in me having to take a few steps back to
fully refresh myself before I can continue building, which leads to a lot of
frustration and feeling like I'm wasting a ton of time.

------
iSnow
In the long run, this is unhealthy.

Yes, it makes you more productive, but what if you fall in love, get sick,
have a child...? Then you feel guilty about not catering to your side projects
and guilt breeds procrastination.

I learned how to break down work into small pieces and rather finish one small
piece and then call it a day instead of leaving something half-working for the
next day. Because of this, I left projects dormant for 3 months and then
picked them up again.

Granted, my side-projects are for-fun and not for-money, that makes it
easier...

~~~
jeresig
I think you might be conflating things a bit. The guilt about a lack of
productivity already exists (daily work, or not). Doing daily work helps to
mitigate it to a large degree. Naturally if I get sick I'll be comfortable
enough to "let it slide". If anything I'll be eager to get back to work right
when I can.

I do agree that breaking things into tiny tasks is the best way to go, it's
helped me tremendously. More than anything else though it seems that passion
is the largest "secret ingredient". If you're not passionate about the work it
just won't happen, regardless of what happens in your life.

~~~
iSnow
>The guilt about a lack of productivity already exists (daily work, or not).

This is what I think is unhealthy. If you want to spend a lot of time coding
in your free time, go for it. If you notice guilt because you are slacking,
you should revisit your priorities and earnestly think about why you are
coding that much.

------
Lambdanaut
That was a beautiful post.

Currently I'm in the complete opposite modus operandi. I don't do a lick of
side-project work during the week, and on weekends I take a
modafinil(wakefullness promoting medication) and stay up nights on end to
crack out as much as I can.

I get an INSANE amount done on the weekends that I have the energy to pull
this off, but it's horrible for my health. The rest of the week I have anxiety
about the coming weekend, and it completely throws of my circadian rhythm. Not
to mention that I'm only able to pull this off perhaps once or twice a month.

I'll definitely be changing my work schedule to be more in-line with a daily
habit. Being able to look back and see a lot of consistent work being done
sounds way preferable to being able to look back at a few weekends of
consistent insanity.

~~~
akilism
no side effects from the modafinil? I take them very rarely pretty much only
when it's of the utmost importance that something gets done by a deadline and
even then i'll only take a half or a quarter.

~~~
scrabble
I used to take 8 modafinil / day but have been able to bring my wakefulness
back to what I feel is going to be normal for me without medication.

I did experience one side effect -- paranoia. I became really paranoid about
what my spouse was doing behind my back. I knew that there was nothing going
on though, so I was able to finally make the call to get my doctor to take me
off the medication. I'd imagine the situation would be much worse if you were
paranoid but didn't realize that you were delusional.

~~~
akilism
8 a day damn i would be up for a month.

------
steveklabnik
The real problem with "don't break the chain" is that once it does, things
collapse.

See my graph:
[https://github.com/steveklabnik](https://github.com/steveklabnik)

As you can see, I'm about to lose a ton of green. I'm at 87 days as my
longest, but July 6, 2013 was brutal for me. I was actually flying, and had
saved a small bit of work to do during a layover, but then I totally forgot.

Once that chain was broken, it was super easy to justify taking some time
off...

~~~
natdempk
One thing I've found is that when you miss days, having some sort of planned
reset time is definitely helpful. I use the same chain technique to journal
every day through 750words. They track streaks both overall in days and
visually on a montly basis, meaning that if you fall off the wagon, you can
still easily get back on. The motivation comes from the fact that you can work
from scratch towards getting another perfect month. I really like this
approach, though I'm not sure exactly how you could apply it to Github's
commit UI.

------
balou
Really? I'm so surprised to see so many "Awesome! Go for it" answers to this.

While I admire the dedication and focus it takes to stay up to such routine, I
am certainly concerned by the quality of life and the narrow mindedness of
enforcing upon oneself to code on a daily basis. What about days off? Going
out friends / family for a weekend or holidays? One would suggest to bring
your laptop so you can stick to it? This is madness to me...

I love to code, contribute to OS projects, do code for a leaving and for
myself - but for nothing in the world I'd even attempt such thing.

Setting yourself with goals is great and required to some extend but on a
proper schedule. Going to the gym 3 times a week can be achieved without being
complexed by the fact you didn't go there every single day - and yet you can
substantially improve yourself. I don't envy those buffy dudes that stick to
it.

I'll stick to enjoying evenings with my wife, do code maybe 1 or 2 times
during the week days, spend an extra day on more complex issues on the week
end, and rest for the last day. Just saying.

~~~
Karunamon
Mhh, read the article a bit more carefully. Specifically:

 _Minimum viable code. I was forced to write code for no less than 30 minutes
a day._

30 minutes a day? That's not exactly a huge quality of life problem or a work
addiction. That's keeping a useful skill up to par, the same way I'd expect a
good musician to practice every day.

Besides, when you're a serial procrastinator, tactics like these can help you
break out of that rut.

------
chris_va
I just want to caution folks, from experience, that it is easy to miss the
forest for the trees if you are constantly trying to code.

I think the key takeaway here is that sticking to a plan is helpful, and that
a coding heavy plan is a productive one. This is a great post for that.

I would argue that a good plan should include time off for reflection, and to
avoid burning out. I have seen too many engineers burn out because they were
convinced that working constantly was optimal for progress.

~~~
jeresig
Perhaps surprisingly I feel like this process has allowed me to come to these
conclusions even more quickly. If I spend five days in a row working on the
same thing it's a giant red alarm in my mind. "Is this the most important
thing I should be working on? Why did I just spend five days working on it?
Should I move on to something else now?" I'd contrast this with before where
if I only worked on it every weekend my ability to make those realization
would be on the scale of a month, rather than a week - allowing me to adapt
and respond much more easily.

------
LanceH
Zero days are great. Enjoy them without guilt. Don't fear going back to day 1.
Make your decision each day if you're going to enjoy a zero day or get
something done and long streaks can follow.

------
danso
I know for some people, TDD is the kind of friction-causing mechanism that
kills the desire for everyday coding...but I've found it extremely helpful,
even for small personal projects.

On nights when I absolutely cannot write a piece of working code, I scaffold
out the tests. When I wake up the next morning and have 5 minutes with my
coffee, I pass a test. Not much gets done, but by building the habit and
ability to "jump into coding", no matter the time, place, or
circumstance...that's how I've been able to build the coding-zen-mentality
needed to write "real" code when the time comes.

------
Sindrome
Why is it so noble and healthy to be a workaholic if you are a Software
Engineer?

~~~
dinkumthinkum
I think your comment deserves many more replies. It is taken completely
granted that this is the case. I don't think it is good at all but that is the
mindset.

~~~
alphakappa
Writing code every day doesn't necessarily make you a workaholic. Working on
code all day, every day might make you one though.

What John is doing is akin to what an artist would do to hone their skills.
Practice. Every great singer practices often. Every master of a musical
instrument. And for programmers, it's a similar thing - there's no substitute
for writing code.

His approach is to write something meaningful every day, but it shouldn't be
interpreted as 'let the code writing take over your life every day'

------
antonius
"No more zero days" is a good quote to live by. No matter how busy I get, I
try to code _something_ everyday.

~~~
bargl
Link to the original article.
[http://www.reddit.com/r/getdisciplined/comments/1q96b5/i_jus...](http://www.reddit.com/r/getdisciplined/comments/1q96b5/i_just_dont_care_about_myself/cdah4af)

------
beat
On a slightly related note, I'm trying to impose a new behaviorist training on
myself. I've never been one to listen to music when working, although I love
music (as in member of two active bands, produced many albums love music).

So now, I'm trying to do work in album-length increments. Put on the
headphones, pick an album, and work on one task all the way through it. No
breaks, no interruptions. It's kind of a Pomodoro technique variant, a bit
longer and with the headphones involved for extra habit and insulation from
the outside world.

~~~
lazerwalker
That sounds vaguely similar to what John Carmack allegedly used to do:
[http://bookofhook.blogspot.com/2013/03/smart-guy-
productivit...](http://bookofhook.blogspot.com/2013/03/smart-guy-productivity-
pitfalls.html)

~~~
beat
Good article, thanks!

------
darkFunction
Absolutely this. You can also use a tool like Gitstats (if you don't use
Github) to track your progress. A lot of my code is written inside thirty
minutes on the bus and tube on the way to work. Sometimes you might feel like
there's no point even pulling the laptop out of your bag since the time window
is too small- but every time you will surprise yourself with how much you
manage to get done.

The best thing about the 'little and often' approach is how you get drawn into
fixing something big just by starting to fix something small. Getting into The
Zone for hours at a time is great and everything but honestly I'm starting to
view the whole process as just clocking in keystrokes.

My gitstats
([http://notes.darkfunction.com/gitstats/index.html](http://notes.darkfunction.com/gitstats/index.html))
is showing commits on 56 of 85 days. A week of the remainder I was on holiday,
and I tend to rebase quite a lot so actual days committed should be higher.
But in that time I have written over 18,000 lines of code and removed over
6000. Almost a full iPhone application since January in my spare time, now
onto the home stretch and couldn't be more pleased with the results.

~~~
clay_to_n
I agree. Having a 40 minute daily BART commute was really productive for me,
even if it's that short.

------
zachlatta
Great post! A similar approach has been working really well for me. I'm on
target to hit a year of consecutive days of coding this weekend. GitHub:
[https://github.com/zachlatta](https://github.com/zachlatta)

I had a bit lower baseline than the author. My rules are as follows:

1\. Commit something, anything. Even if it's just fixing a typo in a readme or
phrasing some documentation better.

2\. You must commit every day.

3\. Every contribution must be useful.

------
tieTYT
This is a good article. I believe this idea comes from Jerry Seinfeld^1.

Here's an article that really complements the submission:
[http://start.jcolemorrison.com/how-i-fight-
procrastination/](http://start.jcolemorrison.com/how-i-fight-procrastination/)
It's titled "How I fight Procrastination" and gives advice on how to break up
tasks into day-sized activities.

Finally, I want to say I _personally_ disagree with the OP's 2nd point:

    
    
        2. It must be useful code. No tweaking indentation, no code 
        re-formatting, and if at all possible no refactoring. 
        (All these things are permitted, but not as the exclusive work of the day.)
    

I've noticed that when I'm really tired or "not feelin' it" sometimes I just
want to do something that takes 10 minutes so I can keep the chain going. When
I spend a day (ie: 10 minutes) refactoring some code, I don't lose my
motivation to work on my project tomorrow. It's breaking the chain makes me
lose motivation and if I forced myself to write something "useful" on a day I
don't feel like it, I may just end up breaking the chain instead. It's of the
utmost priority to lower the bar to work on your project and rule 2 is an
obstacle to that. Plus, I take mild offense to the idea that refactoring is
not considered useful :)

And, if I had this rule I think I'd avoid refactoring a lot of code that needs
it. I'd spend more effort squeezing that square feature into that round hole
if refactoring "didn't count".

    
    
        ^1: http://lifehacker.com/281626/jerry-seinfelds-productivity-secret

------
redmaverick
This essay[1] made a deep impression on me and I rationalize not working if I
don't have a long chunk of time available to work on my side projects.

[1][http://www.paulgraham.com/makersschedule.html](http://www.paulgraham.com/makersschedule.html)

Will need to change my attitude and get more done. Good piece.

------
moron4hire
I have the opposite problem. I need to code less per day and work on the other
important things in my life.

------
mdoerneman
It's crazy that I found this today...I just started something similar except
instead of coding every day I set a goal of 4 hours per week and I use
Beeminder to track my progress. Many of the benefits you listed are spot on
especially "the feeling of making progress is just as important as making
actual progress." Now that I have children, coding for 8 hours on a Saturday
just doesn't work. To reach my current goal of 4 hours per week, I plan on
coding for 30 minutes in the morning or night where I can but I also have
arranged with my wife one weeknight where I leave the house and go code at a
coffee shop for 2-3 hours.

------
zhemao
While Resig's dedication is admirable, I'd caution against applying his advice
too broadly. He is doing it because he has side projects that he wants to
complete. There's no reason to force yourself to code every day for coding's
sake.

I've been doing a lot of side-project hacking the past three months, as
evidenced by my Github activity graph
([https://github.com/zhemao](https://github.com/zhemao)), which, admittedly,
is not as impressive as Resig's. However, this week, I finished up my latest
side project and found myself at a loss for new ideas. At first, I did feel a
bit guilty about not doing any coding, since it had been a long time since I
had nothing to work on. But then I realized that there's more to productivity
than a nice contribution graph and sometimes it's good to take a step back in
order to think, reflect, and get inspiration.

I'm currently reading through Patterson and Hennessy's "Computer Organization
and Design" to learn more about computer architecture. I'd also like to
practice my saxophone some more, start learning how to draw, help a friend who
is still in college find a job, and expand my social life a bit. My Github
account will still be there when I am ready to get back into it.

------
josephschmoe
Don't focus on the how. You can produce good code by: 1\. Coding every day 2\.
Hackathons 3\. Coding on certain days 4\. However you want.

What matters though, is how -you- work. Are you the sort of person who prefers
to code as much as possible? Code every day. Do you enjoy getting a big thing
done fast? Hackathons are for you. Do you have children, a life or a job? You
might want to code whenever you can instead of trying to force yourself into
something that might not work for you.

------
ethanhunt_
"An interesting side effect of writing side project code every day is that
your current task is frequently running in the back of your mind. Thus when I
go for a walk, or take a shower, or any of the other non-brain-using
activities I participate in, I’m thinking about what I’m going to be coding
later and finding a good way to solve that problem."

Is that not a negative? I find it hard to stop thinking about what I'm working
on, and it negatively impacts my life. I leave the office after 8 hours, but
the next 2 hours are spent turning over problems in my head, and the 2 hours
before I sleep are spent on it too. The days that I work on a problem at the
office for a few hours and can't unblock myself before leaving are hell. My
brain won't turn off until I can get into work the next day and begin on the
problem. Some days I will even wake up in the morning or night with _answers_
to the problem. Why is the AWS instance in my head turned on all night long
when I'm not even getting paid for it?

------
paisible
2 years ago some friends and I started writing one song each per week (and met
every Thursday to listen to our respective _master-pieces_ ). We mostly ended
up composing and recording the songs on iphones the Wednesday night before
(thank god for GarageBand), and after 3-4 weeks were producing more creative
content in this compressed timeframe than we'd had been able to with no
deadline before. A few months in we skipped a Thursday or two, and suggested
the solution was to write one song per month instead. That was definitely not
the solution. We didn't find more time to write, and the lack of schedule
killed the momentum. My biggest regret of the last year is not sticking to it
- however a friend just moved to our city with the condition that we'd get it
started again with the weekly frequency, so I'm optimistic :)

------
rajlal
Great blog post john,

I had this experience when i was working on a book and i had to spend
considerable amount of time every week on one example. The book had 100
examples so it took me two years to complete the book but the experience was
amazingly satisfying because i was able to justify the effort, going slow and
steady.

The other thing i noticed is the increase in quality when you do less but give
more time to think. Keeping the problem in your mind create innovative
solutions. Which is impossible if you want to just hack up everything one
weekend.

My personal favorite is keeping a point system for all the good things you
want to do in your day and add them up for weeks and at the end of the month,
check the total and see where are you lacking behind. What percentage of life
you are actual able to live the way you want. Haven't got to 100% yet but
above 60% i give a pat in the back.

------
patrickford
I recently started the same discipline. I spent a good part of my career
writing code then worked my way up to executive management and stopped. After
several years as Director of this, or VP of that, my skills had eroded. Late
last year I decided to take a sabbatical and get back into the game by
applying to Hack Reactor in SF. It was an intense period of two months of pre-
course work (18 Code School classes and a bunch of coding assignments),
followed by three months of intense work on site where we went 11+ hours a day
for 6 days a week. One of the disciplines there is to work on a short “toy
problem” every morning for 30-60 minutes. Although I finished the program
recently I am keeping up that practice as well as working on my real project,
a new startup for social video. I’ll never stop coding again!

------
gbhn
I'm curious if 30 minutes is the lower bound on meaningful project time if the
constraint of writing code is lifted. I've been thinking about what kinds of
projects could be decomposed into 20 minute work units, allowing some work
units to basically be all thinking (design, specs, figuring out how to split
up a problem, etc.) and others to be more coding.

I'm suspicious that there are many projects that could be decomposed like
this, or even into 10 minute blocks, but that it'd be really helpful to have
tools that makes this more achievable -- ones that basically remind you of
where you were and help with the what-do-I-do-next decision.

Does anyone have any experience with this kind of development process?

~~~
underscore_user
I’ve been finding mind maps extremely helpful for doing exactly what you
describe: working in small chunks through the process of approaching a high-
level problem. (I currently use FreeMind for this, but I want to find
something that works better on my laptop and/or would let me edit maps on my
phone as well.)

I use mind maps like an endlessly hierarchical to-do list. Every high-level
task I want to accomplish is a node, and whenever I start to think about the
approach to one, I make child nodes for the broad strokes of that approach. So
long as I’m actually interested in completing the project, I can continue to
break each step down in this way until I get down to a level where it’s easier
for me to just start writing code. (This level varies largely, depending on my
mental state at the time.)

If I stop at any point I have all the thoughts that came to me, written down
in exactly the places they’ll be useful. I can go as deep as I want into
breaking down any particular step, knowing that those thoughts will be
available later. And it’s much easier for me to spot problems and reconsider
my approach when my plans are all laid out hierarchically in front of me.

I might sound overexcited about this because I hadn’t figured out how to use
any external tools to help me think about my projects before I was recently
introduced to mind maps, and they immediately had a huge impact on my ability
to think about my projects without getting bogged down. So if you already have
tools that give you similar benefits, take all this with some salt or
whatever.

Anyway, I’ve lately been working mostly on weekends and finding myself with
similar issues as the blog post describes, so I’m planning to start trying to
do a little bit every day instead, starting today. I think I will be content
if the little bit I do on some days is breaking down some tasks I haven’t yet
thought through in my mind maps, even if I don’t write any actual code.

------
jhtan
I'm actually testing this strategy for competitive programming. Was very
difficult to train for the ACM-ICPC when I was working as developer, but now
that I only study in the University I solve at least a problem a day for
maintain my streak in my Github in these are the results in some online judges
for competitive competitions:
[http://community.topcoder.com/tc?module=MemberProfile&cr=227...](http://community.topcoder.com/tc?module=MemberProfile&cr=22778322)
[http://codeforces.com/profile/jhtan](http://codeforces.com/profile/jhtan) It
works!..

------
karangoeluw
Inspirational post.

Last year, I [1] set a goal to teach myself git by committing at least once
every day for a month. At the end of this, I saw the streak, and was too
afraid to see it go down to 1 in a snap. Ever since, I've been committing code
daily, and it's been about 40 weeks, and I'm still going strong. Being a full
time student, this wasn't really easy for me, but I'm proud of myself.

The one thing I learned is, that the problem isn't the lack of ideas or time,
but the lack of motivation to work on them.

[1] [https://github.com/karan](https://github.com/karan)

~~~
MarkTee
Being fairly new to programming, I usually have a hard time coming up with
realistic/manageable ideas that can be completed in a reasonable timeframe.

Your huge list of projects has been a huge help in that regard, so thanks!

------
endlessvoid94
Related: for the first time in my 15-year programming career, I've spent the
past year or so doing more engineering management than actual coding, and it
has noticeably improved my programming ability.

------
coolsunglasses
This doesn't improve you much unless you're really new or skilled at
challenging at yourself and finding new things to learn.

If the latter is true, do you really need advice?

Said differently: flow is the opiate of the masses.

~~~
jeresig
Not everything has to be a life-improving challenge - sometimes you just want
to ship some code!

~~~
weavie
I would say shipping is definitely life improving. Shipping is where you
expose your work to the public and open it up to feedback and criticism. You
can learn a lot more from direct feedback than you can learn from a general
book.

I have far too many books and half finished projects that will never get
finished. I have forgotten most of the stuff I learned from them.

------
Bahamut
I don't write code every day, but that is largely due to my military
obligations as a reservist. Other than that, I often work on various side-
projects and/or help others with their coding woes as a way to learn & help
keep sharp. I'm disciplined enough to learn what I need to on my own time
whenever I want.

Sometimes I burn out, and in those instances I take my free time away from
programming.

The most important take away is to figure out how you want to improve
yourself, instill passion in doing so, then executing.

------
nicholassmith
I love coding, but the idea of doing it every day would make me hate it so
quickly. I love learning new technologies when I want too, or fiddling with a
concept, but I want it to be because I want to do it and not because I feel
obligated too. I've put myself in that situation before and all it did was bum
me out and push me close to a burnout situation, it works for some people sure
but people should be doing things because they enjoy it.

Don't write code every day, do something you _want to_ everyday.

------
Fenicio
Very inspiring, but take into account that John (most likely) lives in a good
enviroment to proceed with this, his job is intellectually demanding but he is
not overworked or extramulti-tasked.

If your job leaves you depleted, and when you arrive home you're like a husk
of a human being you can't expect to do something like this.

Take into account that great developers like John live in a place where they
can grow, you can't copy what they do and expect to have the same great
results in a not so great environment.

------
jsutton
The pitfalls of context switching is mentioned often in this article. I have a
"problem" where I'll work heavily on a side project for a few days, before
getting bored and wanting to move onto another project. The result is that I
have many unfinished side projects.

Is it better to focus on one project until completion, even if you aren't as
into it anymore? What do other HNers do regarding multiple on-going side
projects?

------
chewxy
As much as I like this idea, I do wish John talked more about HOW he did it.
"No More Zero Days" is a good thing as a target, but it's often unachievable.

For me at least, the context switch required between what pg calls the
manager's schedule and maker's schedule is so huge that it takes hours to
cross that gulf (that's what I'm mostly switching between anyway)

Do you just sit down and force yourself to hammer out code?

------
slowblood
I've made it a point to NOT check things in on Sundays. I break my own rule. I
get the OCD gimmick to get yourself motivated but ...

I flies against of my philosophy of coding. Less is more, quality over lines
of code. Not coding for coding sake. And coding on paper and writing out data
structures and algorithms.

Hey, if a whole bunch connected green dots gives you a feeling of
accomplishment. Enjoy!

------
mburst
I totally agree with this. About a month ago I created a site that puts up a
new programming or logic puzzle every day Monday-Friday. The exercises usually
take no more than 30min and the community has been steadily growing. If you're
interested you can check it out at
[http://problemotd.com/](http://problemotd.com/)

~~~
jschulenklopper
Something similar can be found at Project Euler,
[http://projecteuler.net/](http://projecteuler.net/) or at Codewars,
[http://www.codewars.com/](http://www.codewars.com/), although those have a
stricter format than your examples. For example, the challenges at Project
Euler all have a single number as answer. Some problems can thus be solved via
mathematics, but for most a program -- you may pick the language -- is most
efficient.

------
ScottyE
Jeff Haden refers to this mindset as a systems-oriented mindset as opposed to
a goals-oriented mindset. He's written a great article about it here:
[http://www.inc.com/jeff-haden/an-nearly-foolproof-way-to-
ach...](http://www.inc.com/jeff-haden/an-nearly-foolproof-way-to-achieve-
every-goal-you-set-wed.html)

------
thewarrior
I decided I would write a short story everyday. Ended up forcing myself to
write random gibberish for a few days before i gave up.

------
midas007
I find my daily intelligence is highest in the early morning 6:30 am but
productivity peaks at about 9:30 am.

Anything in the afternoon is a steady decline and by evening I should just do
something that doesn't involve sitting in front of the glowing box. Trying to
push yourself too hard results in overall productivity loss.

------
kf5jak
I've read multiple articles on people doing this. Practice is the best way to
learn. Admittedly, I've tried and failed on this before. I love seeing people
succeed and become better at their practice using this method. It can only
serve as inspiration for others. Thanks and congrats!

------
legierski
This reminds me my 'Half hour' productivity hack that I've been testing last
year: [http://blog.self.li/post/34104114881/4-weeks-into-half-
hour-...](http://blog.self.li/post/34104114881/4-weeks-into-half-hour-
productivity-hack)

------
Cthulhu_
I'm guessing this doesn't apply to the average developer; after all, we write
code for a living. I sure do. I don't usually do any coding when not on the
clock, after all, I've already done 8ish hours of work by then (and if I'm
lucky, most of it spent coding).

------
ElHacker
I really like this approach. I'll do my best to write meaningful code every
day to my side projects.

------
da02
I tried to do this, but in the end I ended up getting a job at a fast food
place (part time). It uses different parts of my brain (as opposed to
freelancing), and forces me to stick to the schedule. I can't exactly explain
it, but it really gave me a BIG productivity boost.

------
prezjordan
I tried this a few months ago and failed miserably:
[https://medium.com/lessons-learned/ab219377be93](https://medium.com/lessons-
learned/ab219377be93)

Really enjoyed your post, though. I think I might give it another shot from a
different perspective.

~~~
aiaf
Your link redirects to a login page?

~~~
prezjordan
Can't seem to reproduce that - it's just a Medium article. Could have
something to do with Heartbleed if you've logged in before.

------
az0xff
Does working toward your side projects without necessarily writing code count?
There are some days where I devote myself to figuring out something on my
system that's essential for my side project, and those days I don't
necessarily write any code.

------
cbp
It's best if you actually just _read_ code everyday and the writing is just
the side effect of tinkering with it. Like chess you will save a lot of time
by learning from other people's games before you actually do something on your
own.

------
lukasm
This is exactly my approach on my side project, but rather than "write code
every day" I say "make some progress every day". Simply because it's not a
Open Source framework, but a wannabe product.

------
vayarajesh
I am totally facing the same issue which you faced about working only during
weekends. Your idea of working everyday seems nice i will try giving it a go
:)

Nice post!

~~~
vayarajesh
And also Congratulations! :)

------
cnaut
Doing this helped me start my startup while working full time and eventually
feel confident enough to quit my job and work full time on my startup

------
beat
I really needed to read this, today. Thank you.

------
osetinsky
How long do you spend every day on your side coding? Do you try to set a
minimum/maximum amount of time?

------
ribs
"I realized that the feeling of making progress is just as important as making
actual progress."

Yeah...no.

------
drderidder
That post was awesome... slow and steady wins the race. Inspiring!

------
Thiz
Hey John, just quit KA.

Life is too short to waste it in things you don't love. Remember jQuery
brought you fame, not because you were chasing fame itself but because your
love for jQuery and programming.

Love for what you do comes first, money is just a secondary effect.

~~~
jeresig
Haha ehhh I think you're reading into this a bit too much. It is possible to
love more than one thing - I love helping educate people and doing it at a
scale that Khan Academy can provide. I also love building reusable JavaScript
libraries. I also love building tools for Art Historians. They all shouldn't
be to the exclusion of each other and, in fact, there's often overlap. Part of
the fun in life is embracing that and trying to make the most of it!

------
jes5199
Is your side project really this important to you? It's your source of
identity and self-worth?

I say: take three months off from even touching a text editor and practice
guitar every day.

I think my system leads to happier, healthier human beings.

~~~
elbear
I think your system leads to a happier, healthier you, since you're doing what
_you_ like. I don't know about John, but I'd code every day, because I
actually enjoy coding. I have the feeling it applies to him as well.

It's the same with writers who write every day, no matter how little, to get
into the rhythm and to constantly improve.

Also, doing something every day, doesn't imply neglecting other parts of your
life. It just means constantly giving to something you care about.

------
shanwang
thank you, this is the best advice about side projects i have ever read, I'm
going to practice this from today!

------
finalight
there's a saying; practise makes perfect

it applies not only to coding, but also to other areas

------
dstavis
Hey THIS IS AWESOME!

------
weishigoname
it sounds great, I like to try.

------
Avishai_Bitton
If you don't use it, you lose it...

------
mildtrepidation
ABC.

Always be coding.

Always.

Be.

Coding.

------
chris_mahan
The best code is no code.

------
pipukamal
Highlanders vs Bulls Live Super 15 Game Free Streaming xv rugby Online
[http://storify.com/superrugbyoz/higvbulnzt](http://storify.com/superrugbyoz/higvbulnzt)

