I’m learning Mandarin at the moment, and whilst the grammar rules are fairly straightforward to understand on paper, actually getting that knowledge out of my brain and through my mouth without having to think for a good few seconds is more difficult – especially with everyday things like numbers. These are actually quite important when you think of the various combinations – less than 10, more than 24, almost 200, add in the complexity of Chinese measure words and the fact that they go in different places depending on if the number ends in a unit or a zero, then there’s dates, decades and centuries, telephone numbers, and thats just as far as I’ve got…
It’s actually a bit tricky for untrained language tutors to quickly come up with lots of combinations of random numbers to practice these specific grammar points, and very boring to write out a list (which I will then remember anyway, defeating the point of the listening exercise). Plus, I want to do it for 10 minutes every day, not just once. So I’ve devised a way to generate random numbers with particular grammer points, by writing a few python scripts which generate these various combinations as digits on the screen. I’m going to ask my tutor to read them out while I write them down and then check them against the screen.
random_large_numbers.py
random_date.py
random_time.py
random_more_less_nums.py (to practice less than / more than and measure word location)
Whilst the code might not be useful unless you’re in the midst of language learning, there are a couple of neat things that I’ve discovered:
1. Codecademy labs – you can basically type in your python script into your web browser and run it remotely. No need to install anything on your computer. Although obviously this does limit some things you can do which require your computer’s resources, its great sandbox for testing code and playing around.
2. QPython for Android – this is a small app which I have on my phone and tablet to run the scripts (you can make them on their too, but I prefer to code & test on a laptop with full sizes keys). No need to carry my computer to lessons! The only annoying thing is that you have to put the scripts in the program folder on your android device, you can’t point QPython to open a script in any folder.
So apart from Python, what has that got to do with the Raspberry Pi? Well, I’ve just set up a Model A Pi with RASPBMC and using it as a media server and file server. So I can code my Python files on my laptop, save them to the RASPBMC server, and pick them up via my phone or tablet via wifi. No Dropbox in sight.