If I have a complex attendance project to track the employees attendance and leaving, and according to that they get overtime money through a workflow.

The schedule is something like that :

6 weeks clickable on the top and the dates of the month in the right hand side.

enter image description here

I save the overall calculation but sometimes some factors may change the number of hours and this make a difference between the live data and the saved data(the overtime which has paid to the employees).

And i find it's so difficult to explore the day which make this difference.

My Question is :

Is it wise to take a snapshot programmatically from this schedule UI for every employee just after confirming the overtime record and save it so that i could compare between the live snapshot and the saved version ? or there 's a better solution ?

  • Is it wise to take a snapshot... -- Is that requirement listed in your requirements specification? – Robert Harvey Oct 27 '16 at 14:39
  • @RobertHarvey : excuse me , i face this problem lately .so i have generated a dynamic report beside overtime report to compare the total number of hours (online[current data], offline[saved confirmed data]) for every employee , but i can't recognize which day and action (the details)making this inconsistency between the two versions .so i ask if taking snapshot image from this schedule during confirmation process and save it in db can make it easy to identify the day & action which make this difference or this 's not a good idea . – Anyname Donotcare Oct 27 '16 at 15:51
  • If it is to help you solve a problem, then anything that might help goes, as long as you remove it all after you fixed the problem. Otherwise it depends on the requirements you have. – Bart van Ingen Schenau Oct 27 '16 at 17:25

Would it be meaningfully different if instead of posting an answer, I posted a screenshot of my answer?

Think about it.

  • If you're only going to be looking at it, then it doesn't matter, either option is readable.
  • However, if you want to perform some operations on it (e.g. ctrl+F, or copying text), then the image will be inferior to the actual answer.

From a development perspective, images aren't all that great:

  • They take up more space than raw data
  • They do not allow for data operations
  • The data cannot be reformatted

Why not simply store the raw data, so you can write a script to look for the discrepancy? Instead of making an image file, make a different file to store data:

  • As a JSON object
  • As an XML file
  • As a binary file
  • As a CSV file

It doesn't matter which option you pick. All of these are easily parseable by a computer, and allow you to write a quick tool/script that looks for fields with different values, saving you the trouble of having to do so manually.

Even if you don't write the script right now, at least you leave the option of doing so in the future. If you start storing images now, then you can't revert that information into data again (without relying on OCR readers, which is unnecessarily complicating things).
But if you store the raw data, you are able to both manually look through it to find the difference, or do so programmatically.

It's up to you. Saving screenshots works, but it imposes limitations that other data formats do not. I see no distinct benefit to using images over data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.