Your SlideShare is downloading. ×
0
{:from => ‘Java’,
   :to => ‘Ruby’}
“Java              Ruby         ”


KAKUTANI Shintaro; Eiwa System Management, Inc.; a...
✓
✓
✓
✓
✓
✓

✓

✓
✓
✓
✓
✓
✓
✓ http://kakutani.com
http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
http://www.amazon.co.jp/o/ASIN/477413256X/kakutani-22
Agile
And there's business value in
fun - after all motivation is a
major factor in programmer
productivity.
                - M...
✓
✓
✓
✓
✓
✓
✓
✓
100%
78% 22%
✓
✓
✓
✓
✓
89%
      11%
Half empty or half full?
✓
✓
✓
✓
✓
✓
✓
✓
✓

✓

✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓



✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
http://www.ruby-lang.org/
RubyKaigi
  2007
Photo by snoozer-05:
http://www.flickr.com/photos/snoozer/539389108/
You must love your
   software tools
I LOVE RUBY
Ruby-do
Ruby has values
Be nice to developers

Be clear and readable

Be flexible and agile

Be open
Be nice to developers
 ✓
  ✓
 ✓
  ✓
 ✓
  ✓
Be clear and readable

✓
✓
 ✓
✓
 ✓
DEMO
✓
✓

✓
class Team
  attr_accessor :name, :wins, :losses
  def initialize(name, wins, losses)
    @name, @wins, @losses = name, wi...
load quot;team.rbquot;

winning_teams = teams.select do |team|
  team.losses < team.wins
end

winning_teams.each do |team|...
class Team
  attr_accessor :name, :wins, :losses
  def initialize(name, wins, losses)
    @name, @wins, @losses = name, wi...
package com.kakutani.java2ruby.sample;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

