+* Word Count Program Test Strategy
+#+AUTHOR:Steven Baltakatei Sandoval
+#+DATE: 2022-09-10
+#+EMAIL: baltakatei@gmail.com
+
+** Question 1
+*How would you test the word count program?*
+
+For the word count program provided on page 20 of K&R 2nd Edition, I
+would first create a program to automatically feed it input and record the output.
+
+Then, I would feed the word count program a corpus of ASCII text that
+has already had its counts of newlines, words, and characters verified
+manually.
+
+Then, I would repeat the previous step but with a corpus containing
+multibyte glyphs such as a UTF-8 formatted Japanese news article.
+
+Then, I would feed the word count program a small (e.g. 10 bytes)
+amount of random binary noise and record the output. Then, I would
+manually review how the word count program parsed the random bytes. I
+would repeat this step several times, noting how the program reacts to
+bytes that could not represent text.
+
+** Question 2
+*What kinds of input are most likely to uncover bugs if there are
+any?* Multibyte glyphs. Text encoded in a single-byte character
+encoding assign one byte for each character; text encoded in
+multi-byte encoding can have multiple bytes assigned. Therefore, a
+single multi-byte character fed into the word count program may
+require multiple calls of the ~getchar()~ to completely process,
+especially if ~getchar()~ were written assuming single-byte encoded
+data that may not even contain text at all. See [[https://www.gnu.org/software/libc/manual/html_node/Extended-Char-Intro.html][Introduction to
+Extended Characters]] in the [[https://www.gnu.org/software/libc/manual/html_node/index.html][GNU C Library Reference Manual]].
+
+Another kind of input that could reveal bugs would simply be random
+bytes. If ~getchar()~ is written expecting to receive only bytes from
+certain ranges, then unexpected bytes may reveal unexpected
+behavior. The expected range of bytes might not be intended by the
+programmer. See [[https://en.wikipedia.org/wiki/Fuzzing][Fuzzing]].