Software construction

Last updated

Software construction is a software engineering discipline. It is the detailed creation of working meaningful software through a combination of coding, verification, unit testing, integration testing, and debugging. It is linked to all the other software engineering disciplines, most strongly to software design and software testing. [1]

Contents

Software construction fundamentals

Minimizing complexity

The need to reduce complexity is mainly driven by limited ability of most people to hold complex structures and information in their working memories. Reduced complexity is achieved through emphasizing the creation of code that is simple and readable rather than clever. Minimizing complexity is accomplished through making use of standards, and through numerous specific techniques in coding. It is also supported by the construction-focused quality techniques. [2]

Anticipating change

Anticipating change helps software engineers build extensible software, which means they can enhance a software product without disrupting the underlying structure. [2] Research over 25 years showed that the cost of rework can be 10 to 100 times (5 to 10 times for smaller projects) more expensive than getting the requirements right the first time. Given that 25% of the requirements change during development on average project, the need to reduce the cost of rework elucidates the need for anticipating change. [3]

Constructing for verification

Constructing for verification means building software in such a way that faults can be ferreted out readily by the software engineers writing the software, as well as during independent testing and operational activities. Specific techniques that support constructing for verification include following coding standards to support code reviews, unit testing, organizing code to support automated testing, and restricted use of complex or hard-to-understand language structures, among others. [2]

Reuse

Systematic reuse can enable significant software productivity, quality, and cost improvements. Reuse has two closely related facets: [2]

Standards in construction

Standards, whether external (created by international organizations) or internal (created at the corporate level), that directly affect construction issues include: [2]

Managing construction

Construction model.

Numerous models have been created to develop software, some of which emphasize construction more than others. Some models are more linear from the construction point of view, such as the Waterfall and staged-delivery life cycle models. These models treat construction as an activity which occurs only after significant prerequisite work has been completed—including detailed requirements work, extensive design work, and detailed planning. Other models are more iterative, such as evolutionary prototyping, Extreme Programming, and Scrum. These approaches tend to treat construction as an activity that occurs concurrently with other software development activities, including requirements, design, and planning, or overlaps them. [1]

Construction planning

The choice of construction method is a key aspect of the construction planning activity. The choice of construction method affects the extent to which construction prerequisites (e.g. Requirements analysis, Software design, .. etc.) are performed, the order in which they are performed, and the degree to which they are expected to be completed before construction work begins. Construction planning also defines the order in which components are created and integrated, the software quality management processes, the allocation of task assignments to specific software engineers, and the other tasks, according to the chosen method. [1]

Construction measurement

Numerous construction activities and artifacts can be measured, including code developed, code modified, code reused, code destroyed, code complexity, code inspection statistics, fault-fix and fault-find rates, effort, and scheduling. These measurements can be useful for purposes of managing construction, ensuring quality during construction, improving the construction process, as well as for other reasons. [1]

Technology Integration in Construction Models

The integration of technology with construction models is crucial for a smooth operation. DevOps and Agile, prominent methodologies, prioritize technological synergy throughout the development lifecycle. DevOps streamlines construction through continuous integration, while Agile methods like Extreme Programming and Scrum use collaborative tools for concurrent development activities. This tech infusion marks a shift towards enhanced efficiency and adaptability in software development, reflecting a dynamic philosophy for optimal project outcomes. [4]

Practical considerations

Software construction is driven by many practical considerations:

Construction design

In order to account for the unanticipated gaps in the software design, during software construction some design modifications must be made on a smaller or larger scale to flesh out details of the software design. [5]

LowFan-out is one of the design characteristics found to be beneficial by researchers. Information hiding proved to be a useful design technique in large programs that made them easier to modify by a factor of 4. [6]

Construction languages

Construction languages include all forms of communication by which a human can specify an executable problem solution to a computer. They include configuration languages, toolkit languages, and programming languages: [7]

Programmers working in a language they have used for three years or more are about 30 percent more productive than programmers with equivalent experience who are new to a language. High-level languages such as C++, Java, Smalltalk, and Visual Basic yield 5 to 15 times better productivity, reliability, simplicity, and comprehensibility than low-level languages such as assembly and C. Equivalent code has been shown to need fewer lines to be implemented in high level languages than in lower level languages. [8]

Coding

The following considerations apply to the software construction coding activity: [9]

Construction testing

The purpose of construction testing is to reduce the gap between the time at which faults are inserted into the code and the time those faults are detected. In some cases, construction testing is performed after code has been written. In test-first programming, test cases are created before code is written. Construction involves two forms of testing, which are often performed by the software engineer who wrote the code: [1]

