$30 off During Our Annual Pro Sale. View Details »

How the East Was Won

How the East Was Won

Slides for Modern Web 2015 talk "How the East Was Won" http://modernweb.tw/

Akira Matsuda

May 16, 2015
Tweet

More Decks by Akira Matsuda

Other Decks in Programming

Transcript

  1. How the
    EAST

    Was Won
    Akira Matsuda

    View Slide

  2. Hello, Modern Web!
    I’m very much honored

    to be here!

    View Slide

  3. Here.

    View Slide

  4. ʂʁ

    View Slide

  5. I’m Sorry, I’m Not a ݴޠ೭෕

    View Slide

  6. Today I’m Going to Talk About
    Ruby

    View Slide

  7. Ruby೭෕

    View Slide

  8. Ruby೭෕
    Matz

    View Slide

  9. Ruby೭෕

    View Slide

  10. দ?
    Matz: দຊ (Matsumoto)
    Me: দా (Matsuda)

    View Slide

  11. Even an Airport in Taipei Is Matz

    View Slide

  12. I’m Not a Ruby೭෕
    But I’m rather a Ruby೭ࢠ

    View Slide

  13. me
    Akira Matsuda (দా ໌)
    @a_matsudaɹ
    amatsudaɹ

    View Slide

  14. amatsuda

    View Slide

  15. amatsuda
    Ruby

    View Slide

  16. amatsuda
    Rails

    View Slide

  17. amatsuda
    Haml

    View Slide

  18. amatsuda
    RubyKaigi

    View Slide

  19. amatsuda
    Gems

    View Slide

  20. Q. Are You a Ruby
    Programmer?

    View Slide

  21. Q. Who Here Have
    Never Used Ruby
    Before?

    View Slide

  22. There Are So Many
    Programming
    Languages

    View Slide

  23. http://en.wikipedia.org/wiki/
    List_of_programming_languages

    View Slide

  24. @languages.map
    https://www.google.com/
    maps/d/u/0/viewer?
    mid=zfjBCRa8NxJ0.kxDsp
    ZZkaW2s

    View Slide

  25. @languages.map

    View Slide

  26. @languages.map

    View Slide

  27. Ruby
    Very unique language
    Made in Japan!
    The creator “Matz” is a
    Japanese
    The only language in this map
    that was made in Asia

    View Slide

  28. Ruby Was Made in Asia
    But that’s not the reason why
    Ruby became popular
    Even in Japan, Ruby wasn’t
    very popular before

    “Ruby on Rails”
    Became popular in US, then
    reverse-imported to Japan

    View Slide

  29. So Why Ruby Became Popular?
    Because people liked

    Ruby’s philosophy

    View Slide

  30. –Matz
    “Ruby is designed to make
    programmers happy.”
    Ruby’s Design Philosophy

    View Slide

  31. I’m Not Saying That,
    Ruby is the only language
    that can make you happy
    I promise that Ruby will
    make you happy

    View Slide

  32. Happy?
    What does “happy” mean?
    How can a programming
    language make us happy?

    View Slide

  33. History of Ruby

    View Slide

  34. In the Beginning,
    1993೥02݄14೔:

    Matz thought,

    “Let there be a language,”
    and Keiju named it “Ruby”.

    View Slide

  35. Design Concept
    Pure Object Oriented
    Scripting language

    View Slide

  36. Nothing New
    No new paradigm
    A curation of existing good
    parts of other languages

    View Slide

  37. –Matz, at RubyKaigi 2013
    “Ruby = Lisp + Smalltalk + Perl + C”
    Ingredients of Ruby

    View Slide

  38. –Matz, 2000
    “Designed to Make
    Programmers Happy”
    Ruby’s Design Philosophy

    View Slide

  39. Ruby Is Optimized for Developers
    Where almost every other
    language is optimized for
    computers

    View Slide

  40. Ruby Focuses on Productivity
    Where almost every other
    language focuses on
    execution efficiency

    View Slide

  41. Ruby’s Syntax
    Concise, succinct syntax
    => Feels natural to humans

    View Slide

  42. Feels Natural
    Feels like our natural
    language
    English

    View Slide

  43. Ruby < English
    Ruby = Lisp + Smalltalk + Perl + C

    + English

    View Slide

  44. Natural
    Write what you think, then it
    should work
    And so the code reads very
    natural to other people

    View Slide

  45. Ruby Feels Natural
    => Productivity ɹ㽉㽉✨
    => Maintainability 㽉㽉

    View Slide

  46. Ruby Is Flexible
    Everything is an Object
    You can monkey-patch
    anything!

    View Slide

  47. You Can Even Change the Way

    1 + 1 Works! (but please don’t do this)
    % ruby -e "p 1 + 1"

    #=> 2
    % ruby -e "Fixnum.class_eval {
    def +(n) self - n; end }; p 1 + 1"

    #=> 0

    View Slide

  48. Isn’t This Flexibility Dangerous?
    Yes, it is
    Users can easily shoot your
    own legs in Ruby
    But who does such a stupid
    thing?

    View Slide

  49. Ruby Trusts the Users
    Ruby gives you powerful
    tools (e.g. meta programming)
    Which helps users a lot
    Gives users almightiness
    and universal feeling

    View Slide

  50. The First Public Release
    1995೥12݄21೔:

    The First Public Release
    20 years ago!

    View Slide

  51. And Matz Said,
    “Let there be communities”

    View Slide

  52. Communities
    Ruby Communities == Mailing Lists

    View Slide

  53. Mailing Lists
    1995೥: ruby-list (Japanese,
    for users)

    View Slide

  54. ruby-list ML
    As soon as he published his
    first release, he created a
    mailing list

    View Slide

  55. Mailing Lists
    1995೥: ruby-list (Japanese,
    for users)
    1997೥: ruby-dev (Japanese,
    for core developers)

    View Slide

  56. ruby-dev ML
    “Let the core developers be
    gathered to one place”
    Matz called the ML

    “ruby-dev”

    View Slide

  57. Mailing Lists
    1995೥: ruby-list (Japanese,
    for users)
    1997೥: ruby-dev (Japanese,
    for core developers)
    1998೥: ruby-talk (English)

    View Slide

  58. ruby-talk ML
    “Be fruitful and increase in
    number and fill the
    computers on the earth”
    And there were non-
    Japanese Ruby users

    View Slide

  59. Matz’s Community Design
    He created some mailing lists,
    and called them “communities”
    He separated users and core
    developers
    He created English speaking
    community as well

    View Slide

  60. And Matz Said,
    “Let there be books”

    View Slide

  61. Books
    1999೥:

    ΦϒδΣΫτࢦ޲εΫϦϓτݴޠRuby

    (Object Oriented Scripting Language Ruby
    Written by Matz himself, and Keiju
    the godfather of Ruby
    Written in Japanese

    View Slide

  62. The “Mustard Coloured” Book

    View Slide

  63. Books
    2000೥: Programming Ruby
    Written by Dave Thomas &
    Andrew Hunt
    Written in English

    View Slide

  64. The pick-axe Book

    View Slide

  65. The Language Spread Rapidly
    Because the book was great
    Because Ruby < English

    View Slide

  66. And Matz Said?
    “Let there be conferences”

    View Slide

  67. Did He?
    No, this is not true.

    View Slide

  68. And Matz Said?
    “Let there be conferences”

    View Slide

  69. Ruby Conferences
    2001೥: The 1st RubyConf (US)
    2003೥: The 1st EuRuKo
    (Europe)
    2006೥: The 1st RubyKaigi
    (Japan)

    View Slide

  70. Ruby Conferences
    ✓Ruby conferences were
    kicked off by the English-
    speaking community

    View Slide

  71. And Matz Said?
    “Let there be packaging
    system”

    View Slide

  72. And Matz Said?
    “Let there be packaging
    system”

    View Slide

  73. Packaging System
    2003೥: RubyGems
    at RubyConf in US

    View Slide

  74. Ruby Packaging System
    ✓The Ruby packaging system
    called “RubyGems” was
    created by the community

    in a conference

    View Slide

  75. And Matz Said?
    “Let there be web framework”

    View Slide

  76. And Matz Said?
    “Let there be web framework”

    View Slide

  77. The Web Framework

    View Slide

  78. The Web Framework

    View Slide

  79. Ruby on Rails
    Created by DHH (David
    Heinemeier Hansson)
    2004೥: First Release

    View Slide

  80. Ruby on Rails in 2015
    DHH still rules
    10-20 Core members
    4000 Contributors

    View Slide

  81. Ruby Web Framework
    ✓The Ruby web framework
    called “Ruby on Rails” was
    created by DHH, and is
    being maintained by the
    community

    View Slide

  82. Ruby on Rails
    Convention over
    Configuration
    Don’t Repeat Yourself
    Code Generator

    View Slide

  83. Ruby on Rails
    Aggressively focuses on
    productivity

    View Slide

  84. –DHH
    “Write Less Code”
    Rails’ Philosophy

    View Slide

  85. Rails Ruby
    DHH’s philosophy perfectly
    matches Ruby’s philosophy
    Rails became possible
    because DHH found Ruby

    View Slide

  86. Rails Is a Framework That Extends
    “the Ruby Way”
    And so, it’s named

    ”Ruby on Rails”,

    not “Rails on Ruby”

    View Slide

  87. Sophisticated & Powerful

    Plugin System
    Based on Ruby’s flexibility
    Sometimes Monkey-
    Patchability

    View Slide

  88. For Example

    View Slide

  89. Adding #like Query Method to
    Model Classes

    View Slide

  90. Adding #like Method to Model
    Classes (Result)
    Developer.like(name: ‘Mat
    %’).to_sql


    #=> “SELECT * FROM developers
    WHERE name like ‘Mat%’”

    View Slide

  91. Enabling Controller Actions to
    Take Method Parameters

    View Slide

  92. Enabling Controller Actions to
    Take Method Parameters (Result)
    # try “action_args” gem if you liked this!

    View Slide

  93. Because Ruby Is Such a

    Flexible Language
    Rails has so many powerful
    plugins

    View Slide

  94. Because Rails Has

    the Plugin System
    The Framework doesn’t have
    to do everything
    Rails provides the core
    features, and delagates
    other features to plugins

    View Slide

  95. Rails Plugins
    Authorization / authentication
    File Upload
    Pagination
    Alternative ORMs
    Template Engines
    Testing

    View Slide

  96. Because Rails Has

    the Plugin System
    Rails encourages people to
    write their own plugins
    Rails trusts the users,

    just as Ruby trusts the users

    View Slide

  97. Because Users Can Create

    Powerful Plugins
    The community has got so
    many talented plugin
    creators

    View Slide

  98. Standing on Shoulders of Giants
    The community helps your
    app development!

    View Slide

  99. Don’t Repeat Yourself
    If you want to develop a typical feature
    for your app, you may find a plugin for
    that on the web
    Don’t Repeat Someone’s Hack
    If you find a bug on the language,
    framework, or a plugin, just fix it and
    send a patch
    Don’t Let Others Repeat Your Bug

    View Slide

  100. The Whole Community Can Be DRY
    That’s the Ecosystem

    View Slide

  101. Don’t Repeat Yourself

    View Slide

  102. Matz Just Created the Language
    And the Communities
    Then the community created
    everything else

    View Slide

  103. “How the East Was Won”

    View Slide

  104. &ɹ =>ɹ
    Ruby was born in Japan
    And raised in the community

    View Slide

  105. “How the East Was Won”
    “The East” alone didn’t win
    But the whole “community”
    won the current status of
    Ruby

    View Slide

  106. The Community

    View Slide

  107. What “the Community” Is Like
    Today?

    View Slide

  108. The Mailing Lists?

    View Slide

  109. The Ruby Core?

    View Slide

  110. The Rails Core?

    View Slide

  111. –Me, 2015
    “A group of Rubyists
    Communicating over the
    Internet”
    The Ruby Community

    View Slide

  112. We Programmers Can Communicate
    in Programming Language!
    Not only in natural language
    such as English

    View Slide

  113. We Programmers Can Communicate
    in Programming Language!
    Such activity is called

    “Social Coding”

    View Slide

  114. Social Coding
    Drives OSS development
    Communication with code
    GitHub
    Built with Ruby

    View Slide

  115. Ruby < English
    Concise, succinct
    Reads natural

    View Slide

  116. Ruby Social Coding
    Works great as a

    “Social Coding” protocol
    A true “Modern Web”
    Language

    View Slide

  117. You Can Join!
    The community is there in
    your computers!
    Don’t be afraid!

    View Slide

  118. You Can Join!
    Language Barrier?
    No! We’re all speakers of
    Ruby!

    View Slide

  119. –Me, 2015
    “A group of Rubyists
    Communicating over the
    Internet”
    The Ruby Community

    View Slide

  120. Q. Who Here Thinks You Are a
    Rubyist?
    Or who here wants to be a
    Rubyist?
    How can you be a Rubyist?

    View Slide

  121. What Is Rubyist?

    How Can You Be a Rubyist?
    The word “Rubyist” was
    created by Matz himself in
    May 1997


    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/
    ruby/ruby-list/2908

    View Slide

  122. Definition of “Rubyist”
    People whoever have some
    positive feeling toward Ruby.
    Not defined by Ruby
    programming skill
    A skilled Ruby programmer
    shall be called “a ruby hacker”

    View Slide

  123. For example,
    Who promote Ruby to other people
    Who answer others’ questions
    Who organize local or online
    communities
    Who write Ruby books
    Who encourage the author of Ruby
    The author of Ruby ^^;;;

    View Slide

  124. It’s So Easy to Become a Rubyist
    You may promote Ruby
    If you like Ruby
    Just tweet “I like Ruby!”
    Then you’re a Rubyist!

    View Slide

  125. Just tweet “I like Ruby!”
    You can easily do this with
    Ruby!
    % gem install t
    % t authorize
    % t update “I like Ruby!”

    View Slide

  126. The Community Is Not Just a
    Virtual Thing
    I said, it’s a group of people.

    View Slide

  127. Meet the Community!
    Ruby conferences
    *.rb

    View Slide

  128. Asakusa.rb

    View Slide

  129. Asakusa.rb.map
    Local community
    Friends from all over the
    world
    #rubyfriends

    View Slide

  130. Welcome to Ruby!

    View Slide

  131. Be Nice to Each Other

    View Slide

  132. Enjoy Hacking

    View Slide

  133. May RUBY be with
    YOU!

    View Slide