stats lost during update

stats lost during update

Postby aristide » Fri Dec 31, 2010 10:36 am

Hello Ernie!
I've just had a problem when updating one of my deck: some card statistics were lost after the download process, although one side was unaltered. It occurred only on one deck. Have you made any change in your merging algorithm, which was rock solid until now?
I wish you a happy new year!
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Sat Jan 01, 2011 8:09 pm

Hey Aristide. Logic might have changed slightly, but I need to look at the coding later today and get back with you.
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby Guest » Sun Jan 02, 2011 2:30 am

Hi!
I've just encountered the same problem, after having injected a supplementary information in my main database, namely, a sound file path for one side. This injection works fine (i.e., the original cards are recognized) when the *second* side is modified. But when the modification occurs on the *first* side, FCDL warns me no matching cards have been found. Unfortunately, I heavily relied on the previous behaviour (i.e., one identical side = same card) when updating programmatically my database by complex injection of pieces of new knowledge into old cards. So, for me, this new behaviour is clearly a regression. I can think to a workaround:
1. export all the offending decks;
2. swap "fixed" columns in first position;
3. re-import the decks;
4. modify the settings to make the second side appear first.
Since this represents some work, I would like to hear your opinion first, about the supposed problem, and the supposed workaround.
Cheers!
A.
Guest
 

Re: stats lost during update

Postby aristide » Sun Jan 02, 2011 2:33 am

Sorry, forgot to login before posting my previous message.
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Sun Jan 02, 2011 8:20 am

I looked at my coding, and while I did change the coding related to this, I don't see any logical difference. I tried a test myself and changed one side at a time (both 1 and then 2) changing first the text, then next adding a new sound file. Everything seemed to work fine for me.

I would like to figure out what is going on on your side. If you can reproduce the behavior and send me some data to reproduce it on my end, I could see what's happening. Can you try a simple test? If that works, I'm guessing there is something more complex going on with your data.

As for your workaround, I don't know. I think that you might have the same problem even if you switched sides. You might try some quick tests if feasable.

I'm sorry I can't give you an answer yet, but hopefully we can figure this out.

Edit: Do you have any duplicate information on two different cards... like the exact same text or sound name on side 1 or 2. This would affect the process, though I don't see it explaining what you are experiencing.


Ernie
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby aristide » Sun Jan 02, 2011 9:09 am

Thanks for your research and your tests.

Perharps have you changed something in your internal representation of the sides? When I look into an exported deck, all the media seem relegated at the end of the side's field. To be more specific, while I generate:
Code: Select all
<pic blank.png>安徽 Ānhuī   <pic Anhui.png>安徽 Ānhuī   <pic China.gif>安徽 Ānhuī   E   Province

The exported side looks like:
Code: Select all
安徽 Ānhuī<pic blank.png>   安徽 Ānhuī<pic Anhui.png>   安徽 Ānhuī<pic China.gif>   E   Province   2,0,22,18,7,5,756,2010-12-05 08:05

I don't know if it was the same before. Anyway, the cards do match though.

But now, when I add a sound on the first side, no match is found in the following three cases:
Code: Select all
安徽 Ānhuī<pic blank.png><snd 125cdb287f3ea780900834c37c0a59bd.m4a>   安徽 Ānhuī<pic Anhui.png>   安徽 Ānhuī<pic China.gif>   E   Province
<pic blank.png>安徽 Ānhuī<snd 125cdb287f3ea780900834c37c0a59bd.m4a>   安徽 Ānhuī<pic Anhui.png>   安徽 Ānhuī<pic China.gif>   E   Province
安徽 Ānhuī<snd 125cdb287f3ea780900834c37c0a59bd.m4a><pic blank.png>   安徽 Ānhuī<pic Anhui.png>   安徽 Ānhuī<pic China.gif>   E   Province


Same problem when I make a textual change:
Code: Select all
<pic blank.png>安徽 ĀnhuīFOOBAR   <pic Anhui.png>安徽 Ānhuī   <pic China.gif>安徽 Ānhuī   E   Province
<pic blank.png>安徽 Ānhuī   <pic Anhui.png>安徽 ĀnhuīFOOBAR   <pic China.gif>安徽 Ānhuī   E   Province


In the latter case, the first side is the constant one! Now I don't know why my updates ever work on 50% of my decks! :-(
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Sun Jan 02, 2011 7:06 pm

First, it doesn't matter that the export has the <pic> at the end. This is how it has always exported.

I think your problem is that you use the same information across multiple cards. I see "pic blank.png" used for every card... this will cause the matching routine to not find a match if you make a change.

