Upgrade to Pro — share decks privately, control downloads, hide ads and more …

12 Years of Ruby

12 Years of Ruby

Keynote, RubyConf indonesia 2017

Sidu Ponnappa

October 06, 2017
Tweet

More Decks by Sidu Ponnappa

Other Decks in Programming

Transcript

  1. 12 Years Of Ruby
    @ponnappa

    View full-size slide

  2. this talk is also about beauty
    (and magic)

    View full-size slide

  3. but that’s for the end

    View full-size slide

  4. `whoami`
    formally, Chonira Ponnappa

    fully, Sidu Ponnappa Chonira Kariappa

    usually, Sidu

    View full-size slide

  5. LOGO 1991

    GWBASIC 1994

    QBASIC 1998

    C 1999

    C++ 1999

    Java 2002

    C# 2004

    Javascript 2005

    Ruby 2005

    View full-size slide

  6. started working in 2005

    View full-size slide

  7. 5 startups, 2 jobs, 1 exit

    View full-size slide

  8. at GO-JEK since 2015
    managing director, GO-JEK India 2015-2016

    head, data engineering 2016-now

    head, global talent acquisition 2017-now

    View full-size slide

  9. developer

    founder

    teacher

    community organiser

    sales guy

    marketing guy

    hr guy

    recruiter

    project manager

    product manager

    View full-size slide

  10. tl;dr
    i’ve done a bunch of stuff in 12 years working, and most of it involved
    Ruby

    View full-size slide

  11. developer

    founder

    teacher

    community organiser

    sales guy

    marketing guy

    hr guy

    recruiter

    project manager

    product manager

    View full-size slide

  12. 2005-2008
    activ money and activ mobs

    ruby 1.8.3/rails 0.11

    View full-size slide

  13. jsp/struts/hibernate vs rails
    the first aha moment

    convention > configuration

    mvc

    activerecord pattern as a lib!

    reloading! no more server restarts.

    View full-size slide

  14. unit tests as first class citizens
    but not TDD, sadly

    View full-size slide

  15. controller tests ftw!
    functional tests for request/response endpoints

    filled the gap between unit tests and browser automation

    View full-size slide

  16. automate everything
    rake + generators

    View full-size slide

  17. ruby was actually slow back
    then
    1.8.x was very slow

    multi process deployments

    nginx+lighttpd

    just restart the process!

    View full-size slide

  18. and i learned rails first
    (which is a bad idea)

    View full-size slide

  19. minswan
    easiest community

    kindest IRC channels

    ESR’s smart questions FAQ not necessary for survival

    View full-size slide

  20. 2007-now
    BRUG

    View full-size slide

  21. india’s first major RUG
    10 years old this year

    just under 1000 members

    View full-size slide

  22. my first large community
    experience
    10 years old this year

    just under 1000 members

    View full-size slide

  23. 2007-2009
    rackspace blackbox

    early private cloud implementation

    genesis of openstack

    microservices

    REST

    ruby 1.8.7/rails 2.x

    View full-size slide

  24. rails 2.x
    REST!

    activeresource (omg, in hindsight it sucked)

    activerecord query cache

    json serialization support (phew)

    plugins (awkward!)

    View full-size slide

  25. phusion passenger + REE
    finally, a not so painful server setup

    fork friendly ruby 1.8.x implementation

    better GC

    easier on memory

    View full-size slide

  26. importance of specs
    ruby codebases decay fast

    migrations from 2.0.x to 2.1.x/2.2.x

    much pain

    specs saved the day

    View full-size slide

  27. backward compatibility #fail
    plugins ecosystem like js lib ecosystem is today

    View full-size slide

  28. microservices
    rails 2.x made it easy

    View full-size slide

  29. don’t metaprogram
    cool 2 edged sword

    more likely to cut me than the problem :)

    definitely don’t override Object#responds_to? :D

    View full-size slide

  30. rjs
    server side rendered js

    another omg #fail

    ridiculous amounts of coupling

    so brittle!

    helped evolve my understand of separation of concerns between
    frontend and backend

    View full-size slide

  31. did i say REST?
    oops, but it was (and is) flawed

    no hypermedia controls

    a model isn’t a resource

    actually, a controller represents a resounce

    level 1 on richardson maturity model

    View full-size slide

  32. still no bundler :(
    plugins, grrr

    tried sharing common components across services

    whattay nightmare

    View full-size slide

  33. 2008-now
    github.com/kaiwren/wrest

    fluent REST client lib

    View full-size slide

  34. no good options
    activeresource

    net/http

    libcurl

    httparty

    View full-size slide

  35. activeresource
    bolted activerecord semantics over HTTP

    mapped HTTP verbs to CRUD :/

    REST != CRUD

    JUST DID NOT FIT

    View full-size slide

  36. net/http
    arrgh that api

    slow and unreliable

    no keep alive support

    totally meh

    View full-size slide

  37. libcurl
    many rb wrappers

    different apis

    but fast and the only sane choice for prod

    View full-size slide

  38. httparty
    terse api

    but everything is a class method :/

    no client caching

    View full-size slide

  39. so, results of diy
    multi-runtime support (mri, rbx, jruby, ironruby)

    (though some are since retired)

    transparent switch between net/http & libcurl

    focus on the URI & serialization, not CRUD

    object oriented & fully specced

    dev friendly api designed for use with REST endpoints

    View full-size slide

  40. in use across GO-JEK
    currently handling millions of RPM

    View full-size slide

  41. 2010-now
    rubyconf india

    400+ participants annually

    View full-size slide

  42. first conference
    learned from pycon india

    thank you, bang-pypers

    still going strong

    genesis of the emerging technology trust

    View full-size slide

  43. led to the ett
    my first non-profit

    raises > $100k annually

    now runs 3 annual open source confereces

    funds students contributing to oss

    connects students to oss mentors

    thank you satish, gautam, niranjan, ajey

    View full-size slide

  44. 2010
    c42 engineering

    boutique ruby/rails consultancy

    self funded product company

    $1M run rate in 18 months

    View full-size slide

  45. bundler + rbenv =
    dependecies

    multi ruby

    phew

    View full-size slide

  46. 2010
    rubyconf x, new orleans

    first talk at the main rubyconf

    View full-size slide

  47. open minded
    look beyond ruby

    no ego

    minswan again! such nice people.

    View full-size slide

  48. 2011
    github.com/rspec/rspec-mocks

    any_instance

    View full-size slide

  49. because speccing rails
    controllers is a pain
    objects that are create in a controller or lib

    not everyone does DI

    mocking non-public apis by reading source is scary

    long, implementation bound mock chain

    View full-size slide

  50. incredible learning
    thank you, dchelimsky

    refactored my PRs, then explained them to me

    (paitiently!)

    implementation bound specs anti-pattern

    View full-size slide

  51. 2011-2013
    rubymonk.com

    top ruby e-learning product

    (still live)

    ruby 1.9.2/rails 3.x

    View full-size slide

  52. thank you, matz!

    View full-size slide

  53. proved beauty matters
    the aesthetic made all the difference

    both visual and narrative style

    launched at rubyconf xi

    8 hours on HN top 3

    24 hours on HN homepage

    View full-size slide

  54. empathy
    taught me to teach through stories

    objects, blocks, message passing

    View full-size slide

  55. still popular
    80-90% of new rubyists use it at some point

    View full-size slide

  56. a labour of love
    but still, no munny :/

    learned the importance of business

    make it and they will pay is a fallacy

    View full-size slide

  57. 2012-now
    dev bootcamp

    taught in ruby

    View full-size slide

  58. consistency of language
    ruby is more consistent than most popular choices

    makes it so easy to teach in

    one of my favourite teaching languages

    View full-size slide

  59. 2015
    github.com/opal/opal

    ruby to js transpiler

    View full-size slide

  60. dream of same language on
    frontend and backend
    and that language wasn’t js :)

    View full-size slide

  61. redson
    github.com/kaiwren/redson

    my usual obsession with ui and ui frameworks

    opal based client side component framework for RoR

    only a poc, because gojek happened

    View full-size slide

  62. in conclusion
    (and with a healthy dose of hindsight)

    View full-size slide

  63. when i started
    code was a puzzle that needed to be solved

    View full-size slide

  64. 1991-2005: computer > me
    my focus was the computer’s productivity

    View full-size slide

  65. BASIC/C/C++/Java
    making the computer do something was the goal

    View full-size slide

  66. nothing magical about it
    it was just hard

    View full-size slide

  67. what is magic?
    write some words

    perform certain rituals

    makes the impossible possible

    View full-size slide

  68. that sounds like writing code!
    it was years before i realised writing code is magic

    View full-size slide

  69. beauty matters
    in code, beauty is utilitarian

    beauty makes magic happen

    View full-size slide

  70. utilitarian beauty?
    easy to understand

    easy to change

    easy to scale

    increasingly magical

    View full-size slide

  71. ruby made me see this
    ruby was the first language that felt beautiful

    then i discovered there are others

    seek them, it’s worth it

    View full-size slide

  72. this was about beauty
    it was all about making more beautiful things

    View full-size slide

  73. always build beautiful things
    they just work better

    much better

    View full-size slide

  74. terima kasih!
    @ponnappa

    View full-size slide