• Save
Ruby Insurgency
Upcoming SlideShare
Loading in...5
×
 

Ruby Insurgency

on

  • 9,851 views

David Hunt Pragmatic Programmers: Andy Hunt's presentation at RubyConf 2001 presenting strategies and tactics for bringing Ruby into the workplace. From: http://www.ruby-doc.org/whyruby

David Hunt Pragmatic Programmers: Andy Hunt's presentation at RubyConf 2001 presenting strategies and tactics for bringing Ruby into the workplace. From: http://www.ruby-doc.org/whyruby

Statistics

Views

Total Views
9,851
Views on SlideShare
9,848
Embed Views
3

Actions

Likes
3
Downloads
0
Comments
2

1 Embed 3

http://www.slideshare.net 3

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Impressive presentation of ’Ruby Insurgency’. You’ve shown your credibility on presentation with this slideshow. This one deserves thumbs up. I’m John, owner of www.freeringtones.ws/ . Hope to see more quality slides from you.

    Best wishes.
    Are you sure you want to
    Your message goes here
    Processing…
  • thanq its really nice and useful to me in thinking about invention comes along with think of that.... really nice function.... tanq for this.....
    Anisa
    http://financejedi.com http://healthjedi.com
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Hello and welcome I’m Andy Hunt Today’s talk is on how we can change the world a little bit

