Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

How google sees a page of programming code

         

dethfire

8:39 pm on Jul 17, 2014 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have a site that is focused on programming and mathematics. So we have pages and pages of math code (LaTeX, MathML) and programming code. I always wondered how Google looked at a page full of code and latex equations with very little actual word content. Should I be concerned?

webcentric

8:43 pm on Jul 17, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I search for code samples regularly. Almost always find what I'm looking for on the first page of results but I do notice that sites that have been around a long time do better generally (even if their examples are somewhat out of date).

lucy24

9:14 pm on Jul 17, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Almost always find what I'm looking for on the first page of results

I strongly suspect that code is treated the same as languages google doesn't know: "We can't even guess at what they're talking about, so let's go with exact matches".

webcentric

9:54 pm on Jul 17, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I should also say that a lot of what I find is accompanied by descriptions explaining the general concepts the code is explaining. I search both for exact code snippets such as

class.property() or class.method() as well as things like how do you re-dimension an array in xyz language.

Pages with at least some written content are gonna be a broader target but I've found code example pages with nothing on them but code e.g. an entire php page output to the page or some such thing. These you find with exact matches. I would guess that you want people to find these pages as a result of some sort of question related to what the code or math is demonstrating which implies the need for descriptive text. Hey, this is a great reason for having good comments in your code. The comments, I'd bet, are readable content to Google.

/* This is how you calculate pi
using a banana */