I think this is a very good way to get a quick idea of how a new language works. No theory, no blabla, just the code in a language you know well side by side with the new one.
It actually works well with spoken languages: I've done that by buying the same book in my native language and a new one for which I know only the basics, with great success (and perseverance).
Your method of learning spoken languages is pretty much the same one that James Murray [1], the editor of the Oxford English Dictionary [2], used to learn new languages, which he did many times. He used translations of the bible.
I am a big proponent of this method for programming languages but this is also how French was basically taught to me in school and it just did not work. The difference? You can practice coding alone... A Hunan language is much more difficult to do that with.
It actually works well with spoken languages: I've done that by buying the same book in my native language and a new one for which I know only the basics, with great success (and perseverance).