2 ms·
actually I recall a time when I made a mistake in code placement that would have been avoided if I had followed this principle. I had made an api controller, b
by bryanrasmussen 8y ago
actually I recall a time when I made a mistake in code placement that would have been avoided if I had followed this principle.
I had made an api controller, but then we needed to expand what our api covered to cover everything the app did (should have gone api first but again, my mistake, also partially inherited code base)
So of course I should have put the parts of the api that handled users into the user controller and the parts that handled images into the image controller and so on and so forth, but instead I thought (and here I can point to overwork dulling ones thinking processes) 'I have an api controller, this stuff now needs to be moved over from these other controllers into api controller' and in the end it became a horrible mishmash with some duplicated functionality I needed to fix later.