And then something comes up and flips the table over, erasing all your hard work.
Sometimes the grammatical genders totally contradict what you have learnt.
In a way, you probably already know to be wary. You've most likely noticed that the idea that all English loan words are das is a falsehood. There's no hard and fast rule, but often, you can think of what the "true" German word would be and then apply that gender to the loan word. (Example: die Party, because die Feier.)
So, to start off easy, here's a fun example of when genders aren't what they seem.
Balzac Coffee, a German café chain, are doing a seasonal macadamia latte. It's an absolute must: ein absolutes Muss!
Wait... that's not actually an "M" there, though. It's an "N", which means the word is in fact Nuss, the German word for nut. Nice pun.
But... it still looks weird because it's die Nuss, so it should be "eine absolute Nuss" instead. But yeah, it's a play on das Muss, so we disregard grammatical constructs.
This is just the tip of the iceberg. (Or the cream atop the macadamia latte.)
It becomes much more unpredictable when proper nouns and titles are involved. That's when things get almost existential.
In English, it's plain odd to refer to somebody as "the Sophie". I remember being weirded out the first few times I heard people say things like "die Sophie mag keinen Reis", or "kannst du das bitte der Sophie geben?".
This is usually within a familiar context. Yet mentally keeping stock of German gender is a good habit for a learner to develop, because in the following examples, you really have to think about what something actually is, in spite of what seems to be logical (or simple).
Please forgive this sentence and instead consider the grammatical question it throws at us:
"Ich habe es in der Bild gelesen."
Wait, what? Surely it should be im Bild, since it's das Bild?
Well, no. If you think about it it this way, it makes more sense:
"Ich habe es in der Bild-Zeitung gelesen."
Die Zeitung is a feminine noun (die becomes der in the dative) and it gets omitted here because it's assumed that if you're talking in German -- and also, context -- you'll know that we're talking about the publication Bild, i.e. a proper noun. Not Bild as in an image.
"Ich war im Karstadt shoppen."
Now, if we didn't already know that Karstadt is a department store in Germany, we might assume that this sentence should read in der Karstadt, because die Stadt. But since the various words for "store" or "shop" in German are either das or der, we are going to stick to im Karstadt. And we are, after all, talking about a store, not an actual Stadt (city).
I guess there is also the option of just saying "in Karstadt" without an article, but now that I've heard so many native speakers use one when referring to establishments like this, it sounds flimsy without.
To round things off: this is what happened when I tried to ask my German boyfriend what the gender of Österreicher would be if you're talking about an Austrian restaurant, not an Austrian man:
I pushed it and he said he didn't know, maintaining that it would just be "Wir gehen zum Österreicher". This doesn't bring us any closer to knowing whether it's das or der, though. I mean, it could literally be either.
The case for das: it's das Restaurant.
The case for der: it's der Österreicher when you're referring to a person, so maybe it just transfers onto here as well?
I guess that until I find a definitive answer, I will just find ways to avoid saying it. Sort of like when I mumble a mixture of der and das when I say the word Kabel, because I can never remember that one.