test2 drilling Flashcards

(92 cards)

1
Q

separation of duties

A

important for almost every aspect of CS;
different subsystems should do different things to be easier to understand and connect pieces cleanly

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

spring-boot

A

java framework for web-app development

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

DNS / Domain Name Servers

A

names are translated into IP addresses;
IP addresses are rememebered and when a name is typed in, reroute to that IP

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

IP address

A

“internet protocol address”; unique number for each computer used to determine the destination of a packet; currently at IPV6, so there are 2^n+1 bits of space in an address

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

requesting a site/network

A
  1. check local DNS cache;
  2. Recursively request to an ISP DNS server;
  3. Google’s DNS servers return the IP for the network name
  4. redirect to given IP address
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

model view controller

A

a software architectural pattern used for developing user interfaces dividing the program into three connected elements

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

model

A

internal representations of information; logic

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

view

A

interface presenting information to and accepting information from the user

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

controller

A

software linking the model and view; update model or view

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

JSON

A

JavaScript Object Notation; used for data storage, moving data in an MVC

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

process

A

execution of a program

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

thread

A

a complete unit of execution in a process;
threads share code, resources, memory, runtime details, state of process…;

“like a process but within a process” ?

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

methods for getting threads

A
  1. extend thread; 2. implement runnable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

coroutines

A

cooperative multitasking;
parallel processing for single-threaded languages, coordinated other tasks run when one task is blocked

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

abstract method

A

declaration, but no definition of the body

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

MIOS

A

a class may implement Many Interfaces but may only extend One Superclass

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

static members/variables

A

do not need an instantiated instance of their containing class; static variables are the same among all instances of the declared class

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

wrapper classes

A

a way to use data types as objects;
int myInt = 5 -> Integer myInt = 5;

use when working with arrays/iterables, since they can only store objects/instances not raws;

use when intializing something with the value “null” to avoid a compile error

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

wrapper class: float

A

Float

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

JVM

A

java virtual machine; enables a computer to run java (compiled bytecode)

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

JRE

A

java runtime environment;
runs on top of OS providing everything a program needs to run:
- classloader for required classes
- verifier to ensure code is accurate
- interpreter

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

JDK

A

java development kit; implements specification / provides software for working with Java applications

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

the mythical man-month

A

Fred Brooks’ essays on software eng + project management;

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

Brook’s Law

A

