Keynotes¶
First Keynote: On the Revolutions¶
- by Brandon Rhodes
Topic: Nichola Kopernik¶
- Polish Astronomer
- Lifted the Earth into the heavens, rather than the Earth was at the bottom of the heavens.
- Lived:
Near-Earth environment¶
- 300s BC - Aristotle - spherical Earth
- 200s BC - Erathosthenes - radius of Earth
- 100s BC - Hipparchus - distance to Moon
Hard to tell how things worked out¶
- Planets move slowly across the sky
- Retrograde motion
- Didn’t make sense, so Ptolomy came up with a sophisticated way of handling this based off of observations.
- People followed this for thousands of years because it matched empirical evidence.
- It was the lack of evidence against Ptolomy that made the case against Galileo.
Bradley in 1725 proved Kopernik¶
- Stellar aberration
- Speed of light
- Watched the stars move in relation to the Earth’s movement
Note
“It took 1,900 years after the Greeks discovered the distance to the moon for us to determine the distance to a star.” – Brandon Rhodes
Why did Kopernik debate all the physical evidence for the Earth-centric universe?¶
- Beauty
- Wanted better math
- Made the code pretty
Note
“Kopernik made the most awesome code refactor in history.” – Brandon Rhodes
Kopernik’s model of the solar system made it clear that the Sun was the center of the solar system instead of yet another object.
TODO - get Brandon’s code models for the Ptolomic and Kopernik solar system models.
Copernican Refactor¶
Brandon’s new term for any refactor that brings things to the center.
Example: Gadgets that combine automobile cigarette lighters with a USB connector to put power into mobile devices.
- Clean Architecture (http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html)
- Docopt (https://pypi.python.org/pypi/docopt)
- Django (compared to Python CGI)
Closing¶
If your code is driving you crazy, think like Kopernik and turn the world upside down.
Second Keynote: Why Django Is Awesome¶
- by Daniel Greenfeld aka “Pydanny”
Background¶
- Principal at Cartwheel Web
- Co-author of Two Scoops of Django (https://django.2scoops.org)
- Fiance of Audrey Roy :)
Why Django is Awesome¶
Django Is Everywhere¶
NASA, PBS, Instagram, etc.
Django Lets Us Use Python¶
Python is awesome!
- Python has Zen
- Python has a style guide
- And indentation and such
Django Has Awesome APIs¶
Requests is known for having an elegant API. Look at sample code from using the Django test client. It’s practically the same code!
- Example of models and model methods
API conventions encourage clean design:
- Make it easy to separate content from presentation
- Helps us get things done
Django Views are Functions¶
Function views are very simple. Request -> Response
Even with class-based views, you have View.as_view()
which is basically the same thing.
Django Has Awesome Features¶
The admin is what we’re known for. Aka “How to sell Django 101”.
Shortest admin module possible in 3 lines.
- Don’t hack the admin to force it to bend to NoSQL. Write separate code
- Pydanny will be sprinting on django-admin2
Django’s Full Stack Is Awesome¶
- Dominates hackathons because you have everything in one place
- Building companies is easy with stock Django/Python. Even if you don’t understand the larger Django ecosystem, you can get amazing things done with it.
Django Is Part of an Ecosystem¶
- 30,000 packages on PyPI
- 1,750 packages on https://www.djangopackages.com/
Django Sets the Bar for Documentation¶
- In the Python world, no one says “just read the code” anymore.
- Largely because of Django
Django’s Community is the Best¶
- Humble and listens to criticism
- The more you help people in the community, the more the community helps you. Case study: book had over 125 contributors. We gave free copies and asked the community to do nice things in return. Huge response: readers volunteered their time to write Django projects for churches, schools, other good deeds around the world.
Call To Action¶
Be awesome. “I want us to change the world.” Use your knowledge of Django to help people and do good things.