Live data from Hacker News

A Programmer's Introduction to Mathematics

jeremykun.com

161–170 of 223 posts

Re: A Programmer's Introduction to Mathematics

#161
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…

My first computer science course was a life-changing moment for me. I was two years deep into general-ed, I was trying to manage my mother's alcoholism that I had just started to understand, and my girlfriend and best friend wanted me to move away to state University with her. I read that Java book start to finish, every chapter, and eventually realized the potential that computers can bring the world.

Anecdote aside, there's a difference between reading something and understanding something. My friend who is really in tune with the nature of the subject, is also spending an incredible amount of time surrounding it.

Re: A Programmer's Introduction to Mathematics

#162
post #92

Can we get that GitHub solutions repo going? I feel like that's super important for this book. Bought it anyway.

I guess it's best if Jeremy starts the repo himself, and we contribute to it. But I agree; cannot understate the importance of solutions to make the best use of this book.

Re: A Programmer's Introduction to Mathematics

#163
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…

I have heard that they way Einstein read scientific books is by reading until he doesn't understand, stop there, start again from the begining and repeat until you reach the end.

Re: A Programmer's Introduction to Mathematics

#164
post #53

Earlier quoted context omitted.

Is this a feature or a bug? If it takes you two weeks to apply creative solutions and it take me one week to apply a “rote” solution, what is the benefit?

The main reason to study mathematics is to build and fix your intuition, hence studying rote solutions is a waste of time. It might help you pass the class but it wont help you much at all in other parts of life. For example, at work nobody will care if you have rote memorized a solution or not since they will have already done the math, you will just apply formulas others have came up with. In order to do anything i…

I absolutely agree. From my experience this is also true for the best professional mathematicians, it seems that generally they have picked a very large toolbox of memorized "tricks" that they can effectively (and intuitively) apply, rather than approaching every problem as if it were an entirely new challenge.

Re: A Programmer's Introduction to Mathematics

#165
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…

Here's Alain Connes, Fields medalist, on how a mathematician works and should read a book [0]:

"To understand any subject, above all, a mathematician SHOULD NOT pick up a book and read it.

It is the worst error!

No, a mathematician needs to look in a book, and to read it backwards. Then, he sees the statement of a theorem. And, well, he goes for a walk. And, above all, he does not look at the book.

He says, "How the hell could I prove this?"

He goes for his walk, he takes two hours ... He comes back and he has thought about how he would have proved it. He looks at the book. The proof is 10 pages long. 99% of the proof, pff, doesn't matter.

Tak!, here's the idea!

But this idea, on paper, it looks the same as everything else that is written. But there is a place, where this little thing is written, that will immediately translate in his brain through a complete change of mental image that will make the proof.

So, this is how we operate. Well, at least some of us. Math is not learned in a book, it cannot be read from a book. There is something active about it, tremendously active.

[...]

It's a personal, individual work."

[0] https://www.youtube.com/watch?v=9qlqVEUgdgo

Re: A Programmer's Introduction to Mathematics

#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.

MIT OCW Scholar(independent study) course on Linear Algebra by Prof. Strang[1] is really good and is designed for self-study. If you have the time, you could look up Coding the matrix[2] too. I read probability from Mathematics for Computer Science-MIT[3] and also referred Khan Academy[4] and PennState STAT 414/415 [5] for statistics and probability. StatQuest channel[6] on Youtube has handwavy but easy to understand videos on statistics for ML too. The Deep learning book[7] by Ian Goodfellow et al. has a couple of chapters at the beginning that gives you a fairly good idea of the mathematics required to get into Deep learning. Communities like r/AskStatistics and r/statistics on Reddit were really helpful when I got stuck.

I also chanced upon Mathematics for Machine Learning[8] book recently and it seems to be good. It has a chapter on optimization that is left out in most books but skips statistics.

[0] - https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x...

[1] - https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algeb...

[2] - http://codingthematrix.com/

[3] - https://courses.csail.mit.edu/6.042/spring18/mcs.pdf

[4] - https://www.khanacademy.org/math/statistics-probability

[5] - https://onlinecourses.science.psu.edu/stat414/

[6] - https://www.youtube.com/user/joshstarmer/videos

[7] - https://www.deeplearningbook.org

[8] - https://mml-book.com

Re: A Programmer's Introduction to Mathematics

#167
I see a lot of users are learning maths for machine learning. I did the same and here is what I found:

I started with 3blue1brown's Youtube course[0] on Linear Algebra and loved it. I had already done a college course on LA, but this made me truly understand what I was doing.

