Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Coding with an Organized Mind

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Coding with an Organized Mind

Avatar for Jason Swett

Jason Swett

May 01, 2019
Tweet

Other Decks in Technology

Transcript

  1. Overview • The consequences of coding with a disorganized mind,

    benefits of coding with an organized mind • Defining your work: how to break a project into small, discrete tasks • Setting up your work: using a to-do list • Carrying out your work: working tidily
  2. Defining the work: how to break a project into small,

    discrete tasks • Breaking a project into user stories • Breaking user stories into tasks
  3. Usability testing • Leaves design defects no place to hide,

    leaving behind only logically consistent designs • Removes fuel for bikeshedding
  4. Example usability testing scenarios • “Winston Yapplezapple calls to schedule

    an appointment for 2:00pm on Monday. Add the appointment to the calendar.” • “Winston Yapplezapple calls back later to reschedule the appointment for 3:00pm. Reschedule the appointment.”
  5. Attributes of a good story • Clear, descriptive title (“Ability

    to schedule appointment”) • It’s obvious what it means for the story to be complete • Not more than a few days’ work
  6. Purpose of the to-do list: to always know, with zero

    ambiguity, the answer to 
 “What EXACTLY am I trying to accomplish right now?”
  7. Goal example, coarsest grain to finest, least tractable to most

    tractable • Get appointment system working • Add ability to schedule an appointment • Add ability to add a patient to an appointment • Get a patient field to show up in the appointment form
  8. Example draft to-do list Personal
 - Work on RailsConf talk


    - Van oil change
 - Order spatulas on Amazon Work
 - Ability to save appointment
 - Ability to cancel existing appointment
  9. Modified to-do list (“expansion” technique) Personal
 - Work on RailsConf

    talk
 - Van oil change
 - Order spatulas on Amazon Work
 - Ability to save appointment
 - - Test for saving appointment (valid case)
 - - Test for saving appointment (invalid case)
 - - Test for saving appointment (schedule conflict)
 - Ability to cancel existing appointment
  10. Carrying out the work: working tidily • Focused work sessions

    • Atomic commits • Small, short-lived branches • Small, frequent deployments
  11. Focused work sessions • Close email • Close Slack •

    Don’t allow Twitter/FB/etc. notifications on your phone or computer (and preferably just delete the apps from your phone) • Clearly state your current goal and related tasks, using nested levels of granularity
  12. Atomic commits • Each commit should be just one unit

    of work • I tend to commit every 5-15 minutes • Commits allow you to periodically clear your mind • Atomic commits make rollback/troubleshooting easier
  13. Small, short-lived branches • Branches that live longer than a

    few days are risky (divergence) • The more branches you have, the longer they live, and the bigger they are, the more overhead and confusion they cost • When working on large features, favor feature flags over long-living branches • git-flow is horrible
  14. Takeaways • Iron out project design flaws using usability testing,

    and make sure every story is crisply defined • Write down everything you’re going to do, and always be able to answer “What am I trying to accomplish right now?” • Work in small units, using atomic commits, frequent integrations and frequent deployments
  15. Keep in touch • codewithjason.com • [email protected] • I help

    Rails teams implement these and other practices