Oh, I can't agree with Eugenia and Igor at all! For most nouns, you can define their grammatical gender by their ending. It's difficult with the words that end in -ь, that is true, in that case you have to check with your dictionaty. But there is in fact a very limited number of masculine nouns that have "feminine" endings, (- а or - я). And those are words for male people - дядя (uncle), папа (dad), дедушка (grandfather) - so it is not difficult to remember they are masculine (which means- if you have to put an adjective before them you will choose the masculine form.Or if you use a past tense verb form after them, you will also choose the masculine ending for the verb. But the case forms of these nouns follow the feminine pattern: дедушка will have the same endings as for example сестра).
Feminine nouns end in -а, -я
Masculine nouns end in a consonant
Neuter nouns end in -o or -e, plus a small group with - мя in the end (this group includes время - time and имя - name)