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

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Group

    {:from => 'Java', :to => 'Ruby'} - Presentation Transcript

    1. {:from => ‘Java’, :to => ‘Ruby’} “Java Ruby ” KAKUTANI Shintaro; Eiwa System Management, Inc.; a strong Ruby proponent
    2. ✓ ✓ ✓ ✓ ✓
    3. ✓ ✓ ✓ ✓ ✓
    4. ✓ ✓ ✓ ✓ http://kakutani.com
    5. http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
    6. http://www.amazon.co.jp/o/ASIN/477413256X/kakutani-22
    7. Agile
    8. And there's business value in fun - after all motivation is a major factor in programmer productivity. - Martin Fowler
    9. ✓ ✓ ✓
    10. ✓ ✓ ✓ ✓ ✓
    11. 100%
    12. 78% 22%
    13. ✓ ✓ ✓ ✓ ✓
    14. 89% 11%
    15. Half empty or half full?
    16. ✓ ✓ ✓
    17. ✓ ✓ ✓ ✓ ✓
    18. ✓ ✓ ✓
    19. ✓ ✓ ✓ ✓ ✓ ✓ ✓
    20. ✓ ✓ ✓
    21. ✓ ✓ ✓ ✓ ✓
    22. ✓ ✓ ✓ ✓ ✓
    23. ✓ ✓ ✓ ✓ ✓ ✓ ✓
    24. ✓ ✓ ✓ ✓ ✓
    25. ✓ ✓ ✓ ✓ ✓
    26. ✓ ✓ ✓
    27. ✓ ✓ ✓ ✓ ✓
    28. ✓ ✓ ✓ ✓ ✓ ✓
    29. ✓ ✓ ✓ ✓ ✓ ✓ ✓
    30. ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
    31. http://www.amazon.co.jp/o/ASIN/4873113202/kakutani-22
    32. http://www.ruby-lang.org/
    33. RubyKaigi 2007
    34. Photo by snoozer-05: http://www.flickr.com/photos/snoozer/539389108/
    35. You must love your software tools
    36. I LOVE RUBY
    37. Ruby-do
    38. Ruby has values
    39. Be nice to developers Be clear and readable Be flexible and agile Be open
    40. Be nice to developers ✓ ✓ ✓ ✓ ✓ ✓
    41. Be clear and readable ✓ ✓ ✓ ✓ ✓
    42. DEMO
    43. ✓ ✓ ✓
    44. class Team attr_accessor :name, :wins, :losses def initialize(name, wins, losses) @name, @wins, @losses = name, wins, losses end end teams = [ Team.new(\"Tigers\", 12, 4), # winning Team.new(\"Giants\", 4, 12), Team.new(\"Dragons\", 10, 6), # winning Team.new(\"Carp\", 7, 9)]
    45. load \"team.rb\" winning_teams = teams.select do |team| team.losses < team.wins end winning_teams.each do |team| puts team.name end
    46. class Team attr_accessor :name, :wins, :losses def initialize(name, wins, losses) @name, @wins, @losses = name, wins, losses end end teams = [ Team.new(\"Tigers\", 12, 4), # winning Team.new(\"Giants\", 4, 12), Team.new(\"Dragons\", 10, 6), # winning Team.new(\"Carp\", 7, 9)] winning_teams = teams.select do |team| team.losses < team.wins end winning_teams.each do |team| puts team.name end
    47. 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); } ...
    48. ... 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(\"Tigers\", 12, 4)); /* winning */ teams.add(new Team(\"Giants\", 4, 12)); teams.add(new Team(\"Dragons\", 10, 6)); /* winning */ teams.add(new Team(\"Carp\", 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()); }}}
    49. Be flexible and agile ✓ ✓ ✓ ✓ ✓
    50. Be open ✓ ✓ ✓ ✓ ✓ ✓
    51. Be nice to developers Be clear and readable Be flexible and agile Be open
    52. ✓ ✓ ✓
    53. ✓ ✓ ✓ ✓ ✓
    54. Do you have any questions?

    + Shintaro KakutaniShintaro Kakutani, 3 years ago

    custom

    2315 views, 2 favs, 5 embeds more stats

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

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2315
      • 2190 on SlideShare
      • 125 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 42
    Most viewed embeds
    • 115 views on http://kakutani.com
    • 6 views on http://kakutani.tumblr.com
    • 2 views on http://shibuyahacks.tumblr.com
    • 1 views on http://127.0.0.1:8080
    • 1 views on http://72.14.235.132

    more

    All embeds
    • 115 views on http://kakutani.com
    • 6 views on http://kakutani.tumblr.com
    • 2 views on http://shibuyahacks.tumblr.com
    • 1 views on http://127.0.0.1:8080
    • 1 views on http://72.14.235.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags

    Groups / Events