The REPL: Issue 75 - November 2020
Why Ruby Class Methods Resist Refactoring
Sasha Rezvina explores why class methods in Ruby are hard to refactor. They tend to accumulate lots of logic. I prefer limiting class methods to “builder” methods that instantiate new objects, like .initialize
.
Verbal Expressions: Ruby Regular Expressions made easy
This looks like a fantastic library. It provides a way to “verbally” construct regular expressions:
tester = VerEx.new do
start_of_line
find 'http'
maybe 's'
find '://'
maybe 'www.'
anything_but ' '
end_of_line
end
tester =~ "https://www.google.com"
It supports string replacement, and capture groups too!
Moving my serverless project to Ruby on Rails
This article illustrates one of my worries about the server-less trend: Each lambda function might be simple, but there interactions are not, and that is hard to reason about (and deploy!).
When the building blocks are too simple, the complexity moves into the interaction between the blocks.
Find me on Mastodon at @ylansegal@mastodon.sdf.org,
or by email at ylan@{this top domain}
.