Notes on Programming in Japanese

Created at: 22 Mar 2024 Last updated: 22 Mar 2024

Here are some notes I think anyone who is programming in Japan may find useful, they (will) span across the full stack. At the time of posting this is a very small post, but this will be an ongoing project. I'll update it as I come back to issues again and again.

  • Because Japanese has so many characters using hefty webfonts can significantly slow down your application. A good webfont, like Google Noto Sans CJK, has 65,535 glyphs! So,
    • In general I recommend this old Stackoverflow post. But, here are two more links to useful articles on the topic: 1, 2.
    • There are of course exceptions for stylistic design choices, and I've found Adobe Fonts are not so bad, they have an option for lazy/selective loading.

  • For testing in a Ruby on Rails app: FFaker is better than Faker for dummy Japanese database input. This is an obscure reference, but it's just better. There's no additional setup, and to call a method with Japanese, it has it's own subclass, like: FFaker::AddressJA.method. It's a no brainer if you're using Rspec and FactoryBot.

Back