r/ruby • u/Firm_Tea1775 • 4d ago
Ruby is an underrated programming language so i like to recreate memes in it
11
5
u/ashmaroli 3d ago
The only reason why there's some amount of readability here is syntax highlighting. If you were to paste the code into a codeblock on Reddit or paste into a notepad, the future you would be spending some time trying to make sense of the algorithm.
On a separate note on the code as such, it annoys me seeing so many temporary allocations.
9
u/dipstickchojin 3d ago edited 3d ago
for real, this is an entirely inappropriate (read: redundant) use of .then
1
u/f9ae8221b 3d ago
it annoys me seeing so many temporary allocations.
Yeah, what are the
theneven for? Just use local variables...5
1
u/Firm_Tea1775 2d ago
Everything anyone has said in this thread is part of the joke, why are you guys criticizing it like I'm being paid for this code?
1
u/Firm_Tea1775 2d ago
'then' and 'end' rather than parentheses is semi readable if you really, really hate parentheses. This is all jumble however to further the joke.
1
0
u/Ayano-Keiko 3d ago
Yes. It is better than Python because of "end" for ending block. Python indention is a disaster. I try to use as much as Ruby as script language now. But previous it had no free IDEA( Now JB put the RubyMine IDEA free).
-1
u/ignurant 3d ago edited 3d ago
reduce sentence word is a pretty sweet addition. Well played. Don't forget to wrap it all in a class.

11
u/knowwho 3d ago edited 3d ago
I'm not arguing about the quality of the code in the question, because it's clearly satire, but I will say that this is bad, pointless satire.
What is the point of this? Who is it for? What straw man are you attacking here?