3 ms·
Personally, I think DHH is following YAGNI as a guideline correctly in this case. As long as the code is easy to refactor - and in this case, it's a piece of c
by icebraining 14y ago
Personally, I think DHH is following YAGNI as a guideline correctly in this case.
As long as the code is easy to refactor - and in this case, it's a piece of cake - I think you should err on the side of YAGNI.
- omgsean 14y agoWouldn't this potentially muddy up his tests though? Now he's creating a lot of mocks for a simple create action. Not only that, but should the create action not be called "create_and_maybe_send_to_social_networks"?
- bluesnowmonkey 14y agoThe CRUD metaphor doesn't map well to an application's network API -- which is what controllers/actions are, after all. Like if there's some code that gets executed when you click the "create comment" button, that's how you name it. Doesn't matter that the code creates a comment and maybe posts to social networks and some other things.