Is there a trick to remembering noun genders?
Beyond the rules above, the best "trick" is to always learn new nouns with their definite article (der, die, das). Use flashcards, apps, or create sentences.
Example
Don't just learn "Tisch," learn "der Tisch." Don't learn "Lampe," learn "die Lampe."