The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I think you need to talk with your so called senior partner and put the
idea on paper first and tackle all the problems that may arise implementing
the new requirement.Then document the design change (including UI and BL)
in a new design document and do a review and both of you agree that this
is what is needed to be done to achieve the solution to your new customer.
Then you could design your objects, classes and functional business logic
as a separate layer and then implement test cases for your processing function
to ensure that all the outcomes and test are covered. You need to implement functions that
take into consideration the duty,shift,24hrs....then I'm sure you knew all
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
employees working different shifts of non-contiguous hours.
I don't see why the computer should care. WHere I work, now, aside from those who earn overtime (ad-hoc hours), there are about six different schedules that overlap to varying degrees - they never abut.
Two cases really exist:
Totally random starting times for shifts.
Specific sets of hours scattered throughout the day.
The first requires values to be set as their schedule
The second can use a lookup table (in database) for scheduling sanctioned sets of hours.
One could add further complexity:
* Random hours vary continuously. Just get a time-clock and read-back the data.
* Fixed hours change daily (lookup schedule for employees on days 0-6), but are constant with respect to the day of the week.
So - if any sort of regular scheduling exists, create hours list in table and assign them for each day of the week, reference back to the worker. All of this, of course, will work fine for a standard office with a fixed schedule. Just hope you don't have to set up the schedule.
Programming is a good way to prove to yourself that everything you think you know about the universe is wrong. You think shifts are contiguous? Someone out there disagrees.
The company I work for tracks vehicles and as part of that we record the VIN of the vehicle. The program was originally written to require VINs be unique but then we ran into a set of vehicles that lie and always say their VIN is 00000. So we had to go and remove the requirement that VINs be unique.
Well for me Flemish is easy to understand, but for "Hollanders" it seems to be incomprehensible.
There are exceptions of course, the Ghent dialect is difficult even for me, I think that dialect was caused by the noose that Charles the Great made them wear