• 22 November 2009Reconnect issue in flashcard reviews

    There appears to be a small issue with the handling of reconnects in the flashcard review page.

    When the network connection is really slow, or lost altogether a "Reconnect" link appears on the top right of the page. When you click this link, sometimes it would send the answers twice which would move a card up two stacks instead of one (answering No twice has no detrimental effect). This would happen only when using the "Reconnect" link.

    Until I can do a proper update of the website, as a "hotfix" I have increased the timeout interval to 20 seconds instead of 5. You should rarely see a timeout with this setting, however it can still happen if you lose connection entirely (maybe on wifi, or mobile phone?) in that case please check this topic about the hotfix.

    PS: this weekend I have been busy writing code for a "build" tool that will improve the page load time, especially for the study pages (the flashcard review page is kinda slow to load, but only loads once for a review session, whereas the study page needs to reload entirely for each different character).

    This tool is absolutely essential for developing other websites such as Reviewing the Hanzi, by allowing to share user interface code between different applications.

    If you're into development or creating web pages, it's very similar to Sprockets. I needed something similar but running in php. If it comes out well I'm considering archiving it and putting it up somwhere for download so others can use or contribute.

    A nice side effect of the javascript concatenation is that as a single file all dependencies are solved, and you can use advanced code checking with Google's Closure Compiler. (which you can do without concatenation but then you have to figure out the more complex way of handling external references...).