Awesome book on kotlin design patterns

I was recently given the opportunity to review Kotlin Design Patterns and Best Practices – Third Edition for free and thought I’d post my thoughts. (Here’s the original post https://www.reddit.com/r/Kotlin/s/pd2CPE66hK)

Disclaimer: I received a review copy of this book for free.

TLDR: This is a great book that covers both what makes Kotlin cool, and how to create succinct, maintainable code that utilizes all of Kotlin’s features. It explains things well and contains great information. I would highly recommend this book to people who already know a bit about programming and are looking to create better code and possibly learn the awesome language that is Kotlin.

Throughout this book, I have greatly increased my knowledge of both Kotlin and design patterns. I am currently a junior at the University of Utah studying computer science, so I have experience working with code. I have never studied traditional design patterns, however, so this book was a great resource for me in expanding my toolset for creating maintainable and readable code. Everything in this book was taught succinctly yet was very understandable, containing ample examples of the ideas presented. It not only covers the traditional design patterns outlined by the gang of four but also digs into the wonders of functional programming. Most of my schooling has been on object-oriented programming, yet I have always been curious about functional programming. This book has scratched that itch, teaching you the incredible benefits of functional programming and its implementation, as well as the pros and cons of the method. It bridges the divide between object-oriented and functional design patterns incredibly well, something that is often missed by functional evangelists.

This book is also a great resource in learning kotlin itself. The book guides you through the syntax and features of kotlin throughout the entire book, showing how kotlin lends itself well to many different design patterns. It emphasizes Kotlin’s multi-paradigm nature and shows off both its object-oriented and functional prowess. It discusses awesome features like scoping functions, extension functions, functions as first class objects, and many other features. This book not only serves as a great resource on design patterns, but also a manual on how to use kotlin effectively that blows the kotlin documentation out of the water. Throughout its 12 chapters it manages to teach you everything you need to know about the language. This emphasis on kotlin does not detract from the teaching of design patterns, however, but instead allows practical examples of each pattern to be shown. It provides you with a basis to explore and explain complex design patterns in an obtainable way.

The book in places does seem to gloss over some topics that would be foreign to complete programming beginners, so I think that you should not get this book if you have not had any experience programming in Kotlin or another language. It assumes that you already know the basics of programming, like classes, functions, inheritance, variable scope, etc. It is designed as a resource for writing better code, not learning how to code.

The 414 pages of this book took me about 3 full days to read, but never became a slog. The book continuously throws interesting topics at you but never stays on one for longer than it needs to. I almost never can read textbooks, but this one managed to keep my attention like no other.

In conclusion, I would highly recommend this book to anyone who wants to learn about creating maintainable and readable code while also exploring the awesome language that is Kotlin.

submitted by /u/copperly123
[link] [comments]