From 29cfd265f9a8992c312339582ea7e594f78633d0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 5 Oct 2011 13:03:13 -0400 Subject: [PATCH] good progress --- 0_intro/1_assumptions.md | 11 ++++---- 1_context/0_philosophy.md | 6 ----- 2_problem/0_problem.md | 53 ++++++++++++++++++++++++++++----------- 3_proposal/0_proposal.md | 46 ++++++++++++++++++++++++++++----- 3_proposal/1_guide.md | 46 +++++++++++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 32 deletions(-) create mode 100644 3_proposal/1_guide.md diff --git a/0_intro/1_assumptions.md b/0_intro/1_assumptions.md index af96cd6..e666a94 100644 --- a/0_intro/1_assumptions.md +++ b/0_intro/1_assumptions.md @@ -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. diff --git a/1_context/0_philosophy.md b/1_context/0_philosophy.md index 4e9982d..002bb90 100644 --- a/1_context/0_philosophy.md +++ b/1_context/0_philosophy.md @@ -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! diff --git a/2_problem/0_problem.md b/2_problem/0_problem.md index e330b6a..a41bc72 100644 --- a/2_problem/0_problem.md +++ b/2_problem/0_problem.md @@ -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 diff --git a/3_proposal/0_proposal.md b/3_proposal/0_proposal.md index 5741267..8a4c510 100644 --- a/3_proposal/0_proposal.md +++ b/3_proposal/0_proposal.md @@ -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 \ No newline at end of file + +A powerful module that . + + @@@ python + import envoy + + c = envoy.run('ls') +. + + @@@ pycon + >>> c.status_code + 200 diff --git a/3_proposal/1_guide.md b/3_proposal/1_guide.md new file mode 100644 index 0000000..d6db724 --- /dev/null +++ b/3_proposal/1_guide.md @@ -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 \ No newline at end of file