8

My (somewhat simplified) routine when I encounter a programming problem I can't seem to solve myself:

  1. Search for related words in Google.
  2. Stack Overflow pages appear in the top regions of the first page.
  3. Pick one or two.
  4. Problem solved.

I was surprised to see this routine fail when I ran into an IronPython exception.

bad operand type for abs(): 'Decimal'

Long story short: using this exact phrase didn't bring me to the Q&A I found in the end. It took considerable effort and lots of trial and error to get there ultimately.

The question contains the exact phrase, yet Google didn't find it. Can someone explain why? Is it because the exception message is formatted as code? Is it a flaw in Stack Overflow's SEO?

7
  • 5
    meta.google.com would be a more appropriate place to ask this question. Pity it doesn't exist.
    – yivi
    Commented Nov 13, 2019 at 8:35
  • 1
    That specific Q/A turns up for me now in Google. One of the problems might be that the error message is put in a code block, which might make that Google gives it less importance. Maybe the error message gets SEO optimized if it is put inside quotation markdown instead.
    – rene
    Commented Nov 13, 2019 at 8:52
  • @rene That's my assumption too. I plan to revise the question in due time and see if there's any effect. Would be useful to know because it would give more reason to improve questions where text is incorrectly formatted as code. Commented Nov 13, 2019 at 9:00
  • 6
    It is too old. You have to click on "More results from stackoverflow.com" to find it, then it becomes the 3rd hit. The reason they do this is far too depressing to discuss, be sure to chase "more results". Commented Nov 13, 2019 at 9:14
  • The SEO results changed when Google deemed SO to be a forum.
    – user3956566
    Commented Nov 15, 2019 at 6:06
  • @YvetteColomb Ah, so that's what depresses Hans so badly. Was that an official change in policy that took place somewhere in the past? Commented Nov 16, 2019 at 13:25
  • @GertArnold I'm not sure how it was determined, I'm just aware it happened. Sorry I have no more info.
    – user3956566
    Commented Nov 22, 2019 at 7:12

1 Answer 1

8

The question contains the exact phrase, yet Google didn't find it. Can someone explain why?

Google did find it. It's absolutely indexed and shows up in searches. Your problem is that this error message is common to Python projects in general. A basic search for just that error yields this question about Django, which also uses Python.

If you add IronPython, your desired answer comes in at #3 (where Google still sees IronPython as a less relevant term and excludes it). If you force Google to include ironpython by using "ironpython", then we get it at #1

There's not much we can do about that for three reasons

  1. As mentioned, the error is a Python error, so it's a common error across all Python questions
  2. We can't control Google's ranking system. It's making an educated guess at your search
  3. The Django question sends stronger signals for your search, by putting the error in the title.

That third reason seems fixable, but it really isn't. Either we append it to the title to the desired question (too long) or we replace the title (potentially changes the meaning and/or diminishes the question).

The lesson here is to start general and add specifics to your search. Honestly, that's the only way to find anything in Google sometimes.

1
  • 2
    Yeah, we have to face it, it's mostly out of our hands. Google gives (much) higher ranking to fuzzy matches in header tags than exact matches in the page body. Well, would have saved me a lot of time if they didn't. At least, @HansPassant's comment makes me pay more attention to these links below search results that for whatever reason I've got accustomed to to ignore. Commented Nov 13, 2019 at 15:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .