Drupal 8: How to write a simple custom “block module”

Table of Contents1 - Goals2 - Backup your database3 - Check my code out of Github, or create a module directory4 - Create a project info YAML file5 - Create the necessary subdirectories6 - Write the code to display your block7 - Clear the caches8 - Enable the module9 - Place the block module10 - See the custom block on your website11 - The biggest problem I encountered12 - The source code13 - Summary

In this tutorial I’ll demonstrate how to write a simple Drupal 8 “block module.” By this I mean that I’ll show you how to write a simple Drupal 8 module that will display output in a block. When you’re done you will have created a new block that you can place in one or more theme regions.

Such a disappointing feeling when a book is a letdown

I just spent 45 minutes reading a new book about a programming language I was excited to learn, then slammed it shut and said, “Poorly organized, too many words, not enough code.”

That’s always such a disappointing feeling when you have that initial excitement about a programming language (or technology), and then a book is such a letdown. (I really hope people don’t view my books that way.)

Good TypeScript links

I just started working with TypeScript, and here are some good links:

And an unrelated link on React:

Joe Armstrong: Why OO Sucks alvin April 22, 2019 - 10:58am

Famed programmer Joe Armstrong passed away this weekend. He created the Erlang programming language, based on the actor model, and without using Google, I’m pretty darned sure that Erlang had an impact on Akka, the very cool actor library for Scala. Here’s an article Mr. Armstrong wrote some years ago, titled, Why OO Sucks (OO as in OOP).

The meaning of the word “reify” in programming

I don’t recall hearing of the words “reify” or “reification” in my OOP years, but that may be because I studied aerospace engineering in college, not computer science. Since learning FP I often see those words, so I thought I’d try to understand their meaning.

The short answer is that the main definition seems to be:

“Taking an abstract concept and making it concrete.”

For the longer answer, I found the following definitions and examples of reification.