1.0 Software Development and Design Flashcards

1
Q

XML, JSON, YAML - Which one is “hefty” and not very human readable?

A

XML

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

XML, JSON, YAML - Mostly used for transmitting data between server and a web page

A

JSON

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

XML, JSON, YAML - syntax uses curly braces, square brackets, and quotes for its data representation

A

JSON

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

XML, JSON, YAML - whitespaces are for human readability only, not consumed by the application or script

A

JSON

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

XML, JSON, YAML - whitespaces are used for scoping, defines a structure of the file

A

YAML

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

XML, JSON, YAML - has a mandatory top-most element

A

XML

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

XML, JSON, YAML - most powerful, but most tedious to write/read

A

XML

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

XML, JSON, YAML - used in many configuration files today.

A

YAML

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

XML, JSON, YAML - Similar indention style to Python

A

YAML

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

YAML - What denotes a list?

A

A Dash - similar to writing a shopping list

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

XML - Does XML have predefined tags like HTML?

A

No predefined tags like HTML. The author defines the structure and elements

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

T/F - APIs allow faster prototyping and development of software

A

True

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

APIs use the network for communication, what is a challenge of that?

A

unreliable networks

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

CI/CD

A

continuous integration and continuous deployment

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

YAML

A

YAML ain’t markup language

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

JSON

A

Javascript Object Notation

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

XML

A

eXtensible Markup Language

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

What are the file extensions for XML, JSON, and YAML

A

.xml, .json, and .yaml

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

T/F - In a data format (XML/JSON/YAML), a key must be a string

A

True

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

T/F - In a data format (XML/JSON/XML), a value (in a key/value) could be a string, a number, or a Boolean. Other values could be more complicated, containing an array or an entirely new object

A

True

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

XML - What is used to diferentiate two different objects that are using the same tab names?

A

XML Namespaces and Prefixes

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

What is converting a data structure or an object into a binary or textual format that can be stored and recontructred later called?

A

Serialization

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

Preserving the state of an object, by converting it into a XML, JSON, or YAML file is called what?

A

Serialization

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

Opening a file and reconstructing it to its original state with all the objects defined is called?

A

Deserialization

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

Receiving a configuration from a switch API in XML, JSON, or YAML and converting it to a data structure Python understands is called what?

A

Deserialization

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

Extracting details out of a textual file and converting it into valid Python objects is called what?

A

data or file parsing

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

What are the 19 guiding principles that had considerable influence on how Python was actually designed called?

A

The Zen of Python

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

How do you access The Zen of Python in a Python script or the interactive shell?

A

import this

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

How do you check the version of Python installed on your workstation?

A

python –version or python -V (note the capital V)

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

What is any practically any code outside of your script that you want to use? Already written and available for you to use?

A

A python Library

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

The basic unit of a XML document is called what?

A

An element

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

T/F - An XML document must have one and only one root element.

A

True

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

Where is a collection of packages, libraries, and even entire applications for Python located?

A

Python Package Index or PyPI

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

What is the package manager for Python called?

A

pip

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

What data format are these libraries commonly used with? PyYAML and ruamel.yaml

A

YAML

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

What data format is this library commonly used with? json

A

JSON

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

What data format are these libraries commonly used with? xmltodict, untangle, minidom, and ElementTree

A

XML

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

Which library is newer, and is a derivative of the other? pyYAML or ruamel.yaml

A

ruamel.yaml

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

Which YAML data format library supports YAML 1.2?

A

ruamel.yaml

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

How do you install Python libraries to be used in your script?

A

pip install

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

How do you leverage features from a library you have installed, inside a Python script?

A

import

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? object

A

dict

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? array

A

list

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? string

A

str

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? number (int)

A

int

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? number (real)

A

float

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? true

A

True

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? false

A

False

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

When parsing data from YAML into Python, what is the YAML string converted to within Python? null

A

None

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

T/F - A JSON object gets natively translated into a Python Dictionary.

A

True

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? object

A

dict

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? array

A

list

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? string

A

str

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? number (int)

A

int

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? number (real)

A

float

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? true

A

True

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? false

A

False

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

When parsing data from JSON into Python, what is the JSON data translated to in Python? null

A

None

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

What method is used to parse data from JSON into a Python dict?

A

json.load()

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

What method is used to deserialize from Python dict to JSON?

A

json.dump()

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

What Python element is translated to from this XML Library? minidom

A

