Have students try to find John Smith in n cities when teaching web development to help students understand the importance and hierarchy of file structure through narrowing down search locations.

  • File structure is important because it makes it easy to place and locate specific items.
    • By narrowing down the locations where a specific document should be, it becomes much easier to find.
  • Use the following activity to get students to reason about the importance of file structure through doing a search.
    • This is a good example because you are able to break a general problem into smaller parts.
  • Activity:
    • Tell students you have a really hard task for them, they need to try to find John Smith in n cities.
      • n is a lot of different cities for John Smith to be in, students would come up with a lot of John Smiths in the search.
    • Ask students how they would go about finding John Smith in n cities.
      • You want students to start thinking about how difficult it would be to find someone who could live in any of n cities based solely off of a common name.
    • Next, say to students, "What if you could narrow down the search because you knew additional information about John Smith?"
      • "What if we knew that the John Smith we are looking is in this city?"
        • "Instead of looking in n cities, you are looking for John Smith in your city! In one very specific place."
      • Begin talking about John Smith, "Is his a teacher or a nurse? Does he work at the Apple Store or did you meet him in line at the Apple Store."
      • Have students utilize information they learn about John Smith to narrow down the location they should search for him in.
        • Point out how much easier it is to find the right John Smith, the teacher you met in line at the Apple Store in your city, than it is to find this same John Smith in n cities with no additional information about where to look.
    • Explain to students that this is how you do a file search.
      • Using the file structure to your advantage, you want to know where something is in a very specific place so it is easier to find.

More about this tip

External Source

Interview with Leo Newball