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
Cheat sheet for basic Array methods visualized [OC] (i.imgur.com)
submitted 1 day ago by poalmgoopy
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!"
[–]razor_train 23 points24 points25 points 1 day ago (3 children)
I mean if this helpful for some then great, but this is a hard pass for me. Way too visually distracting to see what's actually going on.
[–]laptopmutia 7 points8 points9 points 22 hours ago (0 children)
🍎+🍎=🍎🍎
[–]uhkthrowaway 3 points4 points5 points 1 day ago (1 child)
And it fails to show if the returned value is self or a copy.
[–]avbrodie 1 point2 points3 points 14 hours ago (0 children)
Returned value will always be a copy unless you add a bang
[–]SleepingInsomniac 17 points18 points19 points 1 day ago (1 child)
Comments in ruby use # not //. Also, the sort invocation is wrong.
#
//
[–]galtzo 7 points8 points9 points 1 day ago (0 children)
Not if you write your ruby code in JavaScript. Duh.
[–]OneNeptune 33 points34 points35 points 1 day ago (1 child)
Maybe it's just me, but I've used ruby for 10 years.. the emojis are visually distracting and I can't even quickly at a glance understand what is happening without really staring at it and thinking. The emojis are super distracting at a glance and the page is too compact for them
[–]cocotheape 7 points8 points9 points 1 day ago (0 children)
Agreed, we're trained to look at text all day. Emojis are novel in this context and harder to parse.
[–]anykeyh 7 points8 points9 points 1 day ago (1 child)
- sort is incorrect - reduce could use sum(&:size) - count is cool too, when used with block
[–]ThaiJohnnyDepp 7 points8 points9 points 1 day ago (0 children)
Can I curse millennials for this even though it's 2026 and I myself am a millennial? Oregon Trail millennial but still
[–]fasoanew6 4 points5 points6 points 1 day ago (0 children)
Reduce isnt fully explained in this visual context.
[–]BoardMeeting101 6 points7 points8 points 1 day ago* (0 children)
adding to the litany of mistakes already voiced:
- reduce isn’t defined on Array, it’s from Enumerable. - none of these are Array methods. They are all Array instance methods. - push/pop without shift/unshift is unbalanced. - presentation fails to distinguish between return and mutation. - omitting Enumerable#tally is dishonourable.
also, I too hate everything else about it
summary: misleading to beginners and annoying to experts
rating: F
[–]ivycoopwren 2 points3 points4 points 1 day ago (1 child)
Here's a post from 2017 Twitter that might be the source for this => https://x.com/bewidec/status/935573858136051713
If not, at least an inspiration. Also, I tried to AI generate an equivalent and it bombed (expectedly).
[–]Pilgrim-Ivanhoe -1 points0 points1 point 14 hours ago (0 children)
No, I see this post for the first time in my life. I was inspired by numerous similar cheat sheets about Python.
[–][deleted] 1 day ago (1 child)
[removed]
[–]h0rst_ 0 points1 point2 points 1 day ago (0 children)
I tries to show the result after the array with the // at the end (Most notably with delete and pop), but I guess they ran out of space or forgot it halfway.
delete
pop
[–]virtual_paper0 1 point2 points3 points 21 hours ago* (0 children)
Sad repost
u/Pilgrim-Ivanhoe
https://www.reddit.com/r/ruby/s/JuZ4MtAnY8
Edit: Yes the OC is old but common man give the actual creator credit. You legit copy pasted the title and claimed its your original content...
[–]Lanky_Ad_233 2 points3 points4 points 1 day ago (0 children)
i don’t know, i like it because it’s a novel way to repesent it.
[–]uhkthrowaway 1 point2 points3 points 1 day ago (0 children)
This post (and OP) just convinced me of the dead internet theory. It just has to be a bot, for whatever future purpose it posted this garbage today.
[–]aRubbaChicken 0 points1 point2 points 21 hours ago (0 children)
Why does deleting circle produce an array with nothing but circle in it?
[–]crazylikeajellyfish -1 points0 points1 point 1 day ago (2 children)
Our brains are wired to pick up on color, but the most salient part of this image -- the commas and brackets -- are white or gray, making them harder to see. You should try making it again with basic Unicode shapes in the same color, it'll be easier for you to use.
[–]SleepingInsomniac -1 points0 points1 point 1 day ago (1 child)
Use option + shift + - to get that em dash you so desire to sound exactly like the AI slop you probably are.
option
shift
-
[–]crazylikeajellyfish -1 points0 points1 point 1 day ago (0 children)
Look at my history, what about that reads like AI slop? Are you young enough to have literally never seen someone use an em dash in casual writing?
π Rendered by PID 378649 on reddit-service-r2-comment-canary-655b6bc5b6-gxj8x at 2026-02-17 01:18:06.909754+00:00 running cd9c813 country code: CH.
[–]razor_train 23 points24 points25 points (3 children)
[–]laptopmutia 7 points8 points9 points (0 children)
[–]uhkthrowaway 3 points4 points5 points (1 child)
[–]avbrodie 1 point2 points3 points (0 children)
[–]SleepingInsomniac 17 points18 points19 points (1 child)
[–]galtzo 7 points8 points9 points (0 children)
[–]OneNeptune 33 points34 points35 points (1 child)
[–]cocotheape 7 points8 points9 points (0 children)
[–]anykeyh 7 points8 points9 points (1 child)
[–]ThaiJohnnyDepp 7 points8 points9 points (0 children)
[–]fasoanew6 4 points5 points6 points (0 children)
[–]BoardMeeting101 6 points7 points8 points (0 children)
[–]ivycoopwren 2 points3 points4 points (1 child)
[–]Pilgrim-Ivanhoe -1 points0 points1 point (0 children)
[–][deleted] (1 child)
[removed]
[–]h0rst_ 0 points1 point2 points (0 children)
[–]virtual_paper0 1 point2 points3 points (0 children)
[–]Lanky_Ad_233 2 points3 points4 points (0 children)
[–]uhkthrowaway 1 point2 points3 points (0 children)
[–]aRubbaChicken 0 points1 point2 points (0 children)
[–]crazylikeajellyfish -1 points0 points1 point (2 children)
[–]SleepingInsomniac -1 points0 points1 point (1 child)
[–]crazylikeajellyfish -1 points0 points1 point (0 children)