Code to text ratio is basically the comparison of the amount of code you have on a page VS the amount of actual readable text on that page. This is an indirect factor. What I mean by indirect is that search engines don't use it as a primary factor in their algorithms. But this factor does tell them about UX (user experience). If a page has higher code to text ratio, it is usually more user-friendly and gives a better experience to your visitors. You can use a tool like this one to check your page's code to text ratio: http://tools.seochat.com/tools/code-to-text-ratio/
People focus too much on things that are not relevant. Text html ratio is different from website to website. If you write articles your text html ratio is going to be huge compared with someone who have a image gallery website ( like me ). Search engines know that. So focus on the quality of your content and forget about these numbers . As long as you are not a spam website that copy content from everywhere, and show a bunch of links that forces people to click on them, you are good to go no matter what that ratio is
Text to html ration means how much actual text (bytes) is present by removing all the HTML tags, scripts, styles compared to the whole webpage size (bytes). You can quickly analyze this ration by using is tool HTML to Text Converter
The ratio you ask about doesn't matter OP what matters is how relevant and useful your text is to the search query in question. Sometimes the best answer to query can be just a few words and so your ratio will be very code heavy whereas at other times your answer may need to be full of rich explanatory content an so your ratio will be very text heavy. Whatever fits the query best is therefore dictated by the particular search query.
Nothing to worry about, this is important only for SE's. People don't even see your source code (*unless they want to!)
Woorank, Maierwalter & SEOChat are the tools that will conduct a FREE text to HTML ratio report for you. It's indirectly relevant to SEO as it will help increase the page loading speed by removing the unwanted codes.