Karma will take care of itself.
And really, it's not worth much.
Post useful stuff, make useful comments.
It may be different for "famous" people like tptacek and Animats who are instantly recognized in any comment thread, so that lots of highly upvoted comments make up for the comment/submission discrepancy.
Be careful, sarcasm, facts, or the inconvenient truth can cause downvotes.
It is also very important, to always post in a manner which cannot insult a demographic (eg. Independent Thinkers™), unless the insulted demographic does not represent the The Right Opinion™ (eg. realists, conservatives, anti-globalists, Drumpf voters, law abiding tax paying majorities, especially males can always be insulted).
Is there a way to figure out a comment's ratio of upvotes to downvotes? Sometimes I see my comment's score oscillating...
This is, frankly, a really annoying aspect of many commenting systems. It's among the reasons I prefer range-based voting (say 1-5 scale) rather than up/down. On the back end it's possible to do some aggregate modeling that works out, for large numbers, somewhat equivalently, but this handles thin data poorly.
On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.
Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off-topic. Timing. I don't live in the US myself, and since roughly half of the site's users are in the US, the time of day makes a big difference in seeing your submission hitting the front page or floating to the bottom.