Featured image of post Google eng-uh-neering: CRLSets

Google eng-uh-neering: CRLSets

Compare and contrast:

const crlSetAppId = "hfnkpimlhhgieaddgfemjhofmfblmnib"
const versionRequestURL = "https://clients2.google.com/service/update2/crx?id="+crlSetAppId+"&v=&uc&acceptformat=crx3"

Versus Google code:

const crlSetAppId = "hfnkpimlhhgieaddgfemjhofmfblmnib"

// buildVersionRequestURL returns a URL from which the current CRLSet version
// information can be fetched.
func buildVersionRequestURL() string {
	args := url.Values(make(map[string][]string))
	args.Add("x", "id="+crlSetAppId+"&v=&uc"+"&acceptformat=crx3")

	return (&url.URL{
		Scheme:   "https",
		Host:     "clients2.google.com",
		Path:     "/service/update2/crx",
		RawQuery: args.Encode(),
	}).String()
}

Which is simpler? More readable? More usable? More maintainable? Less prone to silly errors like separating two literal strings with a concatenation "&v=&uc" + "&acceptformat=crx3"? (What’s up with the empty-value v and the no-value uc parameters anyway?)

For that matter why do the docs pretend to be open (except that one important bit of how they’re generated), but then the link to get the data takes you to this (what can only be described as purposefully obfuscated) source code which you have to go build and run just to download the data that they could’ve provided directly? (And of course it’s in Go, which almost no one would have had installed when this was released.)

Oh and why isn’t the repo hosted in an official Google GitHub org? It’s just under some random Googler(? hopefully)’s personal account???

Seriously, what the hell is going on over there in Mountain View? I understand that vastly over-engineering simple things is the way to promotions over there but you’d think eventually they’d pull their heads out of their posterior? But no, get rid of yet more products (like cached results) and crank down the screws really tight on the few legit* revenue sources you have, I’m sure that’ll help you stop the bleed.

(* non-privacy-invading, to the extent such a thing is possible at such a company)

(image source)