If I am a beginner, I think I should be familiar with the basic knowledge of this programming language first. I am not familiar with functional languages such as Lisp, but I know that in languages such as C and JAVA, such as data types, input and output, basic library functions, etc. Are more important, because if these places are not skilled, you will definitely encounter them in future programming, and they will get stuck and spend a lot of time. As a result, you will never have the energy to reflect and summarize, and you will never have time to learn the basics of mathematics. Therefore, it is suggested that novices should not put too much energy into "mathematical foundation" before making sure that their programming language foundation is not a problem. Then if you want to stay in this field for a few more years, or want to get in touch with advanced content, you can go to see some computer mathematics.
There are many mathematical contents related to computers, such as discrete mathematics and fuzzy mathematics, and many algorithms are designed on the basis of mathematics. If you can learn them and apply them to your own programming, it will be very beneficial to improve your programming skills. But it is not necessary to study them all, because they are scattered. First look at what you are interested in, or what you will use for future development, and pick some targeted ones.
However, it should be noted that copying from memory is not enough, such as data structure algorithm. Books are generally described in some programming language, such as C language version, C++ version, JAVA version … but those are just descriptions, not the algorithm itself! So don't take them too seriously, thinking that you can just copy them and call them directly in my own program. Be sure to understand the intention of each step or stage, what it looks like to complete the whole process from beginning to end, and then it is best to imitate its ideas in the program with your own organized statements, which shows that you understand the algorithm. If you can make it a natural idea to add them to the program, people will not think that you are showing the algorithm, which shows that you really have mastered the algorithm. This process may be long and boring, so be patient.
Of course, this is the general situation. If you are engaged in the development of mathematical applications, this is another matter. . . I come from a computer background, not a math background.