Download - Great Developers Steal
GREATDEVELOPERS
STEAL
ben scofield / @bscofield / scottish ruby conference / 8 april 2011
flickr: hisgett
ART
http://obeygiant.com/headlines/obey-x-austin-sxsw
I’M NOART HISTORIAN
Mythology
http://www.saversplanet.com/wallpapers/one-ring-wallpapers_3072_1600.jpg
http://www.xibalba.demon.co.uk/jbr/trek/gen.html
http://www.scifinow.co.uk/news/top-five-sci-fi-vehicles/
MusicV U
http://www.wired.com/special_multimedia/2008/pl_music_1609
http://www.soulculture.co.uk/features/jimi-hendrix-the-epitome-of-a-legend/
http://upload.wikimedia.org/wikipedia/commons/d/d3/Eleanor_Rigby_-_DSC05154.JPG (Benkid77)
Software Development
Software Development
xUnitSUnitJUnitCppUnitNUnitLapidary Test::Unit
BDDJBehaveRBehave RSpecNBehavePHPSpecJasmine
RailsRailsCakePHPGrailsRhino on RailsASP.NET MVC
ORM Hibernate NHibernateActiveRecord SubSonic
mod_*mod_perlmod_pythonmod_phpmod_rails Passenger
WSGIPasteRackJackPlackHack
WSGIdef 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/
Pastedef app(environ, start_response): start_response('200 OK', [('content-type', 'text/html')]) return ['Hello world']
https://bitbucket.org/ianb/paste
Rackdef call(env) [200, {'Content-Type' => 'text/html'}, 'Hello World']end
https://github.com/rack/rack
Plackmy $app = sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/html' ], 'Hello World' ];};
https://github.com/miyagawa/Plack
Jackfunction(env){ return [200, {'Content-Type': 'text/html'}, "Hello World"];};
https://github.com/JackDanger/jack
Hackapp :: Applicationapp = \env -> return $ Response 200 [ ("Content-Type", "text/plain") ] (pack "Hello World")
main = run app
https://github.com/nfjinjing/hack
SinatraExpress.jsRatpackSammy.jsFitzgeraldSlimScalatraNancy
Sinatrarequire 'rubygems'require 'sinatra'
get '/' do erb :homepageend
get '/names/:name' do "Hello, #{params[:name]}"end
post '/login' do # data is in request.body # validate loginend
https://github.com/bmizerany/sinatra
Express.jsvar express = require('express');var app = express.createServer();
app.configure(function(){ app.use(express.bodyParser());});
app.get('/', function(request, response) { response.render('homepage.ejs');});
app.get('/names/:name', function(request, response) { response.send('Hello, ' + request.param('name'));
});
app.post('/login', function(request, response) { // data is in request.body // validate login});
https://github.com/visionmedia/express
Ratpackget("/") { render "homepage.html"}
get("/names/:name") { "Hello, ${urlparams.name}"}
post("/login") { // data is in params.field // validate login}
https://github.com/bleedingwolf/Ratpack
Slim<?phprequire 'Slim/Slim.php';Slim::init();
Slim::get('/', function () { Slim::render('homepage.php');});
Slim::get('/names/:name', function ($name) { echo "Hello, $name";});
Slim::post('/login', function () { # data is in Slim::request()->post('field') # validate login});
Slim::run();?>
https://github.com/codeguy/Slim
Nancypublic 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/thecodejunkie/Nancy
Sammy.js(function($) { var app = $.sammy('#main', function() { this.get('#/', function() { this.partial('files/homepage.html'); });
this.post('#/login', function() { // data is in params.field // validate login }); });
$(function() { app.run('#/'); });})(jQuery);
https://github.com/quirkey/sammy
Interlude
On Naming
Scalatraimport 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
Software Theft 101
Software Theft 101
Need-Driven
1 Find a problem
2 Pick a target
3 Case the joint
Opportunity-Driven
1 Pick a target
2 Case the joint
3 Wait for your chance
Casing the Joint
Searching
GeneralGitHubBitBucketSourceForgeGoogle Code
SpecificRubygemsPEPsPyPICPAN
Evaluating
GoodForks and watchersActive repositoriesEdge case tests IssuesCitationsDocumentationHistoryStrong opinions
Perpetration
LocationParadigmIdiomStyle
Trouble
Inspire JBehave RSpec
Sample Sinatra Padrino
Cover JUnit NUnitWSGI Rack
RUBYISTScan steal from
EVERYONE
ProceduralObject-OrientedFunctional
Metaprogramming
Test-focused
THANK YOU!now go burgle something
Ben Scofield / @bscofieldhttp://benscofield.comhttp://speakerrate.com/t/7099