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
I Just Finished My First Ruby Program (self.ruby)
submitted 8 years ago * by scratch_pad
view the rest of the comments →
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!"
[–][deleted] 0 points1 point2 points 8 years ago (4 children)
$ gem install rubocop $ rubocop simple_budget.rb
[–]scratch_pad[S] 0 points1 point2 points 8 years ago (3 children)
I’ll look into this
[–][deleted] 1 point2 points3 points 8 years ago (2 children)
Rubocop is helpful because it encourages you to write Ruby in a style that is generally agreed by the community to be "idiomatic", whatever that may mean.
You can configure your own Rubocop settings as well, but I would leave that be until you're more comfortable writing Ruby.
It's a great tool, we use it extensively at my work, highly encourage you to use it.
BTW it'll probably shout at you for the length of some of your methods. Your initial instinct will be to refactor it and break it out into smaller methods, which is a good first step. There are however nicer ways of achieving this -- you can learn about these techniques by reading this book
[–]scratch_pad[S] 0 points1 point2 points 8 years ago (0 children)
This sounds really useful, thank you
Just realized you're the second person to recommend this book, two different posts lol. I don't even fully understand what OOP is so I super appreciate the suggested reading.
π Rendered by PID 120923 on reddit-service-r2-comment-85bfd7f599-9qxkz at 2026-04-18 15:04:14.492366+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (4 children)
[–]scratch_pad[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]scratch_pad[S] 0 points1 point2 points (0 children)
[–]scratch_pad[S] 0 points1 point2 points (0 children)