News for hackers. Stuff that matters.
Re:SimCity UI Code + DRM by bdc on Tuesday March 12, 2013 @01:33AM (#5360403)
On the subject of minification, I see a lot of lines that look like this[1]:

  fireToken : 1 === f.tradeTokens.data.fireToken ? !0 : !1,
Why might that be a desired output from a minifier? Why not simply

  fireToken : 1 === f.tradeTokens.data.fireToken,
[1] https://gist.github.com/anonymous/5133829#file-simcityui-js-...
Re:SimCity UI Code + DRM by ajanuary on Tuesday March 12, 2013 @04:50AM (#5360851)
The original code could have been written as "condition ? true : false" and it's just not a pattern the minifier picks up on.
Re:SimCity UI Code + DRM by yuchi on Tuesday March 12, 2013 @04:48AM (#5360844)
Probably a terrible mistake from the developer, not the minifier.

    fireToken: f.tradeTokens.data.fireToken === 1 ? true : false
In my company I see JS code like the following:

    if (!!someFlag) { /* ... */ }