Skip to main content
 

Justice and Closure

The memo damage has been done and now we're left with the mess. Here are some ideas on how to make amends:

- Everyone ever interviewed by Damore is offered an onsite interview.
- Everyone peer-reviewed for promo is given an automatic appeal.
- Everyone peer-reviewed gets their previous calibrations revisited, and comp retroactively adjusted.

 

Can someone write the same list for closure methods?


http://youmightnotneedjquery.com/






 

 boilerplate reduction:

@107106902560384103150 submitted  http://cr/47565620 , which allows goog.ui.Components to do this:

  this.getRequiredElementByClass('classname')

Also goog.ui.Component has a domhelper.  You can get rid of your local domHelper_ vars in most cases and use this.getDomHelper() (and other dom helpers in goog.ui.Component) instead..









 

Compiler experts:

The JS style guide mentions that UPPER_CASE implies @const-- however when I try compiling this code using


  /**  @type{number}
   *@const*/
  var FOO = 1;
  FOO = 2;

it fails, but

  /**@type{number} */
  var FOO = 1;
  FOO = 2;

succeeds

Oddly enough this succeeds as well, which I would expect to work..
  /**@type{number}@const*/
  var FOO = 1;
  FOO = 2;

Any ideas?  These tests were done with http://closure-compiler.appspot.com -- I have not tested using google3 (yet)  Just wanted to make sure that the style guide meshes with the way the compiler treats things..


http://closure-compiler.appspot.com/home






 

goog.require

Can you guess the top goog.require() calls in google3? Comment below (no peeking!) (props to @103827306991532885669 for the idea)
*Edit* - new list by using new custom closure gsearch
.
.
.
.
.
.
.
.
.
.
.
.
.
.

9069 'goog.dom'
5440 'goog.array'
5364 'goog.events'
3887 'goog.style'
3762 'goog.string'
3337 'goog.dom.classes'
3119 'goog.events.EventType'
2661 'goog.debug.Logger'
2625 'goog.ui.Component'
2573 'goog.events.EventHandler'
2424 'goog.object'
2160 'goog.testing.asserts'
2113 'goog.testing.jsunit'
1968 'goog.events.EventTarget'
1929 'goog.asserts'
1920 'goog.testing.MockControl'
1845 'goog.Uri'
1717 'goog.Disposable'
1693 'goog.events.Event'
1657 'goog.json'
1460 'goog.userAgent'
1328 'goog.Timer'
1184 'goog.structs.Map'
1139 'goog.net.XhrIo'
1131 'fava.delegate.Delegate'
1028 'goog.dom.TagName'

909 'goog.ui.Dialog'
841 'fava.component.DomServices'
792 'goog.ui.Component.EventType'
791 'goog.testing.mockmatchers'
779 'fava.services'
749 'goog.events.KeyCodes'
715 'goog.testing.PropertyReplacer'
690 'goog.functions'
648 'goog.math.Size'
605 'goog.math.Coordinate'
596 'goog.testing.events'
588 'goog.async.Deferred'
557 'goog.structs.Set'

530 'goog.ui.MenuItem'
495 'goog.Uri.QueryData'
472 'goog.dom.DomHelper'
468 'goog.uri.utils'
468 'goog.math'
462 'goog.dom.forms'
453 'fava.extension'
423 'fava.AppContext'
421 'fava.dom.SoyRenderer'
408 'goog.string.StringBuffer'
399 'goog.math.Rect'
397 'goog.module.ModuleManager'
395 'goog.ui.Button'
378 'soy'
378 'goog.positioning.Corner'
372 'ga.Component'
364 'goog.i18n.DateTimeFormat'
353 'crm.testing'
349 'pinto.core.Url'
348 'ga.report.States'
337 'jfk.Button'
329 'goog.net.EventType'
322 'goog.debug'
320 'goog.ui.Dialog.ButtonSet'
319 'goog.math.Range'
316 'fava.data.DataServices'

306 'goog.ui.CustomButton'
301 'goog.testing.MockClock'
301 'goog.debug.LogManager'
Do it yourself:
/home/build/google3/javascript/closure/bin/gsearch goog.require | grep .js: out| ^Crl -pe 's/^.*\((.*)\).*$//' | sort | uniq -c | sort -rn

 

lindner opened issue 1 on gli/closure-compiler-maven-plugin http://ff.im/-yIgZn