15 Matching Annotations
  1. Jun 2021
    1. Thanks, this was just what I was looking for! This is a perfect appropriate use of instance_eval. I do not understand the nay-sayers. If you already have your array in a variable, then sure, a.reduce(:+) / a.size.to_f is pretty reasonable. But if you want to "in line" find the mean of an array literal or an array that is returned from a function/expression — without duplicating the entire expression ([0,4,8].reduce(:+) / [0,4,8].length.to_f, for example, is abhorrent) or being required to assign to a local, then instance_eval option is a beautiful, elegant, idiomatic solution!!
    2. instance_eval is analogous to using tap, yield_self, … when you are dealing with a chain of method calls: do use it whenever it's appropriate and helpful! And in this case, I absolutely believe that it is.
  2. Apr 2021
    1. <aside> is appropriate if the side note "could be considered separate from the content"

      From a programmer's perspective:

      • It shouldn't be in an <aside>, if it is actually directly about what is in <main>
      • An <aside> should be able to be evaluated on its own, (almost entirely) in isolation from, and not dependent on anything in, the <main> content. This could be especially important/relevant for screen readers.
    2. <aside> is not appropriate if the side note is "a parenthetical". The W3C gives no examples of what it means.
  3. Aug 2020
  4. Jun 2020
    1. Don’t apply caching if the process is expected to react to changes during the caching period. i.e. Don’t cache when mixing reads and writes.
    2. An example candidate for caching might be a nightly billing task which aggregates billing data for the past month. That kind of task is likely not expecting last minute updates while it runs. It assumes that the state of the world remains constant while processing.
  5. May 2020
    1. it is a question of balance — if one mouse-click was all it took to consent, is it appropriate to require a phone call during business hours to withdraw that consent? Probably not.
    1. However, please note the following: it will depend on how those subdomains are defined. Are they just subsections of a project that belongs together like help.example.com or blog.example.com (and many other possible arrangements that are part of one and the same setup)? In such a case, using the same policy is appropriate. Problems arise when completely different projects which have little to do with one another and whose data collection practices also differ so significantly that they require different privacy policies.
  6. Apr 2020
  7. Oct 2013
    1. This aptness of language is one thing that makes people believe in the truth of your story
    2. Your language will be appropriate if it expresses emotion and character, and if it corresponds to its subject.