IBM DevOps and Software Engineering Professional Certificate
This specialization has been subdivided into 14 courses and a Capstone Project.
This specialization has been subdivided into 14 courses and a Capstone Project.
It has following modules…
“Tools are not the solution to a cultural problem.”
– Gartner
“Team culture makes a large difference to a team’s ability to deliver software and meet or exceed their organizational goals.”
– Accelerate State of DevOps 2021
Think Differently
Work Differently
Team culture makes a large difference to a team’s ability to deliver software and meet or exceed their organizational goals.
Organize Differently
Measure Differently
Disruptive Business model:
52% of the Fortune 500 have disappeared since the year 2000.
When disruption happen, businesses need to adopt according no matter what, and this adaptation should be agile and lean.
Digitization + Business Model:
Technology is the enabler of innovation, not the driver of innovation.
The Businesses, who adapt to new tech, survive.
The refusal to change according to the digital ages makes it susceptible to bankruptcy.
The term (development and operations) is an extension of agile development environments that aims to enhance the process of software delivery as a whole. — Patrick Debois, 2009
Agility is the goal:
“DevOps starts with learning how to work differently. It embraces cross-functional teams with openness, transparency, and respect as pillars.” — Tony Stafford, Shadow Soft.
DevOps has three dimensions:
Responsibility, transparency, feedback:
“Culture is the #1 success factor in DevOps. Building a culture of shared responsibility, transparency, and faster feedback is the foundation of every high-performing DevOps team.” — Atlassian
Culture, culture, culture:
While tools and methods are important; … it’s the culture that has the biggest impact.
-Change thinking patterns of people
We have come to value:
That is, while there is value in the items on the right, we value the items on the left more.
Agile alone is not good enough:
2 Speed IT:
2007 Patrick Debois:
He recognized Dev and Ops worked ineffectively and not together.
2008 Agile Conference:
Andrew Clay Shafer – Agile Conference 2008 BoF (Birds of a Feather) meeting “Agile Infrastructure”
2009 Velocity 10+ deploys per day:
John Allspaw – Velocity 2009 “10+ Deploys Per Day: Dev and Ops Cooperation at Flickr”
DevOpsDays – Patrick Debois started the first DevOpsDays conference Ghent, Belgium, October 2009
2010 Continuous Delivery:
Continuous Delivery – by Jez Humble and David Farley
2013 The Phoenix Project:
The Phoenix Project – by Gene Kim, Kevin Behr and George Spafford
2015 State of DevOps Report:
State of DevOps Reports – from DevOps Research and Assessment (DORA), founded by Dr. Nicole Forsgren, Gene Kim, and Jez Humble
2016 The DevOps Handbook:
The DevOps Handbook – by Gene Kim, Jez Humble, Patrick Debois, and John Willis
2019 10 Years of DevOpsDays:
DevOpsDays – 40 events in 21 countries are scheduled for 2019 (10 years later) Patrick Debois (lead 2009-15) Bridget Kromhout (lead 2015-2020)
It reminds us that DevOps is:
What is social coding?
Open source practice
All repos are public
Everyone is encouraged to contribute
Anarchy is controlled via Pull Requests
Code reuse dilemma:
Code has 80% of what you need, but 20% is missing
How do you add 20% missing features?
Social Coding Solution:
Discuss with the repo owner
Agree to develop it
Open an Issue and assign it to yourself
Fork the code and make your changes
Issue a Pull Request to review and merge back
Pair Programming:
Two programmers on one workstation
The driver is typing
The navigator is reviewing
Every 20 minutes they switch roles
Pair programming benefits:
Higher code quality
Defects found earlier
Lower maintenance costs
Skills transfer
Two set of eyes on every line of codebase
Create a separate Git repository for every component
Create a new branch for every Issue
Use PRs to merge to master
Every PR is an opportunity for a code review
Git feature branch workflow:
Concept from Lean Manufacturing
Faster feedback
Supports experimentation
Minimize waste
Deliver faster
Small batch example:
You need to mail 1000 brochures:
Step 1: Fold brochures
Step 2: Insert brochures into envelopes
Step 3: Seal the envelopes
Step 4: Stamp the envelopes with postage
Batch of 50 brochures:
Single Piece Flow:
Minimum Viable Product Example:
The importance of testing:
“If it’s worth building, it’s worth testing. If it’s not worth testing, why are you wasting your time working on it?” — Scott Ambler
Test cases drive the design
You write the tests first then you write the code to make the test pass
This keeps you focused on the purpose of the code
Code is of no use if your client can’t call it
Why devs don’t test:
I already know my code works
I don’t write broken code
I have no time
Why is TDD important for DevOps?
BDD vs. TDD:
Explore the problem domain and describe the behavior
Document the behavior using Gherkin syntax
Use BDD tools to run those scenarios
One document that’s both the specification and the tests
Gherkin:
An easy-to-read natural language syntax
Given … When… Then…
Understandable by everyone
Gherkin Syntax:
Given (some context)
When (some event happens)
Then (some testable outcome)
And (more context, events, or outcomes)
Retail BDD example
Gherkin for acceptance criteria:
Think differently about application design:
Think cloud native:
Think microservices:
“The microservices architectural style is an approach to developing a single application as a suit of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery.” — Martin Fowler and James Lewis
Failure happens:
Retry pattern:
Circuit Breaker pattern:
Bulkhead pattern:
Chaos engineering:
Working DevOps:
Culture of teaming and collaboration
Agile development as a shared discipline
Automate relentlessly
Push smaller releases faster
Taylorism:
Adoption of command and control management
Organizations divided into functional silos
Decision-making is separated from work
Impact of Taylorism on IT:
Software development is bespoke:
Software development is NOT like assembling automobiles
Most of the parts don’t exist, yet
Software development is craft work
Taylorism is not appropriate for craft work
Abandon Command and Control:
Command and control is not Agile
Stop working in silos
Let your people amaze you
Software engineering is organic:
Software stack is constantly updated
New features are being added
System behavior changes over time
Yet we treat software engineering like a civil engineering project
The project model is flawed:
The project model doesn’t work for software development
Treat software development like product development
Encourage ownership and understanding
Software engineering is not civil engineering
Maintain stable, lasting teams
Diametrically opposed views:
A clash of work culture:
The no-win scenario:
Operations view of development:
Development teams throw dead cats over the wall
Manually implemented changes
Lack of back-out plans
Lack of testing
Environments that don’t look like production
Development view of operations:
All-or-nothing changes
Change windows in the dead of night
Implemented by people furthest away from the application
Ops just cuts and pastes from “runbooks”
No-win scenario:
If the website works, the developers get the praise!
If the website is down, operations gets the blame!
Required DevOps behaviors:
Described an executable textual format
Configure using that description
Configuration Management Systems to make this possible (Ansible, puppet etc.)
Never perform configurations manually
Use version control
Ephemeral immutable infrastructure:
Server drift is a major source of failure
Servers are cattle not pets
Infrastructure is transient
Build through parallel infrastructure
Immutable delivery via containers:
Applications are packaged in containers
Same container that runs in production can be run locally
Dependencies are contained
No variance limits side effects
Rolling updates with immediate roll-back
Immutable way of working:
You never make changes to a running container
You make changes to the image
Then redeploy a new container
Keep images up-to-date
CI vs. CD:
Continuously deploying to a production-like environment
Traditional Development:
Changes are kept small:
Working in small batches
Committing regularly
Using pull requests
Committing all changes daily
CI automation:
Build and test every pull request
Use CI tools that monitor version control
Test should run after each build
Never merge a PR with failing tests
Benefits of CI:
Faster reaction times to changes
Reduced code integration risk
Higher code quality
The code in version control works
Master branch is always deployable
“Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.” — Martin Fowler
Release to production at any time:
A CI/CD pipeline needs:
Continuous integration and delivery:
Five key principles:
CI/CD + Continuous deployment:
How DevOps manages risk:
How does organization affect DevOps?
Is the culture of your organization agile?
Conway’s Law:
“Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.” — Melvin Conway, Datamation, 1968
Traditional organization around technology:
Organized around business domains:
Align teams with the business:
DevOps is often misunderstood:
Perspectives on DevOps:
DevOps is not a team:
“The DevOps movement addresses the dysfunction that results from organizations composed of functional silos. Thus, creating another functional silo that sits between Dev and Ops is clearly a poor (and ironic) way to try, and solve these problems.” — Jez Humble, The DevOps Handbook
Working in silos doesn’t work:
A DevOps team means we’re DevOps, right?
DevOps is not a job title:
Bad behavior:
“Bad behavior arises when you abstract people from the consequences of their actions.” — Jez Humble, Continuous Delivery
Functional silos breed bad behavior:
Actions have consequences:
DevOps organizational objective:
Shared consciousness
…with
distributed (local) control
On the folly of rewarding for A, while hoping for B
“Whether dealing with monkeys, rats, or human beings, it is hardly controversial to state that most organisms seek information concerning what activities are rewarded, and then seek to do (or at least pretend to do) those things, often to the virtual exclusion of activities not rewarded. The extent to which this occurs, of course, will depend on the perceived attractiveness of the rewards offered, but neither operant nor expectancy theorists would quarrel with the essence of this notion.” — Steven Kerr, The Ohio State University
Measure what matters:
Social metrics:
DevOps metrics:
DevOps changes the objective:
Vanity metrics:
We had 10,000 daily hits to our website!
Now what? (What does a hit represent?)
What actions drove those visitors to you?
Which actions to take next?
Actionable metrics:
Actionable metric examples:
Top four actionable metrics:
Culture measurements:
You can rate statements developed by Dr. Nicole Forsgren to measure your team’s culture, including statements about information, failures, collaboration, and new ideas.
Strongly agree or disagree?
What is SRE?
“…what happens when a software engineer is tasked with what used to be called operations.” —Ben Treynor Sloss
Goal: Automate yourself out of a job.
Tenets of SRE:
Hire only software engineers
Site reliability engineers work on reducing toil through automation
SRE teams are separate from development teams
Stability is controlled through error budgets
Developers rotate through operations
Team differences:
SRE maintains separate development and operations silos with one staffing pool
DevOps breaks down the silos into one team with one business objective
Maintaining stability:
Commonality:
Both seek to make both Dev and Ops work visible to each other
Both require a blameless culture
The objective of both is to deploy software faster with stability
DevOps + SRE:
SRE maintains the infrastructure
DevOps uses infrastructure to maintain their applications
This course has following modules…
It has these modules…
What is Agile?
Agile is an iterative approach to project management that helps teams be responsive and deliver value to their customers faster
Agile defining characteristics:
Agile emphasizes:
Agile Manifesto:
We have come to value:
Individuals and interactions over processes and tools.
Working software over comprehensive documentation.
Customer collaboration over contract negotiation.
Responding to change over following a plan.
That is, while there is value in the items on the right, we value the items on the left more.
Agile Software development:
Key takeaway:
Build what is needed, not what was planned.
Problems with waterfall approach:
Extreme Programming values:
What is Kanban?
Kanban | ‘kanban | noun
(also Kanban system) a Japanese manufacturing system in which the supply of components is regulated through the use of an instruction card sent along the production line.
Origin
1970s: Japanese, Literally mean ‘billboard, sign’
Core principles of Kanban:
Agile and Scrum:
Scrum:
Is a management framework for incremental product development
Prescribes small, cross-functional, self-organizing teams
Provides a structure of roles, meeting, rules, and artifacts
Uses fixed-length iterations called sprints
Has a goal to build a potentially shippable product increment with every iteration
Easy to Understand – Difficult to master
Sprint:
A sprint is one iteration through the design, code, test, and deploy cycle
Every sprint should have a goal
2 weeks in duration
Steps in the Scrum process:
Agile development is iterative:
Scrum roles:
Scrum Artifacts:
Product backlog
Sprint backlog
Done increment
Scrum events:
Sprint planning meeting
Daily Scrum meeting (a.k.a. daily stand-up)
Sprint
Sprint review
Sprint retrospective
Benefits of Scrum:
Higher productivity
Better product quality
Reduced time to market
Increased stakeholders satisfaction
Better team dynamics
Happier employees
Scrum vs. Kanban:
Organize for success:
Proper organization is critical to success
Existing teams may need to be reorganized
Conway’s Law:
“Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.”
— Melvin Conway, Datamation, 1968
Examples of Conway’s Law:
If you ask an organization with four teams to write a compiler … you will get a 4-pass compiler!
How teams should be aligned?
Teams are loosely coupled, tightly aligned
Each team has its own mission aligned with the business (like a “mini startup”)
Teams have end-to-end responsibility for what they build
The long-term mission is usually around a single business domain
Autonomy is important:
It’s motivating – and motivated people build better stuff
It’s fast – decisions happen locally in the team
It minimizes handoffs and waiting, so teams don’t get bogged down
The Agile dilemma!
The entire organization must be Agile:
Agile + DevOps = Alignment
The biggest pitfall for companies is that, they think they’re agile, but actually they’re just doing an iterative work.
Agile is not…
Deadlines:
“I love deadlines… I like the whooshing sound they make as they fly by”. – Douglas Adams
How do you avoid this?
Plan iteratively:
Don’t decide everything at the point when you know the least
Plan for what you know
Adjust as you know more
Your estimates will be more accurate
Formulas for failure:
Product Manager vs. Product Owner:
Project Manager vs. Scrum Master:
Development Team vs. Scrum Team:
“Until and unless business leaders accept the idea that they are no longer managing projects with fixed functions, timeframes, and costs, as they did with waterfall, they will struggle to use agile as it was designed to be used.”
— Bob Kantor, Founder Kantor Consulting Group, Inc.
The roles have changed:
Agile planning tools:
Tools will not make you Agile
Tools can support your Agile process
Many Agile planning tools
ZenHub is one of them
ZenHub:
Plug-in to GitHub
Provides a kanban board and project management reporting
Customizable and integrated with GitHub
Why use ZenHub?
Helps you manage where you are in a project based on GitHub Issues
Provides an easy way to let management know how you are doing
Maintains up-to-date status due to integration with GitHub
Allows developers to only use one tool – GitHub
What is Kanban Board?
Real World Example:
Default ZenHub pipelines:
What is a user story?
A user story represents a small piece of business value that a team can deliver in an iteration.
Story contents:
Stories should contain:
A brief description of the need and business value
Any assumptions or details
The definition of “done”
Story description:
User stories document a persona requesting a function to achieve a goal:
As a <some role>
I need <some function>
So that <some benefit>
Assumptions and details:
It’s important to document what you know;
List any assumptions
Document any details that may help the developer
Acceptance criteria:
It is critical to document the definition of “done”
I like to use the Gherkin syntax
Given <some precondition>
When <some event happens>
Then <some outcome>
Sample Story:
Bill Wake’s INVEST:
Independent
Negotiable
Valuable
Estimable
Small
Testable
Epic:
A big idea
A user story that is bigger than a single sprint
A user story that is too big to estimate on its own
When to use an epic?
When a story is too large in scope it is considered an epic
Backlog items tend to start as epics when they are lower priority and less defined
For sprint planning, epics should be broken down into smaller stories
What are story points?
Story point;
What does a story point measure?
Relative T-Shirt sizes
Story points acknowledge that humans are bad at estimating time-to-completion
Instead, story points use relative T-Shirt sizes (S, M, L, XL)
Most tools use Fibonacci numbers (1, 2, 3, 5, 8, 13, 21)
Agree on what “medium” means:
Since story points are relative, it’s important to agree on what “medium” is
Then, evaluate from there
Is it the same, larger, or smaller than medium
Story size:
A story should be small enough to be coded and tested within a single sprint iteration – ideally, just a few days
Large stories should be broken down into smaller ones
Story point antipattern
Equating a story point to wall-clock time
Humans are bad at estimating wall-clock time
Don’t do it!
Steps in the Scrum process:
Product Backlog:
ZenHub Kanban board:
Creating new stories
Story Template:
As a <some role>
I need <some function>
So that <some benefit>
Need a service for counting things:
As a User
I need a service that has a counter
So that I can keep track of how many times something was done
Creating the next story:
Must allow multiple counters:
As a User
I need to have multiple counters
So that I can keep track of several counts at once
Creating the next story:
Persist counters across restarts:
As a Service Provider
I need the service to persist the last known count
So that users don’t lose track of their counts after the service is restarted
Creating the last story:
Counters can be reset:
As a System Administrator
I need the ability to reset the counter
So that I can redo counting from the start
Stories in the backlog:
Prioritize the product backlog:
Backlog refinement:
Keep the product backlog ranked by priority so that the important stories are always on the top
Break large stories down into smaller ones
Make sure that stories near the top of the backlog are groomed and complete
Backlog refinement meeting:
Who should attend?
Product owner
Scrum master
Development team (optional)
Lead developer/architect
What is the goal?
Groom the backlog by ranking the stories in order of importance
Make sure the story contains enough information for a developer to start working on it
Backlog refinement workflow:
New issue triage:
Start with new issue triage
Goal: At the end of backlog refinement, the New Issues column is empty
Take stories from new issues and…
Move them into the product backlog if they will be worked on soon
Move them into the icebox if they are a good idea but not now
Reject them if they are not where you want to go
Backlog refinement workflow:
As a <some role>
I need <some function>
So that <some benefit>
Assumptions and Details:
<anything you already know>
Acceptance Criteria:
Given <some precondition>
When <some event>
Then <some measurable outcome>
Need a service that has a counter:
Must Persist counter across restarts:
Deploy service to the cloud:
Ability to reset the counter:
Label:
Labels in GitHub
Need a service that has a counter:
Must persist counter across restarts:
Deploy service to the cloud:
Ability to reset the counter:
Technical debt is anything you need to do that doesn’t involve creating a new feature
Technical debt builds up when you take shortcuts, but may also occur naturally
Examples of technical debt:
Code refactoring
Setup and maintenance of environments
Changing technology like databases
Updating vulnerable libraries
Who should attend?
Product owner
Scrum master
Development team
Sprint planning goals:
Each sprint should have a clearly defined business goal
The product owner describes the goal and product backlog items supporting it
It’s important for the whole team to understand why they are building the increment
Mechanics of sprint planning
The development team;
Takes stories from the top of the product backlog and assigns them to the sprint backlog
Assigns story points and labels
Ensures each story contains enough information for a developer to start working on it
Stops adding stories when the team’s velocity is reached
Team velocity:
The number of story points a team can complete in a single sprint
This will change over time as the team gets better at estimating and better at executing
The velocity is unique to the team because the story point assignment is unique to the team
Create a sprint milestone:
Create a sprint milestone to start the sprint
The milestone title should be short
The description should document the milestone goal
The duration should be 2 weeks
Create a milestone:
Steps in the Scrum Process:
The Sprint:
A sprint is one iteration through the design, code, test, deploy cycle
It is usually 2 weeks in duration
Every sprint should have a goal
Daily Execution:
Take the next highest priority item from the sprint backlog
Assign it to yourself
Move it in process
Occurs every day at the same time and place
Sometimes called the “daily Scrum”
Each team member briefly reports on their work
Called a “stand-up” during the meeting to keep it short
Timeboxed to 15 mins
Not a project status meeting – all status should be tabled for later discussion
Daily stand-up meeting:
Who should attend?
Scrum master
Development team
Product owner (optional)
Daily stand-up question:
Each team member answers three questions:
Impediments and blockers:
Impediments identified by the team should be unblocked by the scrum master
Developers that are blocked should work on the next story
Tabled topics:
Topics raised during the daily stand-up should be held until the meeting has ended
Anyone interested in those topics can stay to discuss
Milestones and burndowns:
Milestones can be created for anything in your project
Burndown charts can be used to measure your progress against a milestone
Burndown chart:
The measurement of story points completed vs. story points remaining for a sprint
Over time the story points remaining should go down, hence the name: burndown
Burndown chart examples:
Live demonstration of implemented stories
Product owner determines if stories are done based on acceptance criteria
Done stories are closed
Sprint Review meeting:
Who should attend?
Product owner
Scrum master
Development team
Stakeholders
Customers (Optional)
Sprint review:
Feedback gets converted into new product backlog stories
This is where iterative development allows the creation of products that couldn’t have been specified up-front in a plan-driven approach
Rejected Stories:
What about stories that are not considered done?
Add a label to indicate this and close them
Write a new story with new acceptance criteria
This will keep the velocity more accurate
A meeting to reflect on the sprint
Measures the health of the process
The development team must feel comfortable to speak freely
Who attend the meeting:
Scrum master
Development team
A time for reflection:
Three questions are answered:
The goal is improvement:
This is critical for maintaining a healthy team
The scrum master must ensure that changes are made as a result of the feedback
The goal is to improve for the next sprint
Measurements and metrics:
You can’t improve what you can’t measure
High performing teams use metrics to continually improve
They take baselines and set goals and measure against them
Beware of vanity metrics
Look for the actionable metrics
Baselines and Goals:
Baseline:
It currently requires 5 size team members, 10 hours to deploy a new release of your product
This costs you $X for every release
Goals:
Reduce deployment time from 10 hours to 2 hours
Increase percentage of defects detected in testing from 25% to 50%
Top 4 actionable metrics:
How quickly can you recover from failure?
Example metrics:
End of sprint activities:
Move stories from done to closed
Close the current milestone
Create a new sprint milestone
Adjust unfinished work
Handling untouched stories:
Stories not worked on can be moved to the top of the product backlog
Resist the urge to move them to the next sprint
Remember to unassign them from the sprint milestone
Handling unfinished stories:
Don’t move unfinished stories into the next sprint!
Give the developers credit for the work they did
This will keep your velocity more accurate
Adjust the description and story points of the unfinished story, label it unfinished, and move it to done
Write a new story for the remaining work
Assign remaining story points and move it to the next sprint
Ready for the next sprint:
All stories assigned to the current sprint are closed
All unfinished stories are reassigned
The sprint milestone is closed
A new sprint milestone is created
Agile Anti-Patterns:
No real product owner/Multiple product owners
Teams are too large
Teams are not dedicated
Teams are too geographically distributed
Teams are siloed
Teams are not self-managing
YOU WILL FAIL!
…and you should not wonder why.
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:
This course has following modules…
What is Unix?
UNIX beginnings:
Linux’s beginnings:
Linux, use cases today:
Kernel
Linux filesystem:
Communicating with Linux System:
What is a shell?
User interface for running commands
Interactive language
Scripting language
Shell command applications:
Getting information
whoami
– usernameid
– user ID and group IDuname
– operating system nameps
– running processestop
– resource usagedf
– mounted file systemsman
– reference manualdate
– today’s dateNavigating and working with files and directories
Printing file and string contents
Compression and archiving
tar
– archive a set of fileszip
– compress a set of filesunzip
– extract files from a compressed zip archivePerforming network operations
hostname
– print hostnameping
– send packets to URL and print responseifconfig
– display or configure system network interfacescurl
– display contents of file at a URLwget
– download file from a URLMonitoring performance and status
sort
— Sort lines in a file, -r
will do the same in the reverseuniq
— Filter out repeated linesgrep
(“global regular expression print”) — Return lines in file matching patterngrep -i
— makes grep search case-insensitivecut
— Extracts a section from each linepaste
— Merge lines from different filesWhat is a script?
Script: list of commands interpreted by a scripting language
Commands can be entered interactively or listed in a text file
Scripting languages are interpreted at runtime
Scripting is slower to run, but faster to develop
What is a script used for?
Widely used to automate processes
ETL jobs, file backups and archiving, system admin
Used for application integration, plug-in development, web apps, and many other tasks
Shell scripts and the ‘shebang’
Shell script – executable text file with an interpreter directive
Aka ‘shebang’ directive
#!interpreter [optional-arg]
‘interpreter’ – path to an executable program
‘optional-arg’ – single argument string
Example – ‘shebang’ directives
Shell script directive:
#!/bin/sh
#!/bin/bash
Python script directive:
#!/usr/bin/env python3
Filters are shell commands, which:
Take input from standard input
Send output to standard output
Transform input data into output data
Examples are wc, cat, more, head, sort
, …
Filters can be chained together
Pipe command – |
For chaining filter commands
commmand1 | command2
Output of command 1 is input of command 2
Pipe stands for pipeline
Scope limited to shell
Set
– list all shell variables
Defining shell variables:
var_name=value
No spaces around =
unset var_name
deletes var_name
Extended scope
export var_name
env
— list all environment variables
#
— precedes a comment;
— command separator*
— filename expansion wildcard?
— single character wildcard in filename expansion\
— escape special character interpretation""
— interpret literally, but evaluate meta-characters''
— interpret literallyInput/Output, or I/O redirection, refers to a set of features used for redirecting
>
— Redirect output to file>>
— Append output to a file2>
— Redirect standard error to a file2>>
— Append standard error to a file<
— Redirect file contents to standard inputReplace command with its output
$(command) or `command`
Store output of pwd
command in here
:
Program arguments specified on the command line
A way to pass arguments to a shell script
./MyBashScript.sh arg1 arg2
Bath mode:
Commands run sequentially
command1; command2
Concurrent mode:
Commands run in parallel
command1 & command2
Job scheduling
Schedule jobs to run automatically at certain times
Cron allows you to automate such tasks
What are cron, crond, and crontab?
Cron is a service that runs jobs
Crond interprets ‘crontab files’ and submits jobs to cron
A crontab is a table of jobs and schedule data
Crontab command invokes text editor to edit a crontab file
Scheduling cron jobs with crontab
Viewing and Removing cron jobs
It has following 2 modules…
Working without Version Control:
Working with Version Control:
SSH protocol – A method for secure remote login from one computer to another.
Repository – The folders of your projects that are set up for version control.
Fork – The process you use to request that someone reviews and approves your changes before they become final.
Working directory – A directory on your file system, including its files and subdirectories, that is associated with a git repository.
Background of Git:
Git Repository Model:
What is special about the Git Repository model?
Created in 2005 by Linus Torvalds
What is Git?
Git is a distributed VCS
Git allows for centralized administration
IBM Cloud is built around open-source tools including Git repositories
GitLab is:
A DevOps platform, delivered as a single application
Provides access to Git repositories
Provides source code management
GitLab enables developers to:
Collaborate
Work from a local copy
Branch and merge code
Streamline testing and delivery with CI/CD
What are branches?
Merging Branches:
What is a Pull Request?
A PR makes the proposed (committed) changes available for others to review and use
A pull can follow any commits, even if code is unfinished
PRs can target specific users
GitHub automatically makes a PR if you make a change on a branch you don’t own
Log files record the approval of the merge
Merging into the Master/Main Branch
The master branch should be the only deployed code
Developers can change source files in a branch, but the changes are not released until
Pull
command is issuedPowerful tools include forking and cloning a repository
Cloning creates a copy of a repository on your local machine
Cloned copies can sync between locations
Forking modifies or extends a project
Remote Repositories:
Remote repos are stored elsewhere
Push, pull, and fetch data to share work
Origin refers to your fork
Upstream refers to the original work
Syncing a Fork of a Project:
To keep a fork in sync with the original work from a local clone:
Create a local clone of the project
Configure Git to sync the fork
git remote -v
git remote add upstream <clone repo url>
git remote -v
Commands for Managing Forks:
To grab upstream branches
git fetch upstream
To merge changes into the master branch
git merge upstream/master
GitHub Developer:
A Developer communicates with others using these commands:
git-clone
from the upstream to prime the local repositorygit-pull
and git-fetch
from “origin” to keep-up-to-date with the upstreamgit-push
to shared repository, if you adopt CVS style shared repository workflowgit-format-patch
to prepare email submissiongit-send-email
to send your email submission without corruption by your MUA (Mail User Agent)git-request-pull
to create a summary of changes for your upstream to pullGitHub Integrator:
An integrator
Receives changes made by others
Reviews and responds to PRs
Publishes the result for others to use
Integrators use the following commands:
git-am
to apply patches emailed in from your contributors
git-pull
to merge from your trusted lieutenants
git-format-patch
to prepare and send suggested alternatives to contributors
git-revert
to undo botched commits
git-push
to publish the bleeding edge
GitHub Repository Administrator
A Repository Administrator sets up and maintains access to the repository by developers
git-daemon
to allow anonymous download from repositorygit-shell
can be used as a restricted login shell for shared central repository usersgit-http-backend
provides a server-side implementation of Git-over-HTTP (Smart HTTP) allowing both fetch and push servicesgitweb
provides a web front-end to Git repositories, which can be set-up using the git-instaweb
scriptThis course has these modules…
Tuples are an ordered sequence
Here is a Tuple “Ratings”
Tuples are written as comma-separated elements within parentheses
Tuples concatenation is possible
Tuple slicing is also possible
Tuples are immutable
If one want to manipulate tuples, they have to create a new tuple with the desired values
Tuples nesting (tuple containing another tuple) is also possible
Ratings = (10, 9, 6, 5, 10, 8, 9, 6, 2)
Lists are also ordered in sequence
Here is a List “L”
L = ["Michael Jackson", 10.1, 1982]
A List is represented with square brackets
List is mutable
List can nest other lists and tuples
We can combine lists
List can be extended with extend()
method
append()
adds only one element to the List, if we append L.append([1,2,3,4])
, the List “L” will be:
L = ["Michael Jackson", 10.1, 1982,[1,2,3,4]]
The method split()
can convert the string into the List
"Hello, World!".split()
The split()
can be used with a delimiter we would like to split on as an argument
"A,B,C,D".split(",")
Multiple names referring to the same object is known as aliasing
You can convert a list into set
List = ['foo']
set(List)
To add elements to the set, set.add('foo')
To remove an element, set.remove(‘foo’)
To check if an element is present in the set:
'foo' in set
True/False
set1 & set2
or set1.intersection(set2)
Union of the sets, contain elements of both the sets combined, set1.union(set2)
To find the difference of sets:
#set1 difference from set2
set1.difference(set2)
#set2 difference from set 1
set2.difference(set1)