Ruby multi-line string hell 1
Ruby developers don't usually hate things about Ruby. But there's one thing that seems to be more complicated at times than necessary in Ruby.
As you can see, I'm a frequent guest at some fellow sufferers' confessions.
I even blocked the deployment once, because we didn't have tests for rake tasks and CI didn't detect that this is not a multi-line string:
For the IDE this syntax is just fine too, so no warnings or anything there either... 💣
Basically, every time my string got too long, I needed to look it up. I think our 80 characters line length rubocop limit was just long enough to drop off my spaced learning capabilities and force me to look it up again...
So finally, I've drawn this down as a first step to get hold of the multi-line string hell.
If you try visualizing it, the forward-slash indeed makes sense in terms of flow. The text flow after the slash will go down and not up. Here it is one more time:
No more purple links! For that part at least. There's some more visualization and meditation needed to get the rest of it into my brain, so that the devious Heredoc interpolations, squiggly operators, and whitespace handlers become second nature.