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

DjangoCon 2012 Talk

Avatar for Julia Grace Julia Grace
September 05, 2012

DjangoCon 2012 Talk

Where the Tutorials End & the Wild West Begins: How to bring new developers up to speed on Python and Django

Avatar for Julia Grace

Julia Grace

September 05, 2012
Tweet

More Decks by Julia Grace

Other Decks in Programming

Transcript

  1. – “…Experience is fungible with time. That's rarely the case

    with culture fit or passion.” http://www.hackruiter.com/advice @jewelia
  2. – We did what we had to in order to

    launch fast. @jewelia ™  Remember: many startups/ideas stay in beta or are just “un-launched side projects” for years. ™  Tracy iterated fast & quickly launched the first version of our 5 directories (she did this all as a designer who learned Python and Django to accomplish this !!) ™  It was(is) my job to ensure our infrastructure allows us to keep growing at such tremendous rate.
  3. – ™ We could launch new directories very fast by copying

    old directories and creating new CSS templates, changing names. ™ When you’re launching your MVP (minimum value product), you must “move fast, break things”! @jewelia | [email protected] This was good because…
  4. – ™ Significant code repetition ™ Inconsistencies in error handling and other

    functionality made debugging painful ™ 5 different Django Admin UIs ™ 5 Posgres DBs to query and join data across ™ Positive business growth meant making the fragmentation problem worse. This was bad because… @jewelia
  5. – Step 1: Django Tutorial* @jewelia https://docs.djangoproject.com/en/dev/intro/tutorial01/ https://docs.djangoproject.com/en/1.4/intro/tutorial01/ version There

    are also videos: http://gettingstartedwithdjango.com/resources/gigantuan.html *At the time http://gettingstartedwithdjango.com/ didn’t exist
  6. – The best way to learn is to write production

    quality code that someone other than you can consume. @jewelia
  7. – Step 2B: Fix a bug @jewelia ™  Be upfront

    about your team’s debugging best practices. ™  Devs may know how to debug other languages and environments, but not necessarily Python/ Django. ™ Django debug toolbar has saved me N times when I need to see SQL Django is executing: https://github.com/django-debug-toolbar/ django-debug-toolbar
  8. – ™ Introduces notion that package might exist for features you

    want to build. Chose bugs that involve 3rd party packages http://www.djangopackages.com/ @jewelia
  9. – ™  I chose single sign-on with Etsy (http://www.etsy.com/developers) ™ 

    A lot of fun moving parts: –  OAuth2 –  3rd Party API –  Parsing Data –  Needed good error handling Step 3: Build a Feature @jewelia
  10. – Step 3A: Build a Feature…as a project? ™  Best

    way to prevent “Django magic syndrome” ™  Votizen does this in their interview process: https://github.com/votizen/careers/blob/ master/RemoteCodingProblem.rst @jewelia
  11. – Learning Django != Learning Python Python Amount of Python

    I learned & understood while learning Django @jewelia
  12. – ™  Download IPython to practice writing Python: http://ipython.org/ ™ 

    Saved PDF version of Think Python for quick searching: http://www.greenteapress.com/thinkpython ™  Printed out this cheat sheet & hung it over my desk: http://hairysun.com/downloads/ BegPythonHandout.pdf Step 4: Learn a Little Python @jewelia
  13. – Step 5: Build Something that Breaks Something Else django-hosts

    + + django + DB routing 1 Django Project 5 Postgres DBs 5 Django Applications ™ …or build something that breaks almost everything else.
  14. – ™  All 5 Django applications used: –  auth-user – 

    taggit –  django-comments –  admin (*this actually worked great!) …but I had 5 different auth-user, taggit, django-comments tables in 5 different DBs. Why the Fail @jewelia
  15. – Rise from the FAIL ashes django-hosts + + 1

    Postgres DB 1 Django Project 1 Django Application @jewelia ™  There is a time and place when code must be completely rewritten…into something simpler.
  16. – ™ That is a whole other talk. ™ Solution: python script

    + SQLAlchemy + namespaced all the data ™ …but come up with tests beforehand to check the migration was successful! ™ Tests could be as simple as just counting to ensure *all* the data migrated. Data Migration @jewelia