DOM object - user.getElementsByTagName(‘name’)[0].firstChild.data

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

What Python element is translated to from this XML Library? ElementTree

A

Element Tree - user.find(‘name’).text

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

What Python element is translated to from this XML Library? xmltodict

A

Dictonary - user[‘name’]

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

What Python element is translated to from this XML Library? untangle

A

Object - user.name.cdata

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

Which XML library is the closest to working like YAML or JSON files?

A

xmltodict

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

Which two data formats natively translate their data to a Python dictionary?

A

JSON and YAML

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

T/F - Version Control Software keeps track of every modification of the code.

A

True

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

What is the most popular version control system?

A

Git

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

T/F - Git is a distributed system, so there is no central server.

A

True

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

(Version Control) Where are the files of a project located? It is also where all other local copies are pulled.

A

Remote Repository

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

(Version Control) Where are snapshots, or commits stored, when on the local machine of each individual?

A

Local Repository

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

(Version Control) Where are all the changes you actually want to perform placed?

A

Staging Area

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

Git tracks the differences between this directory and the local repository.

A

Working Directory

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

What is a directory that is initialized with Git called? It can contain anything such as code, images, and any other types of files.

A

Repository

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

What git command must be used when you create a new project locally on your machine, to initialize the project to work and be tracked by git?

A

git init

76
Q

What git command is used to start tracking files and add them to the staging area?

A

git add

77
Q

What git command is used to stop tracking files?

A

git rm

78
Q

What git command is used to create a local snapshot?

A

git commit -M

79
Q

What git command is used to fetch changes from the remote repository?

A

git pull or git fetch

80
Q

What git command is used to send commited changes to the remote repository?

A

git push

81
Q

How do you configure a Git username and email address?

A

git config –global user.name

git config –global user.email

82
Q

T/F - When you use the git commit command, you are required to include a message.

A

True

83
Q

Which git command retrieves changes from the remote repository AND merges them to your current branch?

A

git pull

84
Q

Which git command retrieves changes from the remote repository, but only stores them to the local repository. It doesn’t merge any changes.

A

git fetch

85
Q

Version Control - what git command do you use to temporarily store modified tracked files?

A

git stash

86
Q

Version Control - what git command do you use to restore previously stashed modified files?

A

git stash pop

87
Q

Version Control - what git command would you use to revert commited changes?

A

git reset

88
Q

Version Control - what git command would you use to undo changes that were committed?

A

git reset or git revert

89
Q

Version Control - which git undo command leaves commits that you can go back to

A

git revert

90
Q

Describe the 5 common actions of a typical Git worflow.

A
Directory initialization for Git
Adding a File
Committing a file to a local repository
Pushing a file to a remote repository
Updating a local repository by pulling changes from a remote repository
91
Q

Where is the central location of the files of the project, from which all developers can pull?

A

Remote Repository

92
Q

What is a different instance of your repository called?

A

Branch

93
Q

What is the default instance of your repository called?

A

Master Branch

94
Q

T/F - You should never develop new features or apply bug fixes directly to the master branch.

A

True

95
Q

T/F - Always create a separate branch for a new feature or bug fix.

A

True

96
Q

How do you manipulate branches?

A

git branch

97
Q

How do you navigate through branches?

A

git checkout

98
Q

How do you merge branches?

A

git merge

99
Q

How do you compare changes between branches?

A

git diff

100
Q

How do you create a new branch in your local repository?

A

git branch

101
Q

How do you delete a branch from your local repository?

A

git branch -D

102
Q

How to navigate to a branch after it was created with git branch?

A

git checkout

103
Q

How do you create a new branch and switch to it in one command?

A

git checkout -b

104
Q

What is the process used by software creators to design, develop, and test high-quality software products and applications?

A

The Software Development Lifecycle (SDLC)

105
Q

Name 4 of the 5 methodologies that help implement SDLC.

A

Waterfall, Agile, Prototyping, Rapid App Development, and Extreme Programming

106
Q

What is the development methodology where a linear process is visualized as moving down through phases?

A

Waterfall

107
Q

What is one of the newer and most popular development methodologies that is based on frequent and small incremental releases?

A

Agile

108
Q

Which development methodology has this advantage “Because the process is rigid and structured, it is easy to measure progress and set milestones.”

A

Waterfall

109
Q

What development methodology takes its origin from the Japanese automotive industry? It is merely a concept.

A

Lean

110
Q

