Jan. 25th, 2025

juan_gandhi: (Default)

"From Mathematics to Generic Programming"

I had ordered this book a couple of years ago, but by my mistake it was delivered to my old Californian address. Just received it eventually, about a month ago.

The book has 14 chapters. I don't know who is Daniel Rose, but everybody (except GenZ) knows Stepanov, who is, I think, an actual founder of map/reduce (but who cares, right?). He has an education in "abstract algebra", as I understand (S.Lang's "Algebra" book is what I see throughout this book), and, since he spent his life programming every since, he didn't add any knowledge above, and the book mixes his "Mekhmat Algebra of year 1972" level with programming practices of 1990-s.

I remember I was doing a similar algebra, but in my case category theory was already looming somewhere above, and, many years later, I figured that all that cheap shit that I was doing in homological algebra can be expressed in about a couple of pages if we show that a couple of important functors are adjoint. Same here: "similarities", mentioned here and there throughout the book are just functors between some abelian categories. OTOH, model theory was almost mentioned.

Still, a good reading, really good, especially for kids.

Also, the book contains a lot of stories from the history: How Euclides got pissed off by his contemporary idiots, how Lobachevsky got pissed off by his contemporary idiots, how Galois pissed of some idiots like Cauchy and eventually he got pissed off and killed by some now forgotten asshole.

We start with finding GCD, and we spend the whole book returning to finding GCD, eventually wrapping up with the explanation of how RSA works. GCD everywhere. Since there are c++ code examples and exercises, a lot of time is dedicated to explaining how code works, and how it should be written. The general approach reminds me what they taught us in the 5th year: performance! efficiency! minimalistic code with no extra instruction! Ok, we need that efficiency for doing RSA, of course, especially finding a couple of good primes. And all these things are good exercises if you are learning, or just want to have fun.

So, I recommend this book as a casual weekend or vacation reading to programmers that for some reason skipped algebra - and also as a good algebraic programming tutorial to the kids who are curious to learn something mathematically deeper than Java OOP or Scala FP.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21222324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 22nd, 2025 03:40 pm
Powered by Dreamwidth Studios