Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving tasks to harddisk #50

Closed
keanecjy opened this issue Aug 23, 2020 · 2 comments
Closed

Saving tasks to harddisk #50

keanecjy opened this issue Aug 23, 2020 · 2 comments

Comments

@keanecjy
Copy link

Level 7 says:
Save the tasks in the hard disk automatically whenever the task list changes.

Can I check if if we need to write to the hard disk whenever there is a change to the task list? I was thinking writing to the hard disk after the user inputs "bye" would be more efficient.

@damithc
Copy link
Contributor

damithc commented Aug 23, 2020

We haven't covered this topic yet but the best practice to apply here is be wary of of premature optimization.
Yes, saving only at the bye requires fewer writes, but does it matter to the user? The chances are the efficiency gains are immaterial.
What if the user closed the app without typing bye or the computer shut down unexpectedly for some reason? Wouldn't it be nice to know that the updates have been saved even in such cases?

@keanecjy
Copy link
Author

Alright thank you Prof! That made a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants