News for hackers. Stuff that matters.
Re:Naming Things Is Hard by shay_ker on Friday August 12, 2022 @06:57PM (#32444947)
This is more than just naming things. It’s also that Ruby allows you to monkeypatch _any_ method, even if it’s a Kernel method or already defined by a library or framework (like Rails).

It’s extremely powerful, which is great! But I want a linter that tells me, “Hey - you’re monkeypatching that. I’m going to fail this build unless you explicitly indicate you know what you’re doing”.

I don’t know of a convincing linter that has a complete solution to this. Feel free to chime in if you know of one! I’m guessing this is possible in Rubinius, but not sure about the standard Ruby VM.

Re:Naming Things Is Hard by drewcoo on Friday August 12, 2022 @08:14PM (#32445521)
This is way off-topic, but . . .

You can create a Rubocop check that will complain abuot method_added and method_undefined. And to show that you know that you're calling them even though they're forbidden, just make a comment to tell Ruboocop to ignore. And make sure commits are code-reviewed, of course.

What more could you want?