Live data from Hacker News

Write Code Every Day

ejohn.org

101–110 of 221 posts

Re: Write Code Every Day

#101

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 t…

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

Re: Write Code Every Day

#102

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…

Very good discipline in the article, and very good discipline in your plan too. If you don't mind me asking - what's the point in writing a book about an area that you used to work in, but didn't want to going forward? (I assume you moved out of gaming if the domain was fading)

I'm not keen on working in games professionally right now (though I wouldn't rule it out forever), but I'm still quite into game programming. I don't spend much time doing it these days though, since most of my limited free time lately is either on writing or programming languages.

But I'm still really passionate about the subject material (games and software architecture) and I think the book could be written, and I could write it. I also just really want to finish something for once in my life. Getting email from people asking me to keep working on it for two years didn't hurt either. :)

One little secret about the book is that it's not actually game-specific at all. Almost all of the patterns in it are equally useful in non-game software, but I think games are a much more interesting motivating example than yet another accounting application with EmployeeRecords and PaymentAccountTypes.

Re: Write Code Every Day

#103

Earlier quoted context omitted.

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.

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 "suck…

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.

Re: Write Code Every Day

#104
post #24

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 Pomo…

If only I could find an entire album that I actually enjoy...

Well, what kind of music do you like? Good albums, as opposed to just a bunch of songs strung together, are kind of a special thing.

Might I suggest a Nick Drake album? He only made three (although there are technically more), and all of them have excellent full-album flow. It's folky and acoustic, so not to everyone's taste, but it's beautiful stuff. Alternately, a classic Pink Floyd album? Those are also very this-is-a-complete-album.

Re: Write Code Every Day

#105
post #98

Earlier quoted context omitted.

[HabitRPG]( http://habitrpg.com ) is totally awesome for this, a great motivator. You can setup "Dailies" so that when you're done writing your daily 500 words, you just check it off. Or set it up as a habit and give yourself a "+" whenever you get a new chapter done. I use it all the time for just these purposes.

This is brilliant. Thanks! Are there any other similar apps out there?

Depends what you're looking for exactly - I use http://www.joesgoals.com/ to track multiple goals, which is a more complex variant on http://dontbreakthechain.com/.

Re: Write Code Every Day

#106
post #96
post #37

Earlier quoted context omitted.

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/ ) 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.

Another way to structure the chain is a chain of unbroken weeks, instead of days, especially for actions that stand a pretty good chance of being derailed by life. Like going to the gym. Mark a week as "checked off" if you hit the gym for at least 3 of the 7 days. That way you've got several "buffer days" to act as a cushion.

This is the sort of thing Beeminder effectively automates.

Re: Write Code Every Day

#107
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.

Re: Write Code Every Day

#108
post #33

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 d…

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.

I can appreciate that perspective, and there must be value in your approach if the quality & amount of code you produce is any indication. (As an aside, I really enjoyed Secrets of the JavaScript Ninja; that book changed the way I think about JS.)

Re: Write Code Every Day

#109
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.

Re: Write Code Every Day

#110

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…

Hey I'd just like to tell you that your site is an awesome resource and was useful to me as a student when I was talking my OO design courses. As someone with a gamedev hobby background your site made learning about patterns much easier for me. I will be sure to buy the book when it comes out. Thanks for putting in the hard work and making it available.
Post reply on HN