Comment on Comments


#1

Hi All,

As you’ve probably heard us talk about in this video on writing good code that Ben & I did a while back, comments are very important.

There are the green comments in your OptoScript code done using // or /* comment */, you can add comments into your blocks, and you can also add text directly to your chart.

But there’s another way of adding some notes to a chart that can be handy too – just use an empty block like this:


You can then use a connection line to draw an arrow to a block you’d like to point out, and you can also change the background color (which you can’t do with the standard text box tool).

Neat-o!

-OptoMary


#2

Also, don’t forget about the trick of using an action block as a ‘comment’.
Just paste it down, use a different color for best effect and use the Z-order to send it to the back.

Here is an example;


Comments are oh-so important!
Don’t ever be tempted to think you don’t need them.

Ben.