La cohésion interne chez Google
November 17th, 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 :
C:
-
// 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
)

2 Comments Add your own
1. Christophe | November 17th, 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 17th, 2009 at 2:15 am
Roh mais tu tues tout le suspens
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Subscribe to the comments via RSS Feed