martes, 26 de junio de 2018

Week 6: June 18th to June 24th

During this week I moved the file settings from the DlgPrefMetadataDlg class to a separate class so it is easier to mantain (single responsibility principle) and add new settings. Unfortunately, it is not possible to create an interface because the DlgPrefMetadataDlg object needs to know the subclass, which defeats the purpose.
I also deleted the table view from the dialog, because I thought about it and it makes no sense to make it so extensible early. Better to use a working solution and easier solution than thinking 10 steps ahead.
I added a work in progress concurrency solution for the file listener, which needs to be improved to a dedicated thread. Since the new options already give you the metadata format string, there's no longer need for a template and factory pattern so I removed the hierarchy. Now it simply loads the string from settings.
Unfortunately, I'm delayed regarding the original planning. Which means I'll have to put extra hours to compensate.

lunes, 18 de junio de 2018

Week 5: 11th June - 17th June

This week I started designing a new tab in the user settings for metadata broadcast. The file listener has been refactored to use these new settings. This tab will also use a singleton that I've created that will hold all the listener services, for now. Perhaps I will move it to some class in the scrobbling manager. I also have refactored the scrobbling manager again. My goal for next week is to have the interface finished and start implementing the Last.fm scrobbler.

miércoles, 13 de junio de 2018

Week 4: 4th June - 10th June

This week I transformed the File listener into a factory and template so it can accommodate for the various file formats that broadcasting apps can use. I also modified the metadata broadcaster to only broadcast tracks that have spent 5 minutes or more unloaded, to avoid unnecessary repetitive scrobblings. I refactored the scrobbling manager class to both make it more readable (still working on this) and to allow for dependency injection. The latter is necessary to write automatic tests, to be able to introduce timer mocks. I also changed the isTrackAudible function to a strategy pattern to be able to change it at runtime. I don't know if this will be necessary but since I had to include dependency injection anyway why not make it an interface. I also wrote google tests for the scrobbling manager. I might write more tests if deemed necessary.

martes, 5 de junio de 2018

Week 3: 28th May - 3rd June

So, this week I fixed a bug that was delaying me thanks to my mentor, Daniel. This has allowed me to progress and the first tests of the scrobbling manager worked. It needs further refining but the first version is working. I've also started working on the file listener that will allow RDS apps to scrobble the metadata information. Next week I need to finish the file listener as well as thouroughly test the manager and perhaps introduce some automatic tests. This will be a bit annoying because I'll have to create interfaces to mock up elements. Overall, I'm happier about my work this week.