1.0 Software Development and Design Flashcards
XML, JSON, YAML - Which one is “hefty” and not very human readable?
XML
XML, JSON, YAML - Mostly used for transmitting data between server and a web page
JSON
XML, JSON, YAML - syntax uses curly braces, square brackets, and quotes for its data representation
JSON
XML, JSON, YAML - whitespaces are for human readability only, not consumed by the application or script
JSON
XML, JSON, YAML - whitespaces are used for scoping, defines a structure of the file
YAML
XML, JSON, YAML - has a mandatory top-most element
XML
XML, JSON, YAML - most powerful, but most tedious to write/read
XML
XML, JSON, YAML - used in many configuration files today.
YAML
XML, JSON, YAML - Similar indention style to Python
YAML
YAML - What denotes a list?
A Dash - similar to writing a shopping list
XML - Does XML have predefined tags like HTML?
No predefined tags like HTML. The author defines the structure and elements
T/F - APIs allow faster prototyping and development of software
True
APIs use the network for communication, what is a challenge of that?
unreliable networks
CI/CD
continuous integration and continuous deployment
YAML
YAML ain’t markup language
JSON
Javascript Object Notation
XML
eXtensible Markup Language
What are the file extensions for XML, JSON, and YAML
.xml, .json, and .yaml
T/F - In a data format (XML/JSON/YAML), a key must be a string
True
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
True
XML - What is used to diferentiate two different objects that are using the same tab names?
XML Namespaces and Prefixes
What is converting a data structure or an object into a binary or textual format that can be stored and recontructred later called?
Serialization
Preserving the state of an object, by converting it into a XML, JSON, or YAML file is called what?
Serialization
Opening a file and reconstructing it to its original state with all the objects defined is called?
Deserialization
Receiving a configuration from a switch API in XML, JSON, or YAML and converting it to a data structure Python understands is called what?
Deserialization
Extracting details out of a textual file and converting it into valid Python objects is called what?
data or file parsing
What are the 19 guiding principles that had considerable influence on how Python was actually designed called?
The Zen of Python
How do you access The Zen of Python in a Python script or the interactive shell?
import this
How do you check the version of Python installed on your workstation?
python –version or python -V (note the capital V)
What is any practically any code outside of your script that you want to use? Already written and available for you to use?
A python Library
The basic unit of a XML document is called what?
An element
T/F - An XML document must have one and only one root element.
True
Where is a collection of packages, libraries, and even entire applications for Python located?
Python Package Index or PyPI
What is the package manager for Python called?
pip
What data format are these libraries commonly used with? PyYAML and ruamel.yaml
YAML
What data format is this library commonly used with? json
JSON
What data format are these libraries commonly used with? xmltodict, untangle, minidom, and ElementTree
XML
Which library is newer, and is a derivative of the other? pyYAML or ruamel.yaml
ruamel.yaml
Which YAML data format library supports YAML 1.2?
ruamel.yaml
How do you install Python libraries to be used in your script?
pip install
How do you leverage features from a library you have installed, inside a Python script?
import
When parsing data from YAML into Python, what is the YAML string converted to within Python? object
dict
When parsing data from YAML into Python, what is the YAML string converted to within Python? array
list
When parsing data from YAML into Python, what is the YAML string converted to within Python? string
str
When parsing data from YAML into Python, what is the YAML string converted to within Python? number (int)
int
When parsing data from YAML into Python, what is the YAML string converted to within Python? number (real)
float
When parsing data from YAML into Python, what is the YAML string converted to within Python? true
True
When parsing data from YAML into Python, what is the YAML string converted to within Python? false
False
When parsing data from YAML into Python, what is the YAML string converted to within Python? null
None
T/F - A JSON object gets natively translated into a Python Dictionary.
True
When parsing data from JSON into Python, what is the JSON data translated to in Python? object
dict
When parsing data from JSON into Python, what is the JSON data translated to in Python? array
list
When parsing data from JSON into Python, what is the JSON data translated to in Python? string
str
When parsing data from JSON into Python, what is the JSON data translated to in Python? number (int)
int
When parsing data from JSON into Python, what is the JSON data translated to in Python? number (real)
float
When parsing data from JSON into Python, what is the JSON data translated to in Python? true
True
When parsing data from JSON into Python, what is the JSON data translated to in Python? false
False
When parsing data from JSON into Python, what is the JSON data translated to in Python? null
None
What method is used to parse data from JSON into a Python dict?
json.load()
What method is used to deserialize from Python dict to JSON?
json.dump()
What Python element is translated to from this XML Library? minidom
DOM object - user.getElementsByTagName(‘name’)[0].firstChild.data
What Python element is translated to from this XML Library? ElementTree
Element Tree - user.find(‘name’).text
What Python element is translated to from this XML Library? xmltodict
Dictonary - user[‘name’]
What Python element is translated to from this XML Library? untangle
Object - user.name.cdata
Which XML library is the closest to working like YAML or JSON files?
xmltodict
Which two data formats natively translate their data to a Python dictionary?
JSON and YAML
T/F - Version Control Software keeps track of every modification of the code.
True
What is the most popular version control system?
Git
T/F - Git is a distributed system, so there is no central server.
True
(Version Control) Where are the files of a project located? It is also where all other local copies are pulled.
Remote Repository
(Version Control) Where are snapshots, or commits stored, when on the local machine of each individual?
Local Repository
(Version Control) Where are all the changes you actually want to perform placed?
Staging Area
Git tracks the differences between this directory and the local repository.
Working Directory
What is a directory that is initialized with Git called? It can contain anything such as code, images, and any other types of files.
Repository