It's something I see very often in my research. I will read through many books, online articles, and code repositories as I strive to learn about a software design pattern, (e.g., Domain Driven Design, Microservices, CQRS). I'm always met with the same dilemma: "This code has been simplified for demonstration purposes. You shouldn't use this in your production environment."
sigh
I'm not the type that learns from just reading a book. I need to be able to see code. I need to be able to step through code to understand what it's doing. I most certainly want to see what people consider production-worthy code when they write up these things. Instead, I spend even more time researching. I recently read through a long book on CQRS (Command Query Responsibility Segregation) and often times, people like to tie that in with Event Sourcing. I was not surprised that the code I was reading throughout the book isn't something that I should use in production. Particularly, the code for Event Sourcing. It's easy to understand why. Event Sourcing uses a series of events to bring the current state of an object. You want this to be accurate and efficient.
Anyway, do the rest of you come up on this problem often? What do you do to overcome it?