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

Introduction to Ruby Programming Language

Introduction to Ruby Programming Language

Created for For SARCCOM Indonesia meetup

Didik Wicaksono

August 26, 2017
Tweet

More Decks by Didik Wicaksono

Other Decks in Technology

Transcript

  1. print "elephant" if "elephant".include? "ant" You can speak this in

    proper english: “Print an elephant if elephant include ant”
  2. print "elephant" if "elephant".include? "ant" You can speak this in

    proper english: “Print elephant if elephant include ant”
  3. print "elephant" if "elephant".include? "ant" You can speak this in

    proper english: “Print elephant if elephant include ant”
  4. This sentence still doesn’t make any sense, but it is

    readable You can speak this in proper english: “Print elephant if elephant include ant” print "elephant" if "elephant".include? "ant"
  5. print "elephant" if "elephant".include? "ant" “if” can be used to

    modify expression Method name can have question mark
  6. one = 1 two = 2 three = 3 one,

    two, three = [1, 2, 3]
  7. one = 1 two = 2 three = 3 one,

    two, three = [1, 2, 3] one, two, three = 1, 2, 3 You don’t even need
  8. Blocks allows us to attach closure to any method %w(Google

    Yahoo MSN).map do |engine| "https://www.#{engine.downcase}.com" end this will be returned
  9. Blocks allows us to attach closure to any method %w(Google

    Yahoo MSN).map do |engine| "https://www.#{engine.downcase}.com" end this will be returned You don’t even need to write return
  10. one = 1 two = 2 three = 3 one,

    two, three = [1, 2, 3] one, two, three = 1, 2, 3 You don’t even need FLASHBACK!
  11. You might not noticed, but Mac users already have Ruby

    (even though its outdated) Installation is pretty easy: https://www.ruby-lang.org/en/docum entation/installation/
  12. It only takes 20 minutes to learn Ruby from this

    page: https://www.ruby-lang.org/en/docu mentation/quickstart/
  13. MINASWAN (Matz is nice and so we are nice) みなさん

    (read: mina-san) translation: everyone (polite)
  14. MINASWAN (Matz is nice and so we are nice) みなさん

    (read: mina-san) translation: everyone (polite)
  15. In Indonesia, we are known as ID-Ruby We are active

    on Slack and Telegram Feel free to join: http://ruby.id/slack and https://t.me/ruby_id
  16. Its over 10 years, but Rails is still on demand!

    https://infinum.co/the-capsized-eight/analyzing-rubygems-stats-v2016
  17. Current Rails version is 5.1 with Ruby 2.4 Started using

    Rails on ver 1.2.3 with Ruby 1.8.7 (2009!)