DjangoCon 2011 – Confessions of Joe Developer
Next up is Daniel Greenfeld talking about his experiences with Django.
Over the course of 6 years of Python development at NASA, Revsys, and Eldarion; Daniel Greenfeld has picked up a lot of easy tricks stolen from the best and brightest in the Python community that make him look good in front of his peers and clients. And now, at great risk to his career and reputation, he is going to show you how he does it.
Final Thoughts: Great talk by Daniel Greenfeld with a number of good points. My code definitely needs to be documented better and ladies deserve more respect in open source communities.
You can find the slides over at slideshare.
@pydanny doing a cartwheel to end the talk
How do you isolate out the cool stuff you bring in?
- pip and virtualenv are great for this.
Acme Corporation Advocacy
How to get involved as a company
- Sponsor because it’s the right thing to do
- Sponsor because you get a tax break
- Sponsor because good developers notice
Joe Developer Advocacy
How to get involved with PyLadies as a man
- Give your own time
- Honour your promised commitments
- Give kudos to the men who bring ladies
- Step back: Don’t try to run things
Jane Developer Advocacy
- Now is the time.
- Empowerment through Education
- Contribute to Open Source
- If you don’t step up then no one will
- Tests (Edge cases are hard to remember if you don’t have tests)
- Have TODO statements and attend to them
- Code too confusing to be modified easily
Explicit is better than Implicit
Have docs/config.py in every project for easy documentation
- Use Readthedocs.org
- Updates from your github project (or any repo)
- Automate from Github by adding a ReadTheDocs service code.
- Click Admin -> Service Hook -> ReadTheDocs -> Activate
Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not.
“Stick even the most basic stuff in your documentation.”
- Don’t wanna do anything twice
- Write the same code twice goes into a function
- Put this code into Github
- Don’t wanna debug code when I had it working before
- Manually testing code by watching it run is hard, boring and error prone
- Going to miss edge cases
Sphinx allows you to easily create docs and helps you make your code looks good.
Code available at https://github.com/pydanny/django-party-pack
Can’t Remember Things
- Documentation makes me look good
- Docstrings are awesome
- Learn you some Restructured Text
- Write down everything, even the slide bullets
“If you don’t ask the question, you are wasting opportunity”
“There are no stupid questions”
Using django-request is the easier way to grab URLs.
If you’re stuck on a problem for more than 30 minutes
- Find libraries that do it for me
- Ask on Twitter for answers
- Stack Overflow is also good, but watch out for trolls
- IRC can be good, watch out for trolls.
- Can’t figure things out
- Can’t remember things
- Too stupid not to ask stupid questions
“I’m stupid and lazy”
@pydanny takes the stage.