15 Matching Annotations
  1. May 2018
  2. Nov 2017
    1. jQuery.trim

      This is the only thing about this block of JS that requires JS. I wonder if this an attempt to get jQuery users to write JS? LOL.

      Just replace jQuery.trim(cookies[i]) with cookies[i].trim()!

  3. Jun 2017
    1. 0.25 ether

      This is approximately $75 as of today (29-June-2017). That's a bit rich for a single contract call!

    1. onlyowner

      Violates recommended style

    2. onlyowner

      Violates recommended style

    3. onlyowner

      Violates recommended style

    4. onlyowner

      Violates recommended style

    5. onlyowner

      Violates recommended style

    6. onlyowner

      Violates recommended style

    7. Strings should be quoted with double-quotes instead of single-quotes. Yes: str = "foo"; str = "Hamlet says, 'To be or not to be...'"; No: str = 'bar'; str = '"Be yourself; everyone else is already taken." -Oscar Wilde';

      I cannot agree with this recommendation. We're basically saying that we should change the literal string––grammar be damned––to suit a programming style.

    1. Pitfalls

      This whole section would be good to review frequently while writing code.

    2. Using random numbers in smart contracts is quite tricky if you do not want miners to be able to cheat.

      I feel like this warrants a lot more explanation!

    1. A literal number can take a suffix of wei, finney, szabo or ether to convert between the subdenominations of Ether, where Ether currency numbers without a postfix are assumed to be Wei, e.g. 2 ether == 2000 finney evaluates to true.

      1 ether = 1,000 Finney = 1,000,000 Szabo = 1,000,000,000 GWei = 1,000,000,000,000 MWei = 1,000,000,000,000,000 KWei = 1,000,000,000,000,000,000 Wei

  4. May 2017