Codetutor
Codetutor
  • 363
  • 3 042 857
Liskov Substitution Principle decluttered | LSP violations | SOLID Principles - Part 3
In this video, we explore the Liskov Substitution Principle (LSP), the third principle in the SOLID series. We start by defining LSP and understanding its significance in software design. Through detailed examples, we illustrate how violating LSP can lead to hard-to-track bugs and unexpected behavior. Examples include issues with class hierarchies like Rectangle and Square, Bird and Ostrich, and Car and Electric Car. We also delve into an Android-specific scenario with view models, highlighting how improper inheritance can cause application crashes. By the end of the video, you’ll grasp the importance of designing class hierarchies that ensure subclasses can replace superclasses without affecting program correctness.
#SOLIDPrinciples #LiskovSubstitutionPrinciple #LSP #SoftwareDesign #ObjectOrientedProgramming #OOP #ProgrammingTutorial #CodingBestPractices #Inheritance #ClassHierarchy #Kotlin #SoftwareEngineering #BugFixing #CodeQuality #AndroidStudio #MobileDevelopment #ViewModel
Follow me on Twitter: anilvdeshpande
Chapters
0:00 - Introduction to SOLID Principles
0:36 - What is Liskov Substitution Principle?
1:39 - Understanding LSP with Rectangle and Square
4:05 - Example: Bird and Ostrich
5:22 - Example: Car and Electric Car
7:13 - Android-Specific Example
9:20 - Consequences of Violating LSP
10:09 - Conclusion and Next Steps
zhlédnutí: 0

Video

