Skip to main content
6 events
when toggle format what by license comment
Jun 13, 2017 at 19:31 comment added Jim Speaker I agree with your first statement. However, if it came to peer review, I don't think I would because violating SRP is a slippery slope and this could be the first of many broken windows. Cheers.
Jan 26, 2016 at 22:46 audit First posts
Jan 28, 2016 at 15:58
Jan 8, 2016 at 14:30 comment added Niklas H True. But what if it is not called "Holiday" in this new system, but is "Vacation" or "Free Time". But I agree, with that you typically has the ability to just search for it, or can ask a co-worker. My comment were primarily to get the OP to mentally model the responsibility and where the most obvious place for the logic would be :-)
Jan 8, 2016 at 14:21 comment added NikolaiDante @NiklasH Agreed. Tho personally I wouldn't look randomly and try and guess the class I would search with studio for the word "Holiday" and see what classes it came up in. :)
Jan 8, 2016 at 13:37 comment added Niklas H I agree. If the code is as simple as provided here, I would probably let it slide. But in my mind, I should not be the responsibility of the Employee to handle its own holiday. It might not seem like a big deal with where the responsibility is placed, but look at it this way: If you were new to the code base, and had to work on the holiday-specific functionality - where would you look first? For the holiday-logic, I personally would NOT look at the Employee entity to begin with.
Jan 7, 2016 at 22:06 history answered NikolaiDante CC BY-SA 3.0