Tuesday 5 December 2023

Maintainability: The Cornerstone of Sustainable Software Development

Applications are expected to have a long life cycle. A maintainable design ensures that the application can be sustained over the long term, and provide a foundation for future enhancements. Apart from this, It's important to note that most of the money spent on software doesn't go into the initial development; rather, the majority is used for ongoing maintenance activities. This highlights the importance of designing software with a focus on long-term sustainability and cost-effective maintenance.

 

Now, let's talk about the regular maintenance activities that we do for a software application.

 

1. Bug Fixes: Resolving the issues reported by users or found during testing.

 

2. Environment Changes: Adjusting the software to accommodate alterations in the operating environment, like updates to hardware, software, or third-party dependencies upgrades etc.,

 

3. Enhancements: As time goes on, we might want to add new features or make the existing ones better to match what users need.

 

4. Code Refactoring: Sometimes to enhance maintainability of the application, we might need to refactor the existing code without changing its external behaviour.

 

5. Documentation Updates: We make sure that the guides and instructions about how to use the software are always correct and reflect any changes we've made.

 

6. UI/UX Enhancements: We improve how the software looks and how people interact with it to give a nicer experience.

 

7. Security Enhancements: We work on making sure bad guys can't harm the software. We fix any vulnerabilities to keep everything safe and secure.

 

8. Backing Up and Recovering Data: We regularly check that we can save and get back all the important information in case something unexpected happens, like losing data.

 

9. User Support and Training: We're always ready to help users if they have questions or problems. We might also teach them how to use the software better.

 

10. Getting Ready for the Future: We plan for the day when the software might need to retire (stop working) or be replaced with something newer. If we switch to a new version, we make sure it happens smoothly without causing trouble for users.

 

Principles to design a maintainable system

Creating a software system that is easy to maintain requires to adhere to several key principles that enhance code clarity, organization, and flexibility. These principles play a crucial role in ensuring the software's long-term understandability, adaptability, and scalability, ultimately lowering development costs and enhancing the overall success of the project.

 

1. Keep the things simple

Ensure that new engineers can grasp the system easily by minimizing complexity, which not only enhances understandability but also reduces the likelihood of introducing new bugs during modifications. Striving for simplicity is crucial for improving software maintainability.

 

Break down the software into small, independent modules. This approach facilitates a better understanding of, updates to, and maintenance of individual components without impacting the entire system.

 

Use Clear Naming Conventions, maintain consistency in naming variables, functions, and classes. This practice enhances code readability, making it more accessible for developers to collaborate on and maintain.

 

Embrace Abstractions, encourage for the use of effective abstractions, as they play a crucial role in reducing complexity and making the system more adaptable to new use cases.

 

2. Operable

Ensure that operations teams can effectively manage the system.

 

Operations teams are responsible for various maintenance activities, such as keeping software and platforms up-to-date, applying the security patches, monitoring the system's health, promptly restoring service in case of issues, planning for capacity, managing configurations, and migrating applications between platforms etc.,

 

When designing the system, it's essential to consider how operations can be streamlined. The application should facilitate automation, integrate seamlessly with standard tools, and have a comprehensive documentation that clearly outlines the system's behaviour on each configuration property change etc.,

 

3. Adaptable or Modifiable: Design the application in a way that facilitates easy modifications by engineers in the future, allowing for adjustments to unanticipated use cases as requirements evolve.

 

Following development principles/guidelines helps you to develope a simple, operable and adaptable software.

 

1. Open/Closed Principle (OCP): where Software entities should be open for extension but closed for modification.

 

2. Single Responsibility Principle (SRP): Each class or module should have a single well-defined responsibility. This principle promotes modularity and reduces coupling between components, making it easier to understand and maintain individual parts of the system.

 

3. Dependency Inversion Principle (DIP): Encourage a design where high-level modules don't tightly rely on low-level ones. Both should depend on abstractions. This principle promotes loose coupling and reduces dependencies between components, making it easier to test, debug, and maintain the system.

 

4. Liskov Substitution Principle: If S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program. This principle ensures that inheritance relationships are well-defined and that subtypes behave consistently with their base types.

 

5. Eliminate duplication: Don't repeat yourself in your code. This makes everything more consistent and saves you from doing the same thing in multiple places.

 

6. Clean and comprehensive documentation: Write good and up-to-date guides for your code. It helps you and others understand how everything works.

 

7. High Cohesion and Loose coupling:  Keep related functionality within the same module or class and minimize dependencies between modules or components.

 

8. Testing: Incorporate thorough unit tests, integration tests, and system tests to ensure software correctness, reliability, and consistent behaviours in various conditions. It gives confidence to the developers to validate the new changes on a maintenance product.

                                                             System Design Questions

No comments:

Post a Comment