What three major points must an enterprise focus on to fully embarce the lean philosphy?

A

Purpose, Process, and People

111
Q

What development methodology is a means of implementing the Lean philosophy, based on the concept of short sprints?

A

Agile

112
Q

Which development method provides continuous and incremental value to the software develpment process?

A

Agile

113
Q

What project management methodology, or a framework of agile development, places value on iteration and incremental software development?

A

SCRUM

114
Q

What methodology uses sequential and linear phases

Analysis, Design, Code, and Test?

A

Waterfall

115
Q

T/F - Lack of good documentation is a disadvantage of Agile development.

A

True

116
Q

T/F - Late project changes are welcome in agile development.

A

True

117
Q

What is a short period in which people focus on small but meaningful development tasks?

A

A Sprint

118
Q

What is the software-development methodology where you write the test code before the actual production code?

A

(TDD) Test-driven development

119
Q

T/F - TDD ensures that use cases are tested, and source code has automated tests by using the test-first approach

A

True

120
Q

T/F - TDD is done in iterations - Write tests, Run tests; they must fail, write source code, run all test; they must pass, Refactor the code where necessary

A

True

121
Q

T/F - When doing TDD, you shouldn’t write more code than is needed to get the tests to pass.

A

True

122
Q

List three advantages of code refactoring in TDD, before moving to the next task.

A

Better code Structure, Better code readability, Better design

123
Q

What is the first step in a test-driven development iteration?

A

Write tests that fail

124
Q

What phase in the software development process helps identify bugs and poor code practices, as well as improve the design and overall readability of the code? Its main goal is to find bugs before code is deployed to production, or even to a test server.

A

Code Review

125
Q

List 2 of the 4 reasons for a code review.

A

Identify bugs
Improve code quaility
Get familar with different parts of the project
Learn something new

126
Q

T/F - Identifying bugs is the most important reason to a do a code review.

A

True

127
Q

What are two ways to merge a branch to the master branch?

A

Direct Merge - using the “git merge” command (not recommended)

Merge using pull request - requires code review (recommended option)

128
Q

What GitHub feature is used to initiate a code review?

A

pull request

129
Q

Which software development methodology is an implentation of the Lean concept in software engineering?

A

Agile

130
Q

What framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries?

A

pytest

131
Q

In what relation is a product backlog to a sprint backlog?

A

Work items are typically moved from product backlog to sprint backlog at the sprint start.

132
Q

Why is the Refactor step required in test-driven development?

A

to improve code quality

133
Q

T/F - You should write tests, before writing code during test-driven development.

A

True

134
Q

T/F - You should do code review in every software development project.

A

True

135
Q

Why do you typically perform a code review?

A

to improve codebase quality

136
Q

When performing a code review in GitHub, which action notifies the author that changes to the code must be made before merging?

A

request changes

137
Q

REST

A

Representational State Transfer

138
Q

API

A

Application Programming Interface

139
Q

Applications are split into a suite of multiple smaller, independently running components or services, all complementing each other to reach a common goal.

A

microservices

140
Q

An application that runs as a single logical executable unit.

A

monolith

141
Q

These are the first line in organizing and achieving certain modularity in your program. You can make order in your code by dividing it into blocks of reusable chunks that are used to perform a single, related task.

A

Functions

142
Q

What statement can be used to stop a function execution?

A

return

143
Q

T/F - A variable defined inside a function has a local scope, and are NOT visible outside of the function.

A

True

144
Q

What does the principle know as DRY mean in programming?

A

Don’t Repeat Yourself

145
Q

What are callable units, that are used to group code called?

A

functions

146
Q

In python, functions can be grouped and packaged, so that the code is separated from the rest of the application code, and then used together with the rest of the code in the future. What are these groups/packages called?

A

modules

147
Q

What special system variable needs to be changed to be able to run a Python script directly, instead of by importing it into another script?

A

__name__

148
Q

What does the special system variable __name__ need to be changed to so that a Python script can be executed and run directly?

A

__main__

149
Q

What is a construct used in an object-oriented programming (OOP) language?

A

Class

150
Q

In OOP, what are records or instances of code that allow you to carry data with them and execute defined actions on them?

A

Objects

151
Q

What represents the blueprint of what an object looks like, how it behaves?

A

Class

152
Q

T/F - Classes can inherit data from other classes.

A

True

153
Q

What is the formal description of an object that you want to create? It contains the parameters for holding data and methods that will enable interaction with the object and execution of defined actions.

