Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A Hands-On Introduction to Ruby
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Zach Latta
July 27, 2013
Programming
960
1
Share
A Hands-On Introduction to Ruby
A brief introduction to the wonderful world of Ruby.
Zach Latta
July 27, 2013
More Decks by Zach Latta
See All by Zach Latta
The Art of Code
zach
0
170
Start a Hack Club
zach
0
150
Curiosity, Education, And What We Can Do Better
zach
1
630
Introduction to the Command-Line
zach
0
140
Other Decks in Programming
See All in Programming
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
950
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
1
360
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
23
13k
Sans tests, vos agents ne sont pas fiables
nabondance
0
130
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.1k
Back to the roots of date
jinroq
0
860
From Formal Specification to Property Based Test
ohbarye
0
2.6k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
720
要はバランスからの卒業 #yumemi_grow
kajitack
0
170
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
Six Lessons from altMBA
skipperchong
29
4.2k
Code Reviewing Like a Champion
maltzj
528
40k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Mind Mapping
helmedeiros
PRO
1
190
From π to Pie charts
rasagy
0
180
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
800
My Coaching Mixtape
mlcsv
0
130
Technical Leadership for Architectural Decision Making
baasie
3
360
Transcript
RUBY zach latta a hands-on introduction to
ruby is a high productivity scripting language
Japan made in designed by matsumoto yukihiro
matz
None
None
None
None
...and many more
it’s fun idiomatic poignant not java
objects. objects everywhere.
1 "DO NOT USE ALL CAPS".downcase => "do not use
all caps" valid ruby 2 5.rationalize => (5/1)
i can’t believe it’s not english!
1 5.times { print "hi" } => "hihihihihi" print “hi”
five times 2 print "hi" * 5 => "hihihihihi"
1 import java.io.* 2 3 public class Hi 4 {
5 public static void main(String[] args) 6 { 7 for (int i = 0; i < 5; i++) 8 { 9 System.out.print("hi"); 10 } 11 } 12 } …and in java
quickly and easily understand other ruby
1 print 'This is not a '\ 'palindrome'.reverse => "emordnilap
a ton si sihT"
“code so beautiful that tears are shed” - why’s poignant
guide to ruby
1 puts "What is your name?" 2 name = gets.strip!
3 4 puts "Hello #{ name }. How are you?" greetings
! 1 import java.util.Scanner; 2 3 public class ALessNiceGreeting 4
{ 5 public static void main(String[] args) 6 { 7 Scanner scanner = new Scanner(System.in); 8 9 System.out.println("What is your name?"); 10 String name = scanner.nextLine().trim(); 11 12 System.out.println("Hi " + name + ". How are you?"); 13 14 scanner.close(); 15 } 16 } greetings (cont.)
1 contents = File.read('file.txt') 2 puts contents file io
1 import java.io.BufferedReader; 2 import java.io.FileReader; 3 import java.io.IOException; 4
5 public class BufferedReaderExample 6 { 7 public static void main(String[] args) 8 { 9 BufferedReader br = null; 10 11 try 12 { 13 14 String sCurrentLine; 15 16 br = new BufferedReader(new FileReader("file.txt")); 17 18 while ((sCurrentLine = br.readLine()) != null) 19 { 20 System.out.println(sCurrentLine); 21 } 22 23 } 24 catch (IOException e) 25 { 26 e.printStackTrace(); 27 } 28 finally 29 { 30 try 31 { 32 if (br != null)br.close(); 33 } 34 catch (IOException ex) 35 { 36 ex.printStackTrace(); 37 } 38 } 39 40 } 41 } file io (cont.)
power simplicity vs.
1 def a_method 2 puts "Hello world!" 3 end methods
1 get ‘/‘ do 2 'Hello world!' 3 end dsl
gems
bogosort while !sorted(deck) { shuffle(deck) }
bogosort best case: ΩΩ(n) worst case: Unbounded average case: O(n
× n!)
• http://mislav.uniqpath.com/ poignant-guide/ • http://tryruby.org • make something!
github.com/zachlatta/baas speakerdeck.com/zach/a- hands-on-introduction-to-ruby
[email protected]
e: w: zachlatta.com g: github.com/zachlatta