A Programmer's Introduction to Mathematics - <AUTHOR> https://jeremykun.com/2018/12/01/a-programmers-introduction-to-mathematics/ <comment><USER2> 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 self-studying. Would like to know if solutions are provided in this book. If not, I won't consider buying it.

If this book doesn't make the cut with a solution manual, does anyone have recommendations on an intro to proofs book with one?

<comment><USER3> > The most annoying things about math books is the lack of solutions.

To me the most annoying thing about math books is hand-waving, lack of rigor, and unexplained notation.

At least in programming, everything is formal and I can figure out the entire problem by looking at the source.

<comment><USER4> I think you aren't buying very good math books then. I find the exact opposite: the thing about math books I have read is that they overemphasize rigor at the expense of intuition. Everything is painstakingly illustrated in such great detail that I sometimes see the trees and lose sight of the forest. I feel as if reading proofs and doing problem sets in math books is just manipulating symbols in well-known ways without really understanding intuitively why something must be true. For example my introduction to metric spaces started by defining the characteristics of a certain function d without explaining how this could be thought of as a generalization of distance.

On the other hand, many programming stuff is ruefully hand-waving and lacks rigor. They might present important algorithms in pseudocode; even when they present in real code, the precise semantics of the real code is often underspecified and vaguely described in English. I mean take a language; how often do you see in the language specification the semantics of the language defined rigorously, using operational or denotational semantics? PL nitpicking aside, how many programmers think a piece of code must be correct because they pass a few test cases, without ever giving a proof?

I'm of course not saying the lack of rigor in programming is bad. Perhaps 95% of the software we are building isn't mission-critical and relying on intuitions is fine; we ain't got no time to prove every piece of code we write. But my point is your observation really does not match mine.

<comment><USER5> But at least all imperative procedural steps are clearly understandable from source code given in many programming books. Where as maths books routinely leave out many steps in proofs and calculations, on top of many ambiguously used notations and terminology that can leave a self-student confused.

<comment><USER6> A program proves nothing at all so I am not sure what you can understand from it? Typically in programming you are presented with a piece of code, a statement that this piece of code solves a specific problem and then a proof of that it actually works. Those proofs are typically far from understandable or rigorous.

<comment><USER7> But programs are proofs!

At least in the light of the Curry–Howard correspondence. :)

Anyways, I do agree that in programming it's easier to see what are introductions, assumptions, definitions, functions, values etc. You can't just invent a notation and go with it. Everything needs to be defined from the ground up. It's constructive and I like that, probably because I'm a programmer.

<comment><USER8> That's true but in most languages the things you prove are relatively obvious propositions like "(A and A)implies A."

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> 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 often turns into a "job" of finishing the book. I don't have the pleasure of learning new stuff anymore.

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

