Build the cable and port decision tree, and test it on the awkward cases
Task
Produce a decision tree that takes a symptom and returns which of the four negotiations failed, and test it against cases chosen so that the obvious answer is wrong.
Steps
- Write
lab/usbtree/tree.csvwith headernode,question,yes_goes_to,no_goes_to,conclusionimplementing a decision tree with at least eight nodes. - Write
lab/usbtree/cases.txtwith six symptom descriptions, at least two of which are awkward -- a device that works on one port and not another, or a dock that worked until a firmware update. - Walk each case through the tree and record the path in
lab/usbtree/walks.csvwith headercase,path,conclusion,confirmed_how. - Confirm at least three conclusions by experiment with your own equipment, and record the observation rather than the expectation.
- Record in
lab/usbtree/gaps.mdevery case the tree could not resolve and what node would have to be added -- a tree that resolves everything has not met a hard case.
Verify
awk -F, 'NR>1 && NF>=5 {n++} END {print n" tree node(s)"}' lab/usbtree/tree.csv
grep -c . lab/usbtree/cases.txt
awk -F, 'NR>1 && NF>=4 {n++} END {print n" case(s) walked"}' lab/usbtree/walks.csv
awk -F, 'NR>1 && $4!="" && tolower($4)!="not confirmed" {n++} END {print n+0" confirmed by experiment"}' lab/usbtree/walks.csv
grep -c . lab/usbtree/gaps.md
Eight or more nodes, six cases walked, three or more confirmed by experiment, and a gaps file that is not empty. An empty gaps file means either the cases were too easy or the tree has a node that guesses.
Notes
The confirmation step is what separates this from a paper exercise. A conclusion you have not tested is a hypothesis, and this course's whole argument is that a hypothesis and a finding are different things.
This is an independent study companion for CompTIA A+ Core 1 220-1201 and is not produced by or endorsed by CompTIA.