Ruby Insurgency Ruby Insurgency Presentation Transcript

  • The Pragmatic Programmers, LLC Andrew Hunt RUBY INSURGENCY
  • RUBY
  • RUBY
  • What is “insurgency”?
    • Main Entry: in·sur·gen·cy Function: noun Date: 1803 1 : the quality or state of being insurgent; specifically : a condition of revolt against a government that is less than an organized revolution and that is not recognized as belligerency
  • The Battlegound
    • Fortress of corporate IT
    • Guarded by trolls
    • Fiefdoms devoted to
    • tools, languages,
    • methodologies, etc.
    Corporate I.T. X
  • How did Perl get in?
    • Non-threatening, non-mission-critical
      • “ Playing with the web”
    • Better than /bin/sh, awk, cut, sed, ...
    • Became mission critical!
    • Ubiquitous, but still messy
  • How can Ruby get in?
    • Ruby is better than Perl
    • Better extensibility
      • Evolution of Ruby programs over time
      • Easier addition of C code modules
    • Better maintainability
      • Easier to read
      • Easier to understand
      • Principle of Least Surprise
  • Ruby offers ease and clarity of expression
  • How to leverage Ruby’s strength
    • RubyLearn
    • RubyGlue
    • RubyFace
    • RubyHack
    • RubyRules
    Least threatening Most threatening
  • RubyLearn Ruby as CASE tool
  • RubyLearn
    • No Ruby in development
    • No Ruby in deployment
    • Ruby as a “mental amplifier”
  • RubyLearn
    • Central activity to programming is learning
      • The problem domain
      • Domain language and business processes
  • RubyLearn
    • Central activity to programming is learning
      • What customer/client needs and wants
      • Bits of technology (Java API’s, et al)
  • RubyLearn
    • Central activity to programming is learning
      • System behavior, especially:
        • under load
        • given bad data
  • RubyLearn
    • Algorithm Design
      • Small, specific problem
      • An ADT, new algorithm, or combination
      • Stateful considerations
      • Range and boundary semantics
  • RubyLearn
    • Architectural Spike
      • Executable “big block diagram”
      • Design by Contract across major interfaces
      • Quickly run and validate assumptions
      • (Like XUML, but more realistic and flexible)
  • RubyLearn
    • Module Prototyping
      • Low-friction refactoring
      • Tests
      • Mock Objects
      • Interfaces
      • Refactor rapidly as you learn key relationships and characteristics
  • RubyLearn – Key Points
    • Low-friction
      • Clarity of expression, easy to map to deployment language
      • Quick and easy to modify/adapt as you learn
      • Text based format amenable to tools
  • RubyLearn – Key Points
    • Low-friction
    • Verifiable
      • Unlike diagrams, can actually run it
  • RubyLearn – Key Points
    • Low-friction
    • Verifiable
    • Not much competition in this space
      • Old hands use Smalltalk for this purpose (some Python)
      • Newbies not used to thinking first
  • RubyGlue Ruby runs development
  • RubyGlue
    • Ruby in development only–
    • No Ruby in deployment
  • RubyGlue
    • Strong area for Perl:
    • “The Swiss-army Chainsaw”
    • Powerful, but very messy
    • Constrained to the blades available
    • Gluing disparate bits of tech is hard
      • Even harder trying to decode ${${$x[2]}[3]}[5] or $$a[2][2]
  • RubyGlue
    • Ruby is not a Swiss-army chainsaw
    • More like a Star Trek™ replicator
      • Say what you want, you get it
      • “ Tea, Earl Grey, Hot”
    • Makes supporting development easy
  • RubyGlue
    • It needs to be right
    • It needs to be right now
    • It needs to be maintainable
  • RubyGlue
    • Project Support
      • Post nightly build output to web
      • Annotate, hyperlink or highlight logs
      • Customized Wikis
      • Manage football pools, baby pools, etc.
  • RubyGlue – build automation Source files Other inputs Build processor - make - ant - Aegis Executable code Passed tests Documentation Database construction make make schema make doc make test
  • RubyGlue
    • The Nightly Build
    • * Current build status:
    • There were 2 errors or unexpected exceptions
    • 4 Java unit tests failed:
      • com.loser.library.time.test.TestBasicZone
      • com.loser.library.xmlapplication.test.TestXmlApplication
      • com.loser.server.search.test.TestGetCalcConsReads
      • com.loser.server.security.test.TestSecurity
    • Build FAILS as of Friday, October 12 at 10:34AM.
    • * Most Recent Log
    • * DeveloperHandbook -- How to set up and develop code for this project
    • * Project-wide Java doc
  • RubyGlue – annotated log
  • RubyGlue
    • Build and Release procedure
      • Oversee different compilation environments
      • Assembling release
      • Burn the CD-ROM or upload to ftp server
  • RubyGlue – nightly build Developer 1 Source Source repository Automated build system C heck out source Issue build products Publish results Developer 2 Source Run automatically
  • RubyGlue
    • Regression Test Automation
      • Setting up database for unit tests
      • Run and analyze output
      • Notify team of build failures (e-mail, pager)
  • RubyGlue
    • Documentation and Code generation
      • As a straight code generator
        • Telephone routing application:
        • 6k Ruby generating 150k of C++ code
  • RubyGlue
    • Documentation and Code generation
      • Tweak results from other code generators (yacc, lex, java2idl)
      • Create SQL load scripts for database from doc
      • Documentation beyond capabilities of JavaDoc
  • RubyGlue
    • All the things we would have used Perl for
      • Much easier
      • More maintainable
      • Preserves intellectual property
    • IT JUST WORKS.
  • RubyFace Ruby combines existing components
  • RubyFace
    • Ruby in limited, special-purpose deployment
    • Satisfy custom need based on existing components
  • RubyFace
    • Good products are scriptable
      • Many turn to Python for this role
    • Create more complex tests faster using Ruby scripts to call internals
    • Easier to add composite functionality for custom jobs
    • Leads to “Ruby on Top” architecture
  • RubyFace Ruby C code C++ code Other (via C)
  • “Ruby On Top”
    • Ruby code defines available product
    • Functional core written in
      • Java
      • C
      • C++
      • Fortran
      • Eiffel
      • Anything you can bridge via C
  • RubyFace – Example
    • Telephone switch testing harness
    • Uses Ruby to test commercial phone switch
    • Drives 100,000 lines of C code
  • RubyFace
    • Best of both worlds
      • Preserves existing functionality
      • Leverages Ruby’s flexibility
      • Get used to the idea of deploying Ruby
      • Like Eiffel’s Component Combinator (ca 1997)
  • RubyHack Ruby for one-time custom apps
  • RubyHack
    • Pure Ruby, but small and focused
    • Not mainline development
    • Doesn’t depend on existing functionality
      • Just hits the database
      • Calls CORBA services
      • Munges flat files related to the app
      • Hacks the Registry
  • RubyHack
    • Provide new capability without altering main product
    • Correct errors in deployed product environment
    • Provide diagnostic or debug information
  • RubyHack
    • But how do you convince folks to deploy Ruby just for this?
  • RubyRules Ruby as the deployment language
  • RubyRules
    • We’ve used Ruby as design tool
    • We’ve got Ruby running the development process
    • Deployed Ruby as scripting engine to existing product
    • Deployed Ruby standalone as an add-on to existing product
  • RubyRules
    • You write the project in Ruby
    • Test it with Ruby
    • Deploy it with a Ruby installer
  • Ruby Rules
    • You’re in.
    • Everybody wins.
  • The Pragmatic Programmers, LLC / dy [email_address] www.pragmaticprogrammer.com