Throw away code after 4pm

I very rarely keep any code I write after 4pm.

Code I write after 4pm tends to be:

  • of low quality
  • riddled with mistakes
  • and generally more trouble than it’s worth

I am a morning person, and I often start working at 6:30 – 7:00am.
By 4pm, my brain just doesn’t click like it does first thing in the morning.

I’m not saying there is anything magical about 4pm. 4pm just happens to be the point where my quality of work plummets and I tend to reserve that time for non brain intensive activities (like meetings).

Find your expiry date for the day, and listen to your gut.

If you feel like you are writing bad code, you probably are.

Don’t be afraid to let it go and start again with a clean slate tomorrow.



5 Responses to “Throw away code after 4pm”

  1. Stacy Says:

    This sound like a good rule, I have another: If ever I’m feeling like reverting would be painful I steel myself to revert or commit within 5 minutes.

  2. JR Says:

    I agree Stacy. I don’t think many people revert or toss code half as much as they should.

    Sometimes it’s easier just to clear the slate and start again.

    Thx for sharing.

  3. Tony R Says:

    Your post came up on a search for: “throw away code”.

    I like your idea! I also noticed that a lot of my code created on Friday is never as brilliant come Monday morning!

  4. JR Says:

    Amen to Monday mornings over Friday afternoons!

  5. Try twice « The Agile Warrior Says:

    […] am still a big believer in throwing away code after 4pm (or whatever time of day you stop being […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: