Live data from Hacker News

A Programmer's Introduction to Mathematics

jeremykun.com

181–190 of 223 posts

Re: A Programmer's Introduction to Mathematics

#181

Do the exercises have solutions? The most annoying things about math books is the lack of solutions. A beginner absolutely needs to know whether or not their solutions are correct. The “the reader should know if they are correct” logic doesn’t apply here. A beginner could easily have faulty logic and fool themselves into thinking their solutions are correct. I usually don’t buy math books without solutions if I’m sel…

There seems to be a github repo [0]. It mentions code solutions to examples.

  [0] https://github.com/pim-book/programmers-introduction-to-mathematics

Re: A Programmer's Introduction to Mathematics

#182
post #6

It's good to have something that lowers the bar for programmers so they could learn themselves some math without much fear. Knowing math is very important if you are a coder - and not just linear algebra: knowing a formula, for example, might let you do certain things in constant rather than linear time or, perhaps, reduce the cost of the iteration. Unfortunately, too many of those who can call themselves programmers…

Seconded for this. Going back and taking an actual structured math course at community college after working professionally as a programmer for years was a real eye opening experience for me. So many things that seemed so abstract and meaningless as a 12 year old were instantly apparently useful in an unimaginable number of ways.

What courses did you take?

Re: A Programmer's Introduction to Mathematics

#183
post #139

I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…

Unless you are working on a course of study under guidance, you probably won't go chapter by chapter. Indeed, you won't even read it linearly.

Once I finished my coursework, I tend to have a problem and go searching for material that may get me some traction on it. So a lot of keyword searches, a lot of reading prologues (prologues are where the author tends to give his conceptual overview of what the material in the book is for...I've learned a lot from reading random prologues in a math library).

Once I find something that looks interesting, I'm usually down to a few theorems or definitions that I think will give me traction. Then I start poking around the book or any other source I need/can find to figure out what I need to understand those definitions/theorems.

Usually at some point it becomes clear if they're a) irrelevant, or b) partially relevant. If (a), I drop the entire line right there and go back to searching. If (b), I start running counterexamples from the problem I'm working on against them, looking for where it breaks and seeing what I can salvage.

Prologues usually read like a novel, but occasionally stopping to look up words, so more like reading a novel in a foreign language. Once you're into the meat, your rate of progress is typically measured in hours per paragraph or days per page. But you probably only end up using ten or twenty pages out of a two hundred page book in this method.

Re: A Programmer's Introduction to Mathematics

#184
post #64
post #54

Earlier quoted context omitted.

I enjoyed reading this opinion, do you have any recommendations for math textbooks that reach the standards you've described?

Not exactly math, but physics, since that was my background. Perhaps my favourite textbooks are Landau and Lifschitz[1]. They pretty much exemplify what I mean. They are concise, lucid, entirely self-contained. All the relevant information is there and not one bit more . The material is reduced to its key ideas, therefore making their exposition as clear as it can possibly be. Many people I've spoken to, however, don…

I find this a bit funny. You are comparing books that are used by advanced undergraduates or graduate students to a book written essentially for the subset of programmers with almost no math background. There are beautiful mathematics books by Springer (Undergraduate Texts in Mathematics), Carus Mathematical Monographs and Dover that provide both intuition and rigor at an introductory level. The main problem for a beginner though is knowing where to start and getting a survey of the arena they are entering. They might think linear algebra is adding vectors together with a vector being just a list of numbers.

This book hopefully fills that gap. There are other introductory books like Mathematics: Its Content, Methods & Meaning by Aleksandrov and Kolmogorov but that requires a serious investment of time.

Lastly, I apologize but I am going to rant about this physicist phenomenon. I am a physicist myself (high-energy theory) that entered quantitative finance after my PhD (a heavily disliked field on HN). I found a lot of physicists outside academia who tend to be aggressive and condescending and often haven't actually gone through the rigors of a PhD program themselves. Maybe it makes one feel smarter to tell other people that they are reading easy books or can't jump straight to Landau or Bourbaki (those two couldn't be more different but you get the point) and there are no other physicists around to correct the notion that there are multiple ways to gain knowledge and build intuition.

It doesn't matter who says what about which book. Sample some books, find what you like as long as its not junk science/mathematics, do plenty of exercises, and try to derive things yourself and don't fool yourself that you understand something deeply by studying it for a year.

Re: A Programmer's Introduction to Mathematics

#185

I really wish this book would include probability and statistic sections. My guess is that a lot of people, like me, will want to read it because they're getting started with ML and need help getting used to the math, and probability/stats is an important part of it that's missing. Any chance you could add it in the future?

That's rather like saying that a Java book should include a section on processor architecture so you can design your own chips. Plus, what's in this book isn't really enough to do probability and statistics at any but the most basic level.

The path to a deep understanding of inference that makes most modern ML seem straightforward goes through measure theory, Lebesgue integration, some functional analysis, a smattering of topology, and an intuition around dynamical systems. Then you go do probability and random processes, detour into game theory for a bit, learn decision theory, and at that point it all goes from mystical to bleedin' obvious.

Re: A Programmer's Introduction to Mathematics

#187
post #13
post #2

I've been wanting to peek into mathematics and an "introduction" is exactly what I need. Thank you for sharing this.

This was the book that Richard Feynman used to teach himself calculus when he was 10 or 11 as I recall: https://www.amazon.com/Calculus-Practical-Man-J-Thompson-ebo...

This book looks great. Thank you for sharing!

Re: A Programmer's Introduction to Mathematics

#188
post #139

I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…

> How do you actually read math, physics and programming books? > Reading them the same way as you'd read a novel doesn't seem right. Indeed it doesn’t. As the author of the book in this post points out on his blog [1] in math you focus on learning the syntax first, just like in programming. Off the top of my head I can recommend pre-reading a chapter before reading it: go through theorems, bold/italic text, graphs,…

While I like most of your points, I've got to stand up for our brains (or mathematics, depending on who you think is getting shorthanded there :)).

I would say the exact opposite of "our brains are not wired for [math]": mathematics is the simplest expression of our ultimate thought ("brain") processes.

It is only hard because it is so abstract and builds on a large corpus of what has already been constructed, but it was "designed" exactly after how our brains operate.

For a layperson, proving even the basic arithmetic might seem like magic, but once you go through the simple exercise of defining everything in terms of "One" and "Successor(One)" and compare that to how we teach our kids numbers, it's clear mathematics matches exactly how human brains operate.

Then again, I concede that not everybody's brain is "wired the same way," but I am sure there are plenty of us for whom mathematics is just natural: the only problem being the fact that majority of people have not been exposed to true mathematics.

Re: A Programmer's Introduction to Mathematics

#189
post #166

On a related note, I'm curious if anyone has taken the Mathematics for Machine Learning ( https://www.coursera.org/specializations/mathematics-machine... ) courses on Coursera, and whether it really covers enough to be comfortable with ML. The course bills itself as enough math knowledge for folks who barely remember high school math.

I have completed all three courses in the series. It was a good supplement to other resources, especially 3blue1brown's Linear Algebra course on youtube[0] (mind-blowing, do check it out) but I wouldn't recommend it as a first course. The first two courses weren't rigorous enough for my taste (I am yet to find a rigorous course on Coursera), but the third was pretty good. You should take up books if you are serious.…

These are great insights! Thanks so much. Do you think it's worth going through pre-calc/calc deeply? I assumed I should do that first, but it would take quite a while (I haven't taken calc in ~8 years and barely remember more than the basics).
Post reply on HN