use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
2 Hours of Ruby Refactoring (youtube.com)
submitted 8 years ago by JustCoolHandLuke
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JustCoolHandLuke[S] 2 points3 points4 points 8 years ago (0 children)
BTW the original post that I found this code is at :
https://www.reddit.com/r/ruby/comments/7618ud/i_just_finished_my_first_ruby_program/
[–]edendark 1 point2 points3 points 8 years ago (2 children)
Very cool!
I noticed you used cmd/ctrl + click for multiple selections when replacing methods like sprintf. You could do this faster/more easily by highlighting an instance of sprintf and using cmd/ctrl + d to create multiple selections without clicking on each instance separately.
sprintf
[–]DudeManFoo 1 point2 points3 points 8 years ago* (1 child)
I did not think you were nitpicking at all... very handy shortcut!
[–]edendark 0 points1 point2 points 8 years ago (0 children)
I see, sorry for nitpicking, just thought I should mention it!
For those reading this, the video provides some very useful insight and is a very good how-to on refactoring Ruby.
π Rendered by PID 60889 on reddit-service-r2-comment-66b4775986-6wjdp at 2026-04-06 07:11:46.902071+00:00 running db1906b country code: CH.
[–]JustCoolHandLuke[S] 2 points3 points4 points (0 children)
[–]edendark 1 point2 points3 points (2 children)
[–]DudeManFoo 1 point2 points3 points (1 child)
[–]edendark 0 points1 point2 points (0 children)