Prime Reacts: The Flaws of Inheritance

preview_player
Показать описание
Recorded live on twitch, GET IN

author: @CodeAesthetic

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord
Рекомендации по теме
Комментарии
Автор

I love how CodeAesethic just came from nowhere, proceeded to release some bangers and now is easily one of my top 3 fav programming youtube channels lol

intifadayuri
Автор

I like Jonathan Blow's take on design paradigms: " The benefits are obvious because the thing got proposed because of its benefits and you'll hear about the benefits. The cost tend to be subtle and/or swept under the rug by the people that want to sell you on the benefits." - 'Jonathan Blow on unit testing and TDD' (7:25)

alfred
Автор

Inheritance only works on paper because it forces you to go backwards.

Programming tends to happen bottom-up, you start with some core functionalities, and write more and more stuff on top. OOP requires you to work top-down, which necessitates knowledge of the full problem upfront. That’s why it works on paper (small exercises) but fails on the true stuff.

I’m not sure if you can build inheritance to work the other way round, but it’s clear Rusts traits are much closer to this, that’s why they feel nicer.

theondono
Автор

i'm a fan of that channel, the way he explains is quite like he's the 3blue1brown of programming.

mmzzzmeemee
Автор

I definitely agree with that whole "when you're shown this it makes perfect sense". Like the idea of inheritance is smart, and practical, and obviously a decent way to do it.

Then you see a codebase that actually uses it and it's such a complete cluster fuck and it's so hard to keep track of what anything is supposed to be.

thekwoka
Автор

I love how Prime calls out CodeAesthetics for the next line curly braces and then rhetorically asks whether it's C# because C# standards infamously use next line curly braces. Then I double check the code and realize that it is actually C# code.

IanRiley
Автор

LMAO the curly brace thing at the beginning, finally someone else who HATES newline braces

name_cpp
Автор

Inheritance has its place. It can definitely get out of hand. Composition has its issues, but he made the point that some of those issues might be due to putting too many responsibilities on the composes objects. Some of the issues with inheritance can surely be traced to the same.

TehKarmalizer
Автор

Holy moley I think it's been at least 10 years since I've heard anyone bring up Microsoft XNA.

sadboisibit
Автор

The file savers should really just be functions that take some sort of writable object, an image, and options. There really doesn't need to be a class, since that just creates an unnecessary alias to the image and options.

jaysistar
Автор

"Avoid protected member variables with direct access" - when I was learning Android Development in Java, this KILLED my motivation entirely when trying to reason with the code, some view operations intensively use protected members from the parent class and I kept asking myself where those members were coming from...

thfsilvab
Автор

Who needs inheritance when you have enums and traits?

tokiomutex
Автор

Anyone that doesn't appreciate the proper style of curly braces on their own line is not my programmer.

multiHappyHacker
Автор

The video doesn't present a problem with inheritance. If anything, all it does is reveal the necessary foresight and experience required to construct a feature-rich, well-designed API. It just so happens that the lack of such things are naturally inherent in humans, and this by default.

Also, inheriting from an interface *is* inheritance.

YourComputer
Автор

I know it's an old video but I'm so glad I found this channel. Youtube addiction is my greatest struggle as a junior dev that just has been coasting in his work. I know this channel is primarily entertainment but replacing some of the political trash that I normally binge with your content is starting to improve my mindset and problem solving skills and I'm noticing improvement and growing competence at work as a full stack dev.

Coming from a game dev degree that I'm sometimes not proud of you're really helping me fill gaps in my knowledge base that I missed in my formal education. That said I'm happy I went to college for game dev, got me into coding and even if I was disillusioned by the industry during salary negotiation it got me started down this path and it's something I'll never take back.

loganrogers
Автор

Never heard of the triple method but thinking back, its seems to be categorically true in my experience.
I've seen lots of new products fail after months of effort because we didn't know all the things we learned in the first attempt but the 2nd pass usually ends up shipping and doing well. Whenever I've worked on proprietary framework level things it does seem like it takes at least two but often three passes for it to be fully baked and desirable to the org.

sfulibarri
Автор

I use both new line and same line curly braces at work depending on the language and their relative best practices, so yeah you don't die from it

nonnodacciaio
Автор

I like your point at 10:00.
First build is discovering what you don't know.
Second build is learning the things you didn't know.
Third build is starting from the beginning with full knowledge.

jonny
Автор

I quite like these 2nd channel videos. The volume of clips and more of a focus on Actual Programming concepts, rather than the 'hot-takes' to just drive engagement like the main channel. I like seeing the M who just likes to help people get better.

oliverdenton
Автор

dependency injection was our bread and butter in high school robotics. We split the robot into subsystems and everything would be injected into relavent methods and classes. Was a massive pain

NithinJune