3 Coding
BootcampBestitconsulting/Bootcamp2020-11-25
(1) Code Quality
- Functional Code Quality
- Structural Code Quality
🪕 Characteristics of good code
- It works
- Pleasant to look at
- Easy to read
- Simple & Reusable
- Testable
- Easy to maintain & change
🪕 Code Quality is important
- Understanding code: 85%
- Writing code: 2%
- Modifying code: 13%
🪕 General Recommendations
- Follow coding standards
- Follow design principles (KISS, SOLID, etc)
- Introduce Cod Review)
- Introduce automated uit, integration, E2E and UI testing
Code Quality Gates in Development Process

🪕 1. Code
🪕 2. Unit Test
- Test the correctness and proper functionality of the code
- Provides a strict, written contract that the piece of code must satisfy.
- Ensures better quality, but will not catch every error in the program.
🪕 3. Automated code analysis
- Checks source code for compliance with a predefined set of rules or best practices
- Local gate right at the developer
- Immediate feedback
🪕 4. Manual code Review
- Reading source code line-by-line in an attempt to identify potential isues
- Good for examining rarely traversed code paths
- Learning and knowledge sharing possibility for team members
🪕 5. Merge to the codebase
As per a survey conducted in 2015/03 among different teams, a majority of teams use Code Review tasks to improve and keep code quality.

(2) Coding Standards
- 40-80% of lifetime cost goes to maintenance
- Cost of Bug grows during post-implementation and maintenance stages
- A code author rarely maintains his/her code for lifetime for the project.
🪕 Coding Standards:
- Enhance Code clarity
- Increase Readability and consitency
- Support maintainability
- Reduce software development risks
- Drive down Complexity
🪕 Code Style
- Layout of source code
- Indentation between code blocks
- Stye for user defined identifiers like function or classes
- etc
🪕 Code convention:
- Project file organization
- Programming Principles and Practices
- Architectural Best Practices
- etc
🪕 General Rules
- Follow code standards
- Follow Design Principles
- Conventions to be consistent
-
boy scout rule
Leave the campground cleaner than you found it.
-
Root cause Analysis
Always look for the root cause of a problem.

(3) Code Review
🪕 Code Review Aspects
- Process
- Roles
- Review types
- Best practices
- Tools
Automated Code Analysis is a tool for achieving Structured Code Quality in a row as Coding Standards and manual Code Reviews.
Essentically, static and Dynamic analysis enhances code quality, which is the key to making the software live longer.
SonarQube (or formerly Sonar) is an open source platform for continuous inspection of code quality.
