Introduction to Software Engineering
It is divided into these sub-topics…
It is divided into these sub-topics…
Software Crisis:
Began in mid-1960s
Resulted from software development that ran over budget and behind schedule with unmanageable and buggy code
By the time old software solutions were developed, the newer technologies got the traction, and code refactoring would become necessary
Solutions didn’t scale well to large projects
Engineering principles:
Resolved as standardized methods in software engineering and computer-aided software engineering (CASE) tools were developed
Software engineer vs. software developer:
Engineer | Developer |
---|---|
Also developers | Narrower in scope than SE |
Broad, big picture knowledge base | Creative approaches |
Systematic development process | Write code to implement specific functionality and solve specific problems |
Focus on structure |
SE responsibilities:
Design, build and maintain software systems
Write and test code
Consult with stakeholders, third party vendors’ security specialists, and other team members
Software Development Life Cycle (SDLC):
Scientific approach to software development
Guides the software development process
Identifies discrete steps needed to develop software
Systematic process to develop high-quality software
Aims to produce software that meets requirements
Defined phases with their own processes and deliverables
Cycle of planning, design, and development
Minimizes development risks and costs
History of the SDLC:
Conceived of in the mid-1960s
A deliberate approach needed to manage complex projects
Initially used the waterfall method
Adapted to use iterative methods
Advantages of the SDLC:
Improves efficiency and reduce risks
Team members know what they should be working on and when
Facilitates communication among stakeholders
Team members know when development can move to the next phase
Respond to changing requirements
Solve problems early in the process
Reduces overlapping responsibilities
Requirements;
Prototyping:
Small-scale replica to clarify requirements
Tests design ideas
Can be developed at various stages of the SDLC
Software Requirements Specification:
Requirements are documented in the SRS
All stakeholders must agree
Development starts when the design document is finalized and sent to the developers to write code for it.
Code is tested to ensure stability, security, and that it meets requirements from the SRS
Bugs reported, tracked, fixed, and retested
Some common tests:
Unit testing
Integration testing
System testing
Acceptance testing
Common software engineering processes:
The SRS encompasses the process of collecting and documenting the set of requirements that the software needs to adhere to
It may include a set of use cases that describe the business needs and user flows that the software must implement
Software requirements can be classified into four broad categories:
It refers to characteristics of the code, including attributes:
Maintainability
Readability
Testability
Security
Quality code must fulfill the intended requirements of the software without defects
Clean and consistent
Easy to read and maintain
Well documented
Efficient
Coding for quality entails a following set of coding practices during development;
Following coding standards
Using linters to detect errors
Commenting in the code itself to make it easy to understand and modify
The process of verifying that the software matches established requirements and is free of bugs
Identify errors, gaps, or missing requirements
Ensures reliability, security, performance, and efficiency
Software testing can often be automated or done manually
The types of testing are;
Unit testing
Integration testing
System testing
User acceptance testing (UAT) or Beta testing
Alpha | Beta | General Availability |
---|---|---|
Select stakeholders | All stakeholders | Stable |
May contain errors | User testing | All users |
Preview of functioning version | Meets requirements | |
Design changes may occur |
System documentation:
README files, inline comments, architecture and design documents, verification information, and maintenance guides
User documentation:
User guides, instructional videos, manuals, online and inline help
Steps to gathering requirements:
Key personnel:
Goals: broad, long-term achievable outcomes
Objectives: actionable, measurable actions that achieve the goal
Elicit:
Surveys
Questionnaires
Interviews
Document:
Align with goals and objectives
Easily understood
Confirm:
Consistency
Clarity
Completeness
1) Software requirements specification (SRS)
2) User requirements specification (URS)
3) System Requirements Specification (SysRS)
Common development methodologies:
A process is needed to clarify communication and facilitates information sharing among team members.
Some of these methodologies are:
Sequential vs. iterative:
Software versions are identified by version numbers, indicate:
Software developers use versioning to keep track of new software, updates, and patches
Version numbers:
Version numbers can be short or long, with 2, ,3, or 4 set
Each number set is divided by a period
An application with a 1.0 version number indicates the first release
Software with many releases and updates will have a larger number
Some use dates for versioning, such as Ubuntu Linux version 18.04.2 released in 2018 April, with a change shown in the third number set
What do version numbers mean?
Some version numbers follow the semantic numbering system, and have 4 parts separated by a period
the first number indicates major changes to the software, such as a new release
The second number indicates that minor changes were made to a piece of software
The third number in the version number indicates patches or minor bug fixes
The fourth number indicates build numbers, build dates, and less significant changes
Version compatibility:
Test cases:
The purpose of functional is to check:
Its attributes are:
Non-functional testing questions:
Choosing test cases for regression testing:
Unit → Integration → System → Acceptance
Purpose of integration testing:
Written assets
Video assets
Graphical assets
Product vs. process documentation:
Product Documentation | Process Documentation |
---|---|
Relates to product functionality | Describes how to complete a task |
Intended for the development team including developers, architects, and QA. Describes expected features and functionality.
It includes:
Written by architects and development team to explain how the software will be built to meet the requirements.
Written in the code to help developers read the code:
Pertains to the testing team’s strategy progress, and metrics:
Intended for end-users to explain to operate software or help install and troubleshoot system:
Cloud Applications
Built to work seamlessly with a Cloud-based back-end infrastructure
Cloud-based data storage and data processing, and other Cloud services, making them scalable and resilient
Building websites and cloud applications:
The environment is divided into two primary areas:
Full-stack developers have skills, knowledge, and experience in both front-end and back-end environments.
Developers Tools:
HTML is used to create the structure and CSS is used to design it and make it appealing
CSS is also used to create websites that have cross browser compatibility such as PC, mobiles devices etc.
JS adds interactivity
A front-end development language is Syntactically Awesome Style Sheets (SASS)
An extension of CSS that is compatible with all versions of CSS.
SASS enables you to use things like variables, nested rules, inline imports to keep things organized.
SASS allows you to create style sheets faster and more easily.
Learner Style Sheets (LESS)
LESS
enhances CSS, adding more styles and functions.
It is backwards compatible with CSS.
Less.js is a JS tool that converts the LESS
styles to CSS styles.
Websites are designed as reactive and responsive
Reactive or adaptive websites display the version of the website designed for a specific screen size.
A website can provide more information if opened on a PC than when opened on a mobile device.
Responsive design of a website means that it will automatically resize to the device.
If you open up a products’ website on your mobile device, it will adapt itself to the small size of the screen and still show you all the features.
JavaScript’s frameworksorks:
Angular Framework:
an open-source framework maintained by google
Allows websites to render HTML pages quickly and efficiently
Tools for routing and form validation
React.js:
Developed and maintained by Meta
It is a JS library that builds and renders components for a web page
Routing is not a part of this framework and will need to be added using a third-party tool
Vue.js:
maintained by the community and its main focus is the view layer which includes UI, buttons, visual components
Flexible, scalable, and integrates well with other frameworks
Very adaptable – it can be a library, or it can be the framework
The task of a front-end developer evolves continuously.
The technologies are upgraded constantly, and so the front-end developers need to keep upgrading the websites that they create.
The websites that they create should work in multiple browsers, multiple operating systems, and multiple devices.
Creates and manages resources needed to respond to client requests
Enables server infrastructure to process request, supply data and provide other services securely
What does the back-end developer do?
Process the data you enter while browsing, such as:
Write and maintain the parts of the application that process the inputs
Back-End Developer skills:
Examples of tasks and associated skills that back-end developers need:
APIs, routing, and endpoints:
Back-end languages and frameworks:
Some popular back-end languages are:
Working with databases:
Languages and tools for working with databases:
A cloud application developer’s workbench includes:
Frameworks:
Provide a standard way to build and deploy applications
Act as a skeleton you extend by adding your own code
Dictate the architecture of the app
Call your code
Allow you less control than libs
Inversion of Control:
Libs allow you to call functions as when required
Frameworks define the workflow that you must follow
Inversion of control makes the framework extensible
More tools:
CI/CD
Build tools
Examples of Build Tools:
Packages:
Package managers:
Package Managers by platform:
Cloud application package managers:
What is a software stack?
Combination of technologies
Used for creating applications and solutions
Stacked in a hierarchy to support the application from user to computer hardware
Typically include;
Parts of the software stack:
Examples of software stack:
Python-Django
Ruby on Rails
ASP .NET
LAMP
MEAN
MEVN
MERN
LAMP Stack:
MEAN and relasted stacks:
Comparison of MEAN, MEVN, and LAMP:
Interpreted programming:
Interpreted programming examples:
Compiled programming:
Compiled programming examples:
Compiled programming:
Choosing a programming language:
Developers determine what programming language is best to use depending on:
Programming languages:
Interpreted vs. compiled
Programming language levels:
High-level programming languages:
More sophisticated
Use common English
SQL, Pascal, Python
Low-level programming languages:
Use simple symbols to represent machine code
ARM, MIPS, X86
SQL vs. NoSQL:
How does a query language work?
Query language is predominantly used to:
When a user performs a query, the database:
Query statements:
Database queries are either:
More common to use the term “statement”
Select queries request data from a database
Action queries manipulate data in a database
Common query statements:
query statement examples:
Less sophisticated than query languages, structured programming languages, and OOP languages
Uses simple symbols to represent 0s and 1s
Closely tied to CPU architecture
Each CPU type has its own assembly language
Assembly language syntax:
Simple readable format
Entered one line at a time
One statement per line
{lable} mnemonic {operand list} ;{comment}
mov TOTAL, 212 ;Transfer the value in the memory variable TOTAL
Assemblers:
Assembly languages are translated using an assembler instead of a compiler or interpreter
One statement translates into just one machine code instruction
Opposite to high-level languages where one statement can be translated into multiple machine code instructions
Translate using mnemonics:
Input (INP), Output (OUT), Load (LDA), Store (STA), Add (ADD)
Statements consist of:
Opcodes that tell the CPU what to do with data
Operands that tell the CPU where to find the data
Pseudocode vs. flowcharts:
Pseudocode | Flowcharts |
---|---|
Informal, high-level algorithm description | Pictorial representation of algorithm, displays steps as boxes and arrows |
Step-by-step sequence of solving a problem | Used in designing or documenting a process or program |
Bridge to project code, follows logic | Good for smaller concepts and problems |
Helps programmers share ideas without extraneous waste of creating code | Provide easy method of communication about logic behind concept |
Provides structure that is not dependent on a programming language | Offer good starting point for project |
Flowcharts:
Flowchart software:
Pseudocode:
Pseudocode Advantages:
Introduction to programming logic:
Boolean expressions and variables:
Branching programming logic:
Branching statements allow program execution flow:
Looping programming logic:
While loop: Condition is evaluated before processing, if true, then loop is executed
For loop: Initial value performed once, condition tests and compares, if false is returned, loop is stopped
Do-while loop: Condition always executed after the body of a loop
Special type of identifiers to reference multiple program elements
Arrays and vectors
Arrays:
Simplest type of container
Fixed number of elements stored in sequential order, starting at zero
Declare an array
Syntax
[]
int my_array[50]
Vectors:
vector <int> my_vector;
Consequence of modular programming software development methodology
Structured, stand-alone, reusable code that performs a single specific action
Some languages refer to them as subroutines, procedures, methods, or modules
Two types:
Standard library functions – built-in functions
User-defined functions – you write yourself
Objects in programming
Design and documentation take place during the design phase of the SDLC
Software architecture is the organization of the system
Serves as a blueprint for developers
Comprised of fundamentals structures and behaviors
Early design decisions:
How components interact
Operating environment
Design principles
Costly to change once implemented
Addresses non-functional aspects
Why software architecture is important:
Communication
Earliest design decisions
Flexibility
Increases lifespan
Software architecture and tech stacks:
Guides technology stack choice
Tech stacks must address non-functional capabilities
Tech stacks include:
Software design is a process to document:
Structural components
Behavioral attributes
Models express software design using:
Diagrams and flowcharts
Unified Modeling Language (UML)
Characteristics of structured design:
Structural elements: modules & submodules
Cohesive
Loosely coupled
Structure diagram example:
Unified Modeling Language (UML):
Advantages of Unified Modeling Language (UML):
State transition diagram example:
Interaction diagram:
Object-Oriented Languages:
Classes and objects:
Object-Oriented analysis and design:
Class diagram:
Component characteristics:
Components examples:
Component-based architecture:
Examples of Services:
Service-oriented architecture:
Distributed systems
Distributed system characteristics:
Nodes:
Distributed system architectures:
2-tier
3-tier
Peer-to-peer (P2P)
Event-driven
Microservices
Examples:
Combining patterns
Application environments:
Include:
Pre-production environments:
Entire solution stack ++
Intended for all users
Take load into consideration
Other non-functional requirements
More complex than pre-production environments
On-premises deployment:
System and infrastructure reside in-house
Offers greater control of the application
Organization is responsible for everything
Usually more expensive than compared to cloud deployment
Cloud deployment types:
Production deployment infrastructure:
Web and application servers:
Proxy server:
An intermediate server that handles requests between two tiers
Can be used for load balancing, system optimization, caching, as a firewall, obscuring the source of a request, encrypting messages, scanning for malware, and more
Can improve efficiency, privacy, and security
Databases and database servers:
Databases are a collection of related data stored on a computer that can be accessed in various ways
DBMS (Database Management System) controls a database by connecting it to users or other programs
Database servers control the flow and storage of data
Software engineering:
Engineering
Mathematics
Computing
Types of Software:
Desktop and web applications
Mobile Applications
Games
Operating Systems
Network controllers
Types of technologies:
Programming languages
Development environments
Frameworks
Libs, databases, and servers
Categories of software engineer:
Back-end engineers or systems developers
Front-end engineers or application developers
Software engineering teams:
Off-the-shelf software
Bespoke software
Internal software
And within the teams they might work on:
Data integration
Business logic
User interfaces
Software engineering tasks:
Designing new software systems
Writing and testing code
Evaluating and testing software
Optimizing software programs
Maintaining and updating software systems
Documenting code
Presenting new systems to users and customers
Integrating and deploying software
Responsibilities:
What are hard skills?
Commonly required hard skills in software engineering:
What are soft skills?
Analysis and design:
Analyze users’ needs
Design solutions
Development:
Computer programming
Coding
Languages:
Frameworks
Test:
Testing
Debugging
Deployment:
Shell scripting
Containers
CI/CD
Monitoring
Troubleshooting
Teamwork:
Different teams
Squads
Pair programming
Take advantage of strengths
Learn from each other
Communication:
Peers
Managers
Clients
Users
Time management:
Time-sensitive projects
Teams across time-zones
Problem-solving:
Design an appropriate solution
Write an effective code
Locate and resolve bugs
Manage issues
Adaptability:
Client changes
Management request
User needs
Open to feedback:
Peer review
Mentor
Stakeholders
Employment options:
Technical
Coding and problem-solving
Management
Leadership and soft skills
Job Titles:
Origins of the code of ethics:
About the code of ethics: