Great Developers Steal

2,499 views
2,345 views

Published on

There are more smart people building software now than there have been at any point in the past, which means that it's more important than ever to stay on top of new developments, libraries, frameworks, and everything else. To really take advantage of this wealth of innovation, however, you've got to look beyond your normal community -- what's going on in Python? And how can we use that to make our Ruby lives easier? In this session, we'll explore that question. We'll look at actual examples of code and concepts borrowed and reimplemented to form a better idea of when it's appropriate and when it'll fall flat.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,499
On SlideShare
0
From Embeds
0
Number of Embeds
71
Actions
Shares
0
Downloads
14
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Great Developers Steal

  1. 1. GREAT DEVELOPERS STEALben scofield / @bscofield / scottish ruby conference / 8 april 2011
  2. 2. flickr: hisgett
  3. 3. ART
  4. 4. http://obeygiant.com/headlines/obey-x-austin-sxsw
  5. 5. I’M NOART HISTORIAN
  6. 6. Mythology
  7. 7. http://www.saversplanet.com/wallpapers/one-ring-wallpapers_3072_1600.jpg
  8. 8. http://www.xibalba.demon.co.uk/jbr/trek/gen.html
  9. 9. http://www.scifinow.co.uk/news/top-five-sci-fi-vehicles/
  10. 10. MusicV U
  11. 11. http://www.wired.com/special_multimedia/2008/pl_music_1609
  12. 12. http://www.soulculture.co.uk/features/jimi-hendrix-the-epitome-of-a-legend/
  13. 13. http://upload.wikimedia.org/wikipedia/commons/d/d3/Eleanor_Rigby_-_DSC05154.JPG (Benkid77)
  14. 14. Software Development
  15. 15. Software Development
  16. 16. SUnitxUnit JUnit CppUnit NUnit Lapidary  Test::Unit
  17. 17. JBehaveBDD RBehave  RSpec NBehave PHPSpec Jasmine
  18. 18. RailsRails CakePHP Grails Rhino on Rails ASP.NET MVC
  19. 19. ORM Hibernate  NHibernate ActiveRecord  SubSonic
  20. 20. mod_perlmod_* mod_python mod_php mod_rails  Passenger
  21. 21. PasteWSGI Rack Jack Plack Hack
  22. 22. 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 Worldn]http://www.python.org/dev/peps/pep-0333/
  23. 23. Paste def app(environ, start_response):     start_response(200 OK, [(content-type, text/html)])     return [Hello world]https://bitbucket.org/ianb/paste
  24. 24. Rack def call(env)   [200, {Content-Type => text/html}, Hello World] endhttps://github.com/rack/rack
  25. 25. Plack my $app = sub {   my $env = shift;   return [ 200, [ Content-Type => text/html ], Hello World ]; };https://github.com/miyagawa/Plack
  26. 26. Jack function(env){   return [200, {Content-Type: text/html}, "Hello World"]; };https://github.com/JackDanger/jack
  27. 27. Hack app :: Application app = env -> return $   Response 200 [ ("Content-Type", "text/plain") ] (pack "Hello World") main = run apphttps://github.com/nfjinjing/hack
  28. 28. Express.js RatpackSinatra Sammy.js Fitzgerald Slim Scalatra Nancy
  29. 29. 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 endhttps://github.com/bmizerany/sinatra
  30. 30. Express.js var 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
  31. 31. Ratpack get("/") { render "homepage.html" } get("/names/:name") {   "Hello, ${urlparams.name}" } post("/login") { // data is in params.field   // validate login }https://github.com/bleedingwolf/Ratpack
  32. 32. Slim <?php require 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
  33. 33. 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/thecodejunkie/Nancy
  34. 34. 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
  35. 35. InterludeOn Naming
  36. 36. 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
  37. 37. Software Theft 101
  38. 38. Software Theft 101
  39. 39. Need-Driven
  40. 40. 1 Find a problem
  41. 41. 2 Pick a target
  42. 42. 3 Case the joint
  43. 43. Opportunity-Driven
  44. 44. 1 Pick a target
  45. 45. 2 Case the joint
  46. 46. Wait for your3 chance
  47. 47. Casing the Joint
  48. 48. Searching
  49. 49. GitHubGeneral BitBucket SourceForge Google Code
  50. 50. RubygemsSpecific PEPs PyPI CPAN
  51. 51. Evaluating
  52. 52. Forks and watchers Active repositories Edge case testsGood Issues Citations Documentation History Strong opinions
  53. 53. Perpetration
  54. 54. LocationTrouble Paradigm Idiom Style
  55. 55. Inspire JBehave  RSpec
  56. 56. Sample Sinatra  Padrino
  57. 57. Cover JUnit  NUnit WSGI  Rack
  58. 58. RUBYISTScan steal from EVERYONE
  59. 59. ProceduralObject-OrientedFunctional
  60. 60. Metaprogramming
  61. 61. Test-focused
  62. 62. THANK YOU!now go burgle something Ben Scofield / @bscofield http://benscofield.com http://speakerrate.com/t/7099

×