I will be moving to London next week to spend a year as a graduate student. I am wondering if it's possible to take with me some coffee (around 200 g - fine powder) and a type of roasted grain (around 500 g) that we eat back home, both for personal use of course. I checked the government services website for bringing food products into the UK but it doesn't provide any details on the types of items I intend on bringing with me. Should these items be declared to Customs? I am coming from outside the EU.
The right thing to do is, when in doubt, declare it.
After the baggage claim, choose the red "goods to declare" lane, wait for a customs officer to show up if they're not already there (sometimes you need to push a button to summon them), and say "I'm bringing such-and-such food items with me; is that alright?"
In the happy (and likely) case you will be told it's fine, just move on.
Otherwise you'll have to leave the items to be destroyed. At these quantities, import duties are not really relevant, so the main consideration is whether there may be agricultural pests hitching a ride in your food. And if they think there's a risk of that, the quantity doesn't matter.
If possible, bring your supplies in unopened industrial packaging. This doesn't always make a difference, but can sometimes make things easier.