2

Are there any good intro to programming books for people with a strong backround in mathematics, but little experience in coding?

In particular, are there any books that introduce the different features of the language through their use in solving maths problems? I always find that I make the most progress in learning how to code when I am using it for things more closely tied to my interests in mathematics, and more general introductions seem to lack many substantive problems in the early chapters in favor of being more readable to more people.

I am mostly interested in learning some c++, though I would be happy to hear about intros to other languages if they have plenty of fun and engaging excercises. (Though I am definitely more intersted in numerical problems than logic and proofs)

Flumpo
  • 399
  • I love this repo https://github.com/manjunath5496/Algorithm-Books and this one https://github.com/manjunath5496/Computer-Science-Reference-Books – Bumblebee Feb 22 '22 at 00:51
  • 4
    Art of Programming by Donald Knuth. – markvs Feb 22 '22 at 00:57
  • 1
    I enjoyed "Structure and Interpretation of Computer Languages" by Abelson and Sussman. – CyclotomicField Feb 22 '22 at 01:06
  • As a retired programmer, I consider some of the previous responses to be overkill. It seems like you would do best with a math oriented programming language that is as simple as possible to learn. I would suggest Python which is certainly free; the internet is probably loaded with Python tutorials. That is half the battle. The other half is developing skill in writing pseudocode, which means you write down (in English) what steps your program will take to solve the problem. This usually comes just by practicing. ...see next comment – user2661923 Feb 22 '22 at 01:06
  • For example, you could practice by trying to write a program to compute all prime numbers less than $1000$. Or, you could practice by writing a program that will compute the $\sqrt{n}$ to $6$ decimal points. The nice thing about these types of exercises is that you can easily find a complete list of primes less than $1000$ and can easily find the $\sqrt{2}$ to $6$ decimal places. Therefore, you will immediately know if your program is working correctly. – user2661923 Feb 22 '22 at 01:09
  • If you want to program in the service of mathematics then you certainly want to learn Mathematica. – David G. Stork Feb 22 '22 at 01:18
  • 1
    There is literally a book titled "C++ for Mathematicians". – Just a user Feb 22 '22 at 02:27
  • I totally agree with @user2661923 . To learn programming start with python. C++ is a language that was designed for (and is good at) big projects with hundrets, if not thousands of .cpp and .h files written by large teams. In python you get everything for free and can concentrate on the actual programming task. If you want to move to C++ at some point try a few exercises in python writing your own classes that have member functions. – Kurt G. Feb 22 '22 at 05:49
  • @user2661923 I think you might be right. Are there any particularly nice introductions you've come across that slowly introduce the syntax with plenty of examples like these? – Flumpo Feb 22 '22 at 12:31
  • No, I've never seen nor heard of any book that specializes in writing Math-problem oriented pseudocode algorithms. There wouldn't really be a market for it, because the financial interest is in business-world algorithms. Also, programming students interested in Math problems tend to excel at abstract thinking, which means that they don't really need help learning the pseudocode. I emphasize - separate developing pseudocoding skills from developing programming skills (e.g. Python). You should have no trouble finding internet help in learning Python. ...see next comment – user2661923 Feb 22 '22 at 18:56
  • As far as pseudocoding goes, simply find Math problems anywhere on the internet that have been answered analytically that lend themselves to less than $(10)^8$ simulations. For example, if you look hard enough, MathSE is loaded with such problems. – user2661923 Feb 22 '22 at 18:58

0 Answers0