# How to teach abstraction needed for programming?

I experience that my students are fixed to compute with concrete values and are not keen to think in terms of general solution like creating a mathematical function $f(n)$ , needed to write programming functions f(n).

What is a good method of teaching them this lesson, becoming able to think in abstractions like functions on natural numbers?

• Even though I personally find this question very interesting, I think it's too broad and primarily opinion-based. Moreover, this is a more general question regarding how to think abstractly and therefore not specifically related to CS. – nbro May 17 '17 at 22:50
• Are these college level students? – gardenhead May 18 '17 at 1:38
• You may be interested in cseducators.stackexchange.com – Ben I. Jun 1 '17 at 19:12
• @nbro Didactics questions are not necessarily subjective. However, I would agree that this is too broad: abstraction is one of the core competences in CS, so asking how to teach it is not far away from "how do I teach CS". – Raphael Jun 17 '17 at 11:36
• After programming $f(1)$, $f(2)$, ..., $f(77)$, don't they complain about the repetitive work? – Raphael Jun 17 '17 at 11:37