• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Enecomp 2009
 

Enecomp 2009

on

  • 1,212 views

Minha palestra de introdução à cultura e ecossistema Ruby on Rails que dei na Enecomp 2009, em Curitiba, Paraná.

Minha palestra de introdução à cultura e ecossistema Ruby on Rails que dei na Enecomp 2009, em Curitiba, Paraná.

Statistics

Views

Total Views
1,212
Views on SlideShare
1,212
Embed Views
0

Actions

Likes
1
Downloads
24
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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…
Post Comment
Edit your comment

    Enecomp 2009 Enecomp 2009 Presentation Transcript

    • Ruby on Rails Tuesday, September 8, 2009
    • AkitaOnRails.com slideshare.net/akitaonrails Tuesday, September 8, 2009
    • 2008 Tuesday, September 8, 2009
    • 2008 Tuesday, September 8, 2009
    • 13 e 14 Outubro 2009 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • > 100 slides < 1 hora Tuesday, September 8, 2009
    • www.slideshare.net/akitaonrails fabio.akita@locaweb.com.br Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Ruby on Rails 2.3 Ruby 1.8 “Novo” Ruby 1.9 Tuesday, September 8, 2009
    • Ruby on Rails 2.3 Ruby 1.8 “Novo” Ruby 1.9 Tuesday, September 8, 2009
    • Ruby on Rails 2.3 Ruby 1.8 “Novo” Ruby 1.9 Tuesday, September 8, 2009
    • “Matz” 1993 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • “Prag Dave” 2001 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • “DHH” 2004 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Charles Nutter 2006 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • “Tornar as coisas simples fáceis e as coisas complexas possíveis” Filosofia Ruby Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Orientação a Objetos Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • “Eu inventei o termo ‘orientação a objetos’, e posso lhes dizer que eu não estava pensando em C++.” Tuesday, September 8, 2009
    • Meta-programação Tuesday, September 8, 2009
    • Meta-apresentação Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Ruby on Rails Tuesday, September 8, 2009
    • Código que gera Código Convention over Configuration Don’t Repeat Yourself Extreme Programming Tuesday, September 8, 2009
    • Código que gera Código Convention over Configuration Don’t Repeat Yourself Extreme Programming Tuesday, September 8, 2009
    • Código que gera Código Convention over Configuration Don’t Repeat Yourself Extreme Programming Tuesday, September 8, 2009
    • Código que gera Código Convention over Configuration Don’t Repeat Yourself Extreme Programming Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Tuesday, September 8, 2009
    • Views ERB <div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %> </div> <% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td> <% end %> <%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %> Tuesday, September 8, 2009
    • Views ERB <div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %> </div> <% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td> <% end %> <%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %> Tuesday, September 8, 2009
    • Views ERB <div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %> </div> <% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td> <% end %> <%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %> Tuesday, September 8, 2009
    • Rotas RESTFul ActionController::Routing::Routes.draw do |map| map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items] map.namespace :admin do |admin| admin.resources :users admin.resources :products end end Tuesday, September 8, 2009
    • Rotas RESTFul ActionController::Routing::Routes.draw do |map| map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items] map.namespace :admin do |admin| admin.resources :users admin.resources :products end end Tuesday, September 8, 2009
    • Rotas RESTFul ActionController::Routing::Routes.draw do |map| map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items] map.namespace :admin do |admin| admin.resources :users admin.resources :products end end Tuesday, September 8, 2009
    • Rotas RESTFul ActionController::Routing::Routes.draw do |map| map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items] map.namespace :admin do |admin| admin.resources :users admin.resources :products end end Tuesday, September 8, 2009
    • Rotas RESTFul GET /products/new ActionController::Routing::Routes.draw do |map| GET /products POST /products map.resources :products map.resources :addresses map.resourcesGET /products/1 => [:line_items] :orders, :has_many map.namespaceGET /products/1/edit :admin do |admin| PUT /products/1 admin.resources :users admin.resources :products end DESTROY /products/1 end Tuesday, September 8, 2009
    • Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end Tuesday, September 8, 2009
    • Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end Tuesday, September 8, 2009
    • Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end Tuesday, September 8, 2009
    • “Beautiful Code” Tuesday, September 8, 2009
    • @Transient public BigDecimal getTotal() //$Id: Booking.java 5579 2007-06-27 00:06:49Z gavin $ { package org.jboss.seam.example.booking; return hotel.getPrice().multiply( new BigDecimal( getNights() ) ); } import java.io.Serializable; import java.math.BigDecimal; @Transient import java.text.DateFormat; public int getNights() import java.util.Date; { return (int) ( checkoutDate.getTime() - checkinDate.getTime() ) / import javax.persistence.Basic; 1000 / 60 / 60 / 24; import javax.persistence.Entity; } import javax.persistence.GeneratedValue; import javax.persistence.Id; @Id @GeneratedValue import javax.persistence.ManyToOne; public Long getId() import javax.persistence.Temporal; { import javax.persistence.TemporalType; return id; import javax.persistence.Transient; } public void setId(Long id) import org.hibernate.validator.Length; { import org.hibernate.validator.NotNull; this.id = id; import org.hibernate.validator.Pattern; } import org.jboss.seam.annotations.Name; @NotNull @Entity @Basic @Temporal(TemporalType.DATE) @Name("booking") public Date getCheckinDate() public class Booking implements Serializable { { return checkinDate; private Long id; } private User user; public void setCheckinDate(Date datetime) private Hotel hotel; { private Date checkinDate; this.checkinDate = datetime; private Date checkoutDate; } private String creditCard; private String creditCardName; @ManyToOne @NotNull private int creditCardExpiryMonth; public Hotel getHotel() private int creditCardExpiryYear; { private boolean smoking; return hotel; private int beds; } public void setHotel(Hotel hotel) public Booking() {} { this.hotel = hotel; public Booking(Hotel hotel, User user) } { this.hotel = hotel; @ManyToOne @NotNull this.user = user; public User getUser() } { return user; } Tuesday, September 8, 2009
    • public int getBeds() public void setUser(User user) { { return beds; this.user = user; } } public void setBeds(int beds) @Basic @Temporal(TemporalType.DATE) { @NotNull this.beds = beds; public Date getCheckoutDate() } { @NotNull(message="Credit card name is required") return checkoutDate; @Length(min=3, max=70, message="Credit card name is required") } public String getCreditCardName() public void setCheckoutDate(Date checkoutDate) { { return creditCardName; this.checkoutDate = checkoutDate; } } public void setCreditCardName(String creditCardName) @NotNull(message="Credit card number is required") { @Length(min=16, max=16, message="Credit card number must 16 digits long") this.creditCardName = creditCardName; @Pattern(regex="^d*$", message="Credit card number must be numeric") } public String getCreditCard() { public int getCreditCardExpiryMonth() return creditCard; { } return creditCardExpiryMonth; } public void setCreditCard(String creditCard) { public void setCreditCardExpiryMonth(int creditCardExpiryMonth) this.creditCard = creditCard; { } this.creditCardExpiryMonth = creditCardExpiryMonth; } @Transient public String getDescription() public int getCreditCardExpiryYear() { { DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); return creditCardExpiryYear; return hotel==null ? null : hotel.getName() + } ", " + df.format( getCheckinDate() ) + " to " + df.format( getCheckoutDate() ); public void setCreditCardExpiryYear(int creditCardExpiryYear) } { this.creditCardExpiryYear = creditCardExpiryYear; public boolean isSmoking() } { return smoking; @Override } public String toString() { public void setSmoking(boolean smoking) return "Booking(" + user + ","+ hotel + ")"; { } this.smoking = smoking; } } Tuesday, September 8, 2009
    • class Booking < ActiveRecord::Base belongs_to :hotel belongs_to :user validates_presence_of :hotel validates_presence_of :user validates_presence_of :credit_card validates_presence_of :credit_card_name validates_length_of :credit_card, :within => 16..16 validates_format_of :credit_card, :with => /^d*$/ validates_length_of :credit_card_name, :within => 3..70 def total hotel.price * nights end def nights ((checkout_date - checkin_date) / 1.day).round end def to_s "Booking(#{user},#{hotel})" end end Tuesday, September 8, 2009
    • class Booking < ActiveRecord::Base belongs_to :hotel belongs_to :user validates_presence_of :hotel validates_presence_of :user validates_presence_of :credit_card validates_presence_of :credit_card_name validates_length_of :credit_card, :within => 16..16 validates_format_of :credit_card, :with => /^d*$/ validates_length_of :credit_card_name, :within => 3..70 def total hotel.price * nights end def nights ((checkout_date - checkin_date) / 1.day).round end def to_s "Booking(#{user},#{hotel})" end end Tuesday, September 8, 2009
    • class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds t.timestamps end end def self.down drop_table :bookings end end Tuesday, September 8, 2009
    • class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds t.timestamps end end def self.down drop_table :bookings end end Tuesday, September 8, 2009
    • class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds t.timestamps end end def self.down drop_table :bookings end end Tuesday, September 8, 2009
    • 190 vs 40 Tuesday, September 8, 2009
    • “Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante, facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 8, 2009
    • “Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante, facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 8, 2009
    • “Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante, facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 8, 2009
    • “Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante, facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 8, 2009
    • Ferramentas Ágeis Tuesday, September 8, 2009
    • Gitorious Repositórios Github Integração Integrity Contínua Cruise Control Capistrano Deployment Puppet Monitoramento New Relic Tuesday, September 8, 2009
    • Gitorious Repositórios Github Integração Integrity Contínua Cruise Control Capistrano Deployment Puppet Monitoramento New Relic Tuesday, September 8, 2009
    • Gitorious Repositórios Github Integração Integrity Contínua Cruise Control Capistrano Deployment Puppet Monitoramento New Relic Tuesday, September 8, 2009
    • Gitorious Repositórios Github Integração Integrity Contínua Cruise Control Capistrano Deployment Puppet Monitoramento New Relic Tuesday, September 8, 2009
    • Comunidade Tuesday, September 8, 2009
    • peepcode.com Geoffrey Tuesday, September 8, 2009
    • railsenvy.com Jason e Gregg Tuesday, September 8, 2009
    • railscasts.com Ryan Bates Tuesday, September 8, 2009
    • rubylearning.org Satish Talim Tuesday, September 8, 2009
    • rubyinside.com.br Peter Cooper Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • O que dizem por aí ... Tuesday, September 8, 2009
    • Pouco usado Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Rails não Escala Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Blaine Cook http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Tuesday, September 8, 2009
    • Para colocar as coisas em perspectiva, o Friendster foi escrito em Java e eles mudaram para PHP. MySpace foi escrito em ColdFusion e eles mudaram para ASP.NET. Blaine Cook http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Tuesday, September 8, 2009
    • Para colocar as coisas em perspectiva, o Friendster foi escrito em Java e eles mudaram para PHP. MySpace foi escrito em ColdFusion e eles mudaram para ASP.NET. Quando as pessoas caem em problemas de escalabilidade, normalmente acham que a linguagem é o problema, mas eu acho que isso raramente é a realidade. Blaine Cook http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Tuesday, September 8, 2009
    • “O The New York Times usou Ruby on Rails para agregar, analizar e mostrar os resultados das eleições em quase tempo real em um de seus sites mais acessados de todos os tempos.” http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1 Tuesday, September 8, 2009
    • “O The New York Times usou Ruby on Rails para agregar, analizar e mostrar os resultados das eleições em quase tempo real em um de seus sites mais acessados de todos os tempos.” http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1 Tuesday, September 8, 2009
    • Ruby é Lento Tuesday, September 8, 2009
    • x mais lento que C++ Tuesday, September 8, 2009
    • x mais lento que C++ 0 50 100 Python 2 150 Ruby 1.9 200 Perl JRuby Python 3 PHP Ruby 1.8.6 Tuesday, September 8, 2009
    • Homepage: 331 ms Tuesday, September 8, 2009
    • Homepage: 331 ms Total: 5.45 s Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Performance != Escalabilidade Tuesday, September 8, 2009
    • Outros Mitos? Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Mais Produtivo “Melhor” Anti-legado Tuesday, September 8, 2009
    • Mais Produtivo “Melhor” Anti-legado Tuesday, September 8, 2009
    • Mais Produtivo “Melhor” Anti-legado Tuesday, September 8, 2009
    • Agilidade Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Robert C. Martin Tuesday, September 8, 2009
    • “Uncle Bob” Tuesday, September 8, 2009
    • Código Limpo Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Test Driven Development Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 end end Tuesday, September 8, 2009
    • describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 end end Tuesday, September 8, 2009
    • describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 end end Tuesday, September 8, 2009
    • describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 end end Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Funcionalidade: Adição Para evitar erros bobos Como um péssimo matemático Eu quero saber como somar dois números Cenário: Adicionar dois números Dado que eu digitei 50 na calculadora E que eu digitei 70 na calculadora Quando eu aperto o botão de soma Então o resultado na calculadora deve ser 120 Tuesday, September 8, 2009
    • Funcionalidade: Adição Para evitar erros bobos Como um péssimo matemático Eu quero saber como somar dois números Cenário: Adicionar dois números Dado que eu digitei 50 na calculadora E que eu digitei 70 na calculadora Quando eu aperto o botão de soma Então o resultado na calculadora deve ser 120 Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Não é mais demorado? Tuesday, September 8, 2009
    • Cowboy Profissional Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Cowboy Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 11 12 Tempo Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • 237 Equipes 137 Finalizadas Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Empreendedorismo Código e “Forma” Ciclo de Vida de Projetos Comunidade Open Source Tuesday, September 8, 2009
    • Empreendedorismo Código e “Forma” Ciclo de Vida de Projetos Comunidade Open Source Tuesday, September 8, 2009
    • Empreendedorismo Código e “Forma” Ciclo de Vida de Projetos Comunidade Open Source Tuesday, September 8, 2009
    • Empreendedorismo Código e “Forma” Ciclo de Vida de Projetos Comunidade Open Source Tuesday, September 8, 2009
    • Profissionalismo Tuesday, September 8, 2009
    • Tuesday, September 8, 2009
    • Obrigado! akitaonrails.com railssummit.com.br Tuesday, September 8, 2009