A

Class

154
Q

T/F - Python is a “first-class everything”, or everything is a class.

A

True (everything is an object)

155
Q

What method is a special initialization method that is generally known as a constructor and is usually used for the initialization of object data when creating a new object?

A

__init__

156
Q

What variable represents the instance of the object itself and is used for accessing the data and methods of an object?

A

self

157
Q

What is similar to a function, but are part of classes and need to define the “self” parameter?

A

Method

158
Q

What is it called to derive a new class from an existing class?

A

inheritance

159
Q

Creating a new child class, while maintaining the parameters and methods from the so-called parent class is called what?

A

inheritance

160
Q

T/F - Too many interactions between different modules can lead to confusion and unwated side effects when something needs to be changed in a module.

A

True

161
Q

What design principle ensures that when you split your monolithic application into multiple modules, these modules - and the classes accompanying them - have dependencies in one direction only.

A

Acyclic Dependency Principle

162
Q

What design strategy is defined as follows:

High-level modules should not depend on low-level modules. Both should depend on abstractions

Abstractions should not depend on details. Details should depend on abstractions

A

Dependency inversion

163
Q

What is it called when the appropriateness of an object is not determined by its type, but rather by the presence of properties and methods?

A

Duck typing

164
Q

What software design strategy is defined as follows:

Frequently changing, unstable modules can depend on modules that do not change frequently and are as such more stable, but they should not depend on each other in the other direction.

A

Stable-Dependencies Principle

165
Q

In software development, what is the term for reducing the dependency of a module, class, or function that uses different modules, classes, or functions directly? These systems tend to be easier to maintain and more reusable.

A

Loosely Coupled

166
Q

In software development, what is it called where objects mentioned are more dependent on one another?

A

Tightly coupled

167
Q

T/F - Reducing the dependencies between components of a system results in reducing the risk that changes of one component will require you to change any other component.

A

True

168
Q

What three parameters define the coupling criteria in software development?

A

Size, Visibility, and Flexibility

169
Q

T/F - functions and methods that take one parameter are more loosely coupled than functions that take 10.

A

True

170
Q

T/F - A class with too many methods is not an example of loosely coupled code.

A

True

171
Q

T/F - If you fundamentally change the conditions of a function in a loosely coupled system, no more than one module should be affected.

A

True

172
Q

If classes, modules, and functions all aim for the same goal, and focused on one thing, what do they have?

A

Strong Cohesion (high cohesion)

173
Q

What is the optimal combination of coupling and cohesion?

A

strong cohesion and loose coupling

174
Q

What concepts define what OOP enables?

A

Abstraction, Encapsulation, Inheritance, and Polymorphism

175
Q

To hide the logic implementation behind an interface is the ambition of what?

A

Abstraction

176
Q

In Python, how do you mark something as nonpublic data?

A

an underscore or double underscore

177
Q

Since different programming languages are hard difficult to master, what was created to help create a graphical notation of the programs that are being built

A

Unified Modeling Language

178
Q

In a Unified Modeling Language diagram, how is inheritance show?

A

a solid line with an arrow at the end

179
Q

What architecture pattern is also known as the multitier or n-tier architecture pattern, and is one of the most common general purpose software architecture patterns?

A

Layered Architecture Pattern

180
Q

What are the four typical layers of the layered architecture pattern?

A

Presentation, Business, Persistence, Database

181
Q

Between Software Architecture Patterns and Software Design Patterns, which is more detailed and dives into the seperate components that ensure optimal coding techniques?

A

Software Design Patterns

182
Q

What Software Design Pattern ensures that a class has only one instance while providing a global access point to it?

A

singleton pattern

183
Q

In OOP, presenting a process of concealing data and methods of an object, with the intention to hide the implementation and restrict direct access to the object data is called what?

A

encapsulation

184
Q

The separation between the view and the model, which is considered a very important design principle in software and should be followed every time that your application has some sort of dynamic behavior when using this design pattern.

A

Model View Controller

185
Q

What are behavioral patterns that define a one-to-many dependency between objects, together with a subscription mechanism for informing subscribed objects on changes happening on the object they are observing.

A

Observer design patterns

186
Q

Observer design patterns are also known as what?

A

Event-Subscriber or Listener

187
Q

When you need to dynamically sync the object state based on changes in some other object, and you cannot predict how many or what kind of objects will need this means of updating, what design pattern would be used?

A

Observer pattern