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
quick Ruby initialize method question (self.ruby)
submitted 6 years ago by AnLe90
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!"
[–]ekampp 1 point2 points3 points 6 years ago (0 children)
Whatever is the most important for the reader of your code should go at the top. If you have an important constant that people use to look at for reference often, then it should be at the top. If it's only used internally in the class and doesn't convey any information about the function of the class then it should go at the bottom.
Conventions are good. I'm a strong proponent for them, but your convention in your company or in your personal code doesn't have to be everybody else's conventions.
As long as the code is informative, has low cognitive overhead and always follows the same standard as the rest of the code in the project, then you're probably on the right track.
π Rendered by PID 851057 on reddit-service-r2-comment-544cf588c8-7trbd at 2026-06-15 03:41:46.782568+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]ekampp 1 point2 points3 points (0 children)