Visibly Relaying Information
I’m a big fan of visibly displaying information instead of simply attempting to use words.
For example, I could explain the AND (&&) operator as equating to True only if the two values associated with the operation are also True. It's a bit wordy and if you don't already know what the AND operator does then it requires a bit of thought.
In C# this could be something like:
If ( somethingTrue && somethingElseTrue)
BothStatementsWereTrue()
else
AtLeastOneOfTheStatementsWasFalse()
This makes it a little easier to decipher if you already understand programming, but then if you did you would already understand the AND operator.
Perhaps a better way would be display it in a table:
True | False | |
True | True | False |
False | False | False |
This is a little more visual and easier to take in, especially for someone who doesn't know the subject.
A further way to improve visualisation might be to use a truth table, where values A and B are Boolean:
A | B | AND | OR | XOR |
True | True | True | True | False |
True | False | False | True | True |
False | True | False | True | True |
False | False | False | False | False |
Here we've not only shown how the AND operator works, but we've also added the OR and Exclusive OR operators, without adding much complexity.
Visualisation is important when relaying information to others and there are different ways it can be achieved, with some thought required to your intended audience. For many people paragraphs of text make for difficult reading, so adding some visualisations can relieve the monotony of lots of text and also help understanding of the subject.