Reuse

Implementing software reuse entails more than creating and using libraries of assets. It requires formalizing the practice of reuse by integrating reuse processes and activities into the software life cycle. The tasks related to reuse in software construction during coding and testing are: [1]

Construction quality

The primary techniques used to ensure the quality of code as it is constructed include: [16]

Studies have shown that a combination of these techniques need to be used to achieve high defect detection rate. Other studies showed that different people tend to find different defects. One study found that the extreme programming practices of pair programming, desk checking, unit testing, integration testing, and regression testing can achieve a 90% defect detection rate. [17] An experiment involving experienced programmers found that on average they were able to find 5 errors (9 at best) out of 15 errors by testing. [19]

80% of the errors tend to be concentrated in 20% of the project's classes and routines. 50% of the errors are found in 5% of the project's classes. IBM was able to reduce the customer reported defects by a factor of ten to one and to reduce their maintenance budget by 45% in its IMS system by repairing or rewriting only 31 out of 425 classes. Around 20% of a project's routines contribute to 80% of the development costs. A classic study by IBM found that few error-prone routines of OS/360 were the most expensive entities. They had around 50 defects per 1000 lines of code and fixing them costs 10 times what it took to develop the whole system. [19]

Integration

A key activity during construction is the integration of separately constructed routines, classes, components, and subsystems. In addition, a particular software system may need to be integrated with other software or hardware systems. Concerns related to construction integration include planning the sequence in which components will be integrated, creating scaffolding to support interim versions of the software, determining the degree of testing and quality work performed on components before they are integrated, and determining points in the project at which interim versions of the software are tested. [1]

Construction technologies

Object-oriented runtime issues

Object-oriented languages support a series of runtime mechanisms that increase the flexibility and adaptability of the programs like data abstraction, encapsulation, modularity, inheritance, polymorphism, and reflection. [20] [21]

Data abstraction is the process by which data and programs are defined with a representation similar in form to its meaning, while hiding away the implementation details. [22] Academic research showed that data abstraction makes programs about 30% easier to understand than functional programs. [11]

Assertions, design by contract, and defensive programming

Assertions are executable predicates which are placed in a program that allow runtime checks of the program. [20] Design by contract is a development approach in which preconditions and postconditions are included for each routine. Defensive programming is the protection a routine from being broken by invalid inputs. [23]

Error-handling, exception-handling, and fault tolerance

Error-handling refers to the programming practice of anticipating and coding for error conditions that may arise when the program runs. Exception-handling is a programming-language construct or hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution. [24] Fault tolerance is a collection of techniques that increase software reliability by detecting errors and then recovering from them if possible or containing their effects if recovery is not possible. [23]

State-based and table-driven construction techniques

State-based programming is a programming technology using finite state machines to describe program behaviors. [23] A table-driven method is a schema that uses tables to look up information rather than using logic statements (such as if and case). [25]

Runtime configuration and internationalization

Runtime configuration is a technique that binds variable values and program settings when the program is running, usually by updating and reading configuration files in a just-in-time mode. Internationalization is the technical activity of preparing a program, usually interactive software, to support multiple locales. The corresponding activity, localization, is the activity of modifying a program to support a specific local language. [25]

See also

Notes

  1. 1 2 3 4 5 6 7 SWEBOK Pierre Bourque; Robert Dupuis; Alain Abran; James W. Moore, eds. (2004). "Chapter 4: Software Construction". Guide to the Software Engineering Body of Knowledge. IEEE Computer Society. pp. 4–1–4–5. ISBN   0-7695-2330-7.
  2. 1 2 3 4 5 SWEBOK 2014, p. 3-3.
  3. McConnell 2004, Chapter 3.
  4. Fitzgerald, Brian; Stol, Klaas-Jan (2017-01-01). "Continuous software engineering: A roadmap and agenda". Journal of Systems and Software. 123: 176–189. doi:10.1016/j.jss.2015.06.063. ISSN   0164-1212.
  5. SWEBOK 2014, p. 3-5.
  6. McConnell 2004, Chapter 5.
  7. SWEBOK 2014, p. 3-5 - 3-6.
  8. McConnell 2004, Chapter 4.
  9. SWEBOK 2014, p. 3-6.
  10. McConnell 2004, Chapter 11.
  11. 1 2 3 McConnell 2004, Chapter 6.
  12. 1 2 McConnell 2004, Chapter 7.
  13. McConnell 2004, Chapter 12.
  14. 1 2 McConnell 2004, Chapter 16.
  15. 1 2 McConnell 2004, Chapter 19.
  16. SWEBOK 2014, p. 3-7.
  17. 1 2 3 4 McConnell 2004, Chapter 20.
  18. 1 2 McConnell 2004, Chapter 21.
  19. 1 2 McConnell 2004, Chapter 22.
  20. 1 2 SWEBOK 2014, p. 3-8.
  21. Thayer 2013, pp. 140–141.
  22. Thayer 2013, p. 140.
  23. 1 2 3 SWEBOK 2014, p. 3-9.
  24. Thayer 2013, p. 142.
  25. 1 2 SWEBOK 2014, p. 3-10.