When you re-import, it tries to match the new and the old. It will first search exact match on side 1 and 2 for all text/pic/sound values. If found, done. If not, it will search for any match on any text/pic/sound for side 1 or 2. In your case, it will find a match on "blank.png" for many cards. When this happens, it gives up on the matching for that card.

(I think this is how it always has worked.)

Solution: with my current matching routine, you will need to make sure that each card has a unique value for the text, the picture, and the sound for sides 1 and 2 for all cards.

I think I have an idea of how I can improve my logic to find better matches. I'll code that for the next update.


Ernie
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby aristide » Fri Jan 07, 2011 3:14 pm

Hello!
Thanks for your answer, and sorry for the delay: these days I have no time to make more tests on my decks.
I don't know what to think of your algorithm: my decks do have a lot of cards which share the same media. For instance, all my chinese vocabulary have an associated media sound, and as you know 是,事,市, etc. are all pronounced shì, so must refer to the same file. During more than one year, I had zero problem when updating such decks (which I did hundred times). So I find quite difficult to admit it always work the same as today!
As for the solution you suggest, well, it's just not an option in chinese!
I guess I should think of another workaround while waiting for the next update. Perharps export / inject / import-replace, but it's a real hassle for something which used to be transparent.
Cheers,
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Fri Jan 07, 2011 8:22 pm

I will double-check your example with my older version to see what I get, but I'm surprised it used to work. I'm probably missing something.
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby Ernie » Thu Jan 20, 2011 5:45 pm

Hey Aristide,

I found my problem and put the logic back to the way it used to be before the last update. Sorry about the toubles.

Ernie
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby aristide » Wed Jan 26, 2011 2:55 pm

Thanks.
I must confess I was quite desesperate about this, to the point I stopped practicing during 15 days: all my workflow is based on the smart updates FCDL used to perform.
I wonder if your version control strategy allows you to release a small bugfix revision of the latest stable version when you are working on the next one. If not, may be you could suggest a workaround?
Cheers,
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Wed Jan 26, 2011 3:05 pm

My next version should be available in 2 weeks.

Workaround?
1) If you are adding new cards, append, don't update
2) If you are updating cards, export your deck with statistics, make updates to this list keeping the valid statistics around... then transfer back to app(keeping stats from text file, not from the app).
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby aristide » Thu Jan 27, 2011 12:27 am

Oh oh, no magic tricks ;-)
Anyway, 2 weeks is a rather short wait.
Thanks!
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby aristide » Fri Jan 28, 2011 2:54 am

Does your version 2.7 actually fix this problem? I can't find any mention of it in the change list.
Thanks!
A.
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Fri Jan 28, 2011 8:16 am

Yes, 2.7 should fix the problem, even though I didn't mention it in the update notes.
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: stats lost during update

Postby aristide » Mon Feb 07, 2011 11:07 am

Thanks a lot. I've been able to update my four main decks without any problem, except two cards. Here's one of them:

Old version:
Il me fait penser à son frère. <snd e20bacf3bcdffa62d5bbc5800676bce7.m4a><font face='Heiti SC'>他使我想起了他的弟弟。</font> 1300 secondaire
New version:
Il me faisait penser à son petit frère. <snd e20bacf3bcdffa62d5bbc5800676bce7.m4a><font face='Heiti SC'>他使我想起了他的弟弟。</font> 1300 secondaire

The card becames "new". I have a lot of such cards which are correctly merged, for instance:

Old version:
Ma maman ne se sent pas très bien. <snd fe5614c1e84c121d0f63ab64bbc47757.m4a><font face='Heiti SC'>我的妈妈不太舒服。</font> 0200 secondaire
New version:
Ma maman ne se sent pas trop bien. <snd fe5614c1e84c121d0f63ab64bbc47757.m4a><font face='Heiti SC'>我的妈妈不太舒服。</font> 0200 secondaire

Rather strange, I cannot see any logic in this discrepancy.
Anyway, not a big problem for me this time :-)

Thank you again for the fix!
aristide
 
Posts: 56
Joined: Fri Dec 31, 2010 10:28 am

Re: stats lost during update

Postby Ernie » Mon Feb 07, 2011 11:48 am

Glad it's working better. I can't tell from what you posted why it didn't update.

If two existing cards were found with the same unchanged text/sound, then it won't update. For example, two cards with "1300 secondaire" on side 2.
Ernie
Site Admin
 
Posts: 5009
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Return to Comments, Questions and Feedback



cron