Class#10 - Design Patterns and Branching Models
Document Details
Uploaded by BelovedJungle7711
buc.edu.eg
Tags
Summary
This presentation covers software design patterns, focusing on creational, behavioral, and structural patterns. It also discusses code management practices and branching models.
Full Transcript
CLASS#10 Design Patterns, Code Management, 7 Wastes 7 WASTES IN SOFTWARE 1. Partially Done Work 2. Extra Features 3. Relearning 4. Handoffs 5. Delays 6. Task Switching 7. Defects PARTIALLY DONE WORK Description: This includes features or tasks that are started but not completed...
CLASS#10 Design Patterns, Code Management, 7 Wastes 7 WASTES IN SOFTWARE 1. Partially Done Work 2. Extra Features 3. Relearning 4. Handoffs 5. Delays 6. Task Switching 7. Defects PARTIALLY DONE WORK Description: This includes features or tasks that are started but not completed. It results in unfinished work accumulating in the system. Impact: Partially done work leads to longer cycle times, increased context switching, and potential integration issues. Example: A development team starts working on a new feature, such as an advanced search functionality. However, halfway through the sprint, they are asked to shift focus to a critical bug fix. The partially completed feature sits idle, with unfinished code and unmerged pull requests, accumulating technical debt. EXTRA FEATURES (GOLD PLATING) Description: Adding more features than what is necessary or required by the customer. Impact: Extra features increase complexity, maintenance costs, and the risk of defects. Example: A product manager requests an extensive set of customization options for a user profile page, including background themes, font styles, and color schemes. These features are added despite not being requested or needed by users. RELEARNING Description: The effort spent in rediscovering information or knowledge that is already known but not documented or shared effectively. Impact: Relearning wastes time and resources and often leads to inconsistent practices. Example: A developer needs to fix a bug in a module that was last updated six months ago. However, there is no documentation or comments explaining the module's purpose or functionality. The developer spends hours trying to understand the code and rediscovering its logic HANDOFFS Description: Transferring information or tasks between different team members or departments. Impact: Handoffs can lead to miscommunication, delays, and a loss of information, resulting in inefficiencies. Example: In a traditional development process, a feature passes through several stages: from requirements gathering by business analysts, to design by architects, to implementation by developers, and finally to testing by QA engineers. Each handoff involves transferring knowledge and context. DELAY Description: Any waiting time that slows down the development process, such as waiting for approvals, feedback, or resources. Impact: Delays prolong the development cycle and can lead to missed deadlines and bottlenecks. Example: A developer completes a feature and submits it for code review. However, the reviewer is busy with other tasks and doesn't get to the review for several days. The feature sits in the queue, waiting for approval before it can be merged and tested. TASK SWITCHING Description: Frequently switching between different tasks or projects. Impact: Task switching reduces productivity, increases the likelihood of errors, and leads to burnout. Example: A developer is assigned to work on multiple projects simultaneously. They spend part of the day fixing bugs in one project, writing new features in another, and attending meetings for a third project. Constantly switching between tasks disrupts their focus and productivity. DEFECTS Description: Bugs or errors in the software that require rework and corrections. Impact: Defects reduce the quality of the software, increase costs, and damage customer satisfaction. Example: A feature is developed and released without thorough testing. Users quickly discover several bugs, such as crashes and incorrect data handling. The development team has to prioritize fixing these defects, diverting attention from new feature development. CODE MANAGEMENT AND BRANCHING MANUAL CODE CHANGES Risk of errors In efficient collaboration Lack of traceability Lack of security controls SOME TIPS Git ignore Git pre-push hook Git cherry-pick DESIGN PATTERNS TYPES OF DESIGN PATTERNS Creational Behavioral Structural Patterns Patterns Patterns Concerned with the Focuses on Deals with way objects are effective organizing and created to optimize communication and composing objects flexibility and responsibility and classes to form reusability distribution among larger, more These patterns objects manageable provide various These patterns are structures object creation concerned with These patterns mechanisms, which algorithms and the explain how to increase flexibility assignment of assemble objects and reuse of responsibilities and classes into existing code. between objects. larger structures while keeping these SINGLETON FACTORY PATTERN FACTORY PATTERN ADAPTER PATTERN ADAPTER PATTERN BRIDGE PATTERN BRIDGE PATTERN CHAIN OF RESPONSIBILITY Request Request Request OBSERVER PATTERN OBSERVER PATTERN STAY IT TOUCH