What is ‘Best Practices’?
- Method or process followed to deliver results successfully and effectively
- The process differs from organization to organization.
- In software programming it could used for gathering requirement, maintaining code, debugging code, or delivering the end product.
Common Problems of Software Development
- Lack of understanding in system requirements on the part of customers and designers
- Large gaps between time estimates with actual delivery time.
- Lack of Experience leading to either over Estimating or under estimating.
- Difficulty in monitoring progress in a software projects
- Poor communication among groups working on the same project
- Newly trained and under skilled programmers
- Dependence of software on hardware
- Lack of inventories of reusable software components to aid in the building of new programs
- Too many Change of Requests
Best Practices in Development
- REQUIREMENT GATHERING
- PROJECT GOAL
- CODING
a) NAMING CONVENTIONS
b) COMMENTING - DEBUGGING
- TESTING
- DEPLOYMENT
- MANAGEMENT
1) Requirement Gathering
- Challenges in Requirement Gathering
- Scope and Vision not clearly defined
- All requirements are critical, no priority is defined
- Signed-off requirements keep changing
- New requirements get added in the middle of the project
- Users/customers are busy and not available to specify requirements / Review
- Organize a demo meeting to understand Client’s Requirements
- Present a Understanding Document(UD)
- Present HLD or LLD, if needed
- Finalize the Scope of work
2) Project Goal
- Never begin coding without understanding why the code Is being written and what is it being written for.
- Always document the project goal in the code, so that a new programmer in future, doesn’t find it difficult to understand ‘what the code does’ and ‘why is it there’.
3) Coding
- Building the code is really just a small part of the total project effort even though it’s what most people equate with the whole process since it’s the most visible.
- Best coding evolves from following proper coding standards and guidelines.
- Naming Conventions for forms, units, variables, functions/ procedures, and components.
- Appropriate Comments for each and every line of code makes code maintainability much easier.
- A best code should have reusable components
a) Naming Conventions
- Instead of using Form1 for forms or Unit1 for Units
- Use login_frm, home_frm, or formula_unit
- Instead of using temp1, temp2, newtemp, x1, text1
- Use _ prefix for local temporary variables
- Use survey_num or stationlst for Tstringlist.
- Instead of using Button1, Label1, Combobox1
- Use btnSave, lblUsername, cbCountry
- Instead of using Calc1, Add1 function
- Use XYaxisToLonLat_Calc, Concate_StationGear
b) Commenting
- Name of the module.
- Purpose of the Module.
- Description of the Module (In brief).
- Original Author
- Modifications
- Authors who modified code with a description on why it was modified.
4) Debugging
- Programmers usually tend to write the complete code and then begin debugging and checking for errors
- Tips
- Know your IDE’s debugger limitations and features
- Obvious places may not be the culprits
- Check for Memory Leak
- Output messages
- Last working code
5) Testing
- Analyze your test results
- Think positive
- Writing test cases
- Performance testing is the critical part
- Programmers should not test their own code
- Keep developers away from test environment
- Involve testers right from software requirement and design phase till deployment
6) Deployment
- “The Project always has last minute problems or bugs during deployment”
- Never test the Delivery on programmers computer
- Never assume what not tested
- Try testing in real time environments
- Engage the Client or the user during the Testing(UAT) phase
7) Management
- Discuss Understanding, Assumptions and risks during requirement gathering even during change of request
- Prototyping Requirements
- Create internal deadlines much ahead of the Delivery
- Document Analysis at every stage
- Brainstorming sessions
- Monitor status with Review meetings
- Client Interaction and Reviews
- Timely Delivery