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

Idea to launch in days - executed Python-style

Idea to launch in days - executed Python-style

Talk given on Thursday October 3rd 2013 at PyconZA in Cape Town

70a03732569cbb2f477831558f79f1ee?s=128

Mike Jones

October 03, 2013
Tweet

Transcript

  1. to launch idea in days Mike Jones / / @imsickofmaps

  2. Western Cape Labs ~ [ ] Smart apps for dumb

    phones Smart sites for busy people
  3. WARNING: THIS IS *MY* WAY

  4. ideas service data BUILD MEASURE LEARN

  5. ideas service data BUILD MEASURE LEARN LEARN focus } mention

    }
  6. Do you have empathy? Your opinion [though interesting] is irrelevant

  7. SO THAT <VALUE> AS A <PERSONA> I CAN <DO SOMETHING>

  8. Configure locally $ git flow init Create a issue on

    github (e.g. Start blog application) linked to user story. Start the feature $ git flow feature start issue-1-start-blog-application Code like your life depends on it $ git flow feature publish issue-1-start-blog-application Convert to a pull request $ git pull-request -i 1 -b develop Send someone the pull-request link or @mention them Once its got a +1 from the reviewer(s) and tests are passing $ git flow feature finish issue-1-start-blog-application $ git push use git flow
  9. starting over! STOP STOP reinventing! STOP being distracted! just for

    now... please!
  10. we chose Flask and Bootstrap USE FRAMEWORKS PICK A DATASTORE

    we chose Riak, Spreedly and Xero MAKE DEPLOYMENT EASY we chose Fabric and chef-solo REUSE CODE we built on top of On The Way
  11. we chose Flask and Bootstrap USE FRAMEWORKS PICK A DATASTORE

    we chose Riak, Spreedly and Xero MAKE DEPLOYMENT EASY we chose Fabric and chef-solo REUSE CODE we built on top of OnTheWay your choices may differ!
  12. 1 file apps are nice but make a skeleton FLASK

    TIPS: #1 static <-- for css, js, img etc. (serve via nginx) templates <-- for jinja templates __init__.py <-- makes module (easy to serve) app.py <-- declare the Flask app in here config.py <-- use config objects for dev and prod main.py <-- include everything via this (no circular deps) shareddefs.py <-- place we put login_req decorators etc. sharedforms.py <-- central place for WTForms <route_name>.py <-- one per application function
  13. Use jinja + WTForms + bootstrap templates FLASK TIPS: #2

  14. Use decorators FLASK TIPS: #3

  15. Less + Bootstrap + Google Fonts = Pretty compiles variables,

    plus your less file into a single css lessc source.less output.css ask someone with taste to pick one! google.com/fonts update font, set colour palette tweak variables.less
  16. creates folders, rsync’s chef recipes, run chef, creates virtualenv, pip

    installs fab <env> bootstrap rsync’s code, restarts services fab <env> deploy
  17. live! make it

  18. Thanks. mike@westerncapelabs.com @imsickofmaps http:/ /otw.io/pyconzatalk