Continuity mistake: In the closeup of Barney's yearbook picture his name is listed as "Bernard Milton Fife," and Andy even reads it aloud, but in the previous episode from season 1, "A Plaque for Mayberry" Andy says that Barney's middle name is Oliver.
Character mistake: When Andy and Barney are looking through the yearbook, Barny's middle name is Milton. But Barney says many times throughout the series that his name is Bernard P. Fife.
Answer: Those "boxes" are valences that used to be very common, before air conditioning. They allow for windows to be open during rain storms. They permit air circulation, without letting the rain in.