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:
  1. // Is it a broken browser?
  2.     var msg string;
  3.     switch agent := req.UserAgent; {
  4.     case strings.Index(agent, "MSIE")>= 0:
  5.         msg = "Internet Explorer"
  6.     case strings.Index(agent, "Chrome/")>= 0:
  7.         msg = "Chrome"
  8.     default:
  9.         return
  10.     }

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 :) )

Entry Filed under: Go, Google

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

hidden

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


Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Most Recent Posts

Wikipedia Affiliate Button