|
|
|
|
|
by corytheboyd
818 days ago
|
|
Pretty much this. I want traces to go to actual code as much as possible. I also want my IDE to work. One of the most annoying things in my life right now is aasm. It’s a good idea, but I hate having to know this new dsl, I hate the dynamic methods it defines, I hate having to constantly explain to the confused folks that this random bang method is actually triggering this `event :event_name` over here. I would just so much rather have none of the DSL and meta-programming stuff, even if it’s twice as much “boilerplate”, if that means people who understand normal code can actually trace what the program is doing using the tools they already know how to use. Certainly don’t mind abstraction like a standardized Result class, it’s more the chaining and custom halt with error patterns that I can tell are going to complicate debugging. |
|
Or ActiveRecord's query chaining?
ex. User.where(admin: true).joins(:account).order(id: :asc)
It's all versions of the same approach.
And yes all of the above _can_ complicate debugging, for sure. But so can most abstractions. Only use them if the specific problem they solve is bigger than the drawbacks.