0% found this document useful (0 votes)
18 views

BPP assignment

Uploaded by

sumaiyya patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

BPP assignment

Uploaded by

sumaiyya patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Q.1 What is the coding and documentation of the program?

Code documentation is the process through which software programmers document their
code. It is a combination of clear pictures and textual explanations that describe what a
codebase does and how it may be used. It enhances code readability, reproducibility, and
usability.
Technical documentation is essential for all parties involved in the SDLC, including software
developers and stakeholders. Effective communication with both technical and non-technical
audiences is crucial for the process's success. This enhanced communication enhances
employability and enhances technical communication abilities.
Documented code is often used more than undocumented open-source projects, as it provides
more information and makes it easier for users to contribute. Choosing a less powerful library
with well-documented code is preferable, as developers aim to make important decisions in
clear language for easy access.
How Do You Write a Documented Code?
 Develop clean code before writing documentation to avoid ambiguous, improperly
formatted code. Create a logical folder structure, adhere to naming standards, remove
repetitive code, and format code according to consistent standards throughout the
project.
 Select appropriate tools for creating searchable, user-friendly HTML documentation
and manual code documentation for open-source software. Sphinx is a Python
package, Pkgdown for R projects, and free HTML-favoured tools like latex, pandoc,
and markdown.
 Document code step-by-step as it's written to save time and produce accurate,
thorough documentation. Use proper versioning to track changes and ensure
consistent documentation.
 Add Comments - Comments in source code files provide background information,
justification for coding styles, and explanations of algorithms. Use active voice,
present tense, imperative mood, and concise language for improved readability.
 Add Docstrings-Docstrings are multi-line descriptions at the beginning of function
definitions, documenting functional units in code. They maintain a connection
between documentation and components, with two types: functional docstrings, which
include function details, parameters, results, errors, and exceptions, and structural
docstrings, explanatory comments in standalone modules.
Q.2 What is Software Architecture? How to design software architecture in five steps.

Software architecture design involves programming knowledge to plan high-level software


design, allowing teams to sketch out the big picture and prepare prototypes. By following tips
and best practices, developers can analyze software characteristics and determine the best
approach for software architecture.

5 Steps of designing software architecture:

1. Have a clear understanding of your requirements: A clear understanding of requirements is


crucial for successful software architecture and stakeholder satisfaction. To map
requirements, start with a high-level view using mind mapping and map functional
requirements using verbs like "view" and “edit” which can link “account” or “profile” to each
other in a mind map of functional areas." This approach helps ensure a well-rounded project
and a satisfied end product.

2. Start thinking about each component: Functional requirements significantly impact a


project, and to overcome challenges, identify which requirements pose significant challenges
to your design or project plan. Develop a working draft with your team, considering conflicts
and conflicts between items from your stakeholders' wish list. Wait and design the final
architecture later, as architecture planning will likely change throughout the process.

3. Divide your architecture into slices: Agile architecture design focuses on vertical slices,
allowing your team to quickly deliver value to users and plan development resources. By
diagramming the layers involved in your software architecture project, you can visualize the
entire piece and how each layer influences other layers.

4. Prototype: Prototyping is crucial for validating work and checking assumptions. It allows
for early failures, providing quick feedback, and discovering proof-of-concept. It is essential
to document design decisions and changes, maintain a careful revision history, have a single
source of truth, and use diagrams to manage prototype changes and visualize differences
between versions.

5. Identify and quantify non-functional requirements: Non-functional requirements define the


system's characteristics and are essential to design. These requirements may be specific to a
specific part of the software architecture, and stakeholders may have their own expectations
about them. Diagramming non-functional requirements helps visualize their quantification
and place specific requirements in relevant contexts.
Q.3 What is a design pattern? Explain the usage of design patterns and types of design
patterns.

A software design pattern is a general, reusable solution to common problems in software


engineering. It represents the best practices experienced object-oriented software developers
use, and they are solutions to general problems faced during software development. The
Gang of Four (GOF) was founded in 1994 by four authors, who published a book titled
"Design Patterns - Elements of Reusable Object-Oriented Software." The authors based their
design patterns on object-oriented principles, such as programs to interface and favor object
composition over inheritance.

Design patterns have two main usages in software development:

 As a common platform for developers, providing standard terminology specific to


specific scenarios. For example, a singleton design pattern signifies the use of a single
object, allowing all developers familiar with the pattern to follow it.
 Additionally, design patterns have evolved over time, providing best practices for
certain problems faced during software development. Learning these patterns helps
inexperienced developers learn software design more easily and quickly.

Types of Design Patterns

As per the design pattern reference book Design Patterns - Elements of Reusable Object-
Oriented Software, there are 23 design patterns that can be classified in following
categories:

1. Creational Patterns: These design patterns provide a way to create objects while
hiding the creation logic, rather than instantiating objects directly using a new
operator. This gives the program more flexibility in deciding which objects must be
created for a given use case.
2. Structural Patterns: These design patterns concern class and object composition. The
concept of inheritance is used to compose interfaces and define ways to compose
objects to obtain new functionalities.
3. Behavioral Patterns: These design patterns are specifically concerned with
communication between objects.
4. J2EE Patterns: These design patterns are specifically concerned with the presentation
tier. These patterns are identified by Sun Java Center.

Q.4 Short Note:

a) Defensive Programming: Defensive programming is a method of creating code for


computer software to prevent issues before they arise and improve stability. It focuses on
eliminating unnecessary code while generating enough to handle all user actions. It helps
developers catch errors and prevent future issues, saving time and money during debugging.

The three types of defensive operations are mobile defense, area defense, and retrograde.
Mobile defense involves engaging the enemy rapidly, disrupting their momentum, and
preventing their objectives. Area defense focuses on establishing defensive positions in key
terrain areas, using obstacles, strong points, and overlapping fields of fire to hold ground and
deny enemy access. Retrograde defense involves withdrawing from a current position to a
new defensive line or area, disengaging from direct contact while preventing enemy advance.
These strategies are part of broader military tactics and planning, involving forces, terrain
analysis, and situational awareness.

b) Code design: Code design in programming involves the steps a programmer takes before
starting a program in a specific language. When properly documented, these steps make the
completed program easier for other programmers to maintain in the future. Coding standards
improve code quality, increase efficiency, facilitate collaboration, ensure compatibility, and
reduce maintenance costs. To follow industry-specific coding standards, developers should
focus on code readability, standardize headers for different modules, avoid using single
identifiers for multiple purposes, turn daily backups into an instinct, leave comments and
prioritize documentation, formalize exception handling, and choose between Closed vs. Open
coding standards.

c) Performance tuning of the code: performance tuning improves the price-to-performance


ratio for a system or set of services by reallocating the available computing, network, or
storage resources. Performance tuning is essential when bottlenecks arise between
performance and execution, as it removes them. This process involves reducing input and
increasing output by reducing the space and resources used by the same source code.
Bottlenecks block the path through which performance occurs, causing the entire system to
go idle. Tuning removes cache, bugs, wear, and tears from the system, while long usage of
code can cause it to become weary and teary, slowing down speed. By performing tuning, we
can ensure optimal performance and reduce the impact of bottlenecks on the system.

You might also like