A Review of Data-Oriented Programming by Yehonathan Sharvit

Aneesha Bakharia
2 min readApr 4, 2021
Data Oriented Programming — Cover Image

Object-oriented programming is too complex but what are the alternatives? Yehonathan Sharvit makes the case for data oriented programming and completely succeeds by introducing and building on the following three fundamental principles: Separate code from data; Represent data with generic data structures; and enforce data immutability.

The book is well written with a dialogic writing style, includes many code examples, and mind-maps to highlight key points. I applaud the author for using Javascript in the examples as it is easy to understand and as a result makes the book accessible to a broad range of programmers with experience in a variety of languages.

A key strength of the book is that each fundamental principle is introduced generally and then further explored in detail within subsequent chapters. I particularly enjoyed reading the chapter where a library system is designed using object-oriented programming and then the complexity is completely tamed using data oriented programming. The explanations are not overtly lengthy and terse either — these complex explanations are made simple using a conversational writing style with dialog between an OO practitioner and a data oriented programming expert.

In all honestly, I’ve always had little understanding of why immutability is required, only really understanding the React update lifecycle requirement. The book has given me a clear understanding of how immutable data structures ensure data safety and also that lodash includes many useful methods to add immutability to Javascript. The book has convinced me to dig deeper into libraries such as lodash and Ramda. I’ve also always thought that data serialisation from objects was very tedious and it was reassuring to read that the process described as a “nightmare”.

It is not often that a programming book attempts and succeeds at changing the mindset from a traditional development paradigm! Data Oriented Programming published by Manning is one such book and I highly recommend it for both beginner and experienced programmers. My advice to any programmer: “Take a weekend and read this book. It will change how you approach programming”.

Note:
Many thanks to Yehonathan Sharvit for seeking out a review from a female programmer.

--

--

Aneesha Bakharia

Data Science, Topic Modelling, Deep Learning, Algorithm Usability and Interpretation, Learning Analytics, Electronics — Brisbane, Australia