pub...
...
public List<T> findAll(List<T> list, BooleanMatcher<T> matcher) {
  List<T> result = new ArrayList<T>();
  for(Iterato...
Be flexible and agile
 ✓
  ✓
 ✓
 ✓
 ✓
Be open
✓
 ✓
✓
 ✓
✓
 ✓
Be nice to developers

Be clear and readable

Be flexible and agile

Be open
✓
✓
✓
✓

✓

✓
✓
✓
Do you have any questions?
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
{:from => 'Java', :to => 'Ruby'}
Upcoming SlideShare
Loading in...5
×

{:from => 'Java', :to => 'Ruby'}

2,927

Published on

About "From Java to Ruby" , "Ruby-do" and me.

Published in: Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,927
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
49
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "{:from => 'Java', :to => 'Ruby'}"

  1. 1. {:from => ‘Java’, :to => ‘Ruby’} “Java Ruby ” KAKUTANI Shintaro; Eiwa System Management, Inc.; a strong Ruby proponent
  2. 2. ✓ ✓ ✓ ✓ ✓
  3. 3. ✓ ✓ ✓ ✓ ✓
  4. 4. ✓ ✓ ✓ ✓ http://kakutani.com
  5. 5. http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
  6. 6. http://www.amazon.co.jp/o/ASIN/477413256X/kakutani-22
  7. 7. Agile
  8. 8. And there's business value in fun - after all motivation is a major factor in programmer productivity. - Martin Fowler
  9. 9. ✓ ✓ ✓
  10. 10. ✓ ✓ ✓ ✓ ✓
  11. 11. 100%
  12. 12. 78% 22%
  13. 13. ✓ ✓ ✓ ✓ ✓
  14. 14. 89% 11%
  15. 15. Half empty or half full?
  16. 16. ✓ ✓ ✓
  17. 17. ✓ ✓ ✓ ✓ ✓
  18. 18. ✓ ✓ ✓
  19. 19.
  20. 20.
  21. 21. ✓ ✓ ✓ ✓ ✓ ✓ ✓
  22. 22. ✓ ✓ ✓
  23. 23. ✓ ✓ ✓ ✓ ✓
  24. 24. ✓ ✓ ✓ ✓ ✓
  25. 25. ✓ ✓ ✓ ✓ ✓ ✓ ✓
  26. 26. ✓ ✓ ✓ ✓ ✓
  27. 27. ✓ ✓ ✓ ✓ ✓
  28. 28. ✓ ✓ ✓
  29. 29. ✓ ✓ ✓ ✓ ✓
  30. 30. ✓ ✓ ✓ ✓ ✓ ✓
  31. 31. ✓ ✓ ✓ ✓ ✓ ✓ ✓
  32. 32. ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
  33. 33. http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
  34. 34. http://www.ruby-lang.org/
  35. 35. RubyKaigi 2007
  36. 36. Photo by snoozer-05: http://www.flickr.com/photos/snoozer/539389108/
  37. 37. You must love your software tools
  38. 38. I LOVE RUBY
  39. 39. Ruby-do
  40. 40. Ruby has values
  41. 41. Be nice to developers Be clear and readable Be flexible and agile Be open
  42. 42. Be nice to developers ✓ ✓ ✓ ✓ ✓ ✓
  43. 43. Be clear and readable ✓ ✓ ✓ ✓ ✓
  44. 44. DEMO
  45. 45. ✓ ✓ ✓
  46. 46. class Team attr_accessor :name, :wins, :losses def initialize(name, wins, losses) @name, @wins, @losses = name, wins, losses end end teams = [ Team.new(quot;Tigersquot;, 12, 4), # winning Team.new(quot;Giantsquot;, 4, 12), Team.new(quot;Dragonsquot;, 10, 6), # winning Team.new(quot;Carpquot;, 7, 9)]
  47. 47. load quot;team.rbquot; winning_teams = teams.select do |team| team.losses < team.wins end winning_teams.each do |team| puts team.name end
  48. 48. class Team attr_accessor :name, :wins, :losses def initialize(name, wins, losses) @name, @wins, @losses = name, wins, losses end end teams = [ Team.new(quot;Tigersquot;, 12, 4), # winning Team.new(quot;Giantsquot;, 4, 12), Team.new(quot;Dragonsquot;, 10, 6), # winning Team.new(quot;Carpquot;, 7, 9)] winning_teams = teams.select do |team| team.losses < team.wins end winning_teams.each do |team| puts team.name end
  49. 49. package com.kakutani.java2ruby.sample; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class WinningTeamsFinder<T> { public static class Team { private String name; private int wins, losses; public Team(String name, int wins, int losses) { this.name = name;this.wins = wins;this.losses = losses; } public int getLosses() {return losses;} public void setLosses(int losses) { this.losses = losses;} public String getName() {return name;} public void setName(String name) {this.name = name;} public int getWins() {return wins;} public void setWins(int wins) {this.wins = wins;} } public interface BooleanMatcher<T> { public boolean isMatch(T obj); } ...
  50. 50. ... public List<T> findAll(List<T> list, BooleanMatcher<T> matcher) { List<T> result = new ArrayList<T>(); for(Iterator<T> all = list.iterator(); all.hasNext();){ T each = all.next(); if (matcher.isMatch(each)) result.add(each); } return result; } public static void main(String[] args) { List<Team> teams = new ArrayList<Team>(); teams.add(new Team(quot;Tigersquot;, 12, 4)); /* winning */ teams.add(new Team(quot;Giantsquot;, 4, 12)); teams.add(new Team(quot;Dragonsquot;, 10, 6)); /* winning */ teams.add(new Team(quot;Carpquot;, 7, 9)); List<Team> winningTeams = new WinningTeamsFinder<Team>() .findAll(teams,new BooleanMatcher<Team>() { public boolean isMatch(Team team) { return team.getLosses() < team.getWins(); }}); for(Iterator<Team> all = winningTeams.iterator(); all.hasNext();){ Team each = all.next(); System.out.println(each.getName()); }}}
  51. 51. Be flexible and agile ✓ ✓ ✓ ✓ ✓
  52. 52. Be open ✓ ✓ ✓ ✓ ✓ ✓
  53. 53. Be nice to developers Be clear and readable Be flexible and agile Be open
  54. 54. ✓ ✓ ✓
  55. 55. ✓ ✓ ✓ ✓ ✓
  56. 56. Do you have any questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×