dasari4kntr Posted 18 hours ago Report Share Posted 18 hours ago రెండు interviews..లో ఇద్దరిని అడిగితే …ఇద్దరూ నీళ్ళు నమిలారు… Quote Link to comment Share on other sites More sharing options...
NaniVuncle Posted 18 hours ago Report Share Posted 18 hours ago 18 hours ago, dasari4kntr said: రెండు interviews..లో ఇద్దరిని అడిగితే …ఇద్దరూ నీళ్ళు నమిలారు… Expand PM requirement here Quote Link to comment Share on other sites More sharing options...
EggpuffReddy Posted 18 hours ago Report Share Posted 18 hours ago 18 hours ago, dasari4kntr said: రెండు interviews..లో ఇద్దరిని అడిగితే …ఇద్దరూ నీళ్ళు నమిలారు… Expand this is the chatGPT answer, ila chebte oknaa, next follow up questions em vuntaayi Great! Let's go over the SOLID principles, which are 5 key design principles in object-oriented programming (OOP) to make software more maintainable, flexible, and scalable. The acronym SOLID stands for: ✅ S — Single Responsibility Principle (SRP) "A class should have only one reason to change." Each class or module should focus on one task or responsibility. Benefits: Easier to maintain, test, and understand. Example: csharp CopyEdit // ❌ Bad: Mixing responsibilities class Report { void GenerateReport() { ... } void SaveToFile() { ... } // Saving is not report generation } // ✅ Good: Separate responsibilities class Report { void GenerateReport() { ... } } class FileSaver { void SaveToFile(Report report) { ... } } ✅ O — Open/Closed Principle (OCP) "Software entities should be open for extension, but closed for modification." You should be able to extend a class's behavior without modifying its source code. Benefits: Easy to add new features without breaking existing code. Example: csharp CopyEdit // Base class abstract class Shape { public abstract double GetArea(); } // Extension via inheritance class Circle : Shape { public override double GetArea() { ... } } class Rectangle : Shape { public override double GetArea() { ... } } ✅ L — Liskov Substitution Principle (LSP) "Derived classes must be substitutable for their base classes." A subclass should be able to replace its parent class without breaking functionality. Benefits: Ensures consistent behavior when using base types. Example: csharp CopyEdit class Bird { public virtual void Fly() { ... } } class Sparrow : Bird { public override void Fly() { ... } } // ✅ Violating this would be making a Penguin class extend Bird and try to Fly, which it can't. ✅ I — Interface Segregation Principle (ISP) "Clients should not be forced to depend on interfaces they do not use." Many small, specific interfaces are better than a large, general-purpose one. Benefits: Avoids forcing classes to implement unnecessary methods. Example: csharp CopyEdit // ❌ Bad: One big interface interface IMachine { void Print(); void Scan(); void Fax(); } // ✅ Good: Segregate interfaces interface IPrinter { void Print(); } interface IScanner { void Scan(); } // Class only implements what it needs class Printer : IPrinter { public void Print() { ... } } ✅ D — Dependency Inversion Principle (DIP) "Depend on abstractions, not on concretions." High-level modules should not depend on low-level modules, but both should depend on abstractions (interfaces). Benefits: Makes code flexible and reduces coupling. Example: csharp CopyEdit // Interface interface IMessageSender { void SendMessage(string message); } // Concrete implementation class EmailSender : IMessageSender { public void SendMessage(string message) { ... } } // High-level class depending on abstraction class NotificationService { private readonly IMessageSender _sender; public NotificationService(IMessageSender sender) { _sender = sender; } public void Notify(string message) { _sender.SendMessage(message); } } ✅ Summary of SOLID: Principle Description Goal S - Single Responsibility One class = one job Low coupling, high cohesion O - Open/Closed Open for extension, closed for modification Extensible and stable code L - Liskov Substitution Subtypes replace base types without issues Reliable polymorphism I - Interface Segregation Many specific interfaces > one large one Avoid bloated interfaces D - Dependency Inversion Depend on abstractions, not concretions Flexible, testable, maintainable code Quote Link to comment Share on other sites More sharing options...
*Prince Charming Posted 18 hours ago Report Share Posted 18 hours ago 18 hours ago, dasari4kntr said: రెండు interviews..లో ఇద్దరిని అడిగితే …ఇద్దరూ నీళ్ళు నమిలారు… Expand SOLID principles kakunda inkem telsikovaali ?? For interviews?? Quote Link to comment Share on other sites More sharing options...
Popular Post Spartan Posted 18 hours ago Popular Post Report Share Posted 18 hours ago frankly....interviews ki tappa...real world daily work lo does anyone even care about these anna.. SOLID, ACID... etc vatillo unna concepts over the period experience to ostai....but desining or coding appudu I havent seen anyone bring this up and adhere to them.. unless someone wants to play Devils Advocate during the session.... @Konebhar6 @dasari4kntr @csrcsr 8 Quote Link to comment Share on other sites More sharing options...
Aquaman Posted 18 hours ago Report Share Posted 18 hours ago 18 hours ago, Spartan said: frankly....interviews ki tappa...real world daily work lo does anyone even care about these anna.. SOLID, ACID... etc vatillo unna concepts over the period experience to ostai....but desining or coding appudu I havent seen anyone bring this up and adhere to them.. unless someone wants to play Devils Advocate during the session.... @Konebhar6 @dasari4kntr @csrcsr Expand code reviews lo chustam anna Quote Link to comment Share on other sites More sharing options...
Spartan Posted 18 hours ago Report Share Posted 18 hours ago 18 hours ago, Aquaman said: code reviews lo chustam anna Expand LGTM. 2 Quote Link to comment Share on other sites More sharing options...
dasari4kntr Posted 18 hours ago Author Report Share Posted 18 hours ago 18 hours ago, EggpuffReddy said: this is the chatGPT answer, ila chebte oknaa, next follow up questions em vuntaayi Great! Let's go over the SOLID principles, which are 5 key design principles in object-oriented programming (OOP) to make software more maintainable, flexible, and scalable. The acronym SOLID stands for: ✅ S — Single Responsibility Principle (SRP) "A class should have only one reason to change." Each class or module should focus on one task or responsibility. Benefits: Easier to maintain, test, and understand. Example: csharp CopyEdit // ❌ Bad: Mixing responsibilities class Report { void GenerateReport() { ... } void SaveToFile() { ... } // Saving is not report generation } // ✅ Good: Separate responsibilities class Report { void GenerateReport() { ... } } class FileSaver { void SaveToFile(Report report) { ... } } ✅ O — Open/Closed Principle (OCP) "Software entities should be open for extension, but closed for modification." You should be able to extend a class's behavior without modifying its source code. Benefits: Easy to add new features without breaking existing code. Example: csharp CopyEdit // Base class abstract class Shape { public abstract double GetArea(); } // Extension via inheritance class Circle : Shape { public override double GetArea() { ... } } class Rectangle : Shape { public override double GetArea() { ... } } ✅ L — Liskov Substitution Principle (LSP) "Derived classes must be substitutable for their base classes." A subclass should be able to replace its parent class without breaking functionality. Benefits: Ensures consistent behavior when using base types. Example: csharp CopyEdit class Bird { public virtual void Fly() { ... } } class Sparrow : Bird { public override void Fly() { ... } } // ✅ Violating this would be making a Penguin class extend Bird and try to Fly, which it can't. ✅ I — Interface Segregation Principle (ISP) "Clients should not be forced to depend on interfaces they do not use." Many small, specific interfaces are better than a large, general-purpose one. Benefits: Avoids forcing classes to implement unnecessary methods. Example: csharp CopyEdit // ❌ Bad: One big interface interface IMachine { void Print(); void Scan(); void Fax(); } // ✅ Good: Segregate interfaces interface IPrinter { void Print(); } interface IScanner { void Scan(); } // Class only implements what it needs class Printer : IPrinter { public void Print() { ... } } ✅ D — Dependency Inversion Principle (DIP) "Depend on abstractions, not on concretions." High-level modules should not depend on low-level modules, but both should depend on abstractions (interfaces). Benefits: Makes code flexible and reduces coupling. Example: csharp CopyEdit // Interface interface IMessageSender { void SendMessage(string message); } // Concrete implementation class EmailSender : IMessageSender { public void SendMessage(string message) { ... } } // High-level class depending on abstraction class NotificationService { private readonly IMessageSender _sender; public NotificationService(IMessageSender sender) { _sender = sender; } public void Notify(string message) { _sender.SendMessage(message); } } ✅ Summary of SOLID: Principle Description Goal S - Single Responsibility One class = one job Low coupling, high cohesion O - Open/Closed Open for extension, closed for modification Extensible and stable code L - Liskov Substitution Subtypes replace base types without issues Reliable polymorphism I - Interface Segregation Many specific interfaces > one large one Avoid bloated interfaces D - Dependency Inversion Depend on abstractions, not concretions Flexible, testable, maintainable code Expand next ఆ dependecy invesion గురించి questions పడతాయి… Quote Link to comment Share on other sites More sharing options...
dasari4kntr Posted 18 hours ago Author Report Share Posted 18 hours ago 18 hours ago, Spartan said: frankly....interviews ki tappa...real world daily work lo does anyone even care about these anna.. SOLID, ACID... etc vatillo unna concepts over the period experience to ostai....but desining or coding appudu I havent seen anyone bring this up and adhere to them.. unless someone wants to play Devils Advocate during the session.... @Konebhar6 @dasari4kntr @csrcsr Expand solid …very important… if someone knows…solid …they know the dependency injection….and next they kbow how it is useful in unit tests… 1 Quote Link to comment Share on other sites More sharing options...
dasari4kntr Posted 18 hours ago Author Report Share Posted 18 hours ago 18 hours ago, Spartan said: frankly....interviews ki tappa...real world daily work lo does anyone even care about these anna.. SOLID, ACID... etc vatillo unna concepts over the period experience to ostai....but desining or coding appudu I havent seen anyone bring this up and adhere to them.. unless someone wants to play Devils Advocate during the session.... @Konebhar6 @dasari4kntr @csrcsr Expand simple example…springboot లో ప్రతి class లో @Autowired అని రాస్తాం…అది ఎందుకు అంటే…దానికి ఆది మూలం ఇదే… Quote Link to comment Share on other sites More sharing options...
dasari4kntr Posted 17 hours ago Author Report Share Posted 17 hours ago 18 hours ago, *Prince Charming said: SOLID principles kakunda inkem telsikovaali ?? For interviews?? Expand developer role కాబట్టి …అక్కడ నుండి start చేసా…next…oka coding problem ఇచ్చి execute చేయమంటా…to see he is hands on or not… Quote Link to comment Share on other sites More sharing options...
Mr Mirchi Posted 17 hours ago Report Share Posted 17 hours ago 18 hours ago, dasari4kntr said: రెండు interviews..లో ఇద్దరిని అడిగితే …ఇద్దరూ నీళ్ళు నమిలారు… Expand Kanikaram ledhu e khatina manavudiki 2 Quote Link to comment Share on other sites More sharing options...
Mr Mirchi Posted 17 hours ago Report Share Posted 17 hours ago 18 hours ago, Spartan said: frankly....interviews ki tappa...real world daily work lo does anyone even care about these anna.. SOLID, ACID... etc vatillo unna concepts over the period experience to ostai....but desining or coding appudu I havent seen anyone bring this up and adhere to them.. unless someone wants to play Devils Advocate during the session.... @Konebhar6 @dasari4kntr @csrcsr Expand Acid yes…. Solid jujubi mostly intervieer thana pethapam chupimchalante aduguthadu ilantivi .. kondharu ithe java lantivi ok but thuppasi vatiki kuda VERSIONS adugutharu Quote Link to comment Share on other sites More sharing options...
citizenofIND Posted 17 hours ago Report Share Posted 17 hours ago Okay thanks for info uncle Quote Link to comment Share on other sites More sharing options...
dasari4kntr Posted 17 hours ago Author Report Share Posted 17 hours ago sare.. @Spartan @Mr Mirchi...ee code ki unit test ela raastro.. cheppandi.... class OrderService { private final SqlDatabase database; private final FileLogger logger; public OrderService() { this.database = new SqlDatabase(); this.logger = new FileLogger(); } public void processOrder(Order order) { try { database.save(order); logger.log("Order processed: " + order.getId()); } catch (Exception e) { logger.log("Error processing order: " + e.getMessage()); } } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.