TIL: The brevity of Kotlin

I’ve started looking into JVM languages. As an exercise, I researched how to do a basic HTTP request - one trivial evaluation point of a language (i.e. how simply or comfortably this built-in feature is made available). In Java, here’s one way to request a page: import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; import java.io.InputStreamReader; import java.io.BufferedReader; public class Main { public static void main(String[] args) throws IOException { URL url = new URL("http://example.

Read More

TIL: 降るそう vs 降りそう

When telling a friend “according to the news, tomorrow looks like rain” which of these sentences is correct? ニューズによると、明日雨が降るそうです。 ニューズによると、明日雨が降りそうです。 The top one is used when someone is giving their opinion. In this case, the verb before そう is the plain-form or 辞書形。 The latter one is used when giving your own opinion based on observation. In this case, the verb before そう is the masu-form or ます形。 So the first sentence is the correct one.

Read More

First J->E translation attempt

I realised too late that reading is a really important part of language study. So I’m trying to spend some more time reading Japanese text. I figured attempting to translate might be a help. Here’s the original story entitled 50歳以上しか採用しない会社の社長が言った、「人生の変え方」. Below is the English translation, then I show line-by-line translations and a few notes for reference. This is an experiment, and hopefully I’ll do more. “How to change your life”: words from a company CEO that only hires over 50’s This drawing, shown to kids before studying for an exam, is pretty well done.

Read More

Quick guide to tables in Hugo

I had an idea for presenting some language translations in a table. As I’m not very familiar with markdown, I set out to discover how to do it. It turns out to be simple - just write something like the following in your post markdown: | Item | Quantity | | ---- | -------- | | Apples | 12 | | Rice | 5 kg bag | | Toilet Paper | 1 roll | which gives the following output:

Read More

TIL: 〜感 and 〜可能 as suffixes

While looking up the word 達成 (たっせい) achievement, I noticed two other variants: 達成感 (achievement + feeling -> sense of accomplishment) 達成可能 (achievement + ability/capability -> achievable) So far I had only encountered the suffix 感 as 感じ e.g. 悲しみを感じます (I feel sad) or 幸せな感じ (happy feeling). Similarly for 可能, I’d only seen it as a standalone word like その方法は可能です (That way is possible). Seeing 達成感 & 達成可能 was a pleasant surprise.

Read More

Adding Twitter Card support to Hugo themes

Without setting up Twitter Card support in your HTML, you’ll see the following which looks less than ideal: Tip: use the Twitter card validator before you tweet to check how the Twitter Card will look based on your URL content. Some themes like Minos (like I’m using) appear to not have Twitter Card support enabled. Here’s how I set it up. Insert the Twitter Card Hugo template Firstly in your site folder, find the layouts folder.

Read More

How I remember the kanji for Europe

This kanji is the combination of two elements that brings to mind the BREXIT event in the UK, i.e. the departure of the UK from the EU. The symbology of the EU losing a ‘district’ (the UK) under dramatic circumstances makes this now a relatively unforgettable kanji. I’ve found trying to incorporate a real-life parallel or association to kanji helps with recall. It’s important to accept that sometimes it takes a few goes to come up with an associative story that ‘works’ for you.

Read More

How to add a one-line description to a Hugo theme's header

I’m using the really nice minimal Minos theme. By default, it does not include a one-liner description. After checking the docs, there wasn’t any setting available in config.toml. After some research, I found it’s possible to overide the theme’s header with a custom one. Here’s the process I performed: in the themes/hugo-theme-minos folder, find the header currently being used for the site in your site folder, find the layouts folder (which is likely empty).

Read More