The paper presents an example of methodological approach to the development of variational thinking skills in teaching programming. Various ways in solving a given task are implemented for the purpose. One of the forms, through which the variational thinking is manifested, is related to trail practical actions. In the process of comprehension of the properties thus acquired, students are doing their own (correct or incorrect) conclusions for other, hidden properties and at the same time they discover possibilities for new ways of action and acquiring of new effects. The variability and the generalizing function of thinking are in a close interrelation, and their interaction to a great extend determines the dynamics of the cognitive activity of the student.