Machine learning decluttered | Un /Semi /Re-Enforced/Supervised Learning - AI Orientation - Part 3
zhlédnutí 182Před 9 hodinami
In this video, we dive deeper into the world of machine learning, building on the foundational concepts previously discussed. We explore the four main types of machine learning: supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning. Each type is explained in detail, with practical examples such as stock price prediction, customer segmentation, fraud de...
SOLID Principles | Breaking down Open & Closed Principle | OCP | - Part 2
zhlédnutí 155Před 14 hodinami
In this video, we dive into the second principle of SOLID: the Open/Closed Principle (OCP). We explore how software entities like classes, modules, and functions should be open for extension but closed for modification. Using examples like `NotificationService`, `PaymentProcessor`, and `FileReader`, we illustrate common pitfalls when this principle is not followed. We also discuss a real-life e...
SOLID Principles: The Beginning | Single Responsibility Principle | RSP - 1
zhlédnutí 278Před dnem
In this tutorial, we explore how to identify and avoid bad coding practices by understanding common pitfalls in code design. We start by examining examples of inflexible, non-reusable, and untestable code, such as `EmailService`, `NotificationService`, `Logger`, and `UserService`. These examples highlight issues like tight coupling and poor maintainability. The video introduces the SOLID princi...
LLM Ollama based CodeTutorGPT running on local Machine | Special Edition
zhlédnutí 227Před dnem
In this special edition video, we have a new tool that I have developed using the LLM RAG model. This explains the concept of Retrieval Augmented Generation (RAG) and showcases how we consolidated metadata from our 350 CZcams videos into a knowledge base for a locally running LLM. By using this tool, we quickly finds links to specific videos on topics like Jetpack Compose, ViewModel, and Swift ...
Room DataBase @Update and @Query method | RoomDatabase Finale : Android Room Database - 9
zhlédnutí 135Před 14 dny
Welcome to the final video in our Room Database series! In this tutorial, we complete the implementation of the update functionality. We begin with the DAO, move to the repository, then to the ViewModel, and finally integrate it into the composable. We'll cover how to write a suspend function for updating the country, handle custom queries, and update the repository. Learn how to maintain the m...
Fix for faulty delete in Room DB | Dynamic LazyColumn trick : Android Room Database - 8
zhlédnutí 132Před 14 dny
In this video, we dive into the implementation of delete functionality using the Room Database in Android. We start by creating a suspend function in the DAO (Data Access Object) to handle deletions, which then gets called in the repository and later in the ViewModel. However, we notice the delete function isn't working as intended due to issues with our LazyColumn configuration. To debug, we l...
Android MVVM Compatible Delete operation | Debug database from device: Android Room Database - 7
zhlédnutí 128Před 21 dnem
In this video, we delve deeper into the Room Database implementation for Android. We start by recapping the functionalities implemented in the previous video, including fetchAndInsertAll and getAllCountries in the CountryRepository and CountryViewModel. We then tackle a common issue: multiple countries being replaced due to the primary key ID being initialized to zero. By setting the ID to null...
Insert, Select with Room Database (MVVM Compatible) : Android Room Database - 6
zhlédnutí 214Před 21 dnem
In this video, we dive into the implementation of Room Database in an Android application. In the previous video we have setup two essential methods: FetchAndInsertAll and GetAllCountries. We then connect the remaining code to load and display countries on the screen. Next, we implement the ViewModel and composable components, ensuring seamless integration with the repository. The video covers ...
Repository Design Pattern for Room | Why & How : Android Room Database - Part 5
zhlédnutí 244Před měsícem
Welcome to another tutorial on Room Database! In this video, we dive deep into implementing a repository for Room Database in Android. We'll start by clarifying the interaction between the repository and the Data Access Object (DAO), and why repositories are crucial for better separation of concerns and centralized data control. We also cover the basic structure of a repository implementation, ...
Configuring RoomDatabase: Android Room Database - Part 4
zhlédnutí 176Před měsícem
Welcome back to our tutorial series on Room Database in Android! In this video, we dive into setting up a Room database to manage our database operations efficiently. We'll cover the essential steps to define your database structure, ensure proper data conversion between JSON and SQLite, and implement CRUD operations through the DAO. Join us as we walk you through the process of creating an abs...
Setting up DAO for CRUD operations: Android Room Database [Kotlin] - Part 3
zhlédnutí 181Před měsícem
Welcome to our latest video where we dive deep into the functionalities of the Room Library, focusing on the crucial component of Data Access Objects (DAOs). Whether you're a beginner or an experienced developer, this tutorial will enhance your understanding of how to efficiently manage database operations like select, insert, delete, and update within your Android applications. In this session...
Setting up Entity aka database table: Android Room Database [Kotlin] - Part 2
zhlédnutí 284Před měsícem
Dive deep into the world of Android Room Persistence Library with our latest tutorial! This video offers a comprehensive guide, moving beyond basic introductions to focus on the fundamental component of Room: the Entity. Learn how to set up your Room environment from scratch, beginning with the essential dependencies needed to get started. We'll explain how Room uses annotations with classes to...
How machines learn | Tenets of Machine Learning: AI Orientation - Part 2
zhlédnutí 150Před měsícem
Welcome to our AI series! In today's video, we dive into the transition from classical AI to machine learning, highlighting the shift from manually coded programs to systems that learn independently. We explore the core concept of machine learning, emphasizing the importance of systems that can learn from data, akin to human learning processes. Understanding human learning is crucial, as it inv...
An Introduction to Room Database - Part 1
zhlédnutí 472Před měsícem
Join us as we dive deep into an exciting Android development tutorial where we revisit a previously implemented application using Jetpack Compose. In this session, we'll enhance our app with advanced concepts like side effects, improving the initial architecture with an offline-first approach. Learn the intricacies of efficiently loading data, utilizing local databases, and making API calls. Di...
AI orientation, understanding AI landscape, Classical AI - Part 1
zhlédnutí 347Před měsícem
AI orientation, understanding AI landscape, Classical AI - Part 1
Demystifying produceState | SideEffects Finale : Android SideEffects | Jetpack Compose [Kotlin]- 46
zhlédnutí 224Před měsícem
Demystifying produceState | SideEffects Finale : Android SideEffects | Jetpack Compose [Kotlin]- 46
Mastering SideEffect and DisposableEffect: Android SideEffects | Jetpack Compose [Kotlin] - 45
zhlédnutí 275Před 2 měsíci
Mastering SideEffect and DisposableEffect: Android SideEffects | Jetpack Compose [Kotlin] - 45
Decluttering rememberUpdatedState : Android SideEffects | Jetpack Compose [Kotlin]- 44
zhlédnutí 270Před 2 měsíci
Decluttering rememberUpdatedState : Android SideEffects | Jetpack Compose [Kotlin]- 44
AI job market | Opportunities, Skillsets & Effort to master: Developer Insight - Edition 5
zhlédnutí 871Před 2 měsíci
AI job market | Opportunities, Skillsets & Effort to master: Developer Insight - Edition 5
LaunchedEffect in Composable | Side Effects - Android SideEffects | Jetpack Compose [Kotlin]- 43
zhlédnutí 410Před 2 měsíci
LaunchedEffect in Composable | Side Effects - Android SideEffects | Jetpack Compose [Kotlin]- 43
Using rememberCoroutineScope : Android SideEffects | Jetpack Compose [Kotlin] 42
zhlédnutí 364Před 2 měsíci
Using rememberCoroutineScope : Android SideEffects | Jetpack Compose [Kotlin] 42
Intro to SideEffects | derivedStateOf : Android SideEffects | Jetpack Compose [Kotlin] - 41
zhlédnutí 498Před 2 měsíci
Intro to SideEffects | derivedStateOf : Android SideEffects | Jetpack Compose [Kotlin] - 41
Dialog navigation with NavGraph : Jetpack Compose - 40
zhlédnutí 340Před 2 měsíci
Dialog navigation with NavGraph : Jetpack Compose - 40
Dialog and Navigation | An Introduction: Jetpack Compose - 39
zhlédnutí 278Před 2 měsíci
Dialog and Navigation | An Introduction: Jetpack Compose - 39
Shared ViewModel with Repository pattern | Navigation: Jetpack Compose - 38
zhlédnutí 498Před 3 měsíci
Shared ViewModel with Repository pattern | Navigation: Jetpack Compose - 38
Shared ViewModel for passing data: Jetpack Compose - 37
zhlédnutí 1,1KPřed 3 měsíci
Shared ViewModel for passing data: Jetpack Compose - 37
Navigting with data done right!! : Jetpack Compose - 36
zhlédnutí 383Před 3 měsíci
Navigting with data done right!! : Jetpack Compose - 36
Navigating with Kotlin Object | JSON De/Serialisation : Jetpack Compose - 35
zhlédnutí 701Před 3 měsíci
Navigating with Kotlin Object | JSON De/Serialisation : Jetpack Compose - 35
Passing data between screens | Navigation : Jetpack Compose - 34
zhlédnutí 1,3KPřed 3 měsíci
Passing data between screens | Navigation : Jetpack Compose - 34