MIT OCW Scholar(independent study) course on Linear Algebra by Prof. Strang[1] is really good and is designed for self-study. If you have the time, you could look up Coding the matrix[2] too. I read probability from Mathematics for Computer Science-MIT[3] and also referred Khan Academy[4] and PennState STAT 414/415 [5] for statistics and probability. StatQuest channel[6] on Youtube has handwavy but easy to understand videos on statistics for ML too. The Deep learning book[7] by Ian Goodfellow et al. has a couple of chapters at the beginning that gives you a fairly good idea of the mathematics required to get into Deep learning. Communities like r/AskStatistics and r/statistics on Reddit were really helpful when I got stuck.

I also chanced upon Mathematics for Machine Learning[8] book recently and it seems to be good. It has a chapter on optimization that is left out in most books but it skips statistics.

[0] - https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x....

[1] - https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algeb....

[2] - http://codingthematrix.com/

[3] - https://courses.csail.mit.edu/6.042/spring18/mcs.pdf

[4] - https://www.khanacademy.org/math/statistics-probability

[5] - https://onlinecourses.science.psu.edu/stat414/

[6] - https://www.youtube.com/user/joshstarmer/videos

[7] - https://www.deeplearningbook.org

[8] - https://mml-book.com

Copied from my comment here: https://news.ycombinator.com/item?id=18582022

Re: A Programmer's Introduction to Mathematics

#168
> The problem is that the culture of mathematics and the culture of mathematics education--elementary through lower-level college courses--are completely different ... I've had many conversations with such students [...] who by their third year decided they didn't really enjoy math. The story often goes like this: a student who was good at math in high school (perhaps because of its rigid structure) reaches the point of a math major at which they must read and write proofs in earnest. It requires an earnest, open-ended exploration they don't enjoy.

I found this interesting because I too discovered this difference in approach but had the complete opposite reaction. I absolutely hated math in middle and high school. It wasn't until I took a discrete math course for my CS program that I got exposed to dealing with real proofs, which I found required a level of creative thinking, and I totally loved it. This admittedly wasn't an "advanced" university math class, but the difference from high school math was still quite stark.

Re: A Programmer's Introduction to Mathematics

#169
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, tables, conclusions, exercises. Also, try proving theorems yourself before reading proofs in a textbook.

My general advice for you is to check out a book “How to Read a Book” by Mortimer J. Adler and Charles Van Doren. It’s a great manual for reading, which contains both general advice (in the form of 15 rules) applied to any reading material, and specific advices for math, philosophy, history, social science, etc.

> I try to go chapter after chapter and make notes

Notes are good, but only if they “active” notes. If you are able to formulate something in your own words it means you’ve done the work towards understanding, if you’re only able to express a thing in author’s words — you have not, and if you leave it at that the chances are you’ve wasted your time.

In math you also have to do problems. Your ability to solve problems w/o the help of the textbook is the ultimate test of whether you’ve learned what you’ve read.

Interleave: in your practice session work simultaneously on problems from different (usually sequential) chapters. IOW: don’t practice one topic during several study sessions until you’ve exhausted all exercises for that topic in a book — go read the next chapter (or chapters), and include its exerices in your next practice.

Interleaving is harder, but more efficient. The reasons being that (1) our brain is bi-modal processing system, it needs time to process things both consciously and unconsciously, it does the latter while your attention is busy with other things; (2) it also needs time to consolidate memories, grow and strengthen new synaptic connections (which it primarily does in sleep) — so spreading a topic/exercises over time is generally a good idea.

> but I often get bored because I don't see the usage in my real life coding > Also after few chapters it often turns into a "job" of finishing the book. I don't have the pleasure of learning new stuff anymore.

This is about psychology of study.

Don’t turn it into a job, it’s not a competition, there are no bosses, no deadlines. Don’t push too hard, allow yourself time to integrate new knowledge by keeping yourself busy with other things and studying several subjects/books simultaneously — when you are tired of one thing, switch to another. It’s more efficient way of learning (as explained above), despite increase in absolute time for mastering a single subject.

And work on your motivation. You can start by read what Paul Graham has to say on why study math [2]. Remember, math is hard; our brains are not wired for it.

[1] http://jeremykun.com/2013/02/08/why-there-is-no-hitchhikers-...

[2] http://www.paulgraham.com/college.html

Re: A Programmer's Introduction to Mathematics

#170
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…

> Reading them the same way as you'd read a novel doesn't seem right.

I think most technical books end up being organised like a reference manual for some reason - not necessarily as dry - but in a way that appears to facilitate some some externally driven learning activity by augmenting it.

> Do you really finish such books? What am I doing wrong?

Not personally, i'm terrible at penetrating any such book until I have a problem at hand that requires it. However I have found a few books that are technical while being enjoyable and engaging at the same time, in much the same way as a novel: "The Feynman Lectures" (Physics), "Michael Abrash's Graphics Programming Black Book", "Thinking Forth" (Programming). These books are well known, I think their popularity is in no small part due to how accessible they are without diminishing the quality of their technical content - I would like to find more books that have this quality.

Post reply on HN