adding manpower to a late software project makes it later

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
No Silver Bullet
"there is no one silver bullet: there is no one single development in either technology or management technique, which by itself promises even one order of magnitude improvement within a decade in productivity, reliability or simplicity" there is no method that is guaranteed to improve reliability, simplicity or productivity on its own
26
second-system effect
when an architect designs a second system, they tend to incorporate all the additions they skipped in the first system due to time constraints. so when designing the second system, one should be wary of adding such attributes and over-engineering it
27
in a suitably complex system,
there is a certain irreducible number of errors; any attempt to fix observed errors results in the introduction of other errors
28
microservice architecture
an architectural style in which the system is constructed from communicating microservices; each microservice runs in its own container, usually in cloud based systems
29
software architecture
the structure of a software product
30
AJAX
Asynchronous JavaScript and XML
31
react; single responsibility principle
react is commonly used in combination with HTML and CSS, but each language only serves one responsibility: HTML for presenting information and structure; CSS for style of information; JavaScript for interactions/data
32
react is a ______ language
declarative language
33
ECMA6 is dynamically typed; variables can… the interpreter…
Dynamically-typed languages are those (like JavaScript and most others) where - variables can hold any type of value at any time, - the interpreter assigns/checks types when code is executed, not during compilation
34
const
defines a constant reference to a value, not an unchanging value; use const to declare a new variable, array or function
35
hooks
functions that: - add state to a function component (useState) - run code at specific times (useEffect) allow one to "hook into" react features from function components; allows one to use react without classes
36
cookies
an ID given to a user by a service to identify if they are logged in or not; pushes the state of being logged in (or another state) to the browser by being present when checked for; microservices also give cookies
37
architectural influences
nonfunctional product characteristics; product lifetime; software reuse; number of users; compatibility; these all affect how the software is built
38
nonfunctional product characteristics
security, performance; things that are necessary for a good product, but not the focus of the product.
39
influence of product lifetime
regular revisions are needed for a product expected to last a long time. architecture needs to be easy to read and refactor and add to
40
influence of software reuse
reusing large components from other products saves time and effort, but this constrains architectural choices: design must fit around the software that is being used
41
influence of number of users
performance will be affected by the number of users at once; build a system that can be scaled easily
42
influence of software compatibility
allows users to adopt product on a different system; limits architectural choices such as database used
43
maintainability-performance tradeoff
a maintainable system is made of small parts that can be easily changed, but if many components are communicating with each other, the software will run slower
44
how to best design security
- a series of layers so an attacker has to get through all of them before the system is penetrated; - implement as separate components so that if one is attacked the others remain; - use different technologies in different layers so it's harder to breach each one
45
security vs usability
- layered security means users have to remember information that would be used to protect their data, slowing down their interaction with the system; - it's best to use an architecture that doesn't enforce unnecessary measures - use architecture that provides helper components that reduce the load on users
46
availability
uptime; when users can access the system; achieved by having redundant components in a system
47
redundancy
components detect failure -> switch the operation to another component when failure is expected (circuit breakers are a good example); implementing redundancy increases time and cost of development and adds complexity, possibly introducing bugs
48
architectural design questions
how should the system be organized?; how should components be distributed and communicate with each other?; what technologies should you use in building the system and what components should be reused?
49
design guidelines / best practices
single responsibility for each component; coherent interfaces that change rarely; avoid duplicating functionality
50
abstraction
focus on essential elements of a system or component without concern for details; reduce complexity (of system / UI) so you can - isolate changes - improve maintainability
51
decomposition
analyzing large-scale components and representing them as finer components*; localizing relationships into the same module, reducing shared dependencies and using local data when possible
52
cross-cutting (security + reliability) concerns
reliability and security are issues affecting all layers of the system and the way people use the system; implementing may add errors, gets worse before it gets better
53
good security architecture:
different technologies are used in different layers; ensures resilience to attacks;
54
layers of functionality (UAABD/T)
UI (HTML to collect input, JavaScript for actions); Authentication; Application-specific functionality; basic shared services, database + transaction management
55
browser-based UI would use:
MVC with HTML for model, Javascript for actions,
56
Authentication + UI management layer
includes components for user authentication and web page generation
57
base shared service layer
this layer establishes services used by the application layer
58
database and transaction layer
provides services such as transaction management and recovery; may not be required if the application doesn't use a database
59
architectural design principles - what should programmers keep in mind?
REAPM replaceability, extensibility, age-appropriate, programmability, minimum work
60
replaceability
the list of applications shouldn't be hard-wired into the system; users should be able to replace applications in the system with alternatives; users can mod your system
61
extensibility
users + system admin should be able to create their own versions of the system
62
age-appropriate
(using iLearn as an example) depending on the system and target audience, alternative UI should be supported so that age-appropriate interfaces can be created
63
programmability
it should be easy to make one's own applications by linking existing applications in the system; similar to extensibility
64
minimum work
users who do not wish to change the system should not have to do extra work just because others want to make changes
65
full service integration
services are aware of and can communicate with other services throuh their APIs
66
partial integration
services may share service components and databases but are unaweare of other application services
67
independent integration
these services do not use any shared system services or databases and they are unaware of any other services in the system; can be replaced by any comparable service with minimal consequences
68
client-server comunication
HTTProtocol used to send messages from client to server, plus an instruction (GET, POST, PATCH) and a URL for a resource to operate the instructions on
69
services
stateless components -> can be replicated and migrate from one computer to another or accessed through the internet; service-oriented architecture is easier to scale and is resilient to failure
70
what is a thread
a path through a running program; independent path through a process; assigned path by the OS
71
javac
java compiler; java -> bytecode to be run by JVM
72
circuit breaker
typically in microservices, can be in servers; if a service stops working, the circuit breaker overrides efforts to call that service again and instantly returns errors. after a cooldown time, the breaker allows a few test requests to see if the service is working again. repeat until it passes the test requests.
73
myhtical man minth: when you add developers to a project,
it makes it later; they need to be taught about the project before progress is made (6 months- 1 year before they become 'profitable contributors'
74
SOLID: S
single-responsibility
75
SOLID: O
open-closed
76
SOLID: L
Liskov's principle: subclasses should replace classes without breaking the program
77
SOLID: I
Interface segregation; each interface should only have one responsibility
78
SOLID: D
dependency inversion principle; high level and low level modules should depend on abstractions; details should depend on abstractions, not the other way around
79
spring-boot
a server system / framework; built on maven or another project manager, generally done in java;
80
maven
build system for software/servers
81
tomcat
heavy-use web server for running java applications
82
thymeleaf
template engine for HTML; has its own namespace + sublanguage of HTML
83
declarative language
state what the result should be, not how it should be reached
84
imperative language
must state steps to clarify how one wants something achieved
85
functional testing
test the program on a larger scale than unit tests; tests the entire system
86
privacy
keeps personal data from being seen by unauthorized parties
87
integrity threats
attacker attempts to damage the system or its data
88
availability threats
an attacker attempts to deny access to the system for legitimate users
89
pros of dynamically typed programs
faster, flexible
90
cons of dynamically typed programs
errors occur at runtime; harder to maintain large codebases; slower performance
91
useState
adds state to a function component
92
useEffect
run code at specific times