3.3. Anatomy of a Bot#
Since bots are computer programs, let’s look at the structure of code written in programming languages.
With all languages (including programming languages), you combine pieces of the language together according to specific rules in order to create meaning. For example: Consider this sentence in English:
I was at UW (University of Washington, Seattle) yesterday.
In our constructing that sentence, we used a number of English language rules, such as:
Putting the subject
I
before the verbwas
Ending the sentence with a period
.
Making a parenthetical remark with a matching opening parenthesis
(
and closing parenthesis)
. This parenthetical remark clarified the part of the sentence before itUW
.
Programming languages also have their own set of rules for combining and organizing pieces of code in order to create meaning. We will look at some of these rules in these sections: