C18: Implementation and Quality Assurance Flashcards

1
Q

Coding standards should address the following:

A

Define the required and optional items of the coding standards.
Define the format and language used to specify the required optional items (so the programmers know what to include).
Define the coding requirements and conventions.
Define the rules and responsibilities to create and implement the coding standards well as review and improve the practice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are coding standards?

A

A set of rules that serve as requirements and guidelines for writing programs in an organization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do coding standards address?

A

Define the required and optional items of the coding standards.
Define the format and language used to specify the required optional items (so the programmers know what to include).
Define the coding requirements and conventions. Define the rules and responsibilities to create and implement the coding standards well as review and improve the practice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Coding standards usually include:

A

File Header

Description of Classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Description of classes include:

A

Purpose
Description of methods
Description of fields
In-code comments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Coding conventions include:

A

Naming Conventions
Formatting Conventions
In-Code Comment Conventions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why coding standards?

A

They define a common set of rules for writing programs in the project. Thereby ensuring consistency and facilitating project management, software integration, software reuse, configuration management, and software maintenance.
They make it easy to understand the programs within the project and ensure that important items are included to reap the benefits.
They help code review and test case generation because the functional description and incode comments help the reviewers and testers understand the program.
They facilitate the use of integration with apps such as javadoc and static analysis tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Code Review Checklist

A
  1. Does the program correctly implement the functionality and conform to the design specification.
  2. Does the implemented class interfaces conform to the interfaces the specified in the design class diagram.
  3. Does the implementation comply with the coding standards.
  4. Compute a number of the required quality metrics and identify those that are worse than the required indicators.
  5. Are programming constructs used correctly and properly?
  6. Does the program correctly implement data structures?
  7. Are there in error or anomalies?
  8. Incorrect uses of logic?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Guidelines for Practicing Code Standards

A
  1. Define barely enough coding standards - Keeps effort to a minimum while still having benefits.
  2. Easy to understand and practice - To actually have benefits we need developer support.
  3. Should be well documented and include examples - Examples are used to illustrate the required and optional items.
  4. Training on how to use coding standards is helpful - Helps developers understand what is required.
  5. Coding standards, once defined and published, should be practiced and checked for compliance regulatory - Standards that are defined but not practiced are useless.
  6. Assign responsibilities to individuals and make sure that all involved know the assignment.
  7. Practice of coding standards should involve stakeholders - Success of standards requires support from all stakeholders.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Organizing the Implementation Artifacts

A
  1. Architectural-Style organization - organizes classes according to building blocks of the software architecture.
  2. Functional subsystem organisation - Organises classes according to the functional subsystems of the software system.
  3. Hybrid organisation - Combines both of the styles above.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Test Stub Drawbacks

A
  1. Consumes time and effort.
  2. Is not the class it simulates.
  3. Retesting is always required when the actual class is implemented.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is pair programming?

A

When two people work one machine where person A types and focuses on the best way to implement the functionality and person B reviews the code as it is typed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Benefits of pair programming include:

A
  1. Reduces pressure and brings fun to programming.
  2. Enhance team communication because the partners exchange ideas during pair programming. Improves productivity and quality.
  3. It enhances mutual understanding and collaboration.
  4. It tends to produce simpler and more efficient solutions faster.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Limitations of pair programming include:

A
  1. It’s not for everyone - Some people work better alone.
  2. Discussions between partners could take a lot of time if not handled properly.
  3. It could be slow to start due to the need to adapt to the difference in partners skills.
  4. Partners have to be in the same location.
  5. Partners may have different schedules.
  6. It might not be as effective when trying to find errors.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is ping-pong programming?

A

One developer writes the tests and the other implements the functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is test-driven development?

A

A software development process that relies on the
repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired functionality or extension of an existing function. He then
produces the minimum amount of code to pass that test.

17
Q

Test-driven development workflow

A
  1. Prepare for test-driven development - Skeleton code for the class is generated and the test coverage is achieved.
  2. Write tests - Programmer selects features to be implemented next as well as the tests for those features.
  3. Implement and test the features. Runs the tests to make sure that the functions are implemented properly.
  4. Repeat until all features are correctly implemented - Repeat steps 2 and 3 until all features are correctly implemented and pass all the tests.
  5. Accomplish test coverage - Programmer checks the if the test coverage objective is achieved.
18
Q

Benefits of Test-Driven Development include:

A
  1. Helps the team understand and improve the requirements.
  2. Constantly validates the implementation with respect to the tests.
  3. Focusses on the desired functionality first but also address the other quality aspects such as program structure and readability through refactoring.
  4. Facilitates debugging because incremental implementation of the features makes it easy to locate and fix errors.
19
Q

Potential problems of Test-Driven Development

A
  1. The test cases may be too weak to ensure that the program indeed correctly implements the desired functionality.
  2. The test cases may be too focused on the main functionality and overlook other cases that may cause the program to crash.
  3. The test cases or test scripts are themselves programs. If they are not written in accordance to codinging standards and convention the maintenance is terrible.
20
Q

Apply agile principles to implementation consideraitons

A
  1. Develop small, incremental releases and iterate. Focus on frequent delivery of software products.
  2. Complete each feature before moving onto the next.
  3. Test early and often.
  4. Everybody owns the code - Everybody is responsible for the quality of the code.
21
Q

Tools for automated coding standards testing

A

Checkstyle: Tool to enable programmers to write Java code which adheres to a coding standard.

Linting: An automated tool which flags code based on a set of rules.

22
Q

What is a testing framework?

A

An execution environment for automated unit tests. Responsible for:
Defining the format in which to express expectations
Creating a mechanism to hook into or drive the application under test.
Generate and executing the tests.
Reporting tests results.