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 Slide

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

    View Slide

  3. but that’s for the end

    View Slide

  4. `whoami`
    formally, Chonira Ponnappa

    fully, Sidu Ponnappa Chonira Kariappa

    usually, Sidu

    View Slide

  5. LOGO 1991

    GWBASIC 1994

    QBASIC 1998

    C 1999

    C++ 1999

    Java 2002

    C# 2004

    Javascript 2005

    Ruby 2005

    View Slide

  6. started working in 2005

    View Slide

  7. 5 startups, 2 jobs, 1 exit

    View 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 Slide

  9. developer

    founder

    teacher

    community organiser

    sales guy

    marketing guy

    hr guy

    recruiter

    project manager

    product manager

    View Slide

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

    View Slide

  11. developer

    founder

    teacher

    community organiser

    sales guy

    marketing guy

    hr guy

    recruiter

    project manager

    product manager

    View Slide

  12. 2005-2008
    activ money and activ mobs

    ruby 1.8.3/rails 0.11

    View 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 Slide

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

    View Slide

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

    filled the gap between unit tests and browser automation

    View Slide

  16. automate everything
    rake + generators

    View Slide

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

    multi process deployments

    nginx+lighttpd

    just restart the process!

    View Slide

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

    View Slide

  19. minswan
    easiest community

    kindest IRC channels

    ESR’s smart questions FAQ not necessary for survival

    View Slide

  20. 2007-now
    BRUG

    View Slide

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

    just under 1000 members

    View Slide

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

    just under 1000 members

    View Slide

  23. 2007-2009
    rackspace blackbox

    early private cloud implementation

    genesis of openstack

    microservices

    REST

    ruby 1.8.7/rails 2.x

    View Slide

  24. rails 2.x
    REST!

    activeresource (omg, in hindsight it sucked)

    activerecord query cache

    json serialization support (phew)

    plugins (awkward!)

    View 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 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 Slide

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

    View Slide

  28. microservices
    rails 2.x made it easy

    View 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 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 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 Slide

  32. still no bundler :(
    plugins, grrr

    tried sharing common components across services

    whattay nightmare

    View Slide

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

    fluent REST client lib

    View Slide

  34. no good options
    activeresource

    net/http

    libcurl

    httparty

    View Slide

  35. activeresource
    bolted activerecord semantics over HTTP

    mapped HTTP verbs to CRUD :/

    REST != CRUD

    JUST DID NOT FIT

    View Slide

  36. net/http
    arrgh that api

    slow and unreliable

    no keep alive support

    totally meh

    View Slide

  37. libcurl
    many rb wrappers

    different apis

    but fast and the only sane choice for prod

    View Slide

  38. httparty
    terse api

    but everything is a class method :/

    no client caching

    View 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 Slide

  40. View Slide

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

    View Slide

  42. 2010-now
    rubyconf india

    400+ participants annually

    View Slide

  43. first conference
    learned from pycon india

    thank you, bang-pypers

    still going strong

    genesis of the emerging technology trust

    View Slide

  44. 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 Slide

  45. 2010
    c42 engineering

    boutique ruby/rails consultancy

    self funded product company

    $1M run rate in 18 months

    View Slide

  46. bundler + rbenv =
    dependecies

    multi ruby

    phew

    View Slide

  47. 2010
    rubyconf x, new orleans

    first talk at the main rubyconf

    View Slide

  48. open minded
    look beyond ruby

    no ego

    minswan again! such nice people.

    View Slide

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

    any_instance

    View Slide

  50. 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 Slide

  51. incredible learning
    thank you, dchelimsky

    refactored my PRs, then explained them to me

    (paitiently!)

    implementation bound specs anti-pattern

    View Slide

  52. 2011-2013
    rubymonk.com

    top ruby e-learning product

    (still live)

    ruby 1.9.2/rails 3.x

    View Slide

  53. thank you, matz!

    View Slide

  54. 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 Slide

  55. empathy
    taught me to teach through stories

    objects, blocks, message passing

    View Slide

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

    View Slide

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

    learned the importance of business

    make it and they will pay is a fallacy

    View Slide

  58. 2012-now
    dev bootcamp

    taught in ruby

    View Slide

  59. 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 Slide

  60. 2015
    github.com/opal/opal

    ruby to js transpiler

    View Slide

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

    View Slide

  62. 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  67. nothing magical about it
    it was just hard

    View Slide

  68. what is magic?
    write some words

    perform certain rituals

    makes the impossible possible

    View Slide

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

    View Slide

  70. beauty matters
    in code, beauty is utilitarian

    beauty makes magic happen

    View Slide

  71. utilitarian beauty?
    easy to understand

    easy to change

    easy to scale

    increasingly magical

    View Slide

  72. 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 Slide

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

    View Slide

  74. always build beautiful things
    they just work better

    much better

    View Slide

  75. terima kasih!
    @ponnappa

    View Slide