solymosi / npu

Neptun PowerUp! - Felturbózza a Neptun-odat
MIT License
274 stars 47 forks source link

Multiple stored courses with priority #66

Closed erdeidominik99 closed 1 year ago

erdeidominik99 commented 2 years ago

Hello! I think this can be a good feature to add ability to store multiple lessons for one subject with priority (1,2,3, etc), and when the user clicks the pick up button it tries to pick up the first, if it fails it tries the second etc. So if teher are multiple times that are appropriate for the user it is faster if there is an error, check the box again and click the button.

solymosi commented 2 years ago

Neat idea... however, if we do this, we need to be very careful with the logic that moves down the priority list: it should only start trying lower priority courses if the higher priority ones are full, but not if some other error occurs – otherwise this feature can end up hurting more than it helps (i.e. it could mistakenly sign you up for a less preferred course even if a more preferred would've been available as well).

In general I've been rather wary of long-running automated features because they have a s××t ton of edge cases and it is very difficult to make them reliable, especially against an overloaded Neptun with potentially very long response times. When do we "time out" the automation and abort? If we abort, do we begin from scratch when the user tries again or do we continue where we left off? How do we show the status of the operation to the user? How do we let them cancel it if things get out of hand? These and more would need to be worked out when implementing such a feature.

I don't have time to implement a major feature like this – but if someone else wants to give it a try, feel free to submit a pull request 😉 – just be warned, it takes a lot more work to make it reliable than it seems at first glance.

solymosi commented 1 year ago

Closing this due to lack of activity.