# Category: 📚 Books

## Clean Architecture

A colleague recently mentioned the concept of Clean Architecture (as named by Uncle Bob Martin). The essential idea is to have

• a layered software architecture,
• with the domain objects and business logic at its core
• and all dependencies only pointing inwards

Uncle Bob uses 4 concentric circles to denote the layers of a generic architecture and calls them (from inside to outside): Entities, Use Cases, Interface Adapters and “Frameworks and Drivers”. The outermost layer contains all technical details like the type of database that is used and which web framework (or UI or whatever) is applied.

Of course, Uncle Bob would not be Uncle Bob if he would not suggest to use the dependency inversion principle to have the control flow point in the opposite direction as the dependencies. In my current job, where we work mostly in Rust, we would most of the time rely on traits and in particular the SerDe crate to take the role of the depedency inverter.

## Layered Architecture in DDD

Not so long ago, I tried to read the book Domain-Driven Design by Eric Evans. It was also recommended to me by a colleague. But trying to read it I had a really hard time working myself throug the book. The writing style somehow didn’t connect with me that well.

But then, more recently, I did discover the DDD reference which is a little summary of the patterns and definitions of DDD that is also authored by Eric Evans and that can be downloaded for free on this website: https://www.domainlanguage.com/ddd/reference/

I mention this book here because it also has a section on Layered Architecture in which it says:

• ## Annotating Serre

I very much like the thought of annotating the book “A course in arithmetic” by Jean-Pierre Serre. It is a fascinating and dense math text book that I find very attractive. The book has also been recommended by Richard Borcherds as one of his favorite math books, and I very much like Borcherds’ online math lectures.

But on the other hand, “A course in arithmetic” is a very hard book. I tried to read parts of it and most of what I read seemed to be very hard to understand. As I wrote in the second sentence: It is a very dense book. And people with much better mathematical backgrounds have tried before me and struggled: https://www.reddit.com/r/math/comments/80of13/how_to_read_a_course_in_arithmetic/

When I read this reddit thread, I could very much sympathize with the original poster. But I was even more fascinated by one of the posts’ linking to this annotated version of the book: https://people.ucsc.edu/~weissman/Math222A/SerreAnn.pdf. It is admittedly not a complete annotation of the book but it is a nice start. It seems to be a project that started in a graduate course at the University of California, Santa Cruz.

Serre always gives the maximally elegant proof, putting in only what he considers the absolutely necessary steps. No motivation is given. This is the style popularized by Bourbaki. (A French mathematician informed me that they did this because didn’t want to contaminate the reader with their informal mental picture of what was going on. The reasoning was that their teachers would provide the intuition and “picture”).

But to appreciate this elegance and economy of presentation, you either have to be so mathematically gifted as to be able to immediately see why he would do things the way he does, or to work hard and gain experience. (Most of us have to go the latter route).

I think I would like to work through some parts of the book myself and see what annotations I come up with.

• ## Euler-Maclaurin summation via the Basel problem

I recently started playing with the book 📖 “Riemann’s Zeta Function” by H.M. Edwards. In chapter 6 he introduces Euler-Maclaurin summation, a concept that has allowed Danish mathematician Jørgen Pedersen Gram to find the first list of 15 non-trivial zeros of the Riemann Zeta function in 1903. I will repeat parts of Edwards’ arguments here and use this blog post to introduce Euler-Maclaurin summation in my own words (in fact I will heavily quote from the book). I will not yet connect this with calculating zeros of the Zeta function, it might be the topic of a future post. I will, however, add some pictures and reference the Python code that I’ve used to generate those pictures (https://mybinder.org/v2/gh/ahartel/rzf.git/HEAD).

As the initial example, Edwards choses the sum $S = (\frac{1}{10})^2 + (\frac{1}{11})^2 + \ldots + (\frac{1}{100})^2$ which is part of the series $\zeta(2)$, whose elusive evaluation was known as the Basel problem before Euler solved it in 1735, discovering exactly Euler-Maclaurin summation on the way.

(more…)
• ## ‘Prime Obsession’ by John Derbyshire

I must admit up front that biographical books are probably my most favourite genre overall! And I obviously like math. And this book is about two things: the Riemann Hypothesis and the mathematicians who have worked on it and the theories that revolve around it. When I found this book, it sounded like a great match and did not hesitate long to buy it.

The book’s odd chapters guide the reader, step by step, chapter by chapter, towards an understanding and maybe even appreciation of the Riemann Hypothesis. The even chapters give biographical background information about the main actors in analytic number theory from its very beginning.

It starts out with a discussion of infinite series and their convergence using the example of the harmonic series and the Leaning Tower of Lire in the first chapter. The second chapter introduces the life and person of Bernhard Riemann, the namesake of the hypothesis.

Later biographical chapters cover Gauss, Euler (both chapter 4), Dirichlet (chapter 6), Dedekind, Chebyshev (chapter 8), Hadamard (chapter 10), Hilbert (chapter 12), Hardy, Littlewood and Landau (chapter 14) and many other great mathematicians working in analytic number theory in the nineteenth and twentieth century.

The mathematical chapters range from an introduction to logarithms, complex numbers to the prime number theorem. Chapter 15 introduces Big O notation and the Möbius $\mu$ function. I have mentioned this particular example to demonstrate that the author does not shy away from explaining advanced concepts.

I was particularly pleased by the visual presentation of the values of the zeta function. The author not only plots the values of the zeta function on a segment of the real line $\zeta(x), x \in \mathbb{R}$, but in chapter 13, the author also introduces the Argument Ant and the Value Ant, two imaginary ants that walk the complex plane (either the domain or the co-domain) and produce values of the zeta function (or in the case of the Value Ant primage values). Special pre-image values that map to purely real or purely imaginary values are then plotted to give an impression of the behavior of the zeta function. This latte technique was new to me and I found it quite insightful.