method(:blah_changed?).source_location
is your new best friend. method(:blah_changed?).source_location
is your new best friend.I switched from Ruby to java/kotlin and am consistently frustrated how hard to impossible it is to start a jvm app locally. But also realize that doing so is fairly useless since there’s no interactive repl anyway.
It’s just a different way of programming I suppose.
I also found ruby made me worse at leetcode problems, since my default debugging taught me to run the code, instead of think through program state.
Just curious, annoying relative to what language/pattern that does it better?
Since golang is typed and uses dependency injection, its very easy to know what inputs you need or mocking out values.
You don’t necessarily have to figure out how to call the calling function, but you will want to use the REPL to evaluate the above code in an instance’s binding with instance_eval or the like, or use Class.method(:blah) to get the method object, or etc. Or if this is Rails, stick a binding.pry in the controller and get a REPL at the point while you’re interacting with the app in a browser, etc.
The ability to get a full REPL anywhere and explore and manipulate the program interactively is one thing I deeply miss when working in less dynamic languages.