• code_sagar Profile Picture

    Sagar👨‍💻 🚀 @code_sagar

    2 years ago

    Rashmika is an ex Google SWE. She quits her job and now a 5 star rated Software consultant at Upwork. She wins a 6 month fixed contract of $250K from an US Client. She plans to buy her parents their dream home with it. But this gig is not typical software development. Rashmika was asked to fix, stabilise and upgrade an existing Library management codebase. Robert is the manager and Rashmika’s point of contact. Robert says “Rashmika, some freelancers have built our app. Whenever we make any change to the existing code, some other features gets impacted. The codebase is convoluted and other freelancers charge us a bomb for a small change.” Rashmika is a pro in client handling. She scopes down the problem and “Which specific area you are most worried about?” Robert “The User Management and Account Management, one change leads to other” Rashmika is shocked seeing the code. She finds an Interface called ILibraryManagement which has almost 70+ methods like 1/ loanBook 2/ catalogManager 3/ returnBook 4/ userProfiles… She sighs, “This is gonna be a long work day.” Rashmika to Robert “The problem is with the fundamental design of the system. There is a concept called Interface Segregation Principle. The interface segregation principle (ISP) states that no code should be forced to depend on methods it does not use. And this interface is bloated with unnecessary methods for some classes” Robert, “But that’s an interface how do that matter?” Rashmika, “When you hire other freelancer they create a sub-class of Library Management which has methods that they don’t need. They don’t change the interface. They include the unnecessary empty methods in there new class. The empty methods simple throws an exception when called. This has made the code 1/ cluttered 2/ very hard to unit test 3/ prone to errors Also violating Single Responsibility Principle but let’s not go there. So there is no segregation of features between freelancers and there is high chance that they are changing old code to make there new code work” Robert “Are you sure?” Rashmika smiles and says “ I have been in Google. I have seen codebases that literally runs the world. Robert, let's start with the fundamental problem then we work upward to find and fix bigger issues. How does that sound?” Robert, “Aye aye Captain!” — Few points to consider : 1/ There can be plethora of problems but if the fundamental structure of the code is weak it weakens the entire system. 2/ ISP was introduced to improve Code Understandability, Maintenance, UT 3/ ISP if not followed violates SRP and cascade of failure can happen. 4/ Rashmika is a fictional character 5/ There are many other ways to fix the given problem, but this story only explains the ISP in a closed context. — I am Sagar, Software Architect at McKinsey. I write these stories to simplify building software and your career. ⚡️ Follow me for more such content. Bonus: Don’t stop here, go and read the technical depth on Wikipedia.

    46 85 1K 132K 715
  • codeandgyan Profile Picture

    Ramalingam S @codeandgyan

    2 years ago

    @sagar_codes I can relate each and every statement explained here. A lot of developers don’t understand the principles of design, end up with such a mess. I’d say Interface Segregation Principle is something that led to the idea of Microservices Architecture as regards to APIs.

    1 0 10 1K 1
  • Natya_Sadella Profile Picture

    Abhishek Sharma @Natya_Sadella

    2 years ago

    @sagar_codes Sirji Suprabhat, ISP and doing this is not a good coding practice I got it but if any class implements an interface and used a method which are not called anywhere. How can that create a problem.

    1 0 10 10K 2
  • asterisksbook Profile Picture

    Gaurav.Abhangrao @asterisksbook

    2 years ago

    @sagar_codes Storytelling at best🍾

    1 0 3 3K 0
  • ProgressiveCod2 Profile Picture

    Saurabh Dashora @ProgressiveCod2

    2 years ago

    @sagar_codes Nice storytelling Sagar!🙂 Keep going...👏

    1 0 2 3K 0
  • Iampatelajeet Profile Picture

    Ajeet Patel @Iampatelajeet

    2 years ago

    @sagar_codes interesting take Sagar, love these stories.

    0 0 1 676 0
  • Junaid__Mohamed Profile Picture

    Mohamed Junaid @Junaid__Mohamed

    2 years ago

    @sagar_codes Wow, this indeed was a great explanation ❤️. Following you right now to learn more concepts in form of stories 🙌❣️

    0 0 1 30 0
  • dhruvinj_dj Profile Picture

    Dhruvin⚡high on JS @dhruvinj_dj

    2 years ago

    @sagar_codes Be like rashmika

    0 0 1 35 0
  • chaitalivinod23 Profile Picture

    Chaitali Sawant @chaitalivinod23

    2 years ago

    @sagar_codes Beautifully written 👏🏻

    0 0 1 23 0
  • prathamkohli_ Profile Picture

    Pratham Kohli @prathamkohli_

    2 years ago

    @sagar_codes Well articulated 💯

    1 0 1 688 0
  • mfonPeeter Profile Picture

    Mfonobong Peter @mfonPeeter

    2 years ago

    @sagar_codes Did I understand most of what I just read? Nope, at some point, I got lost🥲 Was it interesting? Yeah😂

    0 0 1 30 0
  • Jitesh20518672 Profile Picture

    JITESH VASWANI🇮🇳 @Jitesh20518672

    2 years ago

    @sagar_codes Dammn! That's really awesome. Thank You for sharing

    0 0 1 43 0
  • KarthikBalasun1 Profile Picture

    Karthik Balasundaram @KarthikBalasun1

    2 years ago

    @sagar_codes You got the hook of the story right. Awesome man. Followed👍

    0 0 1 90 0
  • root_ansh Profile Picture

    Prod Debugger @root_ansh

    2 years ago

    @sagar_codes in a nutshell, DEAR SOFTWARE DEVS, DON'T JUST MUG SOLID PRINCIPLES, IMPLEMENT THEM

    0 0 1 203 0
  • Vishal50177425 Profile Picture

    Vishal @Vishal50177425

    2 years ago

    @sagar_codes Had to follow you for this amazing content

    0 0 1 209 0
  • Coding_Titan7 Profile Picture

    Himanshu Dhawale @Coding_Titan7

    2 years ago

    @sagar_codes You're a beast man 🔥

    1 0 1 4K 1
  • kishorets1 Profile Picture

    Senior Data Engineer || Aspiring Data Architect @kishorets1

    2 years ago

    @sagar_codes Any books in this kind of topic? Please do recommend

    0 0 0 212 0
  • HimanshuRawal05 Profile Picture

    Himanshu Rawal @HimanshuRawal05

    2 years ago

    @sagar_codes Technical debt to its core

    0 0 0 472 0
  • adithynvp Profile Picture

    adithyan @adithynvp

    2 years ago

    @sagar_codes How the hell you again in my TL.. by the way good read

    0 0 0 17 0
  • mayurekbote Profile Picture

    Mayur Ekbote @mayurekbote

    2 years ago

    @sagar_codes Tch. She could create a composite that implements ILibraryManagement and save refactoring time.

    0 0 0 31 0
  • ultimyr Profile Picture

    Saurxbh @ultimyr

    2 years ago

    @sagar_codes Very nice story, it revises the SOLID principles and how important it is for developers to know what exactly these principles are, and why to use them almost all the time. Keep posting more!

    0 0 0 32 0
  • shujatuddin Profile Picture

    shujat @shujatuddin

    2 years ago

    @sagar_codes Nice way taking us in to the story

    0 0 0 30 0
  • 0xAyushsh Profile Picture

    Ayush ( Sr. Front-end Developer ) @0xAyushsh

    2 years ago

    @sagar_codes man you are a master of this art ... u literally compelled a random reader ( me ) to follow you 🙌

    0 0 0 172 0
  • BforBrr Profile Picture

    pow @BforBrr

    2 years ago

    @sagar_codes fgccgtfdseerea gfhbwaa aa

    0 0 0 11 0
  • Krohit31 Profile Picture

    Rohit Kumar @Krohit31

    2 years ago

    @sagar_codes What the hook in story telling 🙌

    0 0 0 94 0
  • themanavkhadka Profile Picture

    Manav ⚡🚀 @themanavkhadka

    2 years ago

    @sagar_codes Followed , Keep posting

    0 0 0 161 0
  • akhilrathipelly Profile Picture

    AKHIL RATHIPELLY @akhilrathipelly

    2 years ago

    @sagar_codes Well structured and nice explanation with fictional characters

    0 0 0 18 0
  • Odo_Peter_Ebere Profile Picture

    _x @Odo_Peter_Ebere

    2 years ago

    @sagar_codes This is premium stuff 👌🏽

    0 0 0 67 0
  • Prince_D_Coder Profile Picture

    OBA_Princewill ™👨🏽‍💻🌱 @Prince_D_Coder

    2 years ago

    @sagar_codes This is awesome, I love the way the story is told. Am following you and turning on the notifications bell for more stories ❤️

    1 0 0 4K 0
  • Download Image
    • Privacy
    • Term and Conditions
    • About
    • Contact Us
    • TwStalker is not affiliated with X™. All Rights Reserved. 2024 www.instalker.org

    twitter web viewer x profile viewer bayigram.com instagram takipçi satın al instagram takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al sosyalgram takipçi satın al instagram ücretsiz takipçi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al metin2 metin2 wiki metin2 ep metin2 dragon coins metin2 forum metin2 board popigram instagram takipçi satın al takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al buyfans buy instagram followers buy instagram likes buy instagram views buy tiktok followers buy tiktok likes buy tiktok views buy twitter followers buy telegram members Buy Youtube Subscribers Buy Youtube Views Buy Youtube Likes forstalk postegro web postegro x profile viewer