Тёмный
Christopher Okhravi
Christopher Okhravi
Christopher Okhravi
Подписаться
Programming Lectures + Book Reviews | PhD, University Lecturer.

❤️ Patreon Community
www.patreon.com/christopherokhravi

Note: Many links on my RU-vid channel are affiliate links. Purchasing something via these links has no additional cost for you but gives me a commission.

Liskov Substitution Principle
20:16
2 месяца назад
8 Wastes of Lean (for Software Developers)
10:54
2 месяца назад
7 Tips to Grow as a Developer
7:25
3 месяца назад
3 Reasons WHY Waterfall Doesn't Work
11:30
3 месяца назад
They Knew Waterfall Didn't Work
6:36
3 месяца назад
Always Use Interfaces
8:08
3 месяца назад
Covariance and Contravariance
13:31
3 месяца назад
3 Ideas on Refactoring by Martin Fowler
5:50
4 месяца назад
The Square-Rectangle Problem
9:59
4 месяца назад
The Only Time You Should Use Polymorphism
13:55
4 месяца назад
My Vim Setup #1 (Job Control)
43:27
5 лет назад
Vue.js - The Hard Way (Ep16)
1:00:12
5 лет назад
Vue.js - The Hard Way (Ep15)
51:46
5 лет назад
Vue.js - The Hard Way (Ep14)
34:00
5 лет назад
Vue.js - The Hard Way (Ep13)
41:29
5 лет назад
Комментарии
@bossmusa9075
@bossmusa9075 8 часов назад
Thank you very much
@sekirox4144
@sekirox4144 9 часов назад
great content bro
@Leyendas-Pequenas
@Leyendas-Pequenas 11 часов назад
why are some popular youtubers so against oop and design patterns?
@galanoth17
@galanoth17 18 часов назад
Nothing better than learning OOPS from Luigi
@javadmahdioun4283
@javadmahdioun4283 День назад
مثل همیشه عالی توضیح دادی، دمت گرم کریستوفر👍
@barisaxo
@barisaxo День назад
Where can one submit corrections for the book (I found a typo)
@ChristopherOkhravi
@ChristopherOkhravi День назад
Thank you very much! 😊🙏 author@theobjectorientedway.com
@chris407x
@chris407x 2 дня назад
Great explanation (around 4 minutes in) about how static typing makes conditional statements unnecessary. I have been doing this for a while, but this is a clear explanation of why it works.
@YarPirates-vy7iv
@YarPirates-vy7iv 2 дня назад
You, sir, give the noble fields of duckology and duckometry a bad name. You've offended every amateur duck enthusiast and, dare I say, even fans of the duck billed platypus. Shame! Edit: Just kidding. Great video. Nobody knows where wild ducks live. 🦆🦆 🦢
@BigBeesNase
@BigBeesNase 2 дня назад
that's a big buuutttt.. right there 😂
@dannyschot3841
@dannyschot3841 2 дня назад
If I buy that (e)book, do I get it later the original printed book?
@VCR47527
@VCR47527 2 дня назад
Lol type guards in typescript encouraging bad behavior
@Max-zn7md
@Max-zn7md 3 дня назад
A video talking about dependency injection (object composition, dependencies lifetime, interception and di containers) would be very cool
@SemyonKalyakulin
@SemyonKalyakulin 3 дня назад
man I love you!
@silberwolfSR71
@silberwolfSR71 3 дня назад
A powerful approach (that I've also seen you take several times in your videos) is to start with a problem. Present a scenario we want to model, implement it naively, then explore shortcomings of said naive solution. _Then_ you can swoop in with the fancy pattern/guideline/principle and show how it saves the day. You've got justification, intended use case(s) and deeper understanding all in one neat package. For bonus points, also explore the limitations/tradeoffs inherent to the "better way" for a more well-rounded engagement with the topic.
@TimVannuffelen
@TimVannuffelen 4 дня назад
I'm really liking your take on these OOP concepts. Even after studying computer science at university in the early 2000s, reading dozens of books on the subject of object oriented programming and design and being a professional software developer since 2007, I find your approach on the subject very refreshing and interesting. Bought the book : )
@RagingMonkee
@RagingMonkee 4 дня назад
This is good theory, and in isolation with simple projects, it seems sound. However, I'd mention it's not always practical. In real world situations, the problems are more complex and ALWAYS evolving. While an object's behaviors may only have data changes now, in the next iteration or in a few months it could take on all kinds of new behaviors. You could argue that these behaviors should be broken up under separate interfaces and maybe handled by different classes, but these things all add complexity and take time to correct. When you're not working in isolation and your team has engineers with varying skills and abilities you can't ignore KISS. Sometimes it's just easier to subtype and build, even if it is just a data change. I'd say it's always better to use your judgement and NOT be overly dogmatic about it. Overall very interesting video 👍
@spounka
@spounka 4 дня назад
again you strike when I needed I would like to ask you. I'm working on a side project in python, the project is meant for me to have fun and mostly learn more about architecture and complex case handling I have a case where my project has to modes, one is mostly "standalone" and the other is a bit more complex, the second mode is more or less the first one with more functionality / steps So, I thought i'd extract the general use with a protocol (interface) with one method called execute, both modes implementing it and such However, I still have to do a runtime test of (if mode == "standalone" elif mode == "workspace") and creating the types based on that My question would be: Is there a way, no matter how magical or simple or complex, to eliminate the check?
@amplifiedge
@amplifiedge 4 дня назад
Thank you!
@greob
@greob 4 дня назад
Great video! Please deep dive into the following points: 1. 2. 3. 4. 5. 6. 7. 8. 9. 😊 Thanks for sharing!
@hasithapriyasad
@hasithapriyasad 5 дней назад
deep dive please
@allegro3785
@allegro3785 5 дней назад
Gdzie ty byłeś całe moje studenckie życie? Pozdrawiam z Polski. :)
@GooogleGoglee
@GooogleGoglee 5 дней назад
Beautiful book! I purchased it. Hope will get better and better once completed
@ChristopherOkhravi
@ChristopherOkhravi 4 дня назад
Thank you very much. I will make sure of it. 😊🙏
@jamesrogers2680
@jamesrogers2680 5 дней назад
Always happy to see a new video from you. Book purchased!
@ChristopherOkhravi
@ChristopherOkhravi 4 дня назад
Thank you very much! 😊🙏
@ramongus1996
@ramongus1996 5 дней назад
I would love to deep dive into point 5. Replace conditional with polymorphism. Great video, thanks!
@jrgalyen
@jrgalyen 5 дней назад
Not everything should be an object. Lots of professors get this wrong. Even Alan Kay himself came to this wrong conclusion file -> namespace(s)/static class(es) { 1. data/state - OOP, DRY Principle 2. external resources - Actor Model, 1-layer abstraction 3. behavior/micro-workflows - pure function like (can take external resources in parameters), FP } // Workflows inside. This is a node of a larger workflow - part of a walking skeleton OOP - data FP - behaviors Actor Model - external resource Give this a try And there are sub-categories in 1, 2, 3. Like algorithms are fully pure functions (unless it is better that they are not) UI Models could wrap data or state models, returning pretty results
@jrgalyen
@jrgalyen 5 дней назад
And why does this pattern work? From the domain 1. db are domain collectors 2. external resources is how we interact with the domain 3. stories capture actionable workflows in the domain OOP & Dry Principle is perfect for data. As data points thrive on a single source of truth Behaviors are best duplicated when they are used for different purposes. So we don’t have a single point of failure If data driving two unrelated behaviors looks the same, that data should be duplicated and named appropriately too. Different data points By thrive, I don’t mean this is always the case. But generally it is From a computer perspective: 1. Heap - data is large and belongs here 2. interrupts, keyboard & mouse, screen, http, etc… 3. Stack - small and streamlined. Extremely fast. Pointers to the heap We are aligning our code to the domain AND our computer architecture. Which that architecture is partly thanks to Alan Kay! And his work on storing bootloader, heap, and stack seperatly
@ApprendreSansNecessite
@ApprendreSansNecessite 5 дней назад
Videos like this are invaluable. Concerning type testing, I still believe there is a case for subtyping even when you have pattern matching and exhaustive switch statements (I count implementing traits or protocols/interfaces as subtyping): You need to define whether it is more likely to have an explosion of cases or an explosion of decisions. With subtyping, every time you add a decision, you need to implement a new method for every subtype; With conditionals, every time you add a type, you need to add a new case for every decision you make. It is a trade off. Concerning class hierarchies and multi-level inheritance, the best example I have in mind is biology. Every developer has heard the analogy of animals, mammals, etc. (which is truly terrible, it should disappear from books and tutorials). Biologists and palaeontologists literally break the tree of life every Tuesday! Classifications are arbitrary and, like analogies, they tend to break when you include more cases or more details. When building any kind of hierarchy, it should be expected that it is going to change. And changing class hierarchies is not a trivial refactor.
@EW-mb1ih
@EW-mb1ih 5 дней назад
great
@BlindVirtuoso
@BlindVirtuoso 5 дней назад
Great!
@milanfanas
@milanfanas 5 дней назад
Everything sounds fine, but without clear practical examples it is foggy and will not stick into anyone's mind
@ChristopherOkhravi
@ChristopherOkhravi 5 дней назад
Noted. Will give examples in the future. Thank you for watching and for giving feedback 😊
@FlaviusAspra
@FlaviusAspra 5 дней назад
I want to get notified when the book is finished, not to buy it unfinished.
@ChristopherOkhravi
@ChristopherOkhravi 5 дней назад
I will make sure to notify when it is completed. Thanks for the feedback and for watching 😊🙏
@gregbell2117
@gregbell2117 5 дней назад
I've haven't heard of, nor do I understand, that reason for Dependency Injection. I use it all the time, but mostly for testing and separation of concerns.
@dominikvonlavante6113
@dominikvonlavante6113 5 дней назад
You don't use loggers, or DBs, or Message Systems?
@chudchadanstud
@chudchadanstud 5 дней назад
You been to go for the no bs mentality. You need to hold customers accountable. If they don't want to plan with you then what's the point? Write code to get the job done, refactor or rewrite when needed. It's how every company has done it. There is no perfect code, there is no perfect solution. All ideas/theories/design patterns live in lala land and quickly fall apart as soon as the meet reality. Most of your errors will be logical errors, which can be solved by discussing things with your customers.
@culestjay
@culestjay 5 дней назад
What happened to your voice?
@justine_chang39
@justine_chang39 5 дней назад
this video is SO good.
@Wildstraw
@Wildstraw 5 дней назад
you are brown
@snail8720
@snail8720 5 дней назад
I think one of the bigger issues is that it's difficult to teach people when to use which pattern at the right time. Oftentimes we teach by simply giving a problem for which the solution could benefit from some pattern. Certain patterns only become apparently useful when you have some new requirement to deal with. Most problems don't involve any new requirements at all
@sniperated
@sniperated 5 дней назад
This is gold, but I hope this is the first of many videos. To me, the best way of learning something is to understand the reason why it is like that. I always fought against the "it is like that, take it as it is" approach during my university studies. And everybody is learning like this, just memorizing without asking "ok, but why". As a .net developer it was hard to understand why we had webforms, why do we have http, what's soap and why everybody despise it. Luckily there are a couple of videos on .net evolution that answered many of these questions. After years of studying math, I had the chance to attend to a "math's history" course. It was so satisfying to learn how we slowly figured how to solve equations, why we write x^2 and so on
@TomislavKimovski
@TomislavKimovski 5 дней назад
Don't make another mistake in your teaching - provide code examples for all of these cases. Apart from that, you're brilliant, thank you.
@ChristopherOkhravi
@ChristopherOkhravi 5 дней назад
Thank you for the feedback. Noted. Will do. 😊🙏
@johnekare8376
@johnekare8376 5 дней назад
Great video, as always! I would love a deep dive on each of these - got the book now, but I really like the video format, and you are an excellent communicator.
@Cempa666
@Cempa666 5 дней назад
Static typing is not superior to dynamic typing, it’s just different. Both are great and fun to work with but in different ways. Static typing should not reduce the amount of automated tests written. If it does you are writing too many or wrong kind of tests.
@MrAbhinavbaijal
@MrAbhinavbaijal 5 дней назад
Awesome, as always. Keep up the good work. And thank you !
@nasimnajand9697
@nasimnajand9697 5 дней назад
I wish I could read your book and learn from it but in Iran we cannot purchase. but I learn from your awesome videos and I'm grateful for this ❤
@susseduud
@susseduud 5 дней назад
Like I feel you've alluded to: all roads lead towards FP. I have a background and interests more in FP, procedural, and "make it impossible, not testable" types of software. I wanted to drop in and say that as much as I value the OOP-centric videos and concepts (I love your academic and thorough approach in your videos), it can sometimes be challenging to convert the OOP way of thinking to a "general", non OOP, way of thinking. Despite enjoying this challenge, I would love to hear more ideas and concepts that apply more to procedural world of code. Anyway, thank you for making these videos. I watch all of them and appreciate how they encourage critical thinking.
@Goten2321
@Goten2321 5 дней назад
Not that I completely disagree, but I dont see how he has alluded to that.
@susseduud
@susseduud 5 дней назад
@@Goten2321 on his book's website atleast.
@susseduud
@susseduud 5 дней назад
​@@Goten2321 I based that comment on how he articulates his new OOP book. For example on the books website there is a clause "the search for the object oriented way seems to be a path that leads to functional programming" :D
@IgnacioTaranto
@IgnacioTaranto 5 дней назад
I'd like to know your opinion on languages that don't have inheritance but do have interfaces, like Go or Rust. Also, I like a feature Go has called embedding, which is like inheritance but without the sub-type relationship.
@dupindersingh1599
@dupindersingh1599 5 дней назад
You are my role model, I was always searching for someone who can guide, and seems like the search is over now :) Thank you for such good content.
@abacaabaca8131
@abacaabaca8131 5 дней назад
How do you abstract away the implementation of multiple user inputs in which the order of that user input is significant so that the output is different if the order is changed. For example if the user presses b first then a is not the same as pressing a first before b.
@ChristopherOkhravi
@ChristopherOkhravi 5 дней назад
Thanks for asking 😊🙏 If you don’t have too many patterns to match you might want to have a look at the State pattern. Otherwise Interpreter or Decorator might be helpful.
@xkxkxxkxkx5165
@xkxkxxkxkx5165 5 дней назад
Man... you're amazing
@xkxkxxkxkx5165
@xkxkxxkxkx5165 5 дней назад
Amazing series man! Thank you for the work! <3
@stomic50
@stomic50 5 дней назад
That shirt and mustache, like a comedy version of Saddam Hussein. 😂 Keep going, the videos are gold.
@ChristopherOkhravi
@ChristopherOkhravi 5 дней назад
🤣🤣