Books I read in 2020


Here are the three technical books I read in 2020.

Functional Programming in C#

Nowadays I’ve been coding in C# at my current job. The experience has been pretty good so far. I have done a lot of Python in the past. C# is a statically-typed programming language which is in contrast to Python’s dynamically-typed nature. I found static typing of C# pretty nice. Refactoring class names and function signatures are a lot safer using an IDE with a guarantee by the compiler. I also find myself using LINQ’s IEnumerable extension methods a lot whenever I need Python’s expressiveness.

C# is mostly an object-oriented programming language. In recent years functional programming paradigm has been gaining popularity among many programming communities. I wanted to learn the functional programming techniques and apply them at my current job. The book introduces some of the best functional programming concepts. The edition I have at the time of this writing is the first edition and the code examples are in C# 7. It’s a dense technical book and it took me over a couple of months to get through the book and digest all the ideas and the code examples.

Architecture Patterns with Python

A few years ago, I read TDD in Python book written by the same author. That book had served me well with me doing TDD in Django. I learned several techniques with writing unit tests and how to use mock library. When this new book came out I had to read it. The online version of the book is available for free. Yet, I purchased the book from the publisher’s website to help support the authors.

I haven’t been writing that much Python lately. But I have worked on large Python code bases in my previous jobs that I am aware of how they could become hard to maintain over time. In my experience, my Pythonistas co-workers tend to be apprehensive towards big design up front. In fact they tend to frown upon attempts to do any sort of design in the name of saying “We don’t do Java in Python”. This attitude serves well in small to medium size projects. However the bigger projects tend to accumulate complexity. As a result they become this unmaintainable ‘big ball of mud’ mentioned in the book. The book shows several techniques to help ease these messy situations.

As the book title suggests the patterns are architural patterns and not to be confused with Gang of Four design patterns. Here are a few of the patterns and the components the book talk about - unit of work pattern, CQRS, DDD bounded context, event driven pattern.

What I also like about the book is that it is pretty honest about the tradeoffs of said patterns. At the end of each chapter it has a section that talks about pros and cons of the pattern in the chapter. The code examples in the book use Flask framework in an e-commerce setting. It has an appendix on how to adapt UoW pattern for Django models.

Growing object oriented software guided by tests

Many years ago I have heard about the book on Ruby Rogues podcast in one of their book club episodes. I bought the book since then and it has been sitting on my book case collecting dust. It’s one of the must-read program design and testing books on my list. The book examples are in Java and I have been away from Java for a long time.

At my current job, I do a lot of test automation so I decided to read through it. The code examples implement an auction sniper GUI app. They use Swing for the GUI and JUnit for testing. The book is also good if you want to learn TDD, but it goes beyond TDD and more applicable to a general program design in a complex, real-world application. For me, the nuggets of wisdom the book has along the chapters are real gold. Part 4 and Part 5 of the book discuss some advanced topics on testing. Their advice on writing maintainable test code and testing asynchronous code is spot on and I learned a lot from those chapters.