Function block naming
The key to writing a quality function is understanding that it represents a thing. This is vital to understand for programmers. Many inexperienced programmers will often use function blocks or classes in general-purpose programming languages as dumping grounds for random methods and variables. This is a terrible practice, as a function block is supposed to model a thing. If you think back to school, you may remember that a noun represents a thing. This means that, much like a struct, a function block should also use a noun as a name.
As we saw with structs, a quality name can easily lay the foundation of a quality function block. A function block should represent one thing and one thing only. Therefore, having a quality noun name will enforce that principle. If you think about it, if you have a function block called television, adding methods to support the operations of a car won’t make any logical sense. Also, much like with structs, you want to...