© 2023 Hashnode
#clean-code
Background idea: The first question that comes to our mind before implementing something is why we need to implement it. The reason behind using clean code is that it makes the code understandable, or…
TL;DR: Tests must be in full control and you can't manage time. Problems Fragile Tests CI/CD Breaks Solutions Tests should be always in full environmental control. Create a time source Contex…
TL;DR: Don't add unnecessary information to your assertions Problems Readability Maintainability Solutions Remove irrelevant data Leave only the needed assertions Context Tests should be mi…
The Open-Closed Principle (OCP) is one of the five SOLID principles of object-oriented design. which states that software entities (classes, modules, functions, etc.) should be open for extension but …
Welcome! Let me show you a few helpful methods that you can use to replace for loops in specific situations, particularly situations related to arrays. Throughout this article, I will show you practic…
Hello Friends😎, and Hi Chubby🙋🏽♂️, It has been a while since I met you in blogs.🤭 In this blog, 👩🏾💻we're covering the in-depth concepts of control structures🤹🏽♂️ used in programming and ho…
Although we already use PHP Framework, there is a possibility when our code is confusing enough and sometimes the original code author loses context why they even code like that because many of us wro…
Have you ever started a new software development job and thought: "Wow, what a beautifully architected system! I wouldn't change anything here." Unless it's a brand-new project, I'm guessing not. Mo…
I've been a big fan of clean code for several years. I have read many books on this topic and hundreds of articles. There is still much to learn as this is a continuous process and never ends. You mig…
TL;DR: Don't define too many unrelated constants in the same class. Don't pile up the junk together. Problems Bad Cohesion High Coupling Magic Numbers Single Responsibility principle violation …