I've reached the persnickety bug-hunting phase of Giocoso Version 3 development! This is good, because it means a release of Version 3 is not too far away. It's bad, though, because as you uncover new, obviously stupid bugs, you spend your days thinking, 'How could I be so stupid!'
A case in point was just triggered by what I thought was going to be a trivial little addition to this website: adding a 'play count' column to my music play history listing. Adding the column itself and getting it populated from my Giocoso database was indeed quite simple. What wasn't expected was this:
The problem is the actual numbers in the far right-hand column: the report is showing previous play-counts of 4, 2, 3, 1 and so on. In itself, that's not indicative of a problem: it's quite reasonable to play the same piece more than once, after all. The trouble is that I've long set my Giocoso to 'only play recordings which haven't previously been played', so how could Giocoso Version 3 be randomly selecting to play Johann Christoph Friedrich Bach's Keyboard Concerto in A major for a fourth time on 6th September at 12:42pm? If it's been played three times prior to that, Giocoso shouldn't be selecting it to be played again!
The clue came from scrolling a little bit further down the list:
Here you see that whilst some Michael Haydn and Jean Sibelius was played for a second time on 3rd September, every play before then was, indeed, a first-and-only play. Which told me all I needed to know: on 3rd September, I must have rolled in some new code which somehow broke the 'only play previously-unplayed works' feature Giocoso's been set to use.
A quick hunt through the relevant sections of code revealed that in one line, I'd referenced a variable called 'UNPLAYEDWORK', whereas in four other places in the code, I'd referred to 'UNPLAYEDWORKS'. The single 's' at the end of the variable name was enough to break the feature... and it only took me three days to notice it 🙁
Anyway, this little coding mishap is what explains the strange, recent behaviour of my 8-day graph showing the percentage of my music collection not yet played in Giocoso:
This 'proportion not yet played' graph will always bounce up and down a bit over time: if I just play new recordings never played before, it will trend downwards. If I rip and catalogue new CDs and add them to my collection, the line will trend upwards as new, unplayed recordings now exist. So a wobble on the line, such as you see for the first few data points at the end of August is fine and entirely expected. But the strange inability of the line to head back downwards after the early September dates is now explained: Giocoso was busy re-playing old recordings, rather than playing new ones for the first time, because of my coding bumbling. A play of something previously played doesn't lower the number of 'not yet played' recordings at all, of course.
Anyway: it's all fixed now and hopefully the music history will swiftly get back to reporting play counts of '1' for pretty much everything, and the trend-line of unplayed recordings will head downwards once more.
Naturally, further (and probably worse!) bugs can be expected to be uncovered in the days and weeks to come. Should I get to a state where I think I've knocked everything I can readily find on its head, however, then I'll move to make the new Giocoso version available generally.