I studied a bit of German. I was always having trouble remembering if the item was a die, der, or das. Maybe my instructors weren't able to make it clear, but, I found no sense in what got assigned which gender.
Ukrainian also has genders, but, there are "rules" along with them...if it ends in an A it is a she, if it ends in E or O its an it, ends in consonant it's a he, etc.
However, I was never able to figure out the reasoning behind the German genders, and that made it all so much more difficult as it turned out to simply be an exercise in memorization.