• Uncategorized

    Actionable Task Naming – Reduce Confusion, Increase Speed

    I’ve worked on many teams across many task management systems. One practice that has consistently brought clarity to our projects is actionable task naming. That is, naming tasks in a way that makes them assignable and actionable. This will reduce the number of false assumptions made, and the amount of time it takes people to interpret a task, every time they encounter the task!

    Doing this is easy, too.

    Instructions:

    When you’re writing a task, say these words first (in your head): “I need you to…” or “I need them to…” or “John needs to” — you get the gist. It’s that simple (most of the time).

    Example 1:

    Instead of Hero image on the homepage is too large you could say Make homepage hero image smaller or Homepage: make hero image smaller or similar.

    Note that I often remove the word “the” (Make the homepage hero image smaller).

    Example 2:

    This time I’ll illustrate why this practice is useful:

    Address field is optional  — does that mean it is currently optional but needs to be required? Or does it mean that it’s presently required but needs to be optional? I don’t want to have to ask myself that question each time I pass by this task. It’d be much easier to understand the intent/issue if it was written Make address field optional or Make address field required or similar.


    On a Related Note (for Developers)

    You can use a similar practice when writing version control commit messages.

    Instead of I need you to... we use the prefix This will....

    The result is consistent messages that say what will happen with a commit is applied/reverted.

    Example:

    Update jQuery UI version to 3.5.1
  • Uncategorized

    Twig Caching Issues in Acquia Cloud Enterprise

    I’ve recently run into an issue where my site (on Acquia Cloud Enterprise) has node displays that were flip-flopping between an older version of a Twig template file, and the most recent version. I tried all combinations of drush cr, varnish cache clearing, and clearing the cache through the Drupal UI.

    After reading through No reliable method exists for clearing the Twig cache, I landed on this page at Acquia: https://support.acquia.com/hc/en-us/articles/360005167754-Drupal-8-Twig-cache

    I SSH’d into the production server I always SSH into, and I ran the command as shown. I did this repeatedly. I did a drush cr after. I did a drush cr before. Nothing was working. My pages were showing up with the old template, or the new template, and it seemed to be at random.

    Ultimately I re-read the documentation page, more thoroughly this time, and discovered this: “connect to each web server instance and run a command like this…

    Ahah! EACH web server.

    So, I logged into the Acquia Cloud interface, found the other production server’s connection string (myuser@someserver.prod.hosting.acquia.com), connected, and ran the same command. After another drush cr all of the pages were using the new template.

    That’ll teach me to jump straight to executing commands without reading the instructions carefully.

  • Uncategorized

    Creating Field Groups in a Custom Module

    If you need your module to add a fieldgroup to your Drupal 7 site, follow this quick and easy process: Also, if you’re looking to create fields, see this related post.

    1. Build the fieldgroup through the “manage fields” UI.
    2. Modify the code below to include a proper $fieldgroup_name, $entity_type and $bundle_name. I needed to add a field to the user profile, so I set the $entity_type to “user” and the $bundle_name to “user”.