What you absolutely should do is lay out the basic information quickly and completely for them.
""" Hi Name,
My name's X and I #{was referred to you by Y, heard about you on Z...} and I'm looking for a $ROLE job. You're interesting because Q.
I'm in your area and wondering if you'd be interested in having coffee to talk about the role? I've attached my #{resume, linkedin, github with a note about what project to look at for a code example.}
I look forward to hearing from you soon.
~ $NAME $CONTACT_INFO """
That's the information I want to figure out if it's going to be a good use of time or not.
You can send me a practice email personally to earl@apolloagriculture.com and I'll give you some feedback, or if you're in Nairobi by some fluke chance we can grab coffee.
I'd say it's a "you miss 100% of the shots you don't take" situation. So ask!
Given that you've decided to ask, get a warm introduction if at all possible. Get a mutual acquaintance to introduce you, even over email. Don't have a mutual acquaintance? Start with who you know and build your network outwards. Alternatively, reach out in the context of that person's public activity: attend the same Meetup, comment on a blog post, etc.
Cold emailing will work best if you have several leads, so you can tolerate a lower success rate.
As a consultant and employee, I would be a bit surprised by such an email because I'm not in a position to hire people. But my manager is always looking for people and we have a referral bonus system, so I would get some money for introducing someone to my manager who gets hired. Both me and my manager would have selfish reasons for seeing you, apart from just being nice people that want to help others out.
If you suggest a coffee close to their office, I don't see a problem. They'll either ignore your email, tell you they're busy, or meet up. I would definitely suggest that you make your intentions clear that you're looking for a job, but also that you're interested in learning more about the job or the industry. I would also suggest that you say how you found the person, otherwise they may be more suspicious or confused. Just say if you found them on LinkedIn, on the company website, or wherever, so that they know where you're coming from.
Good luck!
I also vastly prefer email over calls.