With Viettel Group Client
One of our main partner is ViettelGroup, and when working with them, we have some struggle to handle:
Work process and Legacy Codebase: Many work could be block by some kind of process
- Access resources: (source code, networks, PCs,..)
- Find the right person to work with: sometime, they are very busy and will take time to process your work. In the mean time, you likely can't do anything and the workflow is blocked.
- Legacy code: many project is not up-to-date in technology aspect. They may using old legacy code with very little documentation, minimal code comments. and stale tests.
- Integrate problems: The APIs provided by client can be very ugly, un-structured. The data sometime be gathering from many sources, and they're not formatted or cleaned.
My solutions
-
Always let HRs prepared the resources needed. During that time, you can read the documentation, or complete another works.
-
Communications plan should be done carefully. The works also should be categorize into 2 part, with at least one work can be completed independently.
-
When dealing with poorly designed APIs, there is often little that can be done. Start by requesting documentation and carefully reviewing it to understand the API's purpose and goals. Communicate effectively with team members, and if necessary, consider politely proposing a change request to improve the API.
-
Dealing with legacy code
Understand the Context
- Purpose: Understand the system's purpose, business goals, and how the code contributes to them.
- Stakeholder Input: Communicate with teams to identify critical features and areas of concern. Find as much info as you can.
- Documentation: Review existing documentation, if available. If none exists, create basic documentation as you explore.
Assess the Code
- Client codebase will likely have been scanned with SonarQ. But in my experiences, they usually ignore this step. Ask for SonarQ scan or scan by your self to evaluate the codebase.
- Readability: Evaluate the code’s readability and structure. Identify poorly written or unclear areas.
- Dependencies: Check for outdated libraries or frameworks and evaluate the impact of upgrading them.
- Code Smells: Look for common issues such as duplication, long methods, or tightly coupled components.
- Tests: Identify existing tests. If none exist, write tests for critical parts of the code.
Establish a Plan
- Prioritize: Focus on areas that provide the most value or are causing the most issues.
- Incremental Changes: Plan small, manageable changes to avoid breaking the system.
- Refactoring: Break down large changes into smaller tasks to improve readability, remove duplication, or isolate functionality.
- Testing Strategy: Develop or improve a testing strategy, prioritizing high-risk areas.
Refactor Carefully
- Follow Best Practices: Use established coding standards (e.g., SOLID principles, DRY).
- Minimize Changes: Avoid unnecessary modifications while improving code quality.
- Isolate Changes: Refactor modules or components in isolation to avoid ripple effects.
- Documentation: Document refactored code and overall architecture for future developers.
Manage Risk
- Monitor: Monitor system performance and logs after changes to detect issues quickly. The system usually always have this installed. If needed, ask them this assets.
Engage the Team
- Collaborate: Encourage team members to share their knowledge about the system.
- Training: Provide training for new technologies or frameworks being introduced.