9
u/bluexavi Apr 08 '24
There was a tangible effect on every code base when the "Metaprogramming Ruby" book came out.
8
u/BananafestDestiny Apr 08 '24
Yes! Thankfully that pendulum has swung back the other direction. Personally, I admit to going hog wild with metaprogramming after diving into that book. But I shot myself in the foot enough times that I learned my lesson and now actively avoid metaprogramming and “clever” code, as satisfying as it is to write.
It’s still useful to know all the metaprogramming concepts, to know when it’s the right tool for the job. But more importantly, to know that 99% of the time it is the absolute wrong tool for the job.
1
u/whistlerbrk Apr 08 '24
I have never once used ActiveAdmin since becoming a Rails user in 1.2.3
Not sure why anyone really would tbh
0
Apr 08 '24
[deleted]
2
u/codesnik Apr 08 '24
pretty awful stuff. I've had a couple of companies where whole back-office work was based on heavily rewritten activeadmin. Guys and gals at backoffice somehow tolerated it :\
https://github.com/thoughtbot/administrate looks promising, much less DSL in it.
2
u/rerecurse Apr 08 '24
I clicked that link incredibly fast only to see it's only been touched for dependabot for months.
2
20
u/riktigtmaxat Apr 07 '24
Haha so true. There are very few examples of gems that pulled off a DSL that isn't just annoying, RSpec being one of them.
There are a lot of modern gems that stick to simple OOP though. Pundit is the most famous.