Slide 1

Slide 1 text

GREAT DEVELOPERS STEAL ben scofield / @bscofield / la rubyconf / 4 february 2012

Slide 2

Slide 2 text

http://www.flickr.com/photos/dullhunk/3693920325/

Slide 3

Slide 3 text

MUSIC

Slide 4

Slide 4 text

MUSIC sampling influence covers

Slide 5

Slide 5 text

MUSIC sampling influence covers

Slide 6

Slide 6 text

http://www.wired.com/special_multimedia/2008/pl_music_1609

Slide 7

Slide 7 text

MUSIC sampling influence covers

Slide 8

Slide 8 text

http://www.soulculture.co.uk/features/jimi-hendrix-the-epitome-of-a-legend/

Slide 9

Slide 9 text

MUSIC sampling influence covers

Slide 10

Slide 10 text

EXTENDED METAPHOR AHEAD

Slide 11

Slide 11 text

COVERS

Slide 12

Slide 12 text

COVERS melody lyrics style theme

Slide 13

Slide 13 text

Pierre Menard, Author of the Quixote http://en.wikipedia.org/wiki/File:Donquixote.JPG http://www.coldbacon.com/writing/borges-quixote.html e visible work le by this novelist is easily and brie y enumerated. Impardonable, therefore, are the omissions and additions perpetrated by Madame Henri Bachelier in a fallacious catalogue which a certain daily, whose Protestant tendency is no secret, has had the inconsideration to in ict upon its deplorable readers—though these be few and Calvinist, if not Masonic and circumcised. e true friends of Menard have viewed this catalogue with alarm and even with a certain melancholy. One might say that only yesterday we gathered before his nal monument, amidst the lugubrious cypresses, and already Error tries to tarnish his Memory . . . Decidedly, a brief recti cation is unavoidable. I am aware that it is quite easy to challenge my slight authority. I hope, however, that I shall not be prohibited from mentioning two eminent testimonies. e Baroness de Bacourt (at whose unforgettable vendredis. I had the honor of meeting the lamented poet) has seen t to approve the pages which follow. e Countess de Bagnoregio, one of the most delicate

Slide 14

Slide 14 text

BAD COVERS

Slide 15

Slide 15 text

http://patart-pat.blogspot.com/2011/05/william-shatner-rocket-man.html Rocket Man William Shatner on Seeking Major Tom, 2011

Slide 16

Slide 16 text

GOOD COVERS

Slide 17

Slide 17 text

genre

Slide 18

Slide 18 text

Luck Be a Lady Tonight The Toadies on Chairman of the Board, 1993 http://www.kirtlandrecords.com/Toadies

Slide 19

Slide 19 text

MUSIC sampling influence covers standards

Slide 20

Slide 20 text

http://music-wallpapers.net/billie_holiday_2_wallpapers.html

Slide 21

Slide 21 text

SOFTWARE

Slide 22

Slide 22 text

SOFTWARE libraries influence ports patterns

Slide 23

Slide 23 text

SOFTWARE libraries influence ports patterns

Slide 24

Slide 24 text

SOFTWARE libraries influence ports patterns

Slide 25

Slide 25 text

XUNIT

Slide 26

Slide 26 text

XUNIT SUnit JUnit

Slide 27

Slide 27 text

SOFTWARE libraries influence ports patterns

Slide 28

Slide 28 text

XUNIT SUnit JUnit NUnit

Slide 29

Slide 29 text

XUNIT SUnit JUnit CppUnit

Slide 30

Slide 30 text

language

Slide 31

Slide 31 text

SOFTWARE libraries influence ports patterns

Slide 32

Slide 32 text

DATA MAPPER (165) http://martinfowler.com/eaaCatalog/dataMapper.html

Slide 33

Slide 33 text

DATA MAPPER (165) datamapper datamapper (php) mongomapper sqlalchemy

Slide 34

Slide 34 text

EXAMPLES

Slide 35

Slide 35 text

BDD

Slide 36

Slide 36 text

BDD jbehave rspec rbehave phpspec jasmine

Slide 37

Slide 37 text

BDD JBehave RSpec RBehave Cucumber JSSpec JSpec Jasmine PHPSpec Story Runner

Slide 38

Slide 38 text

RAILS

Slide 39

Slide 39 text

RAILS rails cakephp grails rhino on rails asp.net mvc

Slide 40

Slide 40 text

WSGI

Slide 41

Slide 41 text

WSGI servlet api wsgi / webob rack jsgi / jack psgi / plack hack2

Slide 42

Slide 42 text

WSGI def simple_app(environ, start_response): """Simplest possible application object""" status = '200 OK' response_headers = [('Content-type', 'text/html')] start_response(status, response_headers) return ['Hello World\n'] http://www.python.org/dev/peps/pep-0333

Slide 43

Slide 43 text

WEBOB def simple_app(environ, start_response): start_response('200 OK', [ ('Content-Type', 'text/html; charset=utf8'), ]) return ['OK'] https://github.com/Pylons/webob

