Comments are disabled

Due to a potential security issue I’ve disabled new comments on this website. Hopefully they’ll be re-enabled next week.

I love you, too

To whoever wrote the anonymous comment a few nights ago, “I love you,” thank you, I appreciate it. Odds are, I love you, too. ;)

Drupal 8 Twig templates comments syntax

As a quick note, the Drupal 8 Twig template comment syntax looks like this:

{# this is a comment #}

The Twig multiline comment syntax uses the same characters:

   This is a comment.
   More comments ...
   Even more comments ...

Markdown comments syntax: Comments that won’t appear in generated output

Markdown FAQ: How do I create comments in Markdown? Especially comments that won’t appear in the generated output.

Part 1 of my answer is that technically there is no way — or at least no standard way — to create comments in Markdown documents, other than to use HTML comments like this:

Drupal 8: How to put a View or Block between the Content and Comments

I’m not going to discuss this code much, but in short, the source code below is for a Drupal 8 preprocess_node function that I use to set variables for (a) a custom view and (b) a custom block. I set the variables in this function, and then display them in my node.html.twig file like this:

{{ similar_by_terms }}

and this:

The Play Framework template comments syntax

When you want to create Play Framework template comments, use the @* ... *@ syntax. Here's a one-line comment:


Here's a multiline comment:

 * Four score
 * and seven year ago
 * our fathers ...

(You can format that however you want.)

You can use comments as the first line of Play Framework templates (before the function declaration):

Comments in PHP: PHP comment syntax and examples

It's funny, when I first started working with PHP, the first thing I wanted to know is "What is the PHP comments syntax?" (It reminds me of learning to ride a motorcycle, where the first thing you want/need to learn is how to stop.)

Fortunately, if you have a Unix/Linux and/or C programming background, the PHP comment syntax will seem very familiar, and I'll share some simple PHP comment examples here.

Java comment examples

Question: How do I create a comment in Java?

Answer: There are two ways to create Java comments, and both are shown in the example code below:

// this is a one-line comment

 * this is also
 * a comment, but it can span multiple
 * lines.

The // syntax makes everything after it on the current line a Java comment, and the /** ... */ syntax lets you create multi-line Java comments.

The AppleScript comment syntax

AppleScript comments FAQ: How do I create comments in AppleScript?

Answer: There are two ways to create comments in AppleScript, and here are examples of both approaches.

AppleScript comments with "--" or "#" syntax

First, you can use the "--" syntax. This lets you create a comment like this at the beginning of a line:

-- my comment
display dialog "yada"

You can also use the same syntax to put a comment at the end of a line, like this: