Tuesday, September 17, 2019

SOLID principles for Object Oriented Programming, with LIQUID and GAS

In Object oriented programming, the SOLID principles play an important role in designing the solutions and structuring the code.

For a quick recap, below is what SOLID briefly stand for:



  • S - Single-responsiblity principle: A class should have one job, and only one job.
  • O - Open-closed principle: Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification
  • L - Liskov substitution principle: Every subclass / derived class should be substitutable for their ancestor classes
  • I - Interface segregation principle: No client should be forced to depend on methods it does not use.
  • D - Dependency Inversion Principle:1) High-level modules should not depend on low-level modules. Both should depend on abstractions (e.g. interfaces). 2) Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions

But solid also happens to be a state of matter. To make matters fun, here are 2 more acronyms that can be used in software development, to complete the three commonly found earthly states of matter :)

LIQUID

  • L - Learnability: The program/module/class/method should support enhanced learnability of anyone using / extending it
  • I - Input validation: All inputs must be validated to avoid any security and other bugs
  • Q - Quality control: Code should be structured so that ways to keep checks on regression and maintain strict quality can be easily ensured. i.e., tech debt should be kept within viable limits
  • U - Understandability: Code is modified and debugged more number of times than freshly written, and it must thus be easily understandable for the next person. Conventions needs to be followed consistently
  • I - Integration: Code in isolation is limited in the impact it can have, and so must be so structured to promote easier integration within other projects / modules etc.
  • D - Defect averse: defects have a way of creeping in, so code should be properly tested and structured in a way to minimise code smell and defects.

GAS


  • G - Great readability: Code is read a lot more than it is written, and to save time, should be readable.
  • A - Avoid Anti-Patterns: While using design patterns and other strategies is good, one must know when to avoid the common anti patterns
  • S - Security promoting: Unsafe security practices should be avoided at the offset. As Mad eye moody says, Constant Vigilance is the way to avoid security nightmares.


19 comments:

  1. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.
    PMP Certification in Malaysia

    PMP Certification

    ReplyDelete
  2. I feel extremely glad to have seen your site page and anticipate such a large number of additionally engaging occasions perusing here. Much obliged again for all the subtleties.artificial intelligence course in delhi

    ReplyDelete
  3. Incredibly conventional blog and articles. I am realy very happy to visit your blog. Directly I am found which I truly need. Thankful to you and keeping it together for your new post.

    https://360digitmg.com/course/project-management-professional-pmp

    ReplyDelete
  4. Really impressed! Everything is very open and very clear clarification of issues. It contains truly facts. Your website is very valuable. Thanks for sharing.
    data science course in hyderabad

    ReplyDelete
  5. At the point when you consider everything, LPG (Liquid oil gas) is presumably the most hazardous substance you have on your boat, but you will spend more cash on cleaning, painting the frame and adjusting the motor than you will on your boat gas framework. www.besteenergieleverancier.com

    ReplyDelete
  6. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. best coding chair

    ReplyDelete
  7. The media is relatively quiet about the natural gas revolution that has just started because the "powers that be" are more interested in wind and solar power. However, converting the USA to natural gas is the natural path. Fortunes will be made by those who jump on this train now. If you're a welder and sick of low wages or if you are considering a welding job take a few minutes to read this. Matthew Fleeger is a Dallas-based businessman

    ReplyDelete
  8. The media is relatively quiet about the natural gas revolution that has just started because the "powers that be" are more interested in wind and solar power. However, converting the USA to natural gas is the natural path. Fortunes will be made by those who jump on this train now. If you're a welder and sick of low wages or if you are considering a welding job take a few minutes to read this. Matthew Fleeger

    ReplyDelete
  9. A recent report published by the IEA (International Energy Agency) entitled "Are we entering a golden age of gas?" sparked a series of discussions across the globe about the future of gas. Many energy market experts came forward to express their opinions and thoughts about the report which led me to write this article. Dallas-based CEO

    ReplyDelete
  10. I just now learned your site a couple weeks ago so i are looking at it also on a daily basis. There is a massive amount information at this site and i relish your personal style belonging to the world-wide-web site very. Continue the high quality hard work! bulk backlinks

    ReplyDelete
  11. I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!black and white tile

    ReplyDelete
  12. This is brilliant and eye-catching content thanks for you done right here.private detective mesquite

    ReplyDelete
  13. Thank you for this pretty much amazing insight! I really appreciate your goodness for taking the time in posting all this articles.vintage ladies clothing

    ReplyDelete
  14. This is a really decent site post. Not very numerous individuals would really, the way you simply did. I am truly inspired that there is such a great amount of data about this subject have been revealed and you've put forth a valiant effort, with so much class. On the off chance that needed to know more about green smoke surveys, than by all methods come in and check our stuff.canon printer ink cartridges

    ReplyDelete
  15. Informative article. Thanks for sharing with us.keep it up.
    data science training in pune

    ReplyDelete
  16. I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. Landfill Gas Power Plant

    ReplyDelete
  17. It is especially decent, though look into the tips during this home address.vintage clothing stores near me

    ReplyDelete
  18. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this.. Liquid Help

    ReplyDelete
  19. It should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it. LIquid Help

    ReplyDelete