3 ms·
Really this is what drives me nuts about Rails. You can never really know what exactly any line of code is going to do.
by emodendroket 5y ago
Really this is what drives me nuts about Rails. You can never really know what exactly any line of code is going to do.
- weaksauce 5y agoDo you have an example of such code that does something off label or tricky to intuit?
- zrail 5y agoActive record hooks. Observers especially are a spooky action at a distance factory.
- thih9 5y agoAltering 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).
- emodendroket 5y agoBesides 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).
- BurningFrog 5y agoYeah, as much as really like Ruby, there is just too much Magic going on. I'm a programmer, not a wizard!
- Lammy 5y ago> 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) 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."
- Mikeb85 5y agoI 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...