How do Germans decide the article of a new word?

Last night I was reading on my kindle and thought what would be article of the word kindle and how was that even decided. So I went to my computer and started typing: der kindle (no results), das kindle (that’s the one). For some reason it didn’t look like “die” to me… so how do German decide which article a new word gets.

(originally asked by JEAP, thank you)