Live data from Hacker News

Write Code Every Day

ejohn.org

201–210 of 221 posts

Re: Write Code Every Day

#201

Earlier quoted context omitted.

Did you work on Madden at EA (since you mention it in the intro)? If so I'd love to read more about the architecture of that. I've always wondered how offensive/defensive line interaction and AI worked -- among a million other things. And the book looks good!

> Did you work on Madden at EA (since you mention it in the intro)? I did, though I didn't really touch gameplay. I was a UI programmer on Madden PC 2002 (Oh God that's over a decade ago now, what happened to time?) and I worked on the first version of Madden for the X360 doing mostly animation and tool pipeline stuff. I'm not the best person to ask about it, but the part that blows my mind is that the "AI" for the g…

Fascinating. I personally would love to see more written about Madden, if you were so inclined.

That is probably the code I'd pay the most money to get a walkthrough of.

Re: Write Code Every Day

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

Re: Write Code Every Day

#204

Earlier quoted context omitted.

Thank you! I'll take a look at this when I start digging into the mechanics of the conversion.

No problem. One quick thing I learned: pandoc is sooooooo much better for this than anything else. I was originally using Calibre to generate stuff, and their epubs don't follow the spec, and so don't work correctly in some readers. I was _this close_ to writing a Ruby script that would unzip, s/foo//g, rezip it back up, before I found pandoc.

That's good to know. Calibre was on my list too.

Re: Write Code Every Day

#205

Earlier quoted context omitted.

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.

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"

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

Re: Write Code Every Day

#206
post #188

Earlier quoted context omitted.

> Are you still in the game dev field? No, I left EA about four years ago. I was hoping to stay in the game industry but somehow snuck into Google instead. I'm working on Dart now and couldn't be happier. > Oh, are you the one whom Herb Sutter used his benchmark in the Build conference talk about C++ a few days ago? Yup!

Interesting, how did you end up in Dart team? I mean that "famous" Google-way of randomly assigning employees to projects. And is there any way to apply directly to Dart (or any other) team?

> Interesting, how did you end up in Dart team?

My starter project at Google was working on front-end UI code for what eventually became Hangouts in G+. Lots of JS in a very large JavaScript application.

I really like UI stuff (that's what a lot of my background is in), but I wasn't at all interested in the domain (videoconferencing) and trying to do an app-like user experience in the browser is not something I would wish on my enemies.

Through total random chance (we took a one-off improv class at work together) I met someone who was spinning up a small team working on tech to try to push the web forward. This was right around the birth of my second kid, so I got my manager to agree to let me switch teams when I came back from paternity leave.

I worked on that for a short while before the project ended up getting reshaped. My little team then basically spent a week or two interviewing teams at Google to see where we'd go. It was awesome: we literally had teams coming to us pitching themselves.

Since I love programming languages and open source, the Dart team (which was still in it's very early days) was a great fit.

Re: Write Code Every Day

#207

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…

I've been looking for a resource like this for awhile! Thanks for posting.

Re: Write Code Every Day

#208
post #113
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.

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…

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

Re: Write Code Every Day

#209
post #154

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

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.

Re: Write Code Every Day

#210

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

Can't speak for the OP. In my case "code every day" is meaningful because I have a lot of responsibilities outside of writing code. It's good to have a reminder to always get in a bit of coding time at least.

That doesn't make me a workaholic. I'll still stick to ~8h days. It just means I'm not completely forgetting about the coding side for a couple of days and then feeling super-guilty there's no commit for a week.

(Obviously, Sat/Sun are exempt from "code every day".)

Post reply on HN