Hello Friends,
Can you expect a better performance and comfort just by placing accessories and without upgrading the engine of your car? The answer is a resounding No! Similarly, you will not be able to get the benefit of adopting a new technology platform unless you change the execution methodology. That’s the prime reason for adopting agile. Despite adopting agile best practices, the desired result is still far away.
This failure in implementation reflects the superficial manner in which we are trying to apply Agile. Agile should not be viewed just as a project management technique or a SDLC Methodology, but also as a collection of best practices that should essentially touch every aspect of the development lifecycle. This will result in Optimized Agile Development.
Business Analysis in Agile is transformed well by replacing SRS / BRD with Product Backlog. Similarly, testing is also considered an integral part of the daily development activity in Agile. Ever wondered about Design and Coding? There are a few discussions around Agile Architecture, Technical Debt, Test Driven Development, Behavioral Driven Development, but what are the guidelines which developers need to follow while writing the code?
Here are few pointers for Agile Engineering Effectiveness,
Follow “High Degree of Cohesion Less Degree of Coupling” – All related tasks to be put in one module and there should not be more than three parameters passed from one module to another.
Design Smells – Make sure your design doesn’t have following drawbacks:
- Rigidity : The system is hard to change
- Fragility : Changes causes the system to break
- Immobility : It is hard to disentangle into reusable components
- Viscosity : Doing things right is harder than doing things wrong
- Needless Complexity : The design contains infrastructure that adds to no direct benefit
- Needless Repetition : Repetition of data and control, which can be abstracted and isolated
- Opacity : Hard to read and understand
Move beyond OOPs concepts, adopt SOLID Principles and follow Service Oriented Architecture (SOA). Below are the SOLID Principles, which help developers to eliminate design smells and build the best design.
- SRP : Single Responsibility Principle
- OCP : Open-Closed Principle
- LSP : Liskov Substitution Principle
- DIP : Dependency Inversion Principle
- ISP : Interface Segregation Principle
- Don’t reinvent the wheel – Lots of codes have been written in the last 30 years or so. Before you begin writing any new piece of code, check the Knowledge Repository, a predefined functionality is available in the Framework and API. Below are few examples for Java and C# Developer,
- 1. While < writing a piece of code for sorting of an array, instead of using traditional bobble sort loop, for (i=0; i<n-i; i++) for (j=i+1; j<n;j++) if(a[i]>a[j]) { t= a[i]; a[i]=a[j]; a[j]=t;} Use : Arrays.Sort (noarray)
- 2. Instead of writing a code for File Upload / Download, Data Encryption / Decryption, Maintaining Log, Transaction Management, use the functionalities provided at the Framework Level; like, Interceptor in Struts, Cross Cutting Concerns from Spring, Service from WCF, Web API. Traditionally, every programmer practices their own way of writing code, after which, the concept of best practices emerged and were defined as Patterns. A set of patterns are put together in technology specific frameworks. Unleash the potential for these frameworks to write code in an Agile Way so that you will be able to deliver minimum viable product (MVP) in shorter sprints.
At Hexaware, we have Brainbox, which is a repository of crowd sourced ideas that should be your go to resource, to find solutions to leverage your capabilities in agile better.
- Avoid defects – Write a code to satisfy acceptance criteria and make sure it is unit tested and accepted by the client during Sprint Demo.
- Eliminate Waste and add Value – Write module code good enough to deliver functionality of current User Story and avoid writing additional generic code routines. Follow the Test Driven Development Approach i.e. Write the Code good enough to pass the current test case and all previous test Cases.
- Avoid movement of code / artifact among people – Take ownership of the story design – code – test – deploy on UAT environment and make it available for the customer. Use code repository, follow daily code check, automate test – build – deploy activities. DevOps Automation would address this.
- Refactor – Do not write functions / methods of long lines; a function should not be more than 20 lines.
- Code Analysis and Code Quality – Traditionally, we used to do manual code review but now automated source code analysis (SCA) tools are available to locate and describe areas of weakness in software source code, such as; security vulnerabilities, logic errors, implementation defects, concurrency violations, rare boundary conditions, or any number of other types of problem-causing code. Few examples of such tools are Sonar Cube, Check Style, etc.
- Limit your WIP – Don’t start coding multiple stories at same time, it will result in partially done work at the end of the day. Make sure stories are completed as per Definition of Done (DoD) and can be delivered to the customer.
Once you adopt Agile, primarily you have started to follow Scrum (Ceremonies, Roles and Artifacts), but that’s not the only thing to do. Take a next step to improve Engineering Practices by adopting eXtream Programing Practices, align to Lean principles this will truly lead towards Digital Agile Transformation.
Keep reading upcoming blogs from Hexaware Agile Practice to get different dimensions of Agile!
Prashant Neharkar (CSM, CSP, PMI-ACP, ITIL, SA),
Agile Coach, Hexaware Technologies Limited
References:
- Agile Software Development (Principle, Patterns and Practice) by Robert Martine
- Extreme Programming Explained by Kent Beck
- Lean Software Development: An Agile Toolkit by Mary Poppendieck and Tom Poppendieck