Software Engineering Flashcards

Learn for Exam (68 cards)

1
Q

What is involved in software dev?

A

Maintaining CodeBase

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

What is the benefit of improving code?

A

More readable, pays off in the long term
No Technical Debt

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

What are some aspects of code quality?

A

Readability, Indentation, Function Names, Variable names, consistency of codebase

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

What should good naming achieve?

A

Adding Semantic Info
Making it clear what does what

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

What is the purpose of comments?

A

Explain what the code does,
Limits technical knowledge required,

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

What is Refactoring?

A

Rewriting parts of the codebase,
Doesn’t chaneg functionality,
Improve Readability

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

What is pair programming?

A

Two devs working together,
Communicating enforces clear logic + comments

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

What are code reviews?

A

Review of a dev’s code by other team members

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

What are some automated code review checks?

A

Style checks (indentation, spacing, naming)

Compiler Warnings (Some programming languages provide warnings - variable not used)

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

How do we classify Errors?

A

By different types,
How the error is introduced,
How we find the error

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

How can errors be introduced?

A

Mistakes - wrong logic,
Failure - logic implemented badly,
Syntax Errors
Hardware Malfunction

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

What are the different ways in which we find out about errors?

A

Static Error - When developing
Immediate runtime error - When program starts
Latent runtime error - Sometime during program execution

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

What are errors in subroutines?

A

Input Error - Operation fails because of invalid inputs
Output Error - No way of producing valid result

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

What are good practises when apporaching errors?

A

Assume they will happen,
Make it easy to discover

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

What is the engineering approach to errors?

A

That errors are inevitable, we cannot check everything due to time + budget

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

How do we indicate errors?

A

Int method - return null or -1
Exception method - throw exception

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

Do modern applications prefer int or exception error methods?

A

Exceptions - Cannot be confused with a valid result
- Name explains reason for error

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

How to handle bad inputs?

A

Ignore bad inputs - assume input is valid
Fail when input is bad - Terminate execution

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

What is defensive programming?

A

Assume that functions may not be called correctly
Protect code with exceptions
Security measures in low level code
Check for null values explicitly

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

What is test-based engineering approach to errors?

A

Prevent errors using tests
Tests are methods for checking correctness
Tests are lightweight specifications

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

What is TDD?

A

Test driven development - Writing tests first and then the code that satisfies the tests

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

When do we use branching?

A

you own the repo,
small private projects,
Progress visible in main

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

When do we use forking

A

You don’t own the repo,
Open Source,
Large scale tests in your version
Large enterprise projects

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

What is the waterfall approach

A

