No list is comprehensive.
"there's bound to be some random country that someone is from and isn't on my list"
If that was all there was to it, it would be simple.
There's no "world law" or "world constitution", so there's no single list of countries, republics, territories, protectorates, autonomous regions, independent governments, and disputed territories.
Indeed, it's not possible to come to an agreed-upon definition of "country" which would lead to a final list of country codes. The definition of "country" is politically charged. What, for example, is Tibet? Country or region of China? Northern Ireland? The Holy See?
Pick a list, and know that it's subject to some dispute.
You could, for example, use the IANA country code database: http://www.iana.org/domains/root/db/
It's as good as any, and since it's part of the IANA, it has some standing as a standard. Further, it's pretty accessible as easy-to-parse web content.