Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created December 18, 2008 22:54

Revisions

  1. jbarnette revised this gist Jan 7, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ consequences.

    ## Be Lazy

    If it's happened more than twice, don't ever do it by hand again.
    Write tools. If it's happened more than twice, don't ever do it by hand again.

    ## Be Asynchronous

  2. jbarnette revised this gist Jan 7, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ simplicity takes a bit longer, but it'll pay off.

    ## Be Consistent

    Inconsistent file names, task names, or coding styles hurt productivity.
    Inconsistent file names, task names, and coding styles hurt productivity.

    ## Be Timely (but not too timely)

  3. jbarnette revised this gist Jan 7, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ simplicity takes a bit longer, but it'll pay off.

    ## Be Consistent

    Inconsistent file names, task names, or coding conventions hurt productivity.
    Inconsistent file names, task names, or coding styles hurt productivity.

    ## Be Timely (but not too timely)

  4. jbarnette revised this gist Dec 22, 2008. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,9 @@ If it's happened more than twice, don't ever do it by hand again.

    ## Be Asynchronous

    If it can be done outside the request/response cycle, defer it.
    Mailers, uploads, audit trails.
    If it can be done outside the request/response cycle, consider queuing it.
    Mailers, uploads, audit trails, anything with an external system dependency
    or a lot of IO.

    ## Be Stateful

  5. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Lessons Learned
    # Note to Self

    ## Be Confident

  6. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,6 @@ Find the root cause. Keep asking **why**, even when you're tired and under
    the gun. The guesswork patch you write today will be a nightmare tomorrow.

    ## Be Wrong

    Dogma is for theorists. If it's not working, change it, no matter how long
    If it's not working, change it, no matter how long
    it took to write. Don't throw good money after bad. Admit mistakes early
    and often.
  7. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ If it's happened more than twice, don't ever do it by hand again.

    ## Be Asynchronous

    If it can possibly be done outside the request/response cycle, defer it.
    If it can be done outside the request/response cycle, defer it.
    Mailers, uploads, audit trails.

    ## Be Stateful
  8. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Hard Lessons
    # Lessons Learned

    ## Be Confident

  9. jbarnette revised this gist Dec 19, 2008. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Hard Lessons

    ## Be Confident

    Tests build confidence. Write 'em. They'll save your ass, and they'll
  10. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ If there's a lifecycle, model it as a real state machine. Beware ad hoc flags.
    ## Be Clear

    You'll write it once, but you'll read it a lot. Code accordingly. Sometimes
    simplicity takes a bit longer, but it'll pay off rapidly.
    simplicity takes a bit longer, but it'll pay off.

    ## Be Consistent

  11. jbarnette revised this gist Dec 19, 2008. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ Mailers, uploads, audit trails.

    If there's a lifecycle, model it as a real state machine. Beware ad hoc flags.

    ## Be Simple
    ## Be Clear

    You'll write it once, but you'll read it a lot. Code accordingly. Sometimes
    simplicity takes a bit longer, but it'll pay off rapidly.
    @@ -40,3 +40,9 @@ Is that code really faster? Do users really want that feature?

    Find the root cause. Keep asking **why**, even when you're tired and under
    the gun. The guesswork patch you write today will be a nightmare tomorrow.

    ## Be Wrong

    Dogma is for theorists. If it's not working, change it, no matter how long
    it took to write. Don't throw good money after bad. Admit mistakes early
    and often.
  12. jbarnette revised this gist Dec 19, 2008. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion think.markdown
    Original file line number Diff line number Diff line change
    @@ -39,4 +39,4 @@ Is that code really faster? Do users really want that feature?
    ## Be Persistent

    Find the root cause. Keep asking **why**, even when you're tired and under
    the gun. The temporary patch you write today can be a nightmare tomorrow.
    the gun. The guesswork patch you write today will be a nightmare tomorrow.
  13. jbarnette revised this gist Dec 19, 2008. 1 changed file with 17 additions and 5 deletions.
    22 changes: 17 additions & 5 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,14 @@
    ## Test It
    ## Be Confident

    Write tests. They'll save your ass.
    Tests build confidence. Write 'em. They'll save your ass, and they'll
    let you take a chainsaw to your code without being afraid of unintended
    consequences.

    ## Automate It
    ## Be Lazy

    If it's happened more than twice, don't ever do it by hand again.

    ## Queue It
    ## Be Asynchronous

    If it can possibly be done outside the request/response cycle, defer it.
    Mailers, uploads, audit trails.
    @@ -22,9 +24,19 @@ simplicity takes a bit longer, but it'll pay off rapidly.

    ## Be Consistent

    Inconsistent file names, task names, or code hurts productivity.
    Inconsistent file names, task names, or coding conventions hurt productivity.

    ## Be Timely (but not too timely)

    Keep frameworks, plugins, libraries, and tools up-to-date, but think twice
    before using a production app to play with the bleeding edge.

    ## Be Certain

    Don't speculate, get data. Act on what you know, not what you suspect.
    Is that code really faster? Do users really want that feature?

    ## Be Persistent

    Find the root cause. Keep asking **why**, even when you're tired and under
    the gun. The temporary patch you write today can be a nightmare tomorrow.
  14. jbarnette revised this gist Dec 18, 2008. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -1,30 +1,30 @@
    # Test It
    ## Test It

    Write tests. They'll save your ass.

    # Automate It
    ## Automate It

    If it's happened more than twice, don't ever do it by hand again.

    # Queue It
    ## Queue It

    If it can possibly be done outside the request/response cycle, defer it.
    Mailers, uploads, audit trails.

    # Be Stateful
    ## Be Stateful

    If there's a lifecycle, model it as a real state machine. Beware ad hoc flags.

    # Be Simple
    ## Be Simple

    You'll write it once, but you'll read it a lot. Code accordingly. Sometimes
    simplicity takes a bit longer, but it'll pay off rapidly.

    # Be Consistent
    ## Be Consistent

    Inconsistent file names, task names, or code hurts productivity.

    # Be Timely (but not too timely)
    ## Be Timely (but not too timely)

    Keep frameworks, plugins, libraries, and tools up-to-date, but think twice
    before using a production app to play with the bleeding edge.
  15. jbarnette created this gist Dec 18, 2008.
    30 changes: 30 additions & 0 deletions think.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # Test It

    Write tests. They'll save your ass.

    # Automate It

    If it's happened more than twice, don't ever do it by hand again.

    # Queue It

    If it can possibly be done outside the request/response cycle, defer it.
    Mailers, uploads, audit trails.

    # Be Stateful

    If there's a lifecycle, model it as a real state machine. Beware ad hoc flags.

    # Be Simple

    You'll write it once, but you'll read it a lot. Code accordingly. Sometimes
    simplicity takes a bit longer, but it'll pay off rapidly.

    # Be Consistent

    Inconsistent file names, task names, or code hurts productivity.

    # Be Timely (but not too timely)

    Keep frameworks, plugins, libraries, and tools up-to-date, but think twice
    before using a production app to play with the bleeding edge.