Closed thinkrapido closed 11 months ago
@thinkrapido I guess this PR is not ready for review yet right? Can I convert the status to 'draft'? Is there anything @kobe-reygel could add to the PR to help? Maybe removing all the old stuff?
@tijlleenders now it's ready for merging. @kobe-reygel , please review
@kobe-reygel overall you did a great job highlighting my shortcummings. I'm quite busy this week, but I'll try what I can.
@kobe-reygel overall you did a great job highlighting my shortcummings. I'm quite busy this week, but I'll try what I can.
Don't worry @thinkrapido , I'm also busy this week (and weekend)😀
If I can help somewhere, let me know!
@thinkrapido
I've also stepped through the test case.
The order of processing the goals and the logic follows the algorithm, nice work!
I have a few questions:
Why are we introducing a new concept min_span
?
How is this different from min_duration - which aligns better with the frontend/domain language?
Once a goal
is being handled - and it's not impossible of flex 1 - the logic of finding the right slot is quite obscure to me.
What is the tail
we're introducing here?
Can we find a better name for the Day
struct? This word/concept is not in the algorithm.
Day
is part of the Flexibility
concept (also new but I think useful) which also holds a ref to a goal
. So Flexibility
keeps track of the possible places on the Calendar
for a specific goal
? I think a more appropriate name for Day
then is Timeline
- as it could itself could contain multiple Slots
and doesn't necessarily have to align with calendar days. Currently Day
does align with calendar days, and always contains one Slot
.
Seats
is another new concept - that doesn't really add anything in my opinion. What is it and why can't we remove it?
@tijlleenders @thinkrapido
- Why are we introducing a new concept
min_span
? How is this different from min_duration - which aligns better with the frontend/domain language?
=> as I understand it - it is the same. Possibly a new name to stop confusion with the old implementation. I agree that we need to align this with the domain language
- Once a
goal
is being handled - and it's not impossible of flex 1 - the logic of finding the right slot is quite obscure to me. What is thetail
we're introducing here?
I had the same objection about obscurity. The logic is sound however. The entire tail/ selected block is basically as follows: 'select the element that we want to take (the position we want), partition the unprocessed task list on this elemt so that we select the element. The tail contains all remaining elements.' => basically the functional programming equivalent of selectedElement = list.pop(). The logic is correct as far as I can see. Let's make a 'readability improvement ticket' for this, but not block the merging on this.
- Can we find a better name for the
Day
struct? This word/concept is not in the algorithm.Day
is part of theFlexibility
concept (also new but I think useful) which also holds a ref to agoal
. SoFlexibility
keeps track of the possible places on theCalendar
for a specificgoal
? I think a more appropriate name forDay
then isTimeline
- as it could itself could contain multipleSlots
and doesn't necessarily have to align with calendar days. CurrentlyDay
does align with calendar days, and always contains oneSlot
.
agree
Seats
is another new concept - that doesn't really add anything in my opinion. What is it and why can't we remove it?
I understand it as being the same as the old concept of 'Slots' in a timeline. Agree that we should align this with existing terminology
Ready for Review and merge