Related Research Articles

Computer programming or coding is the composition of sequences of instructions, called programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of procedures, by writing code in one or more programming languages. Programmers typically use high-level programming languages that are more easily intelligible to humans than machine code, which is directly executed by the central processing unit. Proficient programming usually requires expertise in several different subjects, including knowledge of the application domain, details of programming languages and generic code libraries, specialized algorithms, and formal logic.

In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. Refactoring is intended to improve the design, structure, and/or implementation of the software, while preserving its functionality. Potential advantages of refactoring may include improved code readability and reduced complexity; these can improve the source code's maintainability and create a simpler, cleaner, or more expressive internal architecture or object model to improve extensibility. Another potential goal for refactoring is improved performance; software engineers face an ongoing challenge to write programs that perform faster or use less memory.

Software engineering is an engineering-based approach to software development. A software engineer is a person who applies the engineering design process to design, develop, test, maintain, and evaluate computer software. The term programmer is sometimes used as a synonym, but may emphasize software implementation over design and can also lack connotations of engineering education or skills.

Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to:

A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. The process of finding and correcting bugs is termed "debugging" and often uses formal techniques or tools to pinpoint bugs. Since the 1950s, some computer systems have been designed to detect or auto-correct various software errors during operations.

Regression testing is re-running functional and non-functional tests to ensure that previously developed and tested software still performs as expected after a change. If not, that would be called a regression.

In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures—are tested to determine whether they are fit for use. It is a standard step in development and implementation approaches such as Agile.

The following outline is provided as an overview of and topical guide to software engineering:

Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later.

Code review is a software quality assurance activity in which one or more people check a program, mainly by viewing and reading parts of its source code, either after implementation or as an interruption of implementation. At least one of the persons must not have authored the code. The persons performing the checking, excluding the author, are called "reviewers".

<i>Code Complete</i> 1993 book by Steve McConnell

Code Complete is a software development book, written by Steve McConnell and published in 1993 by Microsoft Press, encouraging developers to continue past code-and-fix programming and the big design up front and waterfall models. It is also a compendium of software construction techniques, which include techniques from naming variables to deciding when to write a subroutine.

Software verification is a discipline of software engineering, programming languages, and theory of computation whose goal is to assure that software satisfies the expected requirements.

Software maintenance in software engineering is the modification of a software product after delivery to correct faults, to improve performance or other attributes.

In software development, code reuse, also called software reuse, is the use of existing software, or software knowledge, to build new software, following the reusability principles.

Coding best practices or programming best practices are a set of informal, sometimes personal, rules that many software developers, in computer programming follow to improve software quality. Many computer programs require being robust and reliable for long periods of time, so any rules need to facilitate both initial development and subsequent maintenance of source code by people other than the original authors.

Software security assurance is a process that helps design and implement software that protects the data and resources contained in and controlled by that software. Software is itself a resource and thus must be afforded appropriate security.

Frame technology (FT) is a language-neutral system that manufactures custom software from reusable, machine-adaptable building blocks, called frames. FT is used to reduce the time, effort, and errors involved in the design, construction, and evolution of large, complex software systems. Fundamental to FT is its ability to stop the proliferation of similar but subtly different components, an issue plaguing software engineering, for which programming language constructs or add-in techniques such as macros and generators failed to provide a practical, scalable solution.

In computer programming and software development, debugging is the process of finding and resolving bugs within computer programs, software, or systems.

Development testing is a software development process that involves synchronized application of a broad spectrum of defect prevention and detection strategies in order to reduce software development risks, time, and costs.

This article discusses a set of tactics useful in software testing. It is intended as a comprehensive list of tactical approaches to Software Quality Assurance (more widely colloquially known as Quality Assurance and general application of the test method.

References