Blog / September 2016
-
24 September 2016Maintenance / minor tweak
The website was updated with minor cosmetic changes to improve the theme since I changed the background color some time ago (less yellowish).
I've also updated the tools used to build the Javascripts to Closure Compiler from Google. There shouldn't be any changes, but.. you never know. If anything behaves differently compared to the last few days let me know!Lately I planned to make the whole site mobile friendly but I am cutting back some of those plans because I'd really like to work on something new for existing users. So right now I decided to focus the mobile support to the homepage, and give it a much needed makeover. I'm getting rid of the Amazon links because they earned me pennies in affiliate income, so they are pretty useless. I'm improving the landing page with better screenshots.
I want to experiment on a new landing page with a mobile navigation as well. And then if it's satisfying, I can gradually move that to the rest of the pages. The thing is I should know better than reinvent the wheel. But what framework do I use? I've never liked jquery, and it's annoying that Bootstrap comes with jquery by default. I'm looking at some interesting projects that include Bootstrap with native Javascript.
Another concern is that maintaining a site that was started 10 years ago is no simple feat. If I include Bootstrap for example, it will cascade all kind of effects on the styling of the pages because it's got its own "reset" stylesheet. So at this point, I cherry pick pretty much every component, and big frameworks tend to not work for me.
-
10 September 2016Minor tweak to the site news
I finally added a link to each individual post... (sigh). It's important for search engines and to let users share those posts. Just one of those things that sat at the bottom of a to do list somewhere. Anyway, I've rolled my eyes enough times already. :P Point is, it's there.. so if you wanted to share a link to one of the news posts, the title of this news post is now a link !
By the way, the background color changed recently. Did anyone notice? :D I thought it was nicer on the forum so I brought the change to the main site as well. In this old post you can see the difference... Hopefully you'll agree it is nicer. I think it's funny... it seems I remove a little bit of yellow from the background color every few years. It took ten years to get to this point!
PS: Apologies to our Brazilian friends! I've noticed once in a while people have trouble answering the question on the sign up page. They are often Portuguese spellings (and probably misspellings too) for the name of the capital of Japan. I have just added more of those spellings to make the registration easier. -
9 September 2016Working on mobile layout
I've started work on making the website responsive and more usable on mobile devices.
A quick glance at Google Analytics shows that a significant 24 % of visits are from "mobile", and another 8% from "tablet". I guess a "tablet" could be considered a small desktop PC and usually most websites will fit into a tablet display without a "mobile" view. As for the "mobile" devices, the top 50% of those are shared between the iPhone (31%) and iPad (17%). The other 50% are spread thin between hundreds of different devices and models such as Samsung Galaxy, Google Nexus, Kindle; Motorola, Huawei, etc.As far as I can tell, the website works fine on tablets. When I redesigned the main navigation in early 2015, I purposely made it to work with touch. That way the drop down menus can be used on a tablet where there is no "mouse over" functionality.
Much of the work consists of allowing the content to "collapse" into a single column. The Study page is a good example. I suppose a good design would be for a search box to appear at the top, followed by the user's editing area, and then the shared stories.
As a single developer, I don't want to manage two entirely different websites. I can't afford to keep in sync a "mobile" optimized website, and a desktop website. So what I am trying to do, is a responsive website, that will be more comfortable to use on mobile devices (typically portrait view on a handheld phone). That means from the server point of view, there is only one page. The stylesheet is used to fit the same page content to different displays. In order to achieve that, I need to find a good compromise between both.
One tricky problem to solve are the tables. What should I do with them? We can't fit all the information from the Flashcard List in portrait view on a phone. Should I just hide some of the less important columns? Do mobile phone users expect that the mobile site will feature a "stripped down" version of the information? I really don't know. What if a visitor has never visited the site other than on their mobile device? Do they know that the tables would show more information when seen on a desktop browser or tablet (large display)?
Fortunately the Flashcard Review page is already optimized for mobile devices!
Some pages such as "Custom Review" are already responsive. The content can simply collapse into a single column. It's easy and fast to scroll on touch devices so that works out well.
Other pages like "Manage" featuring a sidebar navigation currently also collapse the sidebar. However the whole sidebar navigation shows at the top. I suppose here the main improvement would be to add a button that expands /collapse the navigation, while opening the most common sub page by default. This way the main content is not pushed too far down, and is seen when the page loads.
Do you have any suggestions for the mobile version of the site? Let me know! -
6 September 2016Success!
Results of the performance update. I think the last performance update was a success! I'm definitely seeing a difference: most Study pages now return in less than half a second and that includes the full return trip to the server. When a Study page is not cached, the queries are still a bit slow to my liking, but still better than before so I'm satisfied with the results. If it becomes necessary, I figured another way I could improve the speed further but this update bought me a lot of time that I can hopefully focus on other things. -
5 September 2016Bugfix
I fixed a rather big bug today related to the On / Kun example readings. The reading was cut after the highlighted part... The On / Kun reading corresponding tio the kanji flashcard was correct, but the full word was not spelled out so the reading could be misleading. For example 少 ("few") would show the reading すこ ... however that reading only made sense in the full word すこし. Now the full word is displayed correctly, along with the highlighted kanji reading. Thanks to Noah for letting me know!
To enable example words on your flashcards go to Account Settings > Flashcards. Example words are selected based on their frequency of use as documented in JMDICT (roughly 16000 entries in JMDICT). For common kanji where there are several suitable On and/or Kun readings, the example words will be picked at random. That way you can get more of your kanji reviews after completing RTK.
-
2 September 2016Today's maintenance & perfomance update
Today's maintenance update went well... but not without hurdles. The results are not as significant as I hoped to be perfectly honest, but overall the return time of Study pages is definitely better.
Before the database update I routinely saw queries on the Study pages that took 1.5 seconds, so adding the 300 ms of response time a page would be returned in two seconds, sometimes more! (300 ms is an average for me in Belgium, with the servers located in Texas; USA).
After the update it looks like most pages return within one second. The queries unfortunately can still vary wildly but overall it seems we have at least a 50% improvement in response time.
Read on for the gory details!In addition to that the caching of shared stories has been improved. Now it truly saves the most expensive queries, and the cache has been made to last much longer. Since we invalidate (ie. refresh) the cached page whenever a public story is edited or voted, I made the cache to last for a month (as of writing). There are ups and downs to that. Study pages corresponding to the beginning of the RTK index are likely to see more activity with shared stories and votes, and hence the cache will not be as efficient for them. Time will tell !
Keep in mind that for a few days, most pages will still take the extra time to be generated because they are not cached yet. However as more users browse the pages, and more pages are cached you should see an improvement.
The main improvement likely comes from the redesign of the indexes, and getting rid of the "temporary table" problem. And who knows, it may be that on peak times the changes I made are even more beneficial since that would be when bottlenecks happen.
I'm sorry the update took so long (about 3 hours). As soon as I took the site down, I found out that the MySQL server does not allow partitions! (unlike my developmental version). This was a further performance improvement I had to undo in the code and database schema.
Some numbers: there are 361871 shared stories as of writing. There are 6209558 stories stored altogether, equivalent to a 1.1 GB MySQL table.
There are still other interesting ideas I'm brainstorming. One approach for example, to make up for the lack of partitions, would be to move the public stories into a new table. Whenever a story is made public it could be copied there, and that means MySQL would deal with a table that would be less than 100 MB instead of 1.1 GB, with all the public stories addressed by a SQL query clustered together.
-
1 September 2016Possible maintenance update tomorrow
I'm almost ready to make a big maintenance and performance update to the database. The goal is to improve the responsiveness of the Study pages which have gotten slower over the years since we are now storing 6.2 million stories from users all over the world!
The maintenance update and downtime MAY happen tomorrow Friday, early afternoon and/or evening CET time.
The update may take an hour or more. I need to download the full database backup before the changes just to be extra safe. Most of the changes are manual updates I do over SSH. Then, while I am the only person able to access the site, I need to go through a bunch of pages, add a story, vote a story, etc... to make sure there are no glaring bugs.
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)