Blog / March 2023
-
31 March 2023Small fix on Review Summary screen
The sorting and paging of the SRS Review Summary screen has been fixed.
Thanks to ilya112358 for reminding me in Review Summary Multipage Bug #304.
Server move, server woes
We are working on moving the website to a new platform. Specifically to a LINODE compute instance. In theory this would provide a more reliable uptime than on shared hosting.
I should write more about this later. This has kept me busy since February. The site is running fine on LINODE. The main blocker for me right now is I can no longer use the simple php mail() functionality since those kind of re-usable servers can have their IP flagged and the emails are blocked by the receiver mail servers (or something like that).
In theory using SMTP email sending via Google servers would improve the reliability and delivery of the emails, so this is a good improvement. However I have been struggling this week trying to get GMail via SMTP with XOAuth2 working.
I managed to send a few mails with PHPMailer, but the documentation is anything but clear to me. I havenĀ“t figured out a reliable way for the code to continue refreshing the OAuth tokens. Are there any other packages that I could use with step by step guide on how to set it up and refresh the tokens for a client app like this site?
If I get really frustrated with this there is a simpler method where you can use an "app password" but this requires enabling 2-factor authentication and I hate this feature. I hate having to pickup my iPad or phone whenever I want to sign in GMail. At least the hassle is not worth it on a secondary email account - since this is not my main email account.
If someone knows a good working example somewhere of implementing Google SMTP with XOauth2 and the token refresh part - that would be useful.
I'll be honest I hate that stuff. I hate it with a passion. Every hour I have to spend doing devops/backend stuff, is an hour I could be sitting with FIGMA doing some app design and implementing actual real features on the site and I'm sorry to vent but I am seriously PISSED OFF right now that I haven't been able to do anything worthwhile on this site for two months at least? This small bug fix today was actually a relief, however minor that was.
I have looked at a bunch of email services and they all cost money. Paying ~ 15 USD a month upfront just to send emails for a simple free web app to me is unacceptable. All these costs add up. Database backup, potential upgrade of the LINODE instance, etc.
I looked at various free options, for example SendGrid's free tier is up to 100 emails per day. Unfortunately 100 emails/day is just about the minimum. At peak times the site has seen upwards of 60-80 signups in a day. So if you add "forgot password", "update passord" emails and so on, we're just barely under 100 emails/day.
Google SMTP servers allow to send up to 500 emails for free per day (per rolling 24h to be precise). So this should be plenty for awhile... once I can get it working that is.
Here is Froschroom by Mouse on Mars. 1994 baby! That should soothe my soul for a little while...
-
16 March 2023Small and not so small fixes
A few fixes from recent weeks:
-
Progress Chart fix for Old Edition RTK Supplement
When using RTK Old Edition, the RTK Supplement lesson is now displayed correctly (Lesson 58 with 23 characters index #3008-3030). Thanks to Vinickw for issue #295 on github! -
Minor tweak to RTK Edition selection
The RTK Edition selection screen (in Account Settings) now displays frame number ranges so it's more obvious how the RTK indexes add up to 3030 / 3000 characters. -
Fixed misspelled keyword
Fixed a typo for keyword #1296 "facsimile". Thanks to peytontucker for issue #292 on github.
From here on this will be mostly developer stuff, so feel free to skip. If you like the gory details though let's dive in :)
Updates to the source code repository
Fixing the keyword wasn't as easy as I hoped. I ended up refreshing an old script that has not been run in years. The script essentially combine data for RTK1+3, along with KANJIDIC2 and UNIHAN - and then output the
kanjis
table for the database.To be fair since the indexes for 5th/6th edition do not change, and data sources like KANJIDIC2 do not change that much over the years - the script kinda fell out of my radar.
So here's a recap of some of the steps for those who are interested in the nitty gritty:
-
We need a "source of truth" for RTK1/3 data, so as not to lose any fixes that accumulate over time. To simplify this process I deleted old data files
rtk1_data
, andrtk3_keywords
and consolidated this data into a single spreadsheet called "RTK Editions Compared". -
This very useful spreadsheet was originally created by Chris/Katsuo (of the now closed RevTK Forums). Chris put the old & new edition indexes side by side, along with the old & new edition keywords. It was really helpful as a reference. The updated spreadsheet now has lesson numbers for both OLD and NEW editions, on every line - so it's easier to parse regardless of sorting order.
-
Since the spreadsheet is now input for all RTK-related data, it is now included in the repository. You can find it in src/data/datafiles/ (the .ods file can be opened in eg. LibreOffice).
-
Updated & fixed the kanjis_table.php script and added it to the repo.
-
The script was re-run on an up to date version of KANJIDIC2 and UNIHAN. Unihan is used to provide the stroke order for all the CJK Unified Ideograph characters that are not part of KANJIDIC2. KANJIDIC2 covers Japanese characters which is approx. 12K characters - while UNIHAN covers the entire CJK Unified range which is ~21K characters - which is what goes in Kanji Koohii database (as a reminder Koohii intentionally includes all the Chinese characters from the RSH/RTH books - all of them are part of CJK Unified Ideographs).
-
To make sure that the script works as intended and does not introduce new errors - I ran a diff between an export of the last live data and the script's output. The diff is viewable here. You'll see the first entry is the keyword typo fix. Interestingly there aren't many changes, even though I haven't run the script in years. There is like 25-ish characters, which are not part of RTK. Most of these have either had their stroke count updated (from Unihan), or the first/principal Onyomi was updated in KANJIDIC.
So even though it was not terribly exciting work I am glad that it is done. My commitment to the community, as I have stated on the Patreon page, is that I maintain the open source repository github.com/fabd/kanji-koohii.
While the open source repo was technically complete in that it includes a sample database, with the full
kanjis
table - it did not include some of the older scripts that I was either too embarrassed to share, or that were broken in some ways. So I am happy that the script was fixed and is now part of the repository.Since you read thus far I'll share with you a song by one of my favorite electronic music bands from the late 90's ... here is Stereomission from the Iaora Tahiti album by Mouse on Mars!
-
By Month
- Oct 2024 (1)
- Sep 2024 (1)
- Jun 2024 (2)
- May 2024 (4)
- Apr 2024 (3)
- Mar 2024 (1)
- Feb 2024 (1)
- Dec 2023 (1)
- Nov 2023 (2)
- Oct 2023 (2)
- Apr 2023 (2)
- Mar 2023 (2)
- Feb 2023 (1)
- Jan 2023 (2)
- Dec 2022 (1)
- Nov 2022 (2)
- Oct 2022 (3)
- Sep 2022 (1)
- May 2022 (4)
- Apr 2022 (1)
- Feb 2022 (2)
- Jan 2022 (2)
- Dec 2021 (4)
- Nov 2021 (2)
- Oct 2021 (2)
- Sep 2021 (2)
- Aug 2021 (1)
- Apr 2021 (2)
- Feb 2021 (3)
- Jan 2021 (3)
- Dec 2020 (1)
- Nov 2020 (1)
- May 2020 (1)
- Apr 2020 (1)
- Jan 2020 (1)
- Oct 2019 (1)
- Sep 2019 (1)
- Aug 2019 (4)
- Jul 2019 (3)
- Jun 2019 (1)
- May 2019 (1)
- Mar 2019 (2)
- Jan 2019 (1)
- Nov 2018 (3)
- Oct 2018 (8)
- Sep 2018 (4)
- Aug 2018 (3)
- Jul 2018 (1)
- Jun 2018 (4)
- May 2018 (1)
- Apr 2018 (1)
- Mar 2018 (1)
- Jan 2018 (1)
- Dec 2017 (6)
- Nov 2017 (4)
- Oct 2017 (4)
- Sep 2017 (5)
- Aug 2017 (5)
- Jun 2017 (3)
- May 2017 (2)
- Apr 2017 (3)
- Mar 2017 (7)
- Feb 2017 (10)
- Jan 2017 (11)
- Dec 2016 (6)
- Nov 2016 (5)
- Oct 2016 (6)
- Sep 2016 (7)
- Aug 2016 (3)
- May 2016 (1)
- Mar 2016 (2)
- Jan 2016 (1)
- Dec 2015 (3)
- Nov 2015 (1)
- Oct 2015 (1)
- Sep 2015 (7)
- Jul 2015 (2)
- Jun 2015 (1)
- May 2015 (5)
- Apr 2015 (4)
- Mar 2015 (5)
- Feb 2015 (4)
- Jan 2015 (5)
- Dec 2014 (4)
- Nov 2014 (3)
- Oct 2014 (2)
- Jun 2014 (1)
- Apr 2014 (2)
- Mar 2014 (4)
- Feb 2014 (3)
- Jan 2014 (4)
- Dec 2013 (2)
- Oct 2013 (1)
- Sep 2013 (1)
- Jun 2013 (4)
- May 2013 (1)
- Mar 2013 (1)
- Jan 2013 (2)
- Oct 2012 (2)
- Aug 2012 (1)
- Jul 2012 (2)
- Jun 2012 (2)
- May 2012 (1)
- Mar 2012 (2)
- May 2011 (1)
- Apr 2011 (4)
- Mar 2011 (3)
- Feb 2011 (2)
- Jan 2011 (2)
- Dec 2010 (8)
- Nov 2010 (8)
- Oct 2010 (3)
- Sep 2010 (3)
- Aug 2010 (1)
- Jul 2010 (2)
- Jun 2010 (5)
- May 2010 (1)
- Apr 2010 (3)
- Mar 2010 (4)
- Feb 2010 (2)
- Jan 2010 (1)
- Dec 2009 (5)
- Nov 2009 (5)
- Oct 2009 (1)
- Aug 2009 (1)
- May 2009 (5)
- Apr 2009 (2)
- Mar 2009 (1)
- Feb 2009 (2)
- Jan 2009 (2)
- Nov 2008 (1)
- Oct 2008 (1)
- Sep 2008 (1)
- May 2008 (2)
- Apr 2008 (1)
- Feb 2008 (6)
- Jan 2008 (5)
- Dec 2007 (6)
- Oct 2007 (1)
- Sep 2007 (2)
- Aug 2007 (3)
- Jun 2007 (1)
- May 2007 (5)
- Apr 2007 (1)
- Mar 2007 (2)
- Feb 2007 (1)
- Jan 2007 (4)
- Dec 2006 (3)
- Aug 2006 (1)
- Jun 2006 (3)
- Apr 2006 (6)
- Mar 2006 (8)
- Feb 2006 (1)
- Jan 2006 (4)
- Nov 2005 (1)
- Oct 2005 (4)
- Sep 2005 (1)
- Aug 2005 (11)