Table of Contents
- Backup your database
- Check my code out of Github, or create a module directory
- Create a project info YAML file
- Create the necessary subdirectories
- Write the code to display your block
- Clear the caches
- Enable the module
- Place the block module
- See the custom block on your website
- The biggest problem I encountered
- The source code
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.
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.)
I just started working with TypeScript, and here are some good links:
And an unrelated link on React:
Kent Beck has a good article on Medium titled, Programmer Test Principles.
I had never heard of the term “Yoda Conditions” until now, but I have seen them in some Java code where programmers put the constant first in an effort to avoid null pointer exceptions.
This is the Index entry for recursion in the third edition of Programming in Scala. :)
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).
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.
“Write shy code — modules that don’t reveal anything unnecessary to other modules and that don’t rely on other modules’ implementations.”
~ Dave Thomas