The short answer is both. The longer answer is:
- Just like when solving a math problem, you need to decompose a programming problem into smaller problems.
- The presence of functions, binary & hexadecimal numbers, Boolean logic, and big O notation for analyzing algorithm performance are either actual math or very close to it.
- Abstractions are useful not only when constructing programs but also when reasoning about programs. Reasoning precisely about abstractions takes a nod from maths.
- Your code needs to communicate the structure and organization of the program to other programmers. You need a good overall structure and you need to divide your programs into smaller snippets, just like paragraphs, for better readability.
- Programming is a repetitive process of coding with frequent refactoring/revising, much like editing to revise and improve the written text.
Full post here, 4 mins read