La cohésion interne chez Google

November 17, 2009

Quand une boite devient un peu grosse, il peut arriver qu’elle choppe des tendance schizophréniques. Par exemple, si on fouille bien dans le code source de Go, on trouve ça :

	// Is it a broken browser?
	var msg string;
	switch agent := req.UserAgent; {
	case strings.Index(agent, "MSIE") >= 0:
		msg = "Internet Explorer"
	case strings.Index(agent, "Chrome/") >= 0:
		msg = "Chrome"
	default:
		return
	}

J’aime bien le principe d’un produit “Google” (le Go n’a pas l’air si Google que ça) qui en insulte un autre :)

(pour info, on trouve ça dans le fichier $GOROOT/src/pkg/http/server.go, vous aurez l’explication complète de pourquoi Chrome se fait traiter de broken en commentaire de la fonction :) )

Filed under: Go,Google

2 Comments Leave a Comment

  • 1. Christophe  |  November 17, 2009 at 2:03 am

    pour ceux qui ne veulent pas chercher:

    // If this is an error reply (4xx or 5xx)
    // and the handler wrote some data explaining the error,
    // some browsers (i.e., Chrome, Internet Explorer)
    // will show their own error instead unless the error is
    // long enough. The minimum lengths used in those
    // browsers are in the 256-512 range.
    // Pad to 1024 bytes.

  • 2. Rémy Sanchez  |  November 17, 2009 at 2:15 am

    Roh mais tu tues tout le suspens :)

Leave a Comment

, (Hidden)

*

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

RSS feed for comments on this post.


Calendar

February 2012
M T W T F S S
« Oct    
 12345
6789101112
13141516171819
20212223242526
272829  

Recent Posts