Re:Ruby delights built into the language
by phoronixrly on Tuesday December 20, 2022 @07:11PM
(#34074854)
First, it's an exercise, you don't get to use much of this functionality day to day, at least if you're a lowly webdev :(.
Second, the solution is optimized for speed of writing (you get more points in AOC the quicker you submit the solution), not for readability. I try to get the chain of calls in my Ruby REPL as soon as the challenge drops.
Third, if you so wish to debug this chain of calls, you can insert a breakpoint and get a REPL anywhere in it with Object#tap:
Second, the solution is optimized for speed of writing (you get more points in AOC the quicker you submit the solution), not for readability. I try to get the chain of calls in my Ruby REPL as soon as the challenge drops.
Third, if you so wish to debug this chain of calls, you can insert a breakpoint and get a REPL anywhere in it with Object#tap:
And lastly, it becomes second nature to read and write these.