good progress

This commit is contained in:
Kenneth Reitz
2011-10-05 13:03:13 -04:00
parent 394b90cfe1
commit 29cfd265f9
5 changed files with 130 additions and 32 deletions
+5 -6
View File
@@ -5,14 +5,13 @@
- *Not* anarchy
!SLIDE
# This talk is not...
- A call for anarchy
- A criticism of Python
- A dump of language-level issues
# For the record...
- *Not* a
!SLIDE
# This talk is...
# This talk is:
- A call for reevaluate our values
- A manifesto?
- A
- Most of the problems that we're going to discuss today are simple.
-6
View File
@@ -23,17 +23,11 @@
!SLIDE
> Readability counts.
!SLIDE
> Although practicality beats purity.
!SLIDE
> If the implementation is hard to explain, it's a bad idea.
!SLIDE
# Welcome to paradise.
!SLIDE
> There should be one—and preferably only one—obvious way to do it.
!SLIDE
# LIES!
+39 -14
View File
@@ -1,3 +1,4 @@
!SLIDE
# Part II: Beginnings
@@ -101,25 +102,48 @@ Let's play around. Maybe play with the GitHub API?
If this was you, you'd leave Python and never come back.
!SLIDE
# Step 3: Install Packages.
* Setuptools? Distribute?
* Pip? Easy_install?
!SLIDE
# "I'll just stick my dependencies in the path."
* Only works for pure-python modules.
* Only works with relative imports.
* Virtualenv?
* Easy_uninstall?
# http/url/lib/2
- Which module to use?
- Worst API ever.
- An *extremely* common use case.
- I'd rather be writing ColdFusion™.
!SLIDE
# Common Pitfalls
* easy_uninstall?
# XML
- `etree` is terrible.
- `lxml` is awesome, but difficult to install.
!SLIDE
# File and System Operations
- sys | shutils | os | os.path | io
- Really difficult to run external commands.
- This blocks dev+ops folks from adopting Python.
!SLIDE
# Packaging and Depdencies
- pip or easy install?
- setuptools isn't included with python? Distribute?
- No easy_uninstall?
- Broken `setup.py`s
- "Released" packages not in the Cheeseshop
!SLIDE
# Date[time]s.
- Which module to use?
- Timezones
- The stdlib can generate but not parse ISO8601 dates
!SLIDE
# Unicode.
- LOLWUT
!SLIDE
# Testing.
!SLIDE
# Installing Dependencies
@@ -128,6 +152,7 @@ If this was you, you'd leave Python and never come back.
* python-mysql
* mod_wsgi
!SLIDE
# Integration Time
!SLIDE
+40 -6
View File
@@ -3,10 +3,10 @@
Python needs more Pragmatic Packages.
!SLIDE small
!SLIDE dark
pra•gmat•ic |pragˈmatik|,
*adj*, dealing with things sensibly and realistically in a way that is
## pra•gmat•ic |pragˈmatik|, *adj*:
Dealing with things sensibly and realistically in a way that is
based on practical rather than theoretical considerations.
!SLIDE
@@ -20,10 +20,23 @@ based on practical rather than theoretical considerations.
!SLIDE
# NOT PRACTICAL (cont)
!SLIDE
# The Codez, they are ugleh.
[trollface or something]
!SLIDE
## Unless there's an explicit requirement,
## a student should never see urllib2.
# No excuses.
!SLIDE
# Practical.
@@@ ruby
ruby codez
!SLIDE
# Pragmatic.
@@ -42,13 +55,34 @@ based on practical rather than theoretical considerations.
# Fit the 90% Use Case.
!SLIDE
# Fit the 90% Use Case.
# The API is all that matters.
## Everything else is secondary.
!SLIDE incremental
# Everything.
- Features.
- Efficiency.
- Performance.
- Corner-cases.
!SLIDE
# urllib2
"I'd rather be writing ColdFusion."
!SLIDE
!SLIDE small
# subprocess
- envoy
A powerful module that .
@@@ python
import envoy
c = envoy.run('ls')
.
@@@ pycon
>>> c.status_code
200
+46
View File
@@ -0,0 +1,46 @@
!SLIDE
## The Hitchhiker's Guide to Python
# DON'T PANIC!
http://python-guide.org
!SLIDE
- A guidebook for newcomers.
- A reference for seasoned veterans.
!SLIDE
# There's only one rule.
!SLIDE
> There should be one—and preferably only one—obvious way to do it.
!SLIDE
# Topics
!SLIDE
# Installing Python Properly
!SLIDE
# Installing
!SLIDE
# Installing Python Properly
!SLIDE
# Installing Python Properly
!SLIDE small
# Best Practices
- Will recommend **distribute**, **pip**, and **virtualenv** out of the box.
Explicit directions for setup on every major OS.
- Instill a resistance to `doctest`
- Teach `datetime.utcnow()`
!SLIDE small
# Installation Guides
- PIL
- Python-MySQL