Skip to main content
6 events
when toggle format what by license comment
Mar 28, 2019 at 11:17 comment added Laiv That said, remember that principles are not rules written in stone. They are permeable (adaptive). As you can see, they are open to interpretation. Your reviewer has an interpretation and you have another. Try to see what you see, resolve his/her doubts and concerns, or let him/her solve yours. You will not find the "right" answer here. The correct answer is up to you and your reviewer to find, asking first to the requirements (functional and non-functional) of the project.
Mar 28, 2019 at 11:10 comment added Laiv You are basically asking me to tell you what you want to hear. I just give you scope. A wider scope for you to decide whether SRP matters or not because SRP is useless without the proper context. IMO the way you are approaching the concern is incorrect because you are only focusing on the technical solution. You should give enough relevance to the whole context. And yes, DB might fail. There's a chance for it to happen and you should not omit that, because as you know, things happen and these things could change your mind regarding doubts about SRP or other good practices.
Mar 28, 2019 at 9:27 comment added Andre Borges @Laiv, you are making a valid point, but this is not the point of my question, or this answer. The question is whether this is a valid solution in the context of SRP, so let's assume there are no DB transaction errors.
Mar 28, 2019 at 6:48 comment added Laiv If the purpose of my event would be to send new user data to Google Analytics - then disabling it would have the same business effect as disabling logging: not critical, but pretty upsetting . What if you are firing premature events causing fake "news". What if the analytics are taking into account "users" that were not finally created due to errors with the DB transaction? What if the company is making decisions upon false premises, backed by imprecise data? You are too focused on the technical side of the issue. "Sometimes you can't see the wood for the trees'"
Mar 26, 2019 at 23:24 comment added Andre Borges Logging is not part of the business flow - how is this relevant in the context of SRP? If the purpose of my event would be to send new user data to Google Analytics - then disabling it would have the same business effect as disabling logging: not critical, but pretty upsetting. What is the rule of a thumb for adding/not adding new logic to a function? "Will disabling it cause major business side effects?"
Mar 26, 2019 at 21:30 history answered async CC BY-SA 4.0