<comment><USER10> 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](https://www.youtube.com/watch?v=9qlqVEUgdgo)

<comment><USER11> This approach seems very similar to working backwards when trying figure out the behavior of a function that calls other functions or libraries and when trying to a debug an issue and following the stack trace to determine the root cause of the issue. Not a perfect analogy but I find it helpful to think about it that way.

</comment></comment></comment><comment><USER12> As someone who works as a programmer but wasn't super interested in mathematics, I've found this blog to be a fantastic read time and time again. I'd highly recommend going through Jeremy's previous posts if this is your first time seeing his site on here.

If this topic piques your interest I would also recommend Mathematics for Computer Science: [https://courses.csail.mit.edu/6.042/spring17/mcs.pdf](https://courses.csail.mit.edu/6.042/spring17/mcs.pdf)

</comment><comment><USER13> To the author:

You might want to extend the preview PDF to include a few pages from later chapters. The issue's that the [current preview]([https://pimbook.org/pdf/pim_first_pages.pdf](https://pimbook.org/pdf/pim_first_pages.pdf)) only gets into polynomials over its 45 pages. But since polynomials are typically taught to students during early childhood, it seems like most readers are liable to just skim that content, being more interested in the topics discussed later. For example, the start of Chapter 14 (on optimization) would be neat to see.

That said, I like the parts that translate between analytical expressions and programming code. Such mappings seem like high-value content to readers; the language barrier can keep people from understanding mathematical writing, while a few helpful translations can help to tear down those language barriers.

<comment><USER14> The Amazon preview has more pages, in case you're still curious.

</comment></comment><comment><USER15> 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?

<comment><USER14> Well, two chapters have singular value decomposition and neural networks as the applications. So it does have a lot of ML :)

But yes, I unfortunately had to cut a probability chapter. I think someone who reads this book would have a much easier time learning probability after, and a better foundation.

<comment><USER16> Thank you for this book. There is a huge need for this.

It saddens me that schools may be handing out CS degrees without having first required students to at least have taken linear algebra, multivariable calculus, and discrete math that covers basic counting, sets, graphs and groups. How can this be?

Probability and statistics should also be a required part of every CS program.

<comment><USER14> /shrug misaligned incentives probably. Schools are also handing out CS degrees without students being all that good at writing programs either.

</comment></comment></comment></comment><comment><USER17> 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 by trade know very little math (you'd be lucky if they remember what they learned in high school).

<comment><USER18> I'm sorry if this isn't your intent but the way you structured your comment comes off as very condescending.

Aside from that, I'm also skeptical that the frequency in which these maths apply to practical, commercial programming is really that high.

Im not anti math or something. I just think the practical value gets way over sold by some people. And sometimes it feels like it's because of the dislike of "those who can call themselves programmers by trade."

<comment><USER16> It is an incredibly important foundation for analyzing any kind of data. That is a need that crosses many different fields, be it sales forecasting, quantitative finance, econometrics, deep learning, signal processing, any sort of scientific computing etc.

I would be more interested in hearing an argument about why math knowledge is not useful or lucrative.

</comment></comment></comment><comment><USER19> I was teaching a college class for high schoolers last year and thought it would be great to record my lectures for them. Then I put it up as an entire youtube channel for everyone:

[https://m.youtube.com/channel/UCuge8p-oYsKSU0rDMy7jJlA](https://m.youtube.com/channel/UCuge8p-oYsKSU0rDMy7jJlA)

It basically builds up mathematics rigorously from basic definitions, while trying to stay very accessible.

If anyone has the time, or desire to learn math this way, let me know what you think, and if I should make more in this series!

</comment><comment><USER20> I am a huge fan of Jeremy's blog. Found his primers on a multitude of topics very useful - [https://jeremykun.com/primers/](https://jeremykun.com/primers/)

As a Math guy who got into the world of programming relatively recently, I am on the opposite side of the spectrum I suppose but I'm gonna order this nonetheless to support him.

<comment><USER14> Would you read "A Mathematician's Introduction to Programming"?

</comment></comment><comment><USER21> Hmm, the "first few pages" end just before the "meat" begins.

From the table of contents, there seem to be short prose sections inteleaved with the teaching sections. I hoped to see an example of the teaching section, not the prose.

<comment><USER14> Yeah, I should update that to have the full first chapter.

<comment><USER14> First chapter is up now at [https://pimbook.org/pdf/pim_first_pages.pdf](https://pimbook.org/pdf/pim_first_pages.pdf)

Also note that the Amazon "Look Inside" lets you see basically any page. Some readers have told me the first chapters were too slow, and so I think more advanced readers will want to breeze through that (though the applications in the first two technical chapters have a coolness to them that is hard to beat!).

</comment></comment></comment><comment><USER22> > _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.

<comment><USER14> That's exactly how I felt. I didn't really discover math until college.

</comment></comment><comment><USER23> Nice.

I tried to start something similar which tried to explain all weird maths symbol via code. It went nowhere.

But feel free to check [https://github.com/mkagenius/mathsymbol2code](https://github.com/mkagenius/mathsymbol2code)

</comment><comment><USER24> What's provided currently at [1] doesn't provide the reader with any impression of the teaching style or quality/quantity of visual aids.

I'm very likely to buy a hard copy of such a book, but not unless I can do the equivalent of flipping through it like I would in a book store.

Consider changing the preview instead to a scattered sampling of some of your proudest pages.

[1] [https://pimbook.org/pdf/pim_first_pages.pdf](https://pimbook.org/pdf/pim_first_pages.pdf)

</comment><comment><USER25> On a related note, I'm curious if anyone has taken the Mathematics for Machine Learning ([https://www.coursera.org/specializations/mathematics- machine...](https://www.coursera.org/specializations/mathematics-machine- learning)) 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.

<comment><USER26> 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...](https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab)

[1] - [https://ocw.mit.edu/courses/mathematics/18-06sc-linear- algeb...](https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra- fall-2011/)

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

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

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

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

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

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

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

<comment><USER25> 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).

<comment><USER26> Essence of calculus[0] by 3blue1brown for the basics and the second course in the Coursera Mathematics for Machine Learning would let you get started. You would rarely need calculus more advanced than that covered in the above, and if need be you will be in a position to look it up quickly. If you can sustain your interest in ML over a long period of time and are in no hurry, I would recommend going through all the math mentioned. If you are a top-down learner, the fast.ai course on ML and deep learning for coders will get you started head-first. All the best!

[0] - [https://www.youtube.com/playlist?list=PLZHQObOWTQDMsr9K-rj53...](https://www.youtube.com/playlist?list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr)

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

<comment><USER14> Let's get it started, and initial thoughts, questions, or suggestions can be in Github issues for now.

[https://github.com/pim-book/exercises](https://github.com/pim-book/exercises)

</comment></comment><comment><USER28> I've found myself unable to do even elementary maths recently just because I'm sorely out of practice. Hasn't really affected my performance as a programmer. Wondering, what kind of math I could learn that would benefit me in my job?

<comment><USER29> What kind of work do you do? For some types of development, basic knowledge of mathematics will take you reasonably far. Knowing more math opens up possibilities. For example, I recently found myself wanting to add features to some flight control software for drones. I wanted a return-to-home feature, which involved implementing a PID controller for gps navigation. I studied control theory in college decades ago, and hadn't used it for anything professionally until this year. Also, autonomous navigation requires taking vectorial inputs from sensors that must be rotated to the frame of reference of the drone (e.g. the accelerometer). I could not have participated in this project if I didn't have enough knowledge of calculus and algebra.

</comment></comment><comment><USER30> It appears the ebook is in PDF format[1], does anyone know if an EPUB will become available?

[1]: [https://gumroad.com/l/pim-book](https://gumroad.com/l/pim-book)

<comment><USER31> I prefer EPUB for most ebooks, but maths books work far better in PDF because mathematical notation gets turned into image files in an EPUB and don't render nearly as nicely.

</comment></comment><comment><USER32> It's a shame you don't get to read any of the actual maths in the sample pages. Otherwise I might have been able to evaluate whether I want to buy this book. Intros don't really tell us much

</comment><comment><USER33> I have been searching for something like this for a while. Just bought the book, I will get back to you. I hope the book will give me exactly what it promises.

<comment><USER33> I would have loved to have the printed version of this book. Unfortunately not available in India.

</comment></comment><comment><USER34> I've been wanting to peek into mathematics and an "introduction" is exactly what I need.

Thank you for sharing this.

<comment><USER35> 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...](https://www.amazon.com/Calculus-Practical-Man-J-Thompson- ebook/dp/B004SN1UMC/ref=sr_1_2?s=books&ie=UTF8&qid=1543707079&sr=1-2)

<comment><USER36> This book looks great. Thank you for sharing!

</comment></comment></comment><comment><USER37> I would be interested to see someone post their experiences after working through at least half of the book. I am completely outside the target audience, and it would be really useful to know what works to teach mathematics to programmers and what doesn't.

</comment><comment><USER38> Long-time programmer without a CS degree here. I've studied polynomial factoring, adding, subtracting, graphing them, etc. Sites like Khan Academy break things down in little bits but the underlying theory seldom emerges. But after working through the preview pages of this book I feel like I finally have a feel for some of the underlying theory ideas behind polynomials. This really emerged during the proofs section. The bits of code and analogies to programming really help. It was like a lightbulb going off in my brain. As a result I have ordered the book from Amazon and can't wait for it to arrive. Thank you for this book.

</comment><comment><USER39> I recently started reviewing mathematics on Khan Academy to brush up on my math skills and learn more Calculus so I can better understand ML. Really looking forward to reading this!

</comment><comment><USER40> This looks really nice, from the preview content---I really like the approach of explaining the background assumptions of reading mathematical definitions and such. Ordered!

</comment><comment><USER41> Some comments/corrections on the first chapter, if you don't mind:

1\. Theorem 2.4 is stated incorrectly. Given the context, I feel like this is worth correcting. Specifically, it says "degree n" rather than "degree at most n". Part of the proof purports to prove that the degree is indeed n but of course it doesn't because that needn't be true.

There are other cases where you say "degree n" for "degree at most n". Again usually this would be a minor error not worth pointing out, but in this context it seems worth getting right.

2\. At one point you introduce a convention that deg(0)=-1. Later, in the exercises, you ask, is this really such a good convention? (The answer being, of course, no.) IMO you should anticipate this. Indeed I don't think you should state, as you do, "By convention the zero polynomial is defined to have degree -1", because that suggests it's some standard universal convention, which is definitely correct, and it's neither of those. Rather you should say something like "We'll use the convention that the zero polynomial is defined to have degree -1". But anyway, the point I made is that, if you're going to question its correctness later, you should anticipate that here, maybe saying something like "(Think about whether this convention makes sense.)" Or maybe not, and just getting rid of the absolutism of your current wording is sufficient. Either way, getting rid of that absolutism and certainty is good; you want to encourage to people about this sort of thing immediately, not encourage them not to think about it until later.

3\. You say that when you see a definition you should write down examples. I would add, "and non-examples". Ideally non-examples that come as close as possible but don't quite make it. You touch on this a little with your polynomial examples, but it's worth stating explicitly.

(In some cases non-examples are unnecessary, but in the generic case one should look for them.)

4\. Regarding your polynomial examples, you don't justify that they are, in fact, not polynomials. Now of course you don't, that would be too hard to do here and take up lots of space you want to use for other things. That's fine. But if you're not going to do it, you should call out that you're skipping over it, like you do with other things. After all, all sorts of nonobvious things can be polynomials -- such as (x-1)(x+6)^2, as you pointed out earlier, but included no similar examples here. (Yes that's obvious to anyone who knows anything about polynomials, but my point is that it's not in the correct syntactic form.) Like, x^e - x^e is a polynomial, you know? Because it's 0. So without some more knowledge, you can't _immediately_ conclude that your example x + x^2 - x^pi + x^e is in fact not a polynomial! You should make a note of that, as I said.

5\. I feel like it's likely worth noting somewhere in this chapter that actually in general in math it's the "syntactic" definition of polynomial that turns out to be the right one (you don't want to define polynomials to be functions if you're working over a finite field, say!). Maybe not and that would just be confusing, I dunno.

6\. This is just nitpicking, but I'd suggest rewriting Theorem 2.3 in a clearer, more standard way. "A nonzero polynomial of degree n has at most n distinct roots." What you wrote down is equivalent, of course, but (IMO) harder to read.

Otherwise, this is pretty nice. I remember being distinctly confused by stuff like "the product over j not equal to i" when I was a kid. I imagine it'll be quite helpful to a number of people that you're laying things out like that explicitly.

Actually, sorry, on that note, one further comment:

7\. You comment on how sigma and pi notation are special cases of fold, but you might want to make a further note about how (unlike general folds) these are folds where the order doesn't matter, and that the fact that the order doesn't matter is one of the things that allows notation like "product over j not equal to i".

<comment><USER14> Of course you're right about degree n vs. at most n, with many easy counterexamples (the list (1,1), (2,1), (3,1) being a simple one). If you'd like, please submit an erratum using the link at pimbook.org, and other readers can see it, and I will include the fix in the next version of the book and credit you.

Thanks for reading! ^_^

<comment><USER41> OK, will do! Like I said, I think a lot of people will find this book quite helpful. :)

</comment></comment></comment><comment><USER42> Thanks for the effort. I purchased the e-book and will start working through it immediately. I'll let you know what I think.

</comment><comment><USER43> Just ordered from Amazon! I used to read his blog a few years ago and I loved the articles and the breadth of topics. Thank you!

</comment><comment><USER44> From the ToC, is the any reason there is no chapter covering probability/statistics? It has chapters for single/multivariable calculus and linear algebra, and all CS programs I know have all three, especially when there are some nice connections between them, not to mention how useful they are in other CS/engineering subjects.

</comment><comment><USER45> Ebook a tad too expensive for me.

</comment><comment><USER15> Can you create an EPUB version? I'd like to buy it but I need EPUB for my reader.

</comment><comment><USER46> Please tell me you wrote it in LaTeX. It would be another reason to buy it.

<comment><USER14> Of course!

</comment></comment><comment><USER47> I tried to buy it but for some reason Paypal refuses to use my existing balance and instead asks for my card.

Is this something you can control on your end?

</comment><comment><USER48> minor suggestion: make it easier to see the table of contents. A survey book leaves uncertain exactly what is included.

</comment><comment><USER5> Does it compare to Don Knuth, et al, "Concrete Mathematics: A foundation for Computer Science"?

<comment><USER49> It might have some crossover, but my guess is it's probably much more introductory than that book. I didn't know this until fairly recently, but Concrete Mathematics was used in a Graduate level course at Stanford as the textbook (with the course name following the book's, Concrete Mathematics). Kind of threw me off when I first found out, because the book says it's a foundation for computer science, so I thought it would be an undergraduate course. So, I don't think you need to be a graduate student or in particular a Stanford level computer science graduate student to read Jeremy Kun's book.

</comment></comment><comment><USER50> I think the author is confused. His book is not for programmers his book is for "programmers lacking computer science education" as computer science is a branch of applied match. If somebody says they have a computer science degree and they don't know math, I would doubt their degree.

</comment><comment><USER26> 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...](https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x..).

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

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

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

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

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

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

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

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

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

</comment><comment><USER51> The description got me excited, but looking at the table of contents, the level is ultra basic - appears to roughly correspond to first year of a cs degree.

<comment><USER52> Certainly more than just the first year, and I don't think the majority of CS degrees require multivariable calc or any group theory.

I do wish there were more of a preview than just the TOC to see how novel the examples are and how much it helps with intuition for these mathematical concepts beyond what you would learn in a plain CS sequence. That would be my reason for buying the book and I wouldn't write it off just because the list of topics covers the first two years of college math.

<comment><USER53> My uni did this weird thing where they put all the math courses into the first year (except for one stat course in the second year). The first semester had highschool basics like calc and trig, followed up by another two courses the following semesters that covered linear algebra and ... something else. I don't remember, I because I was too busy with girl problems.

Looking back, that first year was brutal with each successive year getting way easier and way more fun.

</comment></comment></comment><comment><USER54> A section on quaternions would be nice.

</comment><comment><USER55> I'm a little skeptical of CreateSpace.

Why did you decide to self-publish?

<comment><USER14> I actually used to work for CreateSpace! I think they do a splendid job on the printing, and the royalties are much better than a publisher. I think I will write a longer blog post with more details.

<comment><USER55> I had a CreateSpace textbook once and the mathematical notation was so grainy that it was unpleasant to read.

</comment></comment></comment><comment><USER56> why is it not working

</comment><comment><USER57> I am basically trying to understand the formulas in machine learning papers, will this book help achieve improvements in speed?

I just realize I fear math because the educational system I grew up in was violent (like beating kids for getting a quiz wrong wtf).

It was only through psilocybin mushrooms did I discover math and calculus again.

<comment><USER58> Plenty of cliffhangers in this comment

<comment><USER57> Sure, I grew up in South Korea much of my childhood, corporal punishments was the norm.

So I have this phobia of calculus and math. Anytime I'm faced with a formula I get this panic attack. Some may call it PTSD. But it explains why I had such problem with calculus and it really made me feel inferior.

it's still a cliff hanger, searching for my arc.

</comment></comment></comment><comment><USER59> Jeremy, been reading your blog for years. Just wanted to say thanks for the wealth of readable intros to interesting mathematics.

<comment><USER60> I'd like to tag onto this: I've been reading your blog for nearly a decade and can say that you were one of my inspirations for studying math and CS.

</comment></comment><comment><USER61> I guess this is for the nontraditional programmers since computer science is a mathematical field and programming is simply applied mathematics in some sense. I don't see how you could get a CS degree without being competent in mathematics to some degree since CS is a mathematical field.

</comment><comment><USER62> From the bit I've read from [https://pimbook.org/pdf/pim_first_pages.pdf](https://pimbook.org/pdf/pim_first_pages.pdf) it seems to be very very poor.

* 19 pages of droning before you start with something concrete. Much talk talk talk about your experiences before you get to the point. I can't put into words how much it frustrates me when I'm expecting to read something interesting and the author takes 3 paragraphs talking about nothing (usually with lots of overexcited exclamation marks).

[sorry if I am being blunt, but it's how I feel]

* Imprecise definitions. This defeats the purpose of learning mathematics. Like Leslie Lamport says, rigour in mathematics is not a hurdle or a chore one must endure, it's the whole point of learning the damn thing. You give imprecise definitions, and then _obscure it even further with neverending paragraphs of confusing explanations_. This to me kills the whole pedagogical value the book might have. Here is a rule of thumb that in my experience applies well to almost everything in mathematics: the simpler your explanation is, the better. Your goal is to explain a concept as succintly and beautifully as possible. This exposes the _idea_ behind it. A long and meandering explanation only serves to obscure the idea behind. Less is more.

* Attempting to shoe-horn programming "lingo" into mathematics. Sometimes, the best way to explain something, even to programmers themselves, is not to force an awkward analogy with Java programming. EDIT: 5 pages later: "The best way to think about this is like testing software." oh boy...

* The graph in e.g. page 8 (20 of the pdf) is terribly typeset. The axes text is way too small to read and in a font that doesn't match the rest of the content.

<comment><USER59> wtf is wrong with hn.

>[sorry if I am being blunt, but it's how I feel]

you should learn to keep your feelings to yourself when the only function they serve is to denigrate others and derive cruel satisfaction for yourself.

>Here is a rule of thumb that in my experience applies well to almost everything in mathematics

this is aspirational pretension - everyone claims to appreciate formal purity /after/ they've learned something but when you're /learning/ none of that matters because you're just trying to develop intuition. to be one of those people that understands after their own stumblings/ruminations and then begrudge the next person the same is despicable. shame on you and i hope you're never in a position where someone depends on you to teach them absolutely anything.

>Imprecise definitions. This defeats the purpose of learning mathematics. Like Leslie Lamport says, rigour in mathematics is not a hurdle or a chore one must endure,

but that's just like your opinion man (or leslie lamport's). there are shelves and shelves of books for people like you - go read bourbaki or rudin or mochizuki or whomever you'd like. this book is not for /you/ \- it's stated purpose is to excite and entice people that don't have formal mathematical training to learn mathematics and those sorts of people decidedly don't enjoy austere definitions and succinct theorems and terse proofs.

hence the only purpose your comment serves is to hurt the author's feelings, an author whom i might add has done infinitely more for the math community than you have with your pedantry and vitriol by maintaining a blog [https://jeremykun.com/](https://jeremykun.com/) with literally reams of interesting mathematical content that is simultaneously exciting /and/ rigorous. and furthermore iirc jeremy was originally a math ed phd student so i trust his opinion of the right way to teach math infinitely more than i do yours mr random internet physics guy.

next time think twice before posting this kind of lowbrow mean shit.

<comment><USER63> "wtf is wrong with hn"

One thing that's wrong with HN is that perceived "negativity" often gets condemned in exactly the way you have done here.

It seems as if a significant number of HN readers have never really participated in a spirited discussion with arguments made from multiple different perspectives. Maybe any kind of apparent conflict scares them, maybe they project their own aggression onto a comment that seems to go against the grain of the discussion. It will never change.

<comment><USER64> There are many easy ways to rephrase OP's comment into one that isn't so direct and denigrating. The only thing "apparent" here is that OP has trouble with empathy.

<comment><USER62> "Direct", yes. "Denigrating", how?? I'm genuinely asking so I can fix that in the future, unless you think criticising is offending.

 _> The only thing "apparent" here is that OP has trouble with empathy._

Again, I can do without the online pretend-therapy. Amazing how perceptive some people are that they deduce the most profound things from a dozen lines of text!

<comment><USER65> I wanted to say I found your original comment critical, but not offensive. But I found the reply made to you offensive, because personal and aggressive. Which I think is how you see it too.

However, it seems several people took the side of the replier.

So I reviewed your original comment, and I think I've found the problem: it exaggerated and labelled, e.g. _droning_ , _talk talk talk_ , _talking about nothing_ , _neverending paragraphs_.

Many of these aren't literally true ("nothing", "neverending"). Others are emotionally loaded ("drone"). It's probably almost always better to speak directly, without exaggeration or emotion... but this is particularly important when criticizing.

I didn't notice these at first because I tend to filter out decoration, and just hear the content (i.e the literal meaning) - though this is much easier to do when I'm not personally involved!

I think, "to be blunt", to speak plainly, to get to the point, really mean to be factual and accurate - without emotional language, exaggeration or labeling.

Anyway, I notice dang asked to not continue this thread, but I was troubled by it, and reviewing it helped me - maybe it will help you too.</comment></comment></comment></comment></comment></comment>


Javalarm: Wake Up and Smell the Coffee - <AUTHOR> http://signup.javalarm.com/

<comment><AUTHOR> We're at a Startup Weekend, and are building an alarm clock for phones that shows an ad for a local indie coffee shop when you wake up each morning, giving you a chance of winning a free coffee there that you must claim on the day you win it.

If you run an indie coffee shop, we'd love to know whether you'd be interested in hyper-local advertising that will target people who may not know about you, and travellers who are looking for great coffee off the beaten track. Please consider taking our very short survey: [http://www.surveymonkey.com/s/W87HM8M](http://www.surveymonkey.com/s/W87HM8M)

Thankee!</comment>


The NOSPEC campaign vs. crowdSPRING - <AUTHOR> http://www.37signals.com/svn/posts/1253-the-nospec-campaign-vs-crowdspring <comment><AUTHOR> Maybe because I'm not a prestigious designer with anything to lose, but I would think that by democratizing good designs, it would help companies that could benefit from it and create a bigger market for "premium" design services. The example of iStockPhoto was a good one - break down an artificial restriction of supply and prices in general will come down while prices for excellent work will go up.

<comment><USER2> I don't know... Good designs are already "democratized" in the sense that clients and designers are already in a free market situation. This site tips the balance so far in favor of what clients want that I can't see it inspiring anything but resentment in designers. The site will attract mostly inexperienced designers and will democratize art the same way Rentacoder democratizes code.

Traditionally, most designers generate multiple proposals for their clients -- but they are paid to do so. In the case of this marketplace, all unaccepted proposals are unpaid. If, say, all designers have approximately equal chance of developing a winning design, all designers will eventually have a run of losing designs, just as a random walk is likely to go negative. This increases the volatility of the artist's income, encouraging experienced artists to go elsewhere.

The site actually refunds the client's money if they get less than 25 proposals on a project. Since the artist in the "hire" model may only be generating 2-5 quality proposals, an artist using the site must either seek payouts over five times greater than the "hire" model or they must put only a fraction of the same effort into their proposals. This encourages rushed work and the participation of inexperienced artists who can't accurately estimate how much they need to charge to stay in business.

Probably the biggest problem, though, is that this model makes it very hard to fight plagiarism. A client gets to see all the proposals, but they only need to choose one accepted proposal. There is little to stop them from "borrowing" elements from the other proposals without paying -- many artists do not have the means to launch a copyright suit, especially over a design detail. Any designer who experiences this a few times will sour on the site.

</comment></comment><comment><USER3> I wonder how many of these "professional designers" casually support the downloading of music; harping about the RIAA on their blogs and in their conversations?

One would think that what's good for the goose is good for the gander.</comment>


iPhone 8 Plus: The best smartphone camera we've ever tested - <AUTHOR> https://www.dxomark.com/apple-iphone-8-plus-reviewed-the-best-smartphone-camera-ever-tested/ <comment><USER2> Note : take the review with a pinch of salt. DXOmark do not review phones or cameras from companies that are not "collaborating" with them. They also have paid partnerships with a few manufacturers (see Oneplus 5 launch).

In this case, DXOMark magically added a metric (bokeh and zoom) just one week after the iPhone 8 review. Of course this is a good plus for Apple. Before iPhones were behind Google Pixel, behind HTC U11, Samsung S8+. They were not in the top 10. Now magically, they get to be on top. I wouldn't be surprised if there wasn't a discussion or collaboration between doxmark and apple to review their metrics to have iPhone 8 and X under the best light possible

<comment><USER3> Comparing their subscores it's obvious that without the new zoom and bokeh categories the Pixel would have stayed on top.

Pixel v iPhone 8+

90 - 89 : Exposure and Contrast

80 - 78 : Color

98 - 74 : Autofocus

70 - 64 : Texture

65 - 68 : Noise

50 - 73 : Artifacts

81 - 84 : Flash

24 - 51 : Zoom

30 - 55 : Bokeh

91 - 89 : Video

I guess picking the "best" comes down to how important those features are to each customer. Though Google isn't standing still, the Pixel 2 is announced in two weeks.

<comment><USER4> As a Pixel owner I must say it's camera is very good. I used iPhones for a long time due to security features. Pixel's camera and reasonable hardware security lured me away. Pixel has no pure equivalent to Secure Enclave, but it is good enough. The HDR+ on it is great.

<comment><USER5> Every time I was caught by the richness of the Pixel. The iPhone 8 was ok, but seemed artificial. iPhone 7+ looks downright bad in some pics which goes to show how challenging the scenes must be as its camera is pretty decent.

</comment></comment></comment></comment><comment><USER6> This feels like groundhog day. New iPhone [insert model] has the best camera ever! Fast forward two months: new Google [insert model] has the best camera ever!

I think we're getting to the point where the incremental gains we're seeing with each new phone cycle are almost unnoticeable to the average user who just wants to take photos of their kids to send to Grandma.

<comment><USER7> > the incremental gains we're seeing with each new phone cycle are almost > unnoticeable

I don't think so. As someone with a whole lot of expensive "real" camera gear, I was _astonished_ \- and I don't really say that lightly - with what I saw a friend getting out of her iphone 7+. If three years ago you had shown me some of these images I would have sworn they were taken by at least five grand worth of gear, expertly used. And by all reports the 8 is another giant step up.

This techcrunch review tells the story: [https://techcrunch.com/2017/09/19/review- iphone-8/](https://techcrunch.com/2017/09/19/review-iphone-8/)

I find this all incredibly exciting. It reminds me of the great democratisation of electronic music, where all of a sudden you didn't need $30k worth of hardware synths to make music - a single computer would do. A cambrian explosion of creativity ensued.

High quality and highly capable cameras - _and video cameras_ \- in the hands of the masses? Bring it on I say! How many thousands, if not _millions_ , of incredible, moving, moment-defining images will be captured now we don't need a pro photographer on hand to do justice to a scene?

If we're gonna have cameras in smartphones - and we're gonna - they may as well be good, and Apple is setting the pace - and forcing down the price. Good on them.

<comment><USER8> I think your post actually proves the point of the person you were disagreeing with.

If you, someone experienced with "real" camera gear, were "astonished" by the iphone 7+ pictures and thought they were taken by "five grand worth of gear", then for the average person further gains are going to be unremarkable.

Yes, I understand that a camera gearhead finds everything new and each small improvement incredibly exciting. But for the average picture taker none of it is a big deal; what they have is already quite good, certainly good enough. Of course, it won't be hard for marketing to convince people that they should go out and once again fork over more of their hard earned money for "the best", even if it's in reality a minor improvement.

Also, for the real photographers the equipment is secondary. Better gear helps very little with creating better pictures. I assure you, people were making awesome pictures with digital cameras ten and twenty years ago, with specs that anybody would laugh at now. Good photographers can produce good pictures no matter what camera they take them with. (And, conversely, bad photographers produce crap no matter how good their cameras.)

<comment><USER9> _I think your post actually proves the point of the person you were disagreeing with._

 _If you, someone experienced with "real" camera gear, were "astonished" by the iphone 7+ pictures and thought they were taken by "five grand worth of gear", then for the average person further gains are going to be unremarkable._

That's kind of a strange argument, no? You're saying that _if_ experienced photographers think the improvement is large, _then_ average people can't tell the difference?

That's very strange.

Have a look at e.g. this paper from Google. [http://www.hdrplusdata.org/hdrplus_preprint.pdf](http://www.hdrplusdata.org/hdrplus_preprint.pdf) These changes certainly count as "astonishing" to me (let's say, an "enthusiastic amateaur" photog), and I think you'd be hard-pressed to argue that this tech is insignificant to the average user.

<comment><USER10> >> That's very strange.

Not really. A layperson takes stuff for granted because they don't know better (or what to look for). An expert knows better and can appreciate the differences.

<comment><USER11> A layperson might not know _why_ one photo looks better than another, but they can certainly tell that it still looks better.

An expert might know _why_ , and be able to pick out a few reasons more why one is superior to the other, but the layperson still has a pair of eyes.

<comment><USER10> >> they can certainly tell that it still looks better

The thing is that this is highly subjective and widely varies from person to person. Sometimes it's related to the content (subject) of the photo, sometimes it's the colors, sometimes it's the sharpness, etc.

And sometimes the reason why the photo is "better" has more to do with the photographer's camera settings or technical choices than how good the camera is on paper.

I consider myself somewhat knowledgeable of cameras, but I will consistently say that a high DOF iPhone portrait is better than a portrait with razor thin DOF with silky bokeh shot on a Sony A9, when the A9 is clearly the superior camera. That's because my definition of "looks better" is highly subjective and unique to my own tastes and biases.

<comment><USER7> > a high DOF iPhone portrait is better than a portrait with razor thin DOF > with silky bokeh shot on a Sony A9

I agree completely. I appreciate the gear like anyone else, but it's all about the end result. A recent iphone plus in portrait mode can genuinely capture an amazing looking, high apparent DOF photo. Yes it's all computer trickery but who cares. It looks great. An expert with an A9, with the right lens, primed for the shot, _might_ be able to do better but - and here's the important part - 99.9% of the time they're not there.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> With all of the processing wizardry that goes into phone cameras these days, gets me thinking: will we reach a point where cameras are digital paintbrushes that construct a human-pleasing image out of hints from the real world, rather than tools that capture the real world?

There are probably plenty of people that will pay for a phone camera that makes them look less like themselves if it makes them look more attractive in subtle ways.

<comment><USER13> Every time a friend of mine bought a phone in a country like China or Korea, the camera app had built-in filters to smooth the face and prettify the eyes. Often times these were also the default setting. So I think we are already at that stage in some parts of the world

<comment><USER14> Samsung did this with the Note 3, and I suspect other flagships around this time.

The rear-facing camera would default to their 'Auto' mode, switch to the front-facing and you have to switch out of something like 'Beauty' mode with tons of post-processing for selfies.

<comment><USER15> Selfies are inherently at a disadvantage, because shots are very close range with a wide angle lens exaggerate depth. Portrait photography is usually done with longer lenses, which you can't fake computationally so easily. So I think some of the selfie postprocessing is trying to make up for that.

<comment><USER16> Also most people are "ugly" up close. As in, we see micro features that distract from the macro.

</comment></comment></comment></comment></comment><comment><USER17> The Pixel photos are the best of the lot. I don't understand why the author thinks the iPhone 8+ is better, except that it's newer and from Apple.

Pixel: [https://cdn.dxomark.com/wp-content/uploads/2017/09/Pixels- IM...](https://cdn.dxomark.com/wp-content/uploads/2017/09/Pixels- IMG_20170921_113146.jpg)

iPhone 8: [https://cdn.dxomark.com/wp- content/uploads/2017/09/ip8Plus-I...](https://cdn.dxomark.com/wp- content/uploads/2017/09/ip8Plus-IMG_0660a.jpg)

That's not even close. Wider angle. Better range of contrast. Better sharpness of details. Hard to say which is truer to the colors without being there, but the colors look better on the Pixel.

\</comment><comment>---- Edit: By their own ratings, the Pixel phone beats the iPhone on every metric scored:

Pixel v. iPhone 8+

90 - 89 :Exposure & Contrast

85 - 78 :Color

93 - 74 :Autofocus

93 - 64 :Texture

89 - 68 :Noise

84 - 73 :Artifacts

88 - 84 :Flash

\</comment><comment>--

89 - 96 :Final Score

How does the iPhone receive an overall rating substantially higher than its highest individual rating?

<comment><USER18> Don't you see that the face colors on the pixel are not realistic, she looks dead white. Also try zoom into her face, you will see how much worse the quality is as well

<comment><USER19> I think that particular photo could go either way. Personally, I went from an iPhone 6 to a Pixel and then to the 7 plus, and I find the camera lacking in comparison to the pixel now. The front camera is fine, but the back camera on the Pixel was faster, sharper, and produced more vivid colors. Can't speak to the 8, but I personally found the test images not representative of the Pixel's quality in comparison to the other models listed.

<comment><USER20> "Vivid" often doesn't mean it's color accurate.

I think both the Pixel and iPhone Plus take some of the best mobile camera photos out there. The Pixel is much, much better at low light. However, the iPhone reproduces colors in a more realistic way. Most Pixel photos usually seem to have a harsher color tone, brighter/whiter, very cool like LEDs. The iPhone seems to favor a more warm color temperature, which I think generally produces worse low light photos, but more accurate color reproduction.

</comment></comment></comment></comment><comment><USER21> As someone who owns a $1300 Fuji x100F, color me impressed. The only thing really separating my Fuji from the iPhone 8 is the level of detail when zoomed in, otherwise the images just look great.

The performance of these smartphone cameras is getting closer and closer to DSLR's nowadays. However the level of zoomed in detail still can't compete, but most consumers don't care anyway because most just want to take pics of their food and post on instagram.

<comment><USER22> That seems wrong... Your x100F has an APS-C sensor and is going to benefit from better dynamic range and low light performance for it. The iPhone can use its auto HDR magic to recover dynamic range but that's gotta have an impact with moving subjects. The noise is accounted for by noise reduction and that will cause mushiness and loss of detail. I haven't seen an analysis, but I'd also imagine that the x100F is going to have a vastly more performant lens in terms of things like overall sharpness, microcontrast, and focal plane performance.

The iPhone 8 is doing some post processor magic to do lighting and bokeh in a way that is difficult to replicate either physically or in post. This is really nice! That said, real bokeh will be hard to beat even with AI as it depends a lot on the three-dimensional information available at the time of capture. AI will have to re-create that stuff and will always be an approximation. Of course, your x100F isn't going to be a bokeh monster, but other cameras at that level compare here.

You're right in that for IG food shots it's never going to matter and that's great because the iPhone created a golden age of photography, tbh. But it's silly to say that this hardware can compare to pro hardware. If you're shooting with pro hardware it's because you're going to push performance in some way or another and those are the times that an iPhone can't keep up.

That said, these AI improvements _can_ help push performance as they improve and I'd love to see Apple work with a camera company to incorporate them.

<comment><USER10> >> But it's silly to say that this hardware can compare to pro hardware.

Yes, that is true for people who have some knowledge. For most non- photography-buffs, the comparison goes as far as "hey, that looks as good as the photo Uncle Joe shot on his DSLR". It's a very superficial comparison, but for a layperson, perception is reality.

I would liken it to the concept of "virtual surround sound". Of course, it's not really surround sound, but if the listener's ears and brain are tricked enough to think it's surround sound, it's surround sound to them.

</comment></comment></comment><comment><USER23> Some of these images don't compare :( the scenes / perspectives differ quite a bit.

<comment><USER24> Which ones? Are you talking about the fact that the Pixel has a wider angle lens?

I mean, you could crop those pictures but that wouldn't exactly be fair to the Pixel.

<comment><USER25> The portrait with the tree and the sun in the background is a clear example. Whether the sun is shining through the leaves of the tree or not will overwhelm any inter-phone differences.

<comment><USER24> I'm not convinced. You can see a little bit of flare in the 8 and 7 Plus photos, but global contrast doesn't seem to be affected.

</comment></comment></comment></comment><comment><USER26> More revolutionary than the camera itself is the new image compression Apple is introducing. Can take all the photos in the world but we've still need to store them for all eternity. The effect of the image compression will be felt decades from now, whereas the marginal optical gain from the 7 Plus to the 8 Plus won't even be noticeable.

<comment><USER27> > More revolutionary than the camera itself is the new image compression Apple > is introducing. Can take all the photos in the world but we've still need to > store them for all eternity. The effect of the image compression will be > felt decades from now, whereas the marginal optical gain from the 7 Plus to > the 8 Plus won't even be noticeable.

I think you've got this exactly backwards.

In forty years a slightly better image will still be slightly better, but a 5MB vs a 10MB file will be as meaningless as comparing a 50KB vs a 100KB text file is today.

</comment></comment><comment><USER28> Apple isn't normally classified as a camera company but they definitely are and that is one area where they are still able to still _move the goal post_.

<comment><USER29> Their make some of the world's best consumer cameras, computer chips, and watches. And they truly excel at all of those. Kinda crazy

<comment><USER30> At least up to iPhone 7 the camera sensor wasn't made by Apple:

[https://itstillworks.com/manufactures-apples-iphone- camera-1...](https://itstillworks.com/manufactures-apples-iphone- camera-18562.html)

Currently, it seems to be made by Himax Technologies:

[https://www.cultofmac.com/473737/iphone-8-rumors-cause- share...](https://www.cultofmac.com/473737/iphone-8-rumors-cause-share-prices- to-soar-for-3d-sensor-maker/)

<comment><USER31> They use the same sensors as all the other phones. But I think they are perceived better because on default they apply lots of (destructive) contrast, while other Manufacturers use less to keep more Image Information.

<comment><USER32> Source? Are other manufactures capturing raw? Or are you saying other manufactures do less DSP?

</comment></comment></comment></comment></comment><comment><USER33> Smartphone cameras are so good now, the differences in photo quality are pretty negligible between flagships. IMO, DxOMark basically makes mountains out of mole hills.

Given the option, I'd rather have killer new features like 3D scanning [1] than a bokeh effect which is slightly better to a trained eye.

[1] [https://www.theverge.com/2017/8/31/16232720/sony-xperia- xz1-...](https://www.theverge.com/2017/8/31/16232720/sony-xperia- xz1-3d-creator-ifa-2017)

</comment><comment><USER34> The interior low light photo of the kitchen is quite impressive. But I'm not sure it was taken with just an iPhone.

\+ The sink faucet has a shadow that comes from a low light source to the right.

\+ The rest of the appliances on the counter cast shadows upward and toward the windows.

</comment><comment><USER35> Are they saying it's better than the X, or have they just not tested the X yet?

<comment><USER36> The X isn't released, only announced. Hard to test without the gear...

<comment><USER35> Fair enough!

</comment></comment></comment><comment><USER37> This article here is the reason why Apple is killing others it competes with. No one else goes to these lengths to perfect some feature. They just don't care. It's the reason the iPhone 8 is also years ahead of android phones in speed.

[https://www.macrumors.com/2017/09/22/how-apple-perfected- por...](https://www.macrumors.com/2017/09/22/how-apple-perfected-portrait- lighting/)

<comment><USER38> It's not perfect though, there are examples in some reviews of the feature screwing up and clipping fairs or giving odd shading.

<comment><USER37> Of course not. I was not making the claim it was perfect. Merely that only Apple goes to the lengths they do to _try_ to make perfect things. You think samsung and google are running around studying paintings to try and understand the nuances of various styles and lighting? Hell no. They just through a common image processor in their phone and write some software to use it and call it a day. That's all I was saying. Apple goes really deep into things to understand how to make something better. I don't know any corporation other than Apple that dives that deep into details.

<comment><USER38> Actually, the camera teams at Google does camera studies. Apple is just much better at hyping and marketing what they do. I mean, Google runs the Google Cultural Institute and has photographed more artwork and paintings and sculptures than Apple has, and has constructed special cameras just for photographing such work, and special software focused on art preservation. ([https://www.youtube.com/watch?v=dOrJesw5ET8](https://www.youtube.com/watch?v=dOrJesw5ET8))

If Google just ships common stuff, then why did the Pixel score industry leading numbers on camera, beating the iPhone 7? And doesn't Apple ship Sony image censors, Qualcomm modems, and Samsung OLED displays? Or their "GPU" which is in fact, a licensed PowerVR IP.

You're buying into marketing hype. Apple's last keynote marketed 4K HDR as if they had invented it, they're marketing HEVC motion compensation as if they did something no one else had done, they sell "True Tone" displays, which aren't a feature of the display at all, but just adjusting color temperature based on ambient light sensor, which is something Samsung phones have been shipping for years.

Google and Android vendors do a piss poor job of calling attention to details they've obsessed over, while Apple deploys Johnny Ive to talk about chamfered edges. All this creates a mythos that Apple is the only company that cares about details.

</comment></comment></comment></comment><comment><USER39> The X is better yet right? Will it best the pixel 2?

</comment><comment><USER40> It's also apparently well over twice as fast as the latest Android phones. Essentially the latest Android phones are about as fast as iPhone 6s on realistic workloads. iPhone 6s is two years old. That's what happens when you derive revenue from selling hardware and not ads.

</comment><comment><USER41> as good as these cameras are, I feel like its a real missed opportunity not to partner with Canon or Nikon to get deep integration with their lens systems and essentially turn this into a DSLR that happens to use the iPhone as a sensor. I realize there are lens attachments in the wild but they're mostly trash, and its nowhere close to what it could be.

<comment><USER42> Smartphones have already killed off the casual camera market. I don't think Canon or Nikon would be willing to help Apple kill off the high-end camera market, too.

<comment><USER43> Is it possible where cameras simply become so good on devices, that the next hollywood blockbuster is filmed on an iphone?

I know that is ridiculous, but I remember a "1mp" camera was advertised everywhere as a thing for a phone to have. It wasn't that long ago really.

Let's say your 2040 Iphone captures 4000mp of the entire visible scene. Then you have some special software that unicorns everything into amazing sauce.

I know this is all pretty whimsical, but none the less, I feel that the path we are going down is one that Nikon and Canon can't finish.

<comment><USER44> > Is it possible [...] that the next hollywood blockbuster is filmed on an > iphone?

Yes.

"How one of the best films at Sundance was shot using an iPhone 5S" [https://www.theverge.com/2015/1/28/7925023/sundance-film- fes...](https://www.theverge.com/2015/1/28/7925023/sundance-film- festival-2015-tangerine-iphone-5s)

Or if you want something a bit more Hollywood, Gondry is experimenting with it.

"Michel Gondry debuts film shot entirely on Apple's iPhone 7" [http://mashable.com/2017/07/01/michel-gondry- iphone-7-film/#...](http://mashable.com/2017/07/01/michel-gondry- iphone-7-film/#9bgz2lJPokqu)

</comment></comment></comment></comment><comment><USER45> I'm skeptical. They've been saying this about iphones for years and my immediate family members who use iphones thing it has a crappy camera

</comment><comment><USER46> [https://www.dxomark.com/google-pixel-camera-review- retested-...](https://www.dxomark.com/google-pixel-camera-review-retested-new- dxomark-mobile-protocols/) should we really be praising a 4 point increase from a camera that has been out for two years and cost $150 less on launch?

Don't get me wrong, the iPhone 8 has a good camera, and it is marginally better than the pixel's, but is this really enough to celebrate?

<comment><USER47> The big improvements are somewhat lost in the overall, average score. If you look at some of the specific advancements it's clear that some really impressive enhancements have been achieved. And if you look at a two or three year horizon, the difference is massive.

<comment><USER46> I'm not a camera prosumer in any means but what I saw was 'similar' to the pixel's. In the article I can see where is surpasses the pixel in these marginal aspects, but there would be no way I could pass a blind test of pictures taken from which phone

<comment><USER47> I did used to be a semi-pro portrait photographer so no doubt the differences jump out to me more than to the average person. One thing that should be quite easy to see is that the Pixel is losing a lot of detail in skin tones, both through overexposure and poor choice of color balance. Some of the Pixel images also have a lot of contrast applied (a matter of taste, up to a point, but it is often used to hide poor noise performance in low light portions of the image by rendering them black, and reduces editing options with the image after capture). But of course it's not without reason that the Pixel got glowing reviews for its camera system when it came out, and it still puts in a decent showing.</comment></comment></comment></comment>


Show HN: GitHub-based DNS Hosting - <AUTHOR> https://dns-api.com/

<comment><USER2> I was going to write a message here congratulating this guy, as I love the concept - but then I realized he'd emailed me a few months back, blogged about us, then ripped off our product after we ignored him, and poorly at that.

1) On April 19th, Steve wrote this blog post mentioning us, Namecast: [http://blog.steve.org.uk/i_was_beaten_to_the_punch__but_felt...](http://blog.steve.org.uk/i_was_beaten_to_the_punch__but_felt_nothing.html)

2) At around the same time Steve sent me a personal email doing market research on the concept of Git-backed DNS. I didn't respond because, well, it was a bit of a clunky first way to ping someone. Still no problem, though - who hasn't sent a random stranger an awkward email before, right?

3) He then decided to build a competing product - and steal our messaging?! Seriously, go to [http://www.namecast.net](http://www.namecast.net) right now, check out our above the fold copy, and then check out dns-api.com. "Imagine if updating your DNS records was as easy as running "git push"." Really, Steve? Really?

This is where things go in my mind from "hey, two DNS guys had the same idea about Git and DNS, neat!" to "this dude can't create his own ideas so has decided to steal our copy and cargo cult copy our product."

Luckily Steve isn't very good at DNS or handling traffic, so his servers have fallen down and people are complaining about his feature set, so instead of complaining too hard:

For those of you who want a provider who's site won't fall over after a tiny crush of HN traffic, check out [http://www.namecast.net](http://www.namecast.net).

We've also got working SRV, TXT and alias records - some of you have noticed dns-api.com doesn't - as well as geoIP and native IPv6 amongst other things, and as good members of the open source community, we're contributors to the open source geodns project (written in Go by Ask Bjorn Hansen, it powers the global NTP pool - so if you've got software that talks to pool.ntp.org, like say, ntpdate, it's talking to a server running geodns.)

 _mic drop_

\--afsheenb

<comment><USER2> As a pre-emptive note for other HN'ers:

1) I'm not annoyed that Steve's built a competing product. That would be like the developers of Squid being annoyed that Varnish exists, or lighttpd and Nginx, or.... you get the picture. Competition in the free market and especially amongst software providers is good and healthy, and saying otherwise is tantamount to saying that software is sacred. That way lies patent madness. Besides, LuaDNS and I'm sure others have similar products. I was actually really excited about this, as it validates our market, theoretically - until I recognized the name and visited the site.

2) I'm furious that Steve blogged about us, mailed us directly - so he damn sure knows about us and our product - and then directly lifted our copy and messaging, and is now presenting this as an original concept on a Show HN post. That's where this all falls apart. Just - not cool, buddy. Not. Cool.

<comment><USER3> If Steve replies, I'm bookmarking this :D

<comment><AUTHOR> Please do bear with me .. 23:50 here and I need sleep.

</comment></comment></comment></comment><comment><AUTHOR> Having recently started to explore the Amazon Route53 API I can see a lot of value in using it:

* Anycast DNS handling located in multiple regions.

* Good API for accessing it.

But the barrier to entry is high for many, and the volume-based pricing might put people off.

On that basis I thought a middle-layer of glue might be useful, so I created [https://dns-api.com/](https://dns-api.com/)

Using Github webhooks you can trigger updates of your DNS in a simple manner, allowing near instant updates.

</comment><comment><USER4> I'd want this backed by CloudFlare's dns, not R53 so that I could take advantage of CF's network as a proxy in front of my servers. [https://www.cloudflare.com/docs/client- api.html](https://www.cloudflare.com/docs/client-api.html)

<comment><USER5> I have a tool that syncs my DNS records to CloudFlare using flat files that I keep under version control. I just extracted it from my personal tool set:

[https://github.com/dnerdy/namesync](https://github.com/dnerdy/namesync)

This flat file format seems to work well, and the tool could potentially be updated to support other DNS providers.

<comment><USER6> That is much more useful to me than the OP service. Thanks.

</comment></comment></comment><comment><USER7> [https://m.imgur.com/49k1UbP](https://m.imgur.com/49k1UbP)

<comment><USER8> [http://xkcd.com/1373/](http://xkcd.com/1373/)

</comment></comment><comment><USER9> Using 6 as a prefix for ipv6 might be a bad idea.

The DNS Specification (RFC2181[1]) states:

>The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one restriction relates to the length of the label and the full name. The length of any one label is limited to between 1 and 63 octets. A full domain name is limited to 255 octets (including the separators). The zero length full name is defined as representing the root of the DNS tree, and is typically written and displayed as ".". Those restrictions aside, __any binary string whatever can be used as the label of any resource record.__

>Implementations of the DNS protocols must not place any restrictions on the labels that can be used. In particular, DNS servers must not refuse to serve a zone because it contains labels that might not be acceptable to some DNS client programs.

As an example these are all valid domains

       6.4424.cn, 6www.4424.cn, 6662.cn

But Separating the prefix and domain with a space would already fix the issue.

[1]: [http://tools.ietf.org/rfc/rfc2181](http://tools.ietf.org/rfc/rfc2181)

<comment> X-Istence The record format is the same one that is used for DJBDNS, which by default does not support IPv6 addresses. There is a patch that adds IPv6 support, records start with 6 for IPv6 records.

If you want to create a record named:

      6www.whatever.com

You would put that into the file as:

      66www.whatever.com

Only the first character is used in the DJBDNS record format to specify what the rest of record type is.

Here is more information about the DJBDNS data format: [http://cr.yp.to/djbdns/tinydns-data.html](http://cr.yp.to/djbdns/tinydns- data.html)

<comment><USER9> it might not cause problems, but is not very concise

adding syntax to support new features always causes problems (python .. __^cough^ __)

</comment></comment></comment><comment><USER10> This reminds me of my favorite host, LuaDNS.com. Always willing to extend their services, and have never had a problem with them.

Also more expensive than LuaDNS, and the configuration is far more terse than what is provided. I'm not from LuaDNS, but I'll admit I'm a huge fan.

<comment><AUTHOR> I'm a fan of Lua, and I like the LuaDNS implementation too.

I almost didn't build this, but I think there is room for more. Certainly Amazons DNS service is hard to beat..

</comment></comment><comment><USER11> I actually created something similar to this long ago (Jan 2013).

[https://github.com/silasb/luvdns](https://github.com/silasb/luvdns)

That holds the Lua program to parse my domains [1] and also holds a Sinatra application that gets a post commit hook from GH and then it was as simple as updating the database that PowerDNS looked at. I don't think I ever ended up fully using it.

[1]: [https://github.com/silasb/domains](https://github.com/silasb/domains)

</comment><comment><USER12> I currently have a Git-based DNS setup and can highly recommend the workflow. Having a history, review and team-visibility goes a surprisingly long way.

It's a little more duct-taped together than this (a Jenkins job that rsyncs to [https://www.bytemark.co.uk/support/technical_documents/dnsc](https://www.bytemark.co.uk/support/technical_documents/dnsc))

<comment><AUTHOR> You might imagine I'm familiar with the Bytemark system.

My own records hosted there are also under revision control.

</comment></comment><comment><USER13> I don't see a way to add txt records, which are important for many things. Nor do I see srv records or others.

The documentation also doesn't make it clear because it links TinyDNS format, but says you're using a simplified version without mentioning any real details.

Are there any plans to support / document these other record types?

<comment><AUTHOR> By simplified I mean that we don't support TXT, SRV, NS, or SOA records.

The missing record-types are highlighted as a concern, and it should be possible for me to add them quickly.

I've launched now mostly to see if there is a demand for this middle-ware - rather than having people jump-ship immediately to Amazon. (Plus I find the idea of Git being used neat.)

So, in conclusion yes missing SRV, missing TXT, and they will come.

<comment><AUTHOR> TXT records are now supported, FWIW.

</comment></comment></comment><comment><AUTHOR> The traffic killed the server - I'm rebuilding it now with decent RAM, back in 20 minutes..

<comment><USER14> I have to admit I giggled

[http://i.imgur.com/H9dBG09.png](http://i.imgur.com/H9dBG09.png)

Hope the rebuild goes well.

<comment><AUTHOR> Redeploying is pretty automated, but it looks like I need significant caching on the front-end to cope with load.

<comment><USER15> I'm a huge fan of Varnish for this sort of thing.

</comment></comment></comment></comment><comment><USER16> This requires putting your whole zone file in public, right? Seems like that might not always be a good thing for some but maybe better for others.

Any plans to support something other than Github. Trying to move away from there.

<comment><AUTHOR> I'm happy to support anything that will allow a WebHook to be invoked on a push event. I'm certainly intending to look at GitBucket, and similar.

Handling private repositories is a pain (at least with GitHub) because my key would need to be added to allow a clone/update. If there's a way round that, perhaps via applying patches on demand, I've not come across it.

As you say hosting DNS records publicly might be a concern for some. I don't really see a way round it, and I'd guess that by and large people consider DNS-data public, by definition ..

<comment><USER17> Codebase support would be great! Being able to update DNS by a simple git change would be awesome.

<comment><AUTHOR> We started with Github, and I've now added BitBucket.

Codebase will be next.

</comment></comment></comment></comment><comment><USER18> You could also just use [https://api.luadns.com/](https://api.luadns.com/) which at least offers a free tier.</comment>


John Deere Takes on Silicon Valley - <AUTHOR> http://www.startribune.com/john-deere-takes-on-silicon-valley/448698173/ <comment><USER2> This article reminded me of what Bruce Greenwald said in an interview [0]:

 _If you look at a company like Deere, making equipment is a small part of what they do. A lot goes into putting it to work and making sure it works. A lot of the company is driven by local software. Because the equipment lasts longer, the secondhand markets are a big deal. Those markets are local. For financing, you need local information so you can know the good risks. Imagine that in Illinois, 90% of the tractors and harvesters and seeders are made by Deere. Who will have the best service? Which second-hand market will be the most dense and therefore easiest to sell? Who will have the best information and financing? Deere. Kubota will have a hard time trying to break into that market. And Deere, even if it temporarily suffers in sales, has a service base that means it's not going to compete on price._

[0] [http://www.barrons.com/articles/bruce-greenwald- channeling-g...](http://www.barrons.com/articles/bruce-greenwald-channeling- graham-and-dodd-1494649404)</comment>


538:  Why S&P's ratings are substandard and porous - <AUTHOR> http://fivethirtyeight.blogs.nytimes.com/2011/08/08/why-s-p-s-ratings-are-substandard-and-porous/?hp

<comment><USER2> It looks like the bond market has decided to ignore them in this case: interest rates on U.S. debt are _down_ following the downgrade, as people are buying them up, not selling them off.</comment>


Ask HN: Do you think HN shaddowbanning new accounts is ok? - <AUTHOR> I have created an account and immediately got shadow banned. <comment> who-knows95 it is most likely to protect against spammers, when you say you are shadow banned, what makes you think this.</comment>


Structured Stream Transport (2007) - <AUTHOR> http://pdos.csail.mit.edu/uia/sst

<comment><USER2> i would rather go with mptcp instead</comment>


Ask HN: MIT licensed code, how to properly use when heavily modifying code? - <AUTHOR> I was curious about current best practices or legal guidelines to follow when working with specifically MIT licensed (to focus discussion) but potentially any OSS license:
The context is MIT Licensed code from another company/author than yourself.
1. Heavily modify code (to the point of being not-recognizable) that was originally MIT licensed.
2. Base new code off of ideas/patterns etc from an existing library.
3. Use a utility function or portion that is a small part of a larger library.
Are the answers different if the target/child project is MIT licensed completely or chooses a different license?
I think there are two sides to this question, both important, the community/proper way, and the actual/legal way to handle attribution, future licensing. I'm interested in both.
Thanks <comment><USER2> It _is_ possible to transform code sufficiently such that the original author's copyright no longer applies, eg, USL v. BSDi.

It comes down to the ability to demonstrate to the court that "not- recognizable" is sufficiently transformative.

But you don't want to worry about the possibility of taking it to court, since that's expensive and worrisome.

So, why not leave the original copyright notice?

It doesn't hurt, and it doesn't step on anyone's toes.

You wrote "Are the answers different", but didn't pose any questions to answer.</comment>


Visualization of how Bitcoin's UTXO set has evolved over time - <AUTHOR> https://twitter.com/timothyej/status/967210248032411648 <comment><AUTHOR> Each pixel represents a block, where each column is 300 blocks. The orange visualizes the number of unspent transaction outputs per block, and the blue visualizes the amount of unspent BTC per block.

How I made it:

1\. Precalculated all block heights to snapshot the UTXO stats at (every 1008 blocks) 2\. Downloaded the whole blockchain using the Bitcoin Core client 3\. Wrote a script that invalidates all blocks to X using the Bitcoin Core's RPC 4\. Saved a snapshot of the UTXO set using the same method as for utxo- stats.com (see source code below) 5\. Saved price with each snapshot (from a csv file downloaded from coindesk.com) 6\. Repeated step 3 - 5 by invalidating the next 1008 blocks 7\. Copied the source code for utxo-stats.com modified it to load these snapshots one by one 8\. Recorded the screen using QuickTime 9\. Imported the movie into iMovie and sped it up

Source code for utxo-stats.com: [https://github.com/blockfirm/utxo- stats.com](https://github.com/blockfirm/utxo-stats.com)

Modified version of the Bitcoin Core client: [https://github.com/blockfirm/bitcoin](https://github.com/blockfirm/bitcoin)</comment>


Clinton's VP picks had to turn over every social media password for whole family - <AUTHOR> http://www.politico.com/story/2016/07/tim-kaine-vp-ticktock-226069 <comment><USER2> This is one of the rare cases where giving up all your privacy is in your best interest. Better your ally finds out before your enemy. Because it _will_ be found and used against you in the most cynical way possible.

<comment><USER3> You're probably right, from a political POV; but from a freedom POV: hell no.</comment></comment>