Re:Don't DRY Your Code Prematurely
by RussianCow on Thursday May 30, 2024 @03:20PM
(#40527631)
Sorry, but this doesn't make sense. Why should system critical things be more difficult to understand? Surely you want to reduce room for error, not increase it?
Re:Don't DRY Your Code Prematurely
by withinboredom on Thursday May 30, 2024 @04:13PM
(#40528076)
I mean, sure, I guess API urls could be system-critical. But generally, I prefer to grep a codebase for a url pattern and find the controller immediately. Instead, you have to dig through layers of strings composed of other strings and figure it out. Then at the end, you’re probably wrong.
I don't know the codebase, but to my mind that level of abstraction means it's a system-critical string that justifies the work it takes to find.