Today I learned that English Muffins reproduce by budding.


Posted: Apr 11, 2019

I Hate Video Conference Calls

I have to be honest, I really don't like doing meetings over skype. Don't get me wrong there's a benefit to having video on all participants, but now I feel I have to be a television producer as well as a technologist when I'm making these calls... I spend 20 mins before each call checking the lighting, the angle of my shot, the background. And I'm worrying:

How many chins do I have in the shot? Do I need to a light to prevent a shadow?

I have to camera test shirt / tie combinations, especially with older webcams.

Why am I wearing a tie anyway? Don't these people realize that if someone is working from home the main benefit is Pajama Fridays?

I worry if my shirt clashes with the paint on the walls or worse yet, if the shirt and background are close in color and I appear to be a disembodied head? (this happened to me once)

Of course this is followed by an audio test. Is my mic too hot? Am I close enough to it. Can they hear me breathing?

IF my allergies are acting up is my nose too red? Do I need to borrow some of Anne's makeup to tone it down or will I appear to be David Bowie if I do. What about the zit from when I shaved the other day?

I have to remember to lock up the cat so I'm not trying to shoo him away from the keyboard that he'll attack in the middle of the call.

Folks, really I'm bit of a neurotic mess every time we do video calls, can we just do voice calls?

    Posted: Apr 11, 2019

Inserting a Block into a View Listing in Drupal 8


My blog homepage is basically an activity feed, a combination of Blog Posts, Short Notes, Images and Links, much like a facebook wall or a tumblog.  I decided I wanted to add a link to one of my other sites in the feed, basically a “house ad”.  Blatantly stealing from facebook, I decided that I wanted the second item in the feed. My goal is to create something like this:

In Drupal 7, I would have used preprocess_views_view to insert the ad into the view, but I wanted to do something that was more sustainable and not as hard coded.  Although on my blog I perform all roles (developer, designer, themes, content admin, etc), I wanted to give non-developers the ability to add, change and delete the advertisement.  So I decided to use Drupal's block interface.

I did a little investigation and found that the Twig Tweak module provides a twig function to fetch and drupal regions (and blocks, entities, fields and other Drupalisms). Here's a list of of the functions Twig Tweak provides. The drupal_region twig would do what I need.

Here’s what I did

  1. I added a region to my theme config, “view_inline_ad.”
  2. I added the block with the ad it to the region.
  3. Added the code to render the region to my views template (views-view-unformatted--blog.html.twig)
    1. {% if title %}
    2. <h3>{{ title }}</h3>
    3. {% endif %}
    4. {% for row in rows %}
    5. {%
    6. set row_classes = [
    7. default_row_class ? 'views-row',
    8. loop.first ? 'views-row-first',
    9. loop.last ? 'views-row-last',
    10. ]
    11. %}
    13. {% if loop.index == 2 %}
    14. {{ drupal_region('view_inline_ad') }}
    15. {% endif %}
    17. <div{{ row.attributes.addClass(row_classes) }}>
    18. {{ row.content }}
    19. </div>
    20. {% endfor %}
  4. Cleared Cache, loaded the page and rock and roll.

One problem I ran into, on my site the blog theme is not the default theme. I host multiple sites out of the same Drupal instance and am using the Switch Page Theme module to change theme based on site context. drupal_region() assumes you're using the default theme and not the current theme so it couoldn't find the region. It does accept a second parameter, theme. I popped the theme's machine name in there and it worked like a charm.

    Posted: Apr 11, 2019

Grumble Grumble...

I had already changed it (and am running 2 factor authentication).

Posted: Apr 10, 2019

Bunt, You Idiots

I posted this on Facebook 5 years ago.  It still applies today.

I've watched a lot of baseball in my life and so far this year we're seeing more infield shifts then I've ever seen before. I'm sure this is the natural evolution of the game but I have a question...

If you come up to bat and look at the infield and realize that the 3rd baseman is positioned where the shortstop normally is... Why in the name in all that is holy aren't you bunting? I get that some batters can't change their swing and go the other way... that's fine, I don’t want to change your swing. But every player should be able to square up and lay down a bunt that will roll up the 3rd base line. Push that bunt past the pitcher and you'll have an easy base hit. I don't care if you're fleet of foot like Brett Gardner or have the turtle like speed of David Ortiz, you'll make it the 90 feet before someone can get to that ball and throw you out. Do this often and one of a few things will happen:

1) The defense will stop these shifts since they don't want to give up "cheap hits".

2) You'll hit .400

Some people might say "we don't pay sluggers to bunt". I say, "if they're giving you a free base, take it". If that same slugger worked a walk you'd be applauding, "Good Eye, Good Eye". You never know what's going to start a rally.

To quote the great Yogi: "Baseball is 90% mental, the other half is physical.".

    Posted: Apr 5, 2019

Phone screening / Interview question of the day:

"What do you have in common with a leaf blower?"

Posted: Apr 4, 2019