Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Great Developers Steal

Ben Scofield
February 04, 2012

Great Developers Steal

If you take a look at software today, you'll see more smart people building things than there ever have been before. The problem? They're all working in different languages, on different platforms, with different concepts. To take advantage of the full breadth of work that's being done, we need to stay on top of things happening in other communities, and we need to bring good ideas back to Ruby. In this session, we'll look at how to identify great code and concepts, and how to bring them back to our community.

Given at LA RubyConf - 4 Feb 2012.

Ben Scofield

February 04, 2012
Tweet

More Decks by Ben Scofield

Other Decks in Programming

Transcript

  1. 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
  2. Luck Be a Lady Tonight The Toadies on Chairman of

    the Board, 1993 http://www.kirtlandrecords.com/Toadies
  3. BDD

  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. FLASK from flask import Flask, render_template, request app = Flask(__name__)

    @app.route("/") def hello(): return render_template('homepage.html') @app.route('/names/<name>') 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
  11. SLIM <?php require 'Slim/Slim.php'; $app = new Slim(); $app->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
  12. 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
  13. SCALATRA import org.scalatra._ import org.scalatra.scalate._ class Example extends ScalatraServlet with

    ScalateSupport { get("/") { templateEngine.layout("homepage.scaml") } get("/names/:name") { <p>Hello, {params("name")}</p> } post("/login") { // data is in params{"field"} // validate login } } https://github.com/scalatra/scalatra
  14. WHERE TO LOOK forks / watchers / activity edge case

    testing citations documentation history strong opinions