FlaminMad / researchProject

Level Control Research Project Repo
MIT License
0 stars 0 forks source link

What's the justification for logging data to .xlsx files? #23

Open Dru1X opened 8 years ago

Dru1X commented 8 years ago

If data was logged to a .csv file or even a .json file, that data output would be more easily used in tools other than Microsoft Excel. In fact, MS Excel can interpret .csv files so that would probably be the most interoperable solution. This does assume that formatting is not required on the logged data.

FlaminMad commented 8 years ago

It was justified by being easy for me to evaluate the data as templates are setup for quick evaluation using graphs. However, for future I want to implement logging in a more efficient way so maybe implementing a SQL database?? Not thought too much on it yet mind!

pet1330 commented 8 years ago

If you're going to use a database, I would consider using mongoDB, however, I think using a database might be overkill for this type of project and the suggestions by @DruIX above are probably better. JSON is quite universal now so would be ideal.

If you have the time you can always just create a logging interface which would allow people to add their own type of output, then you're not limiting the user to a specific output type. This would also allow the application to be back compatible with the current system.

EDIT: However, I wouldn't do this until after your deadline :stuck_out_tongue:

Dru1X commented 8 years ago

I agree with @pet1330 that a database is probably overkill here as it's just logged historical data. There may well be some merit in having the system start a new log file each day (or other appropriate time period) so as to prevent the log file from becoming unwieldy.

A database would become more useful if you're looking to query the recorded data in a more thorough and structured way. It would also make more sense in a multi-user environment to handle read/write clashes where you're recording in real-time and querying on-demand. SQLite is a good lightweight option if you want to use SQL, but mongoDB gives you the added benefit of being able to use JSON for your data storage as well as export.

As for the logging interface, in the world of PHP they use a standard called PSR-3 to do this job. I'm not overly familiar with the world of Python, but I'd assume there is something similar out there.

I also agree that this is definitely an enhancement that can be done later on.

FlaminMad commented 8 years ago

I shall reply to this on the weekend... I.e. Post deadline :)