13

I noticed today that the "Jobs near you" sidebar now features locations written in Chinese. Although I do read the language, I don't believe I've ever used an OS or browser with a Chinese language preference with StackOverflow.

Confused jobs posting

You can see that some of the listings are in Chinese and others are not (although all translate to "Pittsburgh, PA, USA"). What's going on?

UPDATE: It seems I don't have to be logged in to see broken behaviour. At http://careers.stackoverflow.com/jobs/location/Pittsburgh%2C%20Pennsylvania%2C%20United%20States:

StackOverflow Careers kind of in Chinese

This reproduces with Safari, Firefox and Chrome on my Mac.

  • Feels more like some data crept into the backend rather than a display bug of any sort... – Makoto Sep 4 '15 at 4:49
4

We're aware of this and it's in our bug backlog. It's related to the way we perform client-side lookups of locations and then cache them in the database. For now I've manually purged the bad entries and refreshed the affected jobs. We're working on a longer term fix, probably 6-8 weeks :).

Thanks for the report!

  • You look up locations client-side and then cache them in your database? Doesn't that seem a bit strange? – nneonneo Sep 4 '15 at 13:20
  • Why is that strange? We lookup locations on the client using the Google Places API. That returns a JSON blob that we parse and validate on the backend before storing it. We also have a bunch of code that does geo-coding server-side. Storing these client-side requests in our cache means we don't hit the API as much on the server-side. Google limits us to 2500 requests / day... Sadly the bug is that we don't respect the language used by a client when storing in the cache so sometimes the cached entry is stored using the wrong language. Doh. – Dean Ward Sep 4 '15 at 13:57
  • 1
    You're not afraid of cache poisoning? Someone submits bogus data that you cache for future visitors? – nneonneo Sep 4 '15 at 15:57
  • 1
    It's a concern, but not one that we've actually had any issues with. Things in the cache don't expire (so good entries don't get overwritten) and we have tooling and backend jobs in place to ensure that things are in a sane state. Not to say that we don't get reports of broken stuff, but we have processes in place to fix things up quickly if needed. – Dean Ward Sep 4 '15 at 16:04
3

This was a problem with how Careers retrieved and used geocoding results from the browser. For English (US), we were mistakenly using the browser language when querying the Google geocoding API rather than English. This, in turn, led us to cache and re-use these query results as English results when, in fact, they were not.

Careers has been updated to use the English version of the geocoding API rather than the browser language version when viewing the English (US) version of the site. In addition, cached results that were obviously in the wrong language have been purged. If you see a location that should be in English but is not, please don't hesitate to create a new Meta post and someone from the Careers team will check into it.

You must log in to answer this question.

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