Komentáře

  • @iftak01
    @iftak01 Před 2 dny

    Good and underrated! Like this New explanation

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před dnem

      hope you have subscribed and clicked on bell icon to get notified. we regularly upload two videos every week.

  • @iftak01
    @iftak01 Před 3 dny

    Really the best video for explaining this concept

  • @rahul_spawar
    @rahul_spawar Před 4 dny

    in the viewmodel example, I've seen in many code examples where we put uiState/uiLogic in viewmodel, infact the buisness logic goes in usecases uiLogic stays in viewmodel, isn't it? In your example how we could've managed the uiState by not voilating SOLID sir 🙇?

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před 3 dny

      You are right!! In the up coming video so this series, we will start exploring how to write code adhering to SOLID principles. There I will start going through you just commented about. Thanks for commenting.

  • @bewithshakir
    @bewithshakir Před 5 dny

    Nice one

  • @sethchhaihout6507
    @sethchhaihout6507 Před 5 dny

    The best explanation. Really excited for waiting next video

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před 5 dny

      Next video has dropped yesterday. Hope you have subscribed, so that you can get notified.

    • @sethchhaihout6507
      @sethchhaihout6507 Před 5 dny

      @@Codetutor-DemystifyCoding One thing, I would recommend is "It will be good if you show the way to fix bad code with practical." Thanks

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před 5 dny

      Thats exactly the plan. Once we understand how faulty code looks, we will start exploring how to fix those. Stay tuned.

  • @SRIKANTH-ls9bm
    @SRIKANTH-ls9bm Před 5 dny

    Best teacher..in online community

  • @gokulkrishnan6324
    @gokulkrishnan6324 Před 6 dny

    Really it's clear and easy to understand.

  • @vinayTshetty
    @vinayTshetty Před 6 dny

    Looking forward for upcoming videos. please provide update on this.

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před 6 dny

      The second video is also published - This is whole playlist - czcams.com/video/QtKw0mPfMy0/video.html Hope you have subscribed to get notified.

  • @jayfatiya9674
    @jayfatiya9674 Před 8 dny

    06:09 Liskov* Substitution Principle

  • @vinayTshetty
    @vinayTshetty Před 9 dny

    Awaiting for the remaining videos on AI

  • @bewithshakir
    @bewithshakir Před 9 dny

    very nice one.

  • @antonfedorich820
    @antonfedorich820 Před 10 dny

    😀As usual, your explanation with visualisation are the best. I use your videos to learn deeper about something in android!

  • @antoniofuller2331
    @antoniofuller2331 Před 10 dny

    I still don't know Kotlin lol

  • @antoniofuller2331
    @antoniofuller2331 Před 10 dny

    Clean code

  • @heshamabdo6024
    @heshamabdo6024 Před 11 dny

    Waiting for the next video

  • @ananthr3744
    @ananthr3744 Před 11 dny

    Hi Sir, could you please make one separate tutorial for this SOLID principle.

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před dnem

      this series is going zoo morph into a detailed overview of solid principles and then later how to consistently apply those principles.

  • @al-aminislam1493
    @al-aminislam1493 Před 11 dny

    Your tutorial are very informative but the sound quality and initial boosted sound not very good

  • @kentsolgule5362
    @kentsolgule5362 Před 12 dny

    Sounds interesting how to do the embedding!

  • @keshavmtech
    @keshavmtech Před 12 dny

    Very good effort Anil !!! Hope you will take it forward....wish you the very best.

  • @rocksolid111
    @rocksolid111 Před 12 dny

    Yes.

  • @muhannddh
    @muhannddh Před 13 dny

    Yes please 🙏 make that video.

  • @souvikdutta2459
    @souvikdutta2459 Před 13 dny

    Anil Sir Thank you for this video. Please share the technical details how you are adding the knowledge base to the model. Though it is terminal application, we can make web app using python also. We can enhance that.

  • @gerdsfargen6687
    @gerdsfargen6687 Před 14 dny

    I love Amil

  • @amin.eftekhari
    @amin.eftekhari Před 15 dny

    excellent, I am waiting for it. Please make a video for MVI Architecture in Android and discussing about advantages and disadvantages of Architectures.

  • @antoniofuller2331
    @antoniofuller2331 Před 17 dny

    Am late

  • @BHARATGARANDE
    @BHARATGARANDE Před 18 dny

    Please make video on how to insert image in room database..

  • @dclasses662
    @dclasses662 Před 18 dny

    Please continue this series.. like how to make PDF of that country's data..

  • @vishallandepatil6320
    @vishallandepatil6320 Před 20 dny

    Hello Anil, I am following your videos to get Details of android development. it is very simple to understand in deep and it covers all Realtime scenario I recently started using Android espresso can you also try to provide one play list on espresso

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding Před 18 dny

      Thanks for kind words. I will add it my bucket list. Hopefully I will get to make it soon. Feel free to explore other content on channel.

  • @antoniofuller2331
    @antoniofuller2331 Před 23 dny

    I'll have to watch this video again when I learn Kotlin

  • @Codetutor-DemystifyCoding

    The code in the CountryDao for deletion of the country is //delete @Delete suspend fun delete(country: Country): Int

  • @heshamabdo6024
    @heshamabdo6024 Před 29 dny

    Thank you so much