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.
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…
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
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
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
Introduces notion that package might exist for features you want to build. Chose bugs that involve 3rd party packages http://www.djangopackages.com/ @jewelia
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
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
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
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
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.
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