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
The Road to Ruby Mastery (RailsClub Moscow 2017)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Bozhidar Batsov
September 23, 2017
Programming
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Road to Ruby Mastery (RailsClub Moscow 2017)
Slide-deck from my presentation at RailsClub Moscow 2017.
Bozhidar Batsov
September 23, 2017
More Decks by Bozhidar Batsov
See All by Bozhidar Batsov
RuboCop 2.0: Where do we go now?
bbatsov
0
65
Clojure: The Bad Parts
bbatsov
0
110
Weird Ruby (RubyDay 2024, Verona)
bbatsov
0
180
Sustainable OSS (Balkan Ruby 2024, Sofia)
bbatsov
0
200
Ruby's Creed (RubyDay 2023, Verona)
bbatsov
0
67
Victims of Complexity
bbatsov
0
340
Ruby 3.0 Redux (Spark Academy, Jan 2021)
bbatsov
1
290
Ruby 3.0 Redux (Pivorak 4.0)
bbatsov
0
510
The Elements of Programming Style (HackConf 2019)
bbatsov
0
220
Other Decks in Programming
See All in Programming
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
670
ふつうのFeature Flag実践入門
irof
7
3.9k
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
240
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
Oxcを導入して開発体験が向上した話
yug1224
4
310
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
340
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
110
RTSPクライアントを自作してみた話
simotin13
0
600
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.3k
New "Type" system on PicoRuby
pocke
1
920
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.5k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
230
The Pragmatic Product Professional
lauravandoore
37
7.3k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Designing for Timeless Needs
cassininazir
1
250
The SEO Collaboration Effect
kristinabergwall1
1
480
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Navigating Team Friction
lara
192
16k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Building Applications with DynamoDB
mza
96
7.1k
Transcript
None
Божидар
I’m back
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Большое спасибо!
Большое спасибо!
Sofia, Bulgaria
Sofia, Bulgaria
None
I’m an Emacs fanatic
bbatsov
None
None
They call me Master…
… and I’m a Rubyist
I must be The Master Rubyist!
None
This guy is so deep and profound!
The Road to Ruby Mastery by Bozhidar Batsov
Master
having or showing very great skill or proficiency
None
Novice
a person new to and inexperienced in a job or
situation
None
Journeyman
a worker, performer, or athlete who is experienced and good
but not excellent
None
Dreyfus Model of Skill Acquisition
Novice Advanced Beginner Competent Proficient Expert
The Road to Mastery
None
not really
try 10 years
http://norvig.com/21- days.html Teach Yourself Programming in Ten Years Peter Norvig
Apprenticeship
Novice Journeyman Master Apprenticeship Apprenticeship
learning from others
directly
indirectly
Computer Science Fundamentals
None
None
None
None
None
None
None
None
None
None
None
Object-oriented programming
None
Ruby is a purely object- oriented language
None
None
Know Thy Language!
Crazy People
None
Ruby is a VERY COMPLEX language!
class instance variable
protected
module_function vs extend self
refinements
super vs super()
== === equal? eql?
None
None
Grokking the language
Understanding and appreciating its philosophy
Coming to grips with reality
(no language is perfect)
(not even Clojure)
(some languages really suck)
Master the idioms
for i in 1..3 puts "Hello, Moscow!” end
3.times do puts "Hello, Moscow!” end
if some_condition then # body omitted end
def some_method # ... return result end
None
None
None
Read some (good) code
some == A LOT
None
Obtain a notion of style
None
None
Ruby Style Guide
None
Tackle problems with style
None
puts debugging sucks
bla bla bla puts ‘********’ puts x puts ‘********’
None
pro “puts” debugging techniques
object = Object.new puts object.method(:blank?).source_location # => ["/gems/activesupport-5.0.0.beta1/ lib/active_support/core_ext/object/ blank.rb",
14]
class Bar def foo puts "=====================" puts caller end end
def foo puts method(:foo).super_method.source_location super end
def parse(input, skip_code_comments: false, ignore_whitespace: true) # do stuff end
method(:parse).parameters #=> [[:req, :input], [:key, :skip_code_comments], [:key, :ignore_whitespace]]
config.thing = { "foo" => "bar" } config.thing.freeze = {
"foo" => "bar" } config.thing.delete("foo") # active_support/concurrency/share_lock.rb:151:in `delete': can't modify frozen Hash (RuntimeError) # from active_support/concurrency/share_lock.rb:151:in `yield_shares' # from active_support/concurrency/share_lock.rb:79:in `block in stop_exclusive'
Ruby Debugging Magic Cheat Sheet http://www.schneems.com/2016/01/25/ruby-debugging-magic-cheat- sheet.html
I am a puts debugger https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html
I am not a puts debugger!
byebug https://github.com/deivid-rodriguez/byebug
pry-byebug https://github.com/deivid-rodriguez/pry-byebug
Profiling stuff
ruby-prof https://github.com/ruby-prof/ruby-prof
memory_profiler https://github.com/SamSaffron/memory_profiler
None
Beyond Rails
Opal
RubyMotion
System administration
JRuby
Alternative web frameworks
Hanami
Padrino
Sinatra
Roda
Keep in sync
RubyWeekly
Ruby5
RubyRogues
RubyTapas
GoRails
RailsClub
RubyConf
RailsConf
Always be exploring!
Clojure
Haskell
Elm
Erlang/Elixir
Racket
Ideas from other programming languages make us better programmers
One more thing…
Ruby is simply not a good fit for every possible
problem
None
None
ФЕЛИНА
Епилог twitter: @bbatsov github: @bbatsov http//batsov.com http://emacsredux.com RailsClub Moscow, Russia
23.09.2017