News for hackers. Stuff that matters.
Re:Suture: A Ruby gem that helps you refactor your legacy code by emodendroket on Sunday September 05, 2021 @03:06PM (#28426833)
Really this is what drives me nuts about Rails. You can never really know what exactly any line of code is going to do.
Re:Suture: A Ruby gem that helps you refactor your legacy code by weaksauce on Sunday September 05, 2021 @03:37PM (#28427104)
Do you have an example of such code that does something off label or tricky to intuit?
Re:Suture: A Ruby gem that helps you refactor your legacy code by zrail on Sunday September 05, 2021 @04:45PM (#28427608)
Active record hooks. Observers especially are a spooky action at a distance factory.
Re:Suture: A Ruby gem that helps you refactor your legacy code by thih9 on Sunday September 05, 2021 @05:15PM (#28427879)
Altering expected framework functionality. E.g. a custom getter method for an ActiveRecord attribute.

Technically this isn't a Rails-only thing; but since Rails relies so much on convention, there are many opportunities to break it (and possibly bring suffering to other devs).

Re:Suture: A Ruby gem that helps you refactor your legacy code by emodendroket on Sunday September 05, 2021 @05:41PM (#28428087)
Besides the other examples already given, monkey patching is another offender, as are proxy tricks with methods like send or respond_to (technically not Rails-specific but I associate this style with Rails).
Re:Suture: A Ruby gem that helps you refactor your legacy code by Mikeb85 on Sunday September 05, 2021 @10:14PM (#28429595)
I mean, this can be any highly expressive language. Common Lisp macros can get crazy, Haskell has sugar on sugar, Perl all looks like code golf to me, etc...
Re:Suture: A Ruby gem that helps you refactor your legacy code by BurningFrog on Sunday September 05, 2021 @06:46PM (#28428490)
Yeah, as much as really like Ruby, there is just too much Magic going on.

I'm a programmer, not a wizard!

Re:Suture: A Ruby gem that helps you refactor your legacy code by Lammy on Sunday September 05, 2021 @07:19PM (#28428696)
> I'm a programmer, not a wizard!

What if I consider those to be the same thing? Programming is an alchemical process through which we can contribute to humanity beyond the time-limit imposed by our physical bodies: https://en.wikipedia.org/wiki/Great_Work_(Hermeticism) :)

"The magnum opus is pre-eminently the creation of man by himself, that is, the full and complete conquest which he can make of his faculties and his future; it is pre-eminently the perfect emancipation of his will."