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

Go go fast as a developer

Go go fast as a developer

Slides with notes - https://www.dropbox.com/s/xxi0ux61ais9oti/Go%20go%20fast%20as%20a%20developer%20-%20with%20notes%20-%20MagmaRails%202012.pdf

Speed! Whether you're starting something new or trying out something new, you want speed. You want to try it fast, you want to learn it fast, and you want to learn the best practices fast. From a software library/plugin's perspective, the easier and more obvious it is for a new developer to try, learn and adopt a library the faster and wider its adoption will be. As a bonus, your library will generate more OMG tweets and blog posts. Eventually, you get on the cover of Linux Journal. Easy peasy.

How? It's not with "good documentation". Reading documentation slows us down and takes us out of the flow. As developers, our flow is our text editor and our terminal. So the solution for libraries is to bundle generators and text editor integration. Make it easier for a new developer to use your library than not to.

In this fast and funny session we'll look at Rails generators and text editor extensions and show how powerful they are and how easy they are to provide for each and every one of your libraries and plugins.

Remember, the Linux Journal needs you on its front cover. How hard could it be?http://www.flickr.com/photos/46457493@N00/230534494/in/set-72157594262577872

Dr Nic Williams

June 19, 2012
Tweet

More Decks by Dr Nic Williams

Other Decks in Technology

Transcript

  1. GO GO FAST AS A DEVELOPER Dr Nic Williams @drnic

    | drnicwilliams.com VP Dev Evangelism, Engine Yard
  2. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 STORY #1 In the beginning
  3. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2006 1
  4. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2006 mid 2009 1 75
  5. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 the problem http://www.infoq.com/presentations/williams-open-source
  6. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 How do you go fast whilst living with the consequences of your creations?
  7. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2006 mid 2012 mid 2009 257
  8. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 What is “go fast”?
  9. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 to go fast: quickly iterating towards your goals
  10. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 experiments small batches continuous deployment
  11. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 1. 2. 3...
  12. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 start fast stay fast hand off continuously
  13. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 generators dev tools deployment tools
  14. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 “go slow”? • Add features that aren’t important • Fix bugs that aren’t important • Maintain unimportant features • Do all the work yourself
  15. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 start fast stay fast hand off continuously
  16. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 start fast • Create and use generators • If low cost to create, low cost to throw away • Bootstrap your universe
  17. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 stay fast • Internal generators • Dev & deployment tools • Code Gardening
  18. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 hand off continuously • Bootstrapping new developers • Document continuously • Homogenous codebases • Promote contributors
  19. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2006 1 mid 2012 mid 2009 257
  20. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2005 mid 2006 0 257 mid 2012
  21. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 first projects • composite_primary_keys • dr_nic_magic_models
  22. YOUR COMPANY NAME | LONG AND INTERESTING PRESENTATION TITLE |

    VERSION NO. XX | 06 /02/2012 $  rails  new  bigidea $  rails  g  model  Post $  rake  db:migrate $  ey  deploy missing concepts
  23. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 $ appscrolls new bigidea -s postgresql \ twitter_bootstrap github eycloud install it store it deploy it
  24. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 ruby in 2006 • Rails - nice structure, generators, textmate support • Rails plugins - nice structure, generator • RubyGems/Ruby - no structure, no tools
  25. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 structure ruby code? • Jay Fields: “How would you structure a (non-Rails) Ruby project?” • http://blog.jayfields.com/ 2006/10/ruby-project-tree.html
  26. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 newgem
  27. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 newgem hoe Scaffold Dev & Deploy tools
  28. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 your company best practices • How do applications look? • How are they deployed? • Document best practices • Generate best practises
  29. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 “It’s not Rails best practice until it’s in the generators” Jeff Casimir at JRubyConf
  30. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Start fast Stay fast $  rails  new  bigidea $  rails  g  model  Post
  31. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Let’s make a generator!
  32. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 $ thor :thing foo exist create lib/foo.rb create spec/foo_spec.rb $ thor :thing bar exist create lib/bar.rb create spec/bar_spec.rb
  33. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 # Thorfile require 'active_support/inflector' class Default < Thor include Thor::Actions attr_reader :name source_root File.expand_path("../templates", __FILE__) desc "thing NAME", "Create a new thing" def thing(name) @name = name directory "thing", "." end end example at https://github.com/drnic/things
  34. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 $ rails g Usage: rails generate GENERATOR [args] ... Bootstrap: bootstrap:install bootstrap:layout bootstrap:themed Coffee: coffee:assets Cucumber: cucumber:install rails generators
  35. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 appscrolls gem_group :test do gem 'cucumber-rails', :require => false gem 'capybara' gem 'database_cleaner' end after_bundler do rake "db:create" generate "cucumber:install" end
  36. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 textmate bundles
  37. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 mid 2006 1 mid 2012 mid 2009 257
  38. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 code Gardening
  39. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 me previous me future me
  40. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 send love letters to future you code Gardening
  41. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Track your gardening • http://gitalytics.com/user • Search for @you • Gardened ___ repos $('#contribs_table tr').size()
  42. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers
  43. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46
  44. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55
  45. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55 • @leshill - 56
  46. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55 • @leshill - 56 • @bmizerany - 94
  47. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55 • @leshill - 56 • @bmizerany - 94 • @schacon - 137
  48. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55 • @leshill - 56 • @bmizerany - 94 • @schacon - 137 • @tenderlove - 143
  49. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 Top gardeners speakers • @deadprogrammer - 46 • @geemus - 55 • @leshill - 56 • @bmizerany - 94 • @schacon - 137 • @tenderlove - 143 • @drnic - 257
  50. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 crowd interactive gardeners • Edwdin - @softr8 - 11 • Mario - @mariochavez - 15
  51. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 how to garden • bundle  list • pick one & download its source • try to use it • fix README & docs for next person
  52. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 newgem history • 2006 - create files & folders • 2007 - using rubigen - Rails’ own generator system • 2010 - abandoned - “bundle gem”
  53. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 “There is no bigger destroyer of creative potential than the misguided decision to persevere”
  54. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 you cannot write today’s code If you’re stuck on Yesterday’s coDE
  55. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 is this your old code?
  56. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 need more Docs? generators? tests? • For each file/class/module • Why does it exist? • How do you use it? • Answer in documentation/ generators/tests
  57. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 remember: go faster • without interruption • reduce work on old code • “what to do next?” quickly
  58. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 start fast stay fast hand off continuously
  59. DR NIC | GO GO FAST AS A DEVELOPER |

    MAGMARAILS 2012 start fast stay fast hand off continuously