[Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

Alan Gauld alan.gauld at yahoo.co.uk
Tue Jul 30 20:00:49 EDT 2019


On 30/07/2019 18:20, boB Stepp wrote:

> What is the likelihood of file storage corruption?  I have a vague
> sense that in earlier days of computing this was more likely to
> happen, but nowadays?  Storing and recalculating does act as a good
> data integrity check of the file data.

No it doesn't! You are quite likely to get a successful calculation
using nonsense data and therefore invalid results. But they look
valid - a number is a number...

Checking data integrity is what checksums are for.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list