What's your best tips and tricks for learning grammar when studying a foreign language? Reading grammar books is fine, but in my experience the knowledge doesn't really stick.
Background: I learnt German in school, and I still have no problem with reading and my listening skills are okay, but I always make grammar mistakes. I can hardly write a sentence without some grammar mistakes. I studied a lot of grammar in school, but apparently it didn't stick. Now I mostly self-study through reading magazines, writing a diary, watching tv programmes and occasionally speaking.