6 Matching Annotations
  1. Mar 2021
    1. The Model macro literally does what our model! step did.

      That information is not generally relevant. Only makes sense for someone who actually knew about or used the old interface.

      The docs shouldn't assume you are an experienced user / a user of the previous version.

      Would have been appropriate in a Changelog entry or announcement, but not in the general docs.

  2. Feb 2021
    1. Grouped inputs It can be convenient to apply the same options to a bunch of inputs. One common use case is making many inputs optional. Instead of setting default: nil on each one of them, you can use with_options to reduce duplication.

      This is just a general Ruby/Rails tip, nothing specific to active_interaction (except that it demonstrates that it may be useful sometimes, and gives a specific example of when you might use it).

      Still, in my opinion, this doesn't belong in the docs. Partly because I think repeating the default: nil for every item is an acceptable type of duplication, which would be better, clearer (because it's more explicit), simpler, keeps those details closer to the place where they are relevant (imagine if there were 50 fields within a with_options block).

      I also think think that it creates a very arbitrary logical "grouping" within your code, which may cause you to unintentionally override/trump / miss the chance to use a different, more logical/natural/important/useful logical grouping instead. For example, it might be more natural/important/useful to group the fields by the section/fieldset/model that they belong with, even if your only grouping is a comment:

      # User fields
      string :name
      integer :age
      date :birthday, default: nil
      
      # Food preferences
      array :pizza_toppings
      boolean :wants_cake, default: nil
      

      may be a more useful grouping/organization than:

      # Fields that are required
      string :name
      integer :age
      array :pizza_toppings
      
      # Fields that are optional
      with_options default: nil do
        date :birthday
        boolean :wants_cake
      end
      

      Or it might be better to list them strictly in the same order as they appear in your model that you are trying to match. Why? Because then you (or your code reviewer) can more easily compare the lists between the two places to make sure you haven't missed any fields from the model, and quickly be able to identify which ones are missing (hopefully intentionally missing).

      In other words, their "optionalness" seems to me like a pretty incidental property, not a key property worthy of allowing to dictate the organization/order/grouping of your code.

    1. (The forms !=, /= or <> are generally used in programming languages where ease of typing and use of ASCII text is preferred.) x ≈ y means x is approximately equal to y. This may also be written ≃, ≅, ~, ♎ (Libra Symbol), or ≒. G ≈ H means that group G is isomorphic (structurally identical) to group H.

      what does that have to do with this game?

  3. Jan 2021
    1. Thus, the presence of DIF suggests that some irrelevant construct (such as language ability) is being measured along with the intended construct.
    2. For instance, some examinees might obtain higher scores on essay questions because of a greater ability to bluff their way through an answer, not because they have greater knowledge or skill.
  4. Mar 2017