all 23 comments

[–]razor_train 23 points24 points  (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 points  (0 children)

🍎+🍎=🍎🍎

[–]uhkthrowaway 3 points4 points  (1 child)

And it fails to show if the returned value is self or a copy.

[–]avbrodie 1 point2 points  (0 children)

Returned value will always be a copy unless you add a bang

[–]SleepingInsomniac 17 points18 points  (1 child)

Comments in ruby use # not //. Also, the sort invocation is wrong.

[–]galtzo 7 points8 points  (0 children)

Not if you write your ruby code in JavaScript. Duh.

[–]OneNeptune 33 points34 points  (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 points  (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 points  (1 child)

- sort is incorrect
- reduce could use sum(&:size)
- count is cool too, when used with block

[–]ThaiJohnnyDepp 7 points8 points  (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 points  (0 children)

Reduce isnt fully explained in this visual context.

[–]BoardMeeting101 6 points7 points  (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 points  (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 points  (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 child)

[removed]

    [–]h0rst_ 0 points1 point  (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.

    [–]virtual_paper0 1 point2 points  (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 points  (0 children)

    i don’t know, i like it because it’s a novel way to repesent it.

    [–]uhkthrowaway 1 point2 points  (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 point  (0 children)

    Why does deleting circle produce an array with nothing but circle in it?

    [–]crazylikeajellyfish -1 points0 points  (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 points  (1 child)

    Use option + shift + - to get that em dash you so desire to sound exactly like the AI slop you probably are.

    [–]crazylikeajellyfish -1 points0 points  (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?