SlideShare a Scribd company logo
RUBY IS NOT
JUST A GEM
Ruby is also an awesome programming language.
It is a good choice for those who like and follow the
KISS principle.
IN THIS
PRESENTATION:
➤ Short language history
➤ Ruby’s flow
➤ Some code examples
➤ Ruby’s community
➤ Few words about nowadays problems of complex
systems development & how Ruby ships us in solving
them
➤ Your questions and my answers
MEET THE LIFE
STORY (SHORT
RUBY’S HISTORY
NOTES)
21 years old
BIRTH
1993
Matz (Yukihiro Matsumoto) wanted a language perfect for his
needs:
➤ Syntactically Simple
➤ Truly Object-Oriented
➤ Having Iterators and Closures
➤ Exception Handling
➤ Garbage Collection
➤ Portable
TODDLER
YEARS
December, 1996
➤ Ruby 1.0 was released
➤ Ruby 1.1 shortly followed in August of
1997
➤ The first stable version of Ruby (1.2)
was released in December of 1998.
PRIMARY SCHOOL
YEARS
1998-2004
➤ In 1998, Matz created a simple English homepage for Ruby - ‘Ruby-
Talk’. Ruby was beginning to spread beyond Japan.
➤ In October of 1999: the first book on the Ruby programming
language «The Object-oriented Scripting Language Ruby» by
Yukihiro Matsumoto and Keiju Ishitsuka.
➤ In 2001, the first English book on Ruby, Programming Ruby (“The
Pickaxe”), was published.
➤ Ruby 1.8 was released in 2003. This release made large amounts of
changes to the agile 10-year-old language.
➤ In 2004, RubyGems was released to the public.
THE REBELLIOUS
TEENAGER
2005-2012
➤ 2005: Ruby on Rails (RoR)
➤ In March of 2007, Ruby 1.8.6 was
released
➤ December, 2007: Ruby 1.9
➤ 2011: Ruby 1.9.3 (stable)
STRONG
ADULT
2013-nowadays
➤ February 2013: Ruby 2.0.0 was released
➤ Christmas day of 2013: Ruby 2.1.0 was released
➤ Ruby’s 21st birthday (February 24, 2014): Ruby 2.1.1
was released. Ruby is now legally allowed to drink in the
US. (Speed improvements and bugfixes).
➤ May of 2014: Ruby 2.1.2 was released (more bugfixes
and is the current stable version of Ruby).
FUTURE
Matz wanted a programming language that suited his needs, so
he built one. (If you can’t find something that you like, program it
yourself).
From 0.95 to 2.1.2, Ruby has struck the awe of those who wished
to program the way they wanted, not the way the machine
wanted.
We can’t know the future of the Ruby language, but we can
predict it based on the past. I believe that the Ruby language, and
its fantastic community will continue furthering the language
above and beyond what others think is possible, and projects built
using it will do the same.
RUBY’S FLOW
Ruby code
Ruby interpreter
jRuby
MRI
PEACES OF
CODE
puts ’’Hello, World!’’
1. Hello world
=> Hello, World!
a = 10
puts ’’now ’a’ is equal to: #{a}’’
2. String interpolation
=> now ’a’ is equal to 10
array = [1, "a", [2, :b]]
array.first
=> 1
array.select {|e| [String, Array].include?(e) }
=> ["a", [2, :b]]
array.map &:to_s
=> ["1", "a", "[2, :b]"]
2. Play with Arrays
hash = {field: "2", key: [3, "4"]}
hash[:key]
=> "2"
hash.keys
=> [:field, :key]
hash.flatten
=> [:field, "2", :key, [3, "4"]]
other_hash = {field: 3, other_key: "c"}
hash.merge other_hash
=> {:field=>3, :key=>[3, "4"], :other_key=>"c"}
2. Play with Hashes
class Fruit
attr_reader :weight, :eaten
def initialize(weight)
@weight = weight
@eaten = false
end
def eat
if @eaten
raise "This #{class}" was already eaten"
end
@eaten = true
end
end
3. Some OOP
class Apple < Fruit
attr_reader :cultivar
def initialize(weight, cultivar)
super(weight)
@cultivar = cultivar
end
def eat
super
@weight = @weight * 0.1
end
end
test_apple = Apple.new(300, "Rannet")
test_apple.weight
=> 300
test_apple.cultivar
=> «Rannet»
test_apple.eaten
=> false
test_apple.eat
=> true
test_apple.weight
=> 30
test_apple.eat
=> RuntimeError: This Apple was already eaten
RUBY’S
COMMUNITY
➤ Ruby groups: rubyusergroups.org
➤ Ruby mailing (Ruby-Talk, Ruby-Core, Ruby-Doc, Ruby-CVS)
➤ Ruby IRC (irc://irc.freenode.net/ruby)
➤ Blogs (O’Reilly Ruby, Riding Rails, Ruby Inside, Matz’ Blog)
➤ Contribute to Ruby Core (https://github.com/ruby/ruby)
➤ Conferentions (RubyConf, RubyKaigi, …)
NOWADAYS
DEVELOPMENT PROBLEMS
COMPLEXITY
USERS COUNT
TIME, DEV RESOURCES
SUPPORT, COMPUTING
RESOURCES, DATA STORAGE
Ievgenii Narovlianskyi - Ruby is not just a gem

More Related Content

PPTX
Serviço, preço, praça e promoção (4Ps)
PDF
Creating multiple v cards
DOCX
MBennett Resume 2016
DOC
Kelli Backman Resume 2
DOC
cia in south vietnam paper
PPTX
MEDIOS TECNOLÓGICOS : TIC
PDF
ฟอร์มแฟ้มสะสมผลงานสำหรับสอนนักเรียนของโฟมๆๆ
PDF
AppsGenii Projects Portfolio
Serviço, preço, praça e promoção (4Ps)
Creating multiple v cards
MBennett Resume 2016
Kelli Backman Resume 2
cia in south vietnam paper
MEDIOS TECNOLÓGICOS : TIC
ฟอร์มแฟ้มสะสมผลงานสำหรับสอนนักเรียนของโฟมๆๆ
AppsGenii Projects Portfolio

Viewers also liked (6)

PPS
Les indications géographiques comme propriété intellectuelle: protéger la rép...
PPTX
Scholarshipppt
ODP
PPTX
Evaluación formativa.
PPTX
HSBD Day hoc theo du an
PPTX
نظام إدارة التعلم الالكتروني Moodle lms
Les indications géographiques comme propriété intellectuelle: protéger la rép...
Scholarshipppt
Evaluación formativa.
HSBD Day hoc theo du an
نظام إدارة التعلم الالكتروني Moodle lms
Ad

Similar to Ievgenii Narovlianskyi - Ruby is not just a gem (20)

PPTX
How to use Ruby in QA, DevOps, Development. Ruby lang Intro
PPTX
Ruby Class 1
PPTX
1 Intro
PDF
01 index
PDF
Kungfurails2009
PPTX
Ruby programming
PPTX
Optimizing for programmer happiness
PPTX
Ruby on Rails Fundamentals, Class 1
PDF
Ruby tutorial
PDF
02 ruby overview
PPTX
PPTX
Ruby introductions
PPT
Ruby Past, Present, Future
PPTX
Why ruby
DOCX
Page List & Sample Material (Repaired)
PPTX
Ruby on Rails Introduction M&P - IT Skill Development Program 07
PPT
Initiation à Ruby on Rails
PDF
Fukuoka Ruby Award 2023 - Opal
PPTX
Ruby in mule
PPT
Intro To Ror
How to use Ruby in QA, DevOps, Development. Ruby lang Intro
Ruby Class 1
1 Intro
01 index
Kungfurails2009
Ruby programming
Optimizing for programmer happiness
Ruby on Rails Fundamentals, Class 1
Ruby tutorial
02 ruby overview
Ruby introductions
Ruby Past, Present, Future
Why ruby
Page List & Sample Material (Repaired)
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Initiation à Ruby on Rails
Fukuoka Ruby Award 2023 - Opal
Ruby in mule
Intro To Ror
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Programs and apps: productivity, graphics, security and other tools
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Programs and apps: productivity, graphics, security and other tools
The AUB Centre for AI in Media Proposal.docx
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Ievgenii Narovlianskyi - Ruby is not just a gem

  • 1. RUBY IS NOT JUST A GEM Ruby is also an awesome programming language. It is a good choice for those who like and follow the KISS principle.
  • 2. IN THIS PRESENTATION: ➤ Short language history ➤ Ruby’s flow ➤ Some code examples ➤ Ruby’s community ➤ Few words about nowadays problems of complex systems development & how Ruby ships us in solving them ➤ Your questions and my answers
  • 3. MEET THE LIFE STORY (SHORT RUBY’S HISTORY NOTES) 21 years old
  • 4. BIRTH 1993 Matz (Yukihiro Matsumoto) wanted a language perfect for his needs: ➤ Syntactically Simple ➤ Truly Object-Oriented ➤ Having Iterators and Closures ➤ Exception Handling ➤ Garbage Collection ➤ Portable
  • 5. TODDLER YEARS December, 1996 ➤ Ruby 1.0 was released ➤ Ruby 1.1 shortly followed in August of 1997 ➤ The first stable version of Ruby (1.2) was released in December of 1998.
  • 6. PRIMARY SCHOOL YEARS 1998-2004 ➤ In 1998, Matz created a simple English homepage for Ruby - ‘Ruby- Talk’. Ruby was beginning to spread beyond Japan. ➤ In October of 1999: the first book on the Ruby programming language «The Object-oriented Scripting Language Ruby» by Yukihiro Matsumoto and Keiju Ishitsuka. ➤ In 2001, the first English book on Ruby, Programming Ruby (“The Pickaxe”), was published. ➤ Ruby 1.8 was released in 2003. This release made large amounts of changes to the agile 10-year-old language. ➤ In 2004, RubyGems was released to the public.
  • 7. THE REBELLIOUS TEENAGER 2005-2012 ➤ 2005: Ruby on Rails (RoR) ➤ In March of 2007, Ruby 1.8.6 was released ➤ December, 2007: Ruby 1.9 ➤ 2011: Ruby 1.9.3 (stable)
  • 8. STRONG ADULT 2013-nowadays ➤ February 2013: Ruby 2.0.0 was released ➤ Christmas day of 2013: Ruby 2.1.0 was released ➤ Ruby’s 21st birthday (February 24, 2014): Ruby 2.1.1 was released. Ruby is now legally allowed to drink in the US. (Speed improvements and bugfixes). ➤ May of 2014: Ruby 2.1.2 was released (more bugfixes and is the current stable version of Ruby).
  • 9. FUTURE Matz wanted a programming language that suited his needs, so he built one. (If you can’t find something that you like, program it yourself). From 0.95 to 2.1.2, Ruby has struck the awe of those who wished to program the way they wanted, not the way the machine wanted. We can’t know the future of the Ruby language, but we can predict it based on the past. I believe that the Ruby language, and its fantastic community will continue furthering the language above and beyond what others think is possible, and projects built using it will do the same.
  • 10. RUBY’S FLOW Ruby code Ruby interpreter jRuby MRI
  • 11. PEACES OF CODE puts ’’Hello, World!’’ 1. Hello world => Hello, World!
  • 12. a = 10 puts ’’now ’a’ is equal to: #{a}’’ 2. String interpolation => now ’a’ is equal to 10
  • 13. array = [1, "a", [2, :b]] array.first => 1 array.select {|e| [String, Array].include?(e) } => ["a", [2, :b]] array.map &:to_s => ["1", "a", "[2, :b]"] 2. Play with Arrays
  • 14. hash = {field: "2", key: [3, "4"]} hash[:key] => "2" hash.keys => [:field, :key] hash.flatten => [:field, "2", :key, [3, "4"]] other_hash = {field: 3, other_key: "c"} hash.merge other_hash => {:field=>3, :key=>[3, "4"], :other_key=>"c"} 2. Play with Hashes
  • 15. class Fruit attr_reader :weight, :eaten def initialize(weight) @weight = weight @eaten = false end def eat if @eaten raise "This #{class}" was already eaten" end @eaten = true end end 3. Some OOP class Apple < Fruit attr_reader :cultivar def initialize(weight, cultivar) super(weight) @cultivar = cultivar end def eat super @weight = @weight * 0.1 end end
  • 16. test_apple = Apple.new(300, "Rannet") test_apple.weight => 300 test_apple.cultivar => «Rannet» test_apple.eaten => false test_apple.eat => true test_apple.weight => 30 test_apple.eat => RuntimeError: This Apple was already eaten
  • 17. RUBY’S COMMUNITY ➤ Ruby groups: rubyusergroups.org ➤ Ruby mailing (Ruby-Talk, Ruby-Core, Ruby-Doc, Ruby-CVS) ➤ Ruby IRC (irc://irc.freenode.net/ruby) ➤ Blogs (O’Reilly Ruby, Riding Rails, Ruby Inside, Matz’ Blog) ➤ Contribute to Ruby Core (https://github.com/ruby/ruby) ➤ Conferentions (RubyConf, RubyKaigi, …)
  • 18. NOWADAYS DEVELOPMENT PROBLEMS COMPLEXITY USERS COUNT TIME, DEV RESOURCES SUPPORT, COMPUTING RESOURCES, DATA STORAGE