Gather Requirements
Analyse + Design
Programming
Testing
Deployment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are user stories?
Tasks defined as stories rather than technical specification, Defines requirements of the user Estimates requirements of the user
26
What is SCRUM?
Iterative Dvelopment Development confined to sprints User Stories Optimal for small teams + changing requirements
27
What are scrum sprints?
Planning Dev Meetings Review Retrospective
28
What is sprint planning
Meeting where the team plans the upcoming sprint Tasks are distributed among developers
29
What are scrum meetings?
Short daily meetings - no longer than 15 minutes
30
What is a sprint review?
REview of dev during sprint, Results, tasks, improvements, Occurs at the end of the sprint
31
What is a sprint retrospective
Where previous sprint is discussed Evaluation of what can be improved Different from sprint review - teamwork + organisation
32
What are the issues with SCRUM methodology
No one follows it perfectly Long scrum meetings, some are skipped Review + retro gets merged Too many meetings Sometimes there is no product owner/scrum master Messy backlog Scrum = Agile
33
What is manual testing?
Calling a function with different values
34
What is visual testing?
Looking at the code and inspecting any issues
35
What is White box Testing?
Looking at code Testing logic Coverage as much as possible Write tests that fit code logic
36
What is black box testing?
Without looking at code Based on spec Focused on inputs Test if software meets requirements
37
What are Unit tests?
SImple short tests per function Provide an input, expected output
38
What are equivalence classes?
Classes of inputs a program can take - should work same for all inputs
39
What are the attributes of good unit tests?
Test as much of cuntion as possible Test each equivalence class Test edge case Test invalid inputs
40
How do we calculate coverage?
Covered code / Total code
41
What is statement coverage?
Testing every atomic statement
42
What are random tests?
Trying to catch unusual/emergent behaviour
43
How do we use tests in software engineering?
Evaluate correctness of code Aim for high code coverage Cover edge cases
44
Why do we run regular tests?
Ensure functionality to avoid breaking things
45
What is the difference between functional tests and non functional tests?
Functional - Ensures meeting requirements Non - functional - Ensure Usability
46
What is a mistake in software engineering?
Wrong logic used to implement a solution
47
What is a failure in software engineering
Correct logic, but poorly implemented
48
What are the main roles in a code review
Author, Code Reader, Scribe
49
What is Extreme Programming
Extreme Programming (XP) is an agile software development methodology that prioritizes collaboration, communication, and feedback to produce high-quality software quickly and efficiently. It's particularly well-suited for projects with rapidly changing requirements, where the goal is to deliver working software frequently and adapt to evolving customer needs. Key aspects of Extreme Programming: Focus on collaboration and communication: XP emphasizes close collaboration between developers and customers, fostering a team environment with open communication and frequent feedback. Short development cycles: XP encourages releasing software in small, frequent increments, allowing for rapid adaptation to changing requirements. Testing and code quality: XP places a strong emphasis on testing and code quality, including unit tests, code reviews, and continuous integration. Simplicity and clean design: XP promotes keeping the software design simple and clean, avoiding unnecessary complexity. Customer involvement: XP heavily relies on customer involvement throughout the development process, ensuring that the software meets their needs and expectations. Continuous feedback: XP emphasizes continuous feedback from customers and other stakeholders, allowing for rapid adjustments and improvements.
50
What are the needs of deployment?
Version needs to be available to the customer. Needs to be updated + work correctly
51
What is continuous deployment?
Set of commands that automatically deploy new commits in git
52
What is the no solution approach to development? What are the issues?
Write Final version, test it Issues: No way of predicting what the final version is. Thorough testing is hard to define
53
What is the manual solution approach to software development.
Incremental development, testing, manually deploy each stable version
54
What is the automated solution to software development?
Automated tests, regular builds, larger tests on each build, deploy automatically.
55
What is continuous integration?
Tools + practises that enable automated approach
56
How do we automate builds?
Instructions on how to build, Building dependencies before main software, Retrieve latest version Run tests to evaluate the build
57
What is a build environment?
Docker Containers - Virtual Machine
58
What are the different kinds of code reviews?
Informal : Simple review that occurs naturally Code Walkthrough : Code author presents code to team Technical Review : Formal peer review of new code Code Inspection : Structured, informal meeting with roles + report
59
Give an example of a technical review in practise (git)
Reviewing a pull request
60
What is a code inspection? (four roles)
Author - Author of code Reader - Reads the code Recorder - Writes down useful findings Moderator - Leads code inspection
61
What are the advantages and disadvantages of code inspection?
Advantages - Formal, Structured process - Identify issues + improvements - Static - doesn't require testing Disadvantages - Synchronous, people need to attend - Complex requries preparation - Confrontational, interpersonal conflicts
62
What is a code walkthrough
Lightweight, presentation of code to team Others propose fixes + improvements
63
When do we run code reviews?
- Scheduled when changes are made - Need to bring team members up to speed - After specific code changes
64
When code reviews in iterative development?
- Carried out after tasks/user stories completed
65
Why do we use project management in Software Dev?
Deliver on time Keep in budget Meet expectations Maintain morale in dev team
66
What are the Project Plan
- Introduction - Project Organisation - Tasks + Targets - Risk Analysis - Quality Plan - Project Control
67
What is a PERT chart?
Gannt but TREEEEE
68