Slide 44

Slide 44 text

RACK def call(env) [200, {'Content-Type' => 'text/html'}, 'Hello World'] end https://github.com/rack/rack

Slide 45

Slide 45 text

JACK function(env){ return { status : 200, headers : {"Content-Type":"text/html"}, body : ["Hello World"] }; } https://github.com/tlrobinson/jack http://jackjs.org/jsgi-spec.html

Slide 46

Slide 46 text

PLACK my $app = sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/html' ], 'Hello World' ]; }; https://github.com/miyagawa/Plack http://search.cpan.org/~miyagawa/PSGI-1.03/PSGI.pod

Slide 47

Slide 47 text

HACK2 {-# LANGUAGE OverloadedStrings #-} import Hack2 import Hack2.Contrib.Response (set_body_bytestring) import Hack2.Handler.SnapServer app :: Application app = \env -> return $ Response 200 [ ("Content-Type", "text/plain") ] "Hello World" main = run app https://github.com/nfjinjing/hack2

Slide 48

Slide 48 text

On Naming INTERLUDE

Slide 49

Slide 49 text

WSGI RACK jsgi jack psgi plack hack2

Slide 50

Slide 50 text

SINATRA

Slide 51

Slide 51 text

SINATRA ratpack flask slim nancy

Slide 52

Slide 52 text

SINATRA require 'rubygems' require 'sinatra' get '/' do erb :homepage end get '/names/:name' do "Hello, #{params[:name]}" end post '/login' do # data is in request.body # validate login end https://github.com/sinatra/sinatra

Slide 53

Slide 53 text

RATPACK set "templateRoot", "myapp/templates" get("/") { render "homepage.html" } get("/names/:name") { "Hello, ${urlparams.name}" } post("/login") { // data is in params.field // validate login } https://github.com/bleedingwolf/Ratpack

Slide 54

Slide 54 text

FLASK from flask import Flask, render_template, request app = Flask(__name__) @app.route("/") def hello(): return render_template('homepage.html') @app.route('/names/') def hello(name=None): return "Hello, " + name @app.route('/login', methods=['POST', 'GET']) def login(): # data is in request.form['field'] # validate login if __name__ == "__main__": app.run() https://github.com/mitsuhiko/flask

Slide 55

Slide 55 text

SLIM get('/', function() { Slim::render('homepage.php'); }); $app->get('/names/:name', function ($name) { echo "Hello, $name!"; }); $app->post('/login', function () { # data is in $app->request()->params('field') # validate login }); $app->run(); ?> https://github.com/codeguy/Slim

Slide 56

Slide 56 text

NANCY public class Sample : NancyModule { public Module() { Get["/"] = params => { return View.Spark("homepage.spark", params); }; Get["/names/{name}"] = params => { return string.Concat("Hello, ", params.name); }; Post["/login"] = params => { /// data is in params.field /// validate login }; } } https://github.com/NancyFX/Nancy

Slide 57

Slide 57 text

On Naming, Revisited INTERLUDE

Slide 58

Slide 58 text

SCALATRA import org.scalatra._ import org.scalatra.scalate._ class Example extends ScalatraServlet with ScalateSupport { get("/") { templateEngine.layout("homepage.scaml") } get("/names/:name") {

Hello, {params("name")}

} post("/login") { // data is in params{"field"} // validate login } } https://github.com/scalatra/scalatra

Slide 59

Slide 59 text

WHY STEAL?

Slide 60

Slide 60 text

OPPORTUNITY

Slide 61

Slide 61 text

OPPORTUNITY learn a language find something awesome steal it

Slide 62

Slide 62 text

webmachine webmachine-ruby

Slide 63

Slide 63 text

EDUCATION

Slide 64

Slide 64 text

EDUCATION pick a language steal something you know

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

NEED

Slide 67

Slide 67 text

NEED have a problem look for a solution steal it

Slide 68

Slide 68 text

objective-c unit testing rspec cedar

Slide 69

Slide 69 text

THE ART OF THEFT

Slide 70

Slide 70 text

WHERE TO LOOK

Slide 71

Slide 71 text

WHERE TO LOOK functional languages object-oriented languages prototype languages

Slide 72

Slide 72 text

WHERE TO LOOK github bitbucket google code sourceforge

Slide 73

Slide 73 text

WHERE TO LOOK rubygems pypi peps cpan

Slide 74

Slide 74 text

WHERE TO LOOK forks / watchers / activity edge case testing citations documentation history strong opinions

Slide 75

Slide 75 text

Mathematics of Beauty INTERLUDE http://blog.okcupid.com/index.php/the-mathematics-of-beauty/

Slide 76

Slide 76 text

WHAT TO DO

Slide 77

Slide 77 text

WHAT TO DO line-by-line acceptance testing

Slide 78

Slide 78 text

ben scofield / bscofi[email protected] / @bscofield THANK YOU!