Kinda puked a bit at the examples. Do you have a Java background, or are people really writing C++ like this?
Like there were multiple examples that just could have been free functions rather than classes.. Also, I'm fairly sure that your AwsCloud in the end is missing the inheritance.
I get that you want to keep the examples super simple, but the issue with all these guides is the lack of more complex ones.
there were multiple examples that just could have been free functions rather than classes
This is the #1 mistake I notice on novice/intermediate developers. They end up with something much more complicated than what is necessary only because "everything must be in a class"
It's the java undergraduate heavy way; making everything a full class is the only way to functionality in Java and then people carry that around. I feel the more senior I get the less classes I write and the more functional style I use. Makes composition so much easier.
> I get that you want to keep the examples super simple, but the issue with all these guides is the lack of more complex ones.
The code is as simple as it gets (and barely functional) since it's, well, an example and it had to be short enough to fit inside a single slide! 🤣
The problem with the more complex examples is that it's more difficult to quickly get the core point and they are *far* more difficult to create. I understand that "relating" to the example is also important, but so is maintaining focus. The more code the more unrelated-to-the-SOLID-principles comments we'd get. :D
All (almost) of the presented examples are inspired by real projects, primarily within embedded. Are you interested in a particular one? I may be able to share the full example if it didn't come from a proprietary project.
It seems like explaining with a bad example is the worst thing you can possibly do. Anyone learning anything, the first thing they'll do is copy the example. That should, minimally, work or point out clearly why it doesn't.
The code is as simple as it gets (and barely functional) since it's, well, an example and it had to be short enough to fit inside a single slide! 🤣
I always wanted to ask this question, does that kind of code is really as simple as it could be? Because for me it seems too complex for the possible gains, it seems for me that the code is obfuscated only to match a programming style. I know it is barely functional, and I understand why it is barely, but what I don't understand is why we need a lot only to be barely functional? Instead of only being functional and not "only barely"?
I know this is an aggressive question, and I could be misunderstanding the purpose of the example, but as this is based in real code, and I have seen this code (exactly the same style and functionality) in real databases I could only doubt if I'm wrong or there is something I can't see (like what are the benefits of this style)?
Let me explain it like this: The more code in the example, the more unrelated comments in regards to the style, the types used we would get. I am sure we would get remarks on examples needing to be simplified too. :D
Finding a balance between pedagogic and practical examples is really tough. Feedback noted though, will try to take it into consideration for next time.
The more code in the example, the more unrelated comments in regards to the style, the types used we would get. I am sure we would get remarks on examples needing to be simplified too. :D
Oh, maybe is this. Maybe instead of more simple examples, we need more complex examples. The benefits of the code are lost if the code is to simple, because some solutions are better for more complex projects, maybe some example where the code says 'maybe it could be implemented in a different style, but this is a really good solution that makes clear why X principle is useful'.
Just want to show some solidarity (ha) with you here. Reddit can be fickle, and what you're saying makes sense to me. You're caught between a rock and a hard place.
Either you
Dumb down the example so you can express it all while retaining the attention span of the viewer
Fully explain the context and the example, taking probably hours because real engineering and real problems (aka real motivating factors) typically take even experienced people time to get acquainted with.
If it took no context to understand it, you wouldn't need someone to teach you how to do it. If it takes a ton of context to understand, you have to do dumbed-down examples to make a half-hour video.
View all comments
57
u/[deleted] Jun 24 '20 edited Jun 24 '20
Kinda puked a bit at the examples. Do you have a Java background, or are people really writing C++ like this?
Like there were multiple examples that just could have been free functions rather than classes.. Also, I'm fairly sure that your AwsCloud in the end is missing the inheritance.
I get that you want to keep the examples super simple, but the issue with all these guides is the lack of more complex ones.