• 15 February 2021Last week's update & End of support for Internet Explorer

    Last Wednesday the site was updated with the next item that was on my list : a refactoring of the calls between client/server that is used across the site : when editing a story, syncing flashcards during review, voting a story and so on.

    I'm happy with the results of this rewrite. I learned a few things about TypeScript along the way that will prove useful later. Mainly that in this case using simple OOP approach and Javascript's native classes, it simplified the TypeScript code. I could remove the interface because the class in itself is already the interface, and you can export it. By using a factory function approach, I had to declare a separate interface, and the code was unnecessarily verbose and annoying to maintain.

    This will prove handy later this year if we (hopefully) get to a point where we can have a proper API (likely using token generation from Laravel Sanctum).

    This refactoring now done, closes second item on my "Phase 1" of the "reboot" roadmap I posted in January.

    Next : Review, Repeat!

    Next on my list then is Issue #184 Add "Again" button in Review page posted by shintoo. I'm really excited to finally be working on a feature, or at least a tangible enhancement to the site's functionality!

    The gist of this feature is to allow users to repeat cards in the same review session. Essentially this adds something similar to Anki's "learning" stage : a new "Repeat" (or "Again") button will move the card back to the bottom of the pile in the same review session. The user is free to "Repeat" those cards as many times as they want. Eventually they'll want to answer Hard / Yes / Easy (typically Hard or Yes, Hard for New cards ensures they will show up again next day). If the review session is ended early (clicking the "End" button), any remaining "Again" cards are not rated. Therefore they will remain in the due pile, and the user can study them again later.

    Note if you'd like to weigh in on how it will work, now is the time! Feel free to leave a comment in the Github issue linked above.

    One of the design questions is what to do with the flashcard answer buttons. I'm not too fond of having five buttons under the flashcard. The solution I'm leaning towards atm, quoting the Github issue:

    (...) adding an option to SRS Settings to Use Learning mode (similar to Anki) : With this option enabled, the "No" button is replaced by "Again" (or "Repeat"). The "Again" answer moves the card to the back of the pile for another test in the same review session.

    If the user ends the session early with the "End" button, unlike what I wrote in the issue, the "Again" cards will remain unrated. That way they will simply sit in the due card pile, and will be available to review again later in the same day.

    So, assuming we tick this option, the buttons under the flashcard would become : Repeat / Hard / Yes / Easy. The choice of labeling "Repeat" or "Again" is mostly about the shortcut : I like "Repeat" because the first letter then can be underlined, like the other buttons. The key r would logically become the shortcut.

    My hunch is for most users new to the site having a "Repeat" button instead of "No" is probably closer to what they need. If that is the case, then I could turn this on by default for new accounts, and those that want the more strict mode (doing a second review of New cards after a night's sleep) could enable that in the options. Let me know what you think!

    I'm aiming to complete this item in two weeks. Let's do this!

    End of support for Internet Explorer 10-11

    While refactoring I also decided to finally drop support for Internet Explorer. Specifically, in developer terms I removed ie >= 11 from the target browser compatibility. The reason for this change is to allow legacy javascript code to use a feature called Promises which are unfortunately not supported at all in IE11.

    Maintaining support for outdated browsers means the packaged javascript delivered by the server is larger, as well as a tad slower due to containing extra code that "patches" the missing functionality in the browser.

    A quick glance at Google Analytics, shows that IE is not even in the top 10 entries of the "Browser & OS" chart anymore. Microsoft EDGE, which now replaces IE in Windows, is at 2.93% of users. For the curious, in this audience specifically, starting at position #1 I'm seeing 60.68% of users on Chrome (I assume this also covers Vivaldi etc. which use the Chrome engine, not sure), #2 is Safari at 21.56% (the default browser on all iOS devices), Firefox is at 7.50%, then EDGE at 2.93%, followed closely by Opera at 2.58%. ... Internet Explorer is at 0.15%.

By Month