c95e24451eb420593b4518befa7fbb70.ppt
- Количество слайдов: 56
Faster! Accelerating your business with blazing prototypes Drew Engelson @handofdoom
Why am I here?
I’m Drew Engelson § I work for Celerity - “The business acceleration consultancy” - We help get companies “unstuck” § I help organizations decide what tech to buy or build - National Geographic Society - PBS - American Diabetes Association § Then we make it happen
First… a disclaimer § I’m a Pythonista § I’m a Djangonaut § Blame OSCON 2006
Hence, my huge man-crush on JKM Photo: Jason Samsa @ Flickr
Cultures of stagnation
Risk aversion
Always choosing path well traveled
"Innovation is R&D’s job” a. k. a. Not your job
Dwelling on past investments
Over-management and review of new ideas
“We have too much real work to do. ”
Cultures of Innovation Props to Josh Linkner
Fuel passion
Celebrate ideas
Foster autonomy
Encourage
Fail forward
Think small
Institutionalize this stuff
COTS vs. Open Source
“COTS is the safer choice” No one ever got fired for choosing ______.
“COTS does it out of the box” That’s horse crap!
Photo: Daleeast @ Flickr
Photo: Kethera @ Flickr
Rapid Prototypes
“If only I could show you!”
Developers [sometimes] have good ideas Give ‘em a chance!
Reduce the potential cost of failure; Timebox the experiment “OK, you get 2 days”
The Framework Showdown
The challenge § Build a simple, fully functional prototype - A basic web service for image transformation § Requirements - Pass in a source image url, desired height and width - Pull down the image to server - Resize the image on the server - Return derivative image
The challenge url = http: //farm 8. staticflickr. com/7138/7576110858_d 66 eec 09 f 5_z. jpg width = 200 height = 200 Photo: Tomcrenshaw @ Flickr
I’m talking REAL functional code; minimize throw away work Evolve to production
Surveyed a few frameworks § PHP - Zend - Code. Igniter § Python - Django - Flask - Bottle § I know, there are many other choices… Which is your favorite?
Compared on § Learning curve § Ease of bootstrapping dev environment § Ease of development - # of files created or touched - # of lines written or modified - Complexity of code § Speed of deployment - Need to share with others, right? § Note: This is a very non-scientific study
The non-scientific results
$ pip install Flask requests PIL Then write ~19 lines of Python
import c. String. IO import requests from PIL import Image from flask import Flask, request, send_file app = Flask(__name__) @app. route('/', methods=['GET', ]) def resize(): url = request. values['url'] req = requests. get(url) resource = c. String. IO(req. content) image = Image. open(resource) image = image. resize((int(request. values['w']), int(request. values['h'])), Image. ANTIALIAS) resource = c. String. IO() image. save(resource, 'JPEG') resource. seek(0) return send_file(resource, mimetype='image/jpeg') if __name__ == '__main__': app. run(debug=True)
Quick and easy local server Django: manage. py runserver Flask: app. run()
Get boilerplate out of the way!
Don’t trust anything that has built-in smilies Sorry, Code. Igniter
How do I share it?
$ git push heroku master Really. . . does anything else matter?
What does this all mean?
Use what you know! Learning curve is biggest time suck.
Keep it real Don’t assume failure… this may have legs.
Don’t be afraid of… Failure; the unknown; the undead
Give ‘em a little rope… But don’t hang ‘em with it
Hold a few “hack days”
Spread knowledge; Hold sessions to share ideas I call these “mind melds”
Increased pace of innovation leads to…
Happier developers leads to…
Greater productivity leads to…
GOTO 50
Resources § http: //flask. pocoo. org/ § https: //www. djangoproject. com/ § http: //codeigniter. com/ § http: //bottlepy. org/ § http: //framework. zend. com/ § Josh Linkner - http: //www. inc. com/articles/201106/josh-linkner-7 -steps-to-a-culture-of-innovation. html § I know, there are many other choices… What’s your favorite?
Thanks for coming! Drew Engelson - @handofdoom dengelson@celerity. com http: //www. celerity. com/
c95e24451eb420593b4518befa7fbb70.ppt