The x-ray diffraction (XRD) technique has become an irreplaceable tool in the study of crystalline solids and is taught as part of the content of undergraduate solid state physics and chemistry courses. The XRD by crystalline materials is a scientific discovery predicted by von Laue, experimentally verified by Friedrich and Knipping and further developed by Bragg and Bragg, father and son, all in 1912. As a demonstration for students` experimental training, we have applied the XRD technique to determine structural and some structure-related properties (grain size, dislocation density, internal strain and stresses, bulk density) of two thin films, one with a tetragonal structure (TiO2) and the other with an hexagonal structure (ZnO). The students, in groups of three and two learned: to prepare TiO2 and ZnO thin films by the spray pyrolysis technique, to analyze diffractograms to obtain structural and some structural-based properties of the films. They had the opportunity to compare by themselves theory and experimental results. In this work, we combine one way of teaching well-established knowledge on XRD with a discussion on the nature of scientific discoveries pointing towards the identification of the individual abilities needed to be cultivated by the students as potential researchers. We discuss XRD by crystals as a scientific discovery highlighting the Laue and the Braggs different ways to think on the phenomenon (as diffraction and as reflection of waves). It is important to train and encourage students to find more than one way to think when dealing with scientific problem-solving.