Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Andrew Stelmach
12,583 PointsAny idea how to approach this?
I want to code an app that does this:
User enters something that they want to be reminded to do periodically.
User indicates the first time they've done that thing.
The app decides when the next time is they've got to do it, based on a pre-designed algorithim.
The app shows the user when the next time they've got to do it is.
If the user doesn't do it by then, the app displays 'overdue by this much time' sort of thing.
When the user DOES do it, the app then decides the next time that the user has to do it is.
Each of these intervals will be different, but will follow the same pattern for each thing. Eg the user must do this again after 2 days then, once they've done that, the user must do it again after 1 week, then once they've done that, they must do it again after 15 days etc.
The user will be able to enter multiple 'things' into the app, but each 'thing' will be tied to the same underlying time interval formula.
I've absolutely NO idea (yet :-) ) how to do this, but I'm putting it out there early to generate some discussion and hopefully get a few pointers.
Artem Prytkov
11,932 PointsArtem Prytkov
11,932 PointsJust to give you direction. 1) You need a model, which contain remainders (todo list I assume). 2) It should have field where you store first occurance of event 3-6) You implement algorithm in model and display it
There is a cool ice_cube gem which can help you with this task.