Units 1-5 Flashcards
Iterative development process
develop working prototypes of a program and then go back and re-develop it
incremental development process
break apart a problem into small parts and reassemble the solution when all the parts are fixed
program documentation
shows how your a part of your program works
comments
program documentation written directly into the program
logic error
error in program’s output.
Code executes but output is not what the programmer intended
syntax error
code doesn’t work because it was written incorrectly
runtime error
error while code is running
overflow error
error in code because numbers are too big for computer
hand-tracing (methods of fixing)
manually tracking variables outputs as the program goes along
print statements (methods of fixing)
print out values to make sure they are correct
Data is stored in bits
bits (binary digits - composed of 0s and 1s)
single digit
Binary numbers
8 bits = 1 byte
if n = number of bits,
2^n = can store 2^n numbers
2^n -1 = shows the largest number it can store
Data representation:
ASCII code
Analog data
Digital data
ASCII code- converts text to binary code
Analog data- infinite details that are continuous and change smoothly over time
Digital data- measured digitally and leaves out extra data by simplifying data collected (form of abstraction)
sampling: when you break up analog data in intervals with the goal of putting it back together at a desired quality. Smaller samples = more accurate, fewer bits = less accurate
Abstraction
reducing complexity by only focusing on most important parts and hiding irrelevant parts from user
focus on content without worrying about how application works
Lossy data compression
Can reduce file size and decrease resolution but lost data CANNOT be recovered. Easier to store and transmit
lossless data compression
no data is lost and files can be reproduced. big file sizes so difficulty storing and sending
metadata
- data that describes your data.
- ex: data - picture of waterfall, metadata- time and location where pic was taken.
- changing metadata will not change primary data
- metadata provides additional info for better usage
data mining
examining large sets of data for information
transforming data
converting, cleaning, structuring data to format it in a way that helps analyze data for organizations
cleaning data
correcting, editing data so its prepared to be analyzed
Strings (data types)
- substrings
- string concatenation
- strings are an ordered list of characters (“hello”)
- substrings are part of a string (“ello”
- string concatenation is when you combine two or more strings with ‘+’
Lists (data types)
- ordered sequence of elements starting with index 1
- if index is less than 1 or greater than the number of elements in the list, it will cause error
Boolean operators (data types)
- only true/false with 3 data operators (NOT, AND, OR)
- NOT: if condition is false, NOT false evaluates to true (opposite)
- AND: evaluates to true only if both condition 1 and condition 2 are true, otherwise false
- OR: evaluates to true if at least 1 condition is true, if both are false, it is false
algorithm
- sequence of instructions that accomplish a certain task; uses sequencing, selection, iteration
sequencing
all code is executed in the order it is written in
selection
- if statements: specify what happens if the condition is met
- else statement: specify what happens if the condition is not met
- nested conditional statements: conditional statement inside another conditional statement
parameters vs arguments
- parameters: input variables that act as placeholders
- arguments: actual defined values when function is called
Iteration
- function that repeats a block of code until a specific result occurs; “repeat n times”, “repeat until”
linear search
Algorithm for finding an element in a list. Starts from beginning of list and goes sequentially checking each element in list until item is found.
Can be used for sorted/unsorted
binary search
Halved the elements that need to be searched
List MUST be sorted (ordered from least to greatest)
- compares middle value of list to target value
- if the middle value is greater than the target value, then eliminate the greater half of the list
It repeatedly dividing in half the portion of the list which could contain the item until you have narrowed it down to one
Computing devices
- physical object that can run a program. input > processing > output
computer networks
group of interconnected computing devices capable of sending and receiving data; communicating with each other
Data Packets:
Metadata:
data on the internet is split up into data packets with metadata attached to each packet to tell the routers information
routing
process of finding best path to deliver information between sender and reciever
bandwidth
rate of data transfer from one device to another in megabits per second.
protocol
set of rules governing format of data sent. internet protocols have allowed the data to be easily changed in size and meet new demands
Internet Protocol
IP addresses and routes your online requests so it can arrive at the correct destination. Every device connected to internet has IP addresses.
4th version: IPv4 has 32 bits; 2^32 addresses
6th version: IPv6 has 128 bits; 2^128 addresses
Transmission Control Protocol
- Ensures accurate data delivery once that IP address has been found.
- Connection-oriented protocol
- Data traveling is broken into smaller chunks of data called packets. If packets get lost, TCP resends
User datagram protocol
- Connectionless protocol
- protocol that allows computer applicants to send messages without checking for missing packets.
- Works faster but not as reliable as TCP. UDP has speedier communication because it doesn’t spend time forming a connection so packets get lost easily
Fault Tolerant examples:
- when system can support failures and continue to function
- packets are taken out of order so path is guided by routers
- if packet not received, TCP will resend it
- when all packets received, packets will be put together to form original message
end-to-end architecture
breaking down and assembling of packets at each end (from computer 1 to computer 2).
- what happens in middle is hidden
Sequential Computing
Operating executed one at a time. It takes as long as the sum of all its steps
Parallel Computing
- breaks up a task into smaller, sequential pieces
- those pieces are executed at same time by using multiple processing units
- takes as long as the longest task done in parallel
- needed in real world scenarios
Distributed Computing
- multiple devices communicate to run a program
- larger problems cannot be solved on a single computer because of processing time or storage needs
speedup of a parallel situation
sequential run time/parallel run time
World Wide Web
a system of web-pages, programs, and files;
runs on the Internet but is not the internet
scalability
the capacity to change in size and scale to
meet new demands.
Digital Divide
- Gaps between those who have access to internet and those who do not
- infrastructure: some people don’t have access to internet bc of where they live
- education: some may have access to it but not have education to use it
- indifference: may have access but choose not to use it
- cost: internet may be unaffordable
Computing Bias
computing innovations can reflect gender/race biases since computers run on historical data.
recruiting algorithms may prefer one gender over the other
Intellectual Property
work that people consider “theirs”
Crowdsourcing
Process of obtaining information or feedback for a task from people on the internet. Ex: Uber connects with people who need rides.
Citizen science
Uses general population with individuals who contribute their own data to conduct scientific research
Copyright
Person who created something determines who gets to use their creation
Creative Commons License
Public copyright license that allows for free distribution of copyrighted materials. Sometimes people can only copy original work without modification but if you credit the author, you can modify it.
Open-Sourcing
Work is freely shared, distributed, modified
Open-access
Research available to public without restrictions
Computing Innovations with legal/ethical issues
- biased algorithms
- software that can download digital media and streams
- devices that collect & analyze data by constant monitoring sites
Personally Identifiable Information (PII)
- Information about a person that identifies or describes them (SSN, age, race, medical info)
- Cyber criminals steal PII data through search history, website views
Multi-factor authentication
User is granted access after successfully presenting multiple methods of verification
Encryption
Encoding data to prevent others from accessing it
Decryption
Process of decoding data
Key
Secret piece of information used to encrypt data
symmetric key encryption
Same key used to write/encrypt and to unlock/decrypt
Public key/asymmetric key encryption
Uses 2 keys. Anyone with public key can encrypt data. Private key is needed to decrypt data
Malware
Malicious software intended to damage or take control of its computing systems.
Can be spread through emails, social media, files.
Malware looks for outdates software with flaws in security to infect. By regularly doing software updates, it can fix errors.
Computer viruses
Programs that copy themselves and gain access to a computer in an unauthorized way.
Viruses attach to a legit program and start running independently. Each time the infected program is run, the virus runs and attaches itself to other programs.
Virus vs Worm
Viruses are attached to infected files and must
be activated by the user; worms can operate independently.
Phishing
Directs users to unrelated sites and tricks the user into giving personal data (PII, bank and credit card details). Disguised as a trusted website but its not!!!
Keylogging
Program that records every keystroke made by computer to gain access to passwords.
Security software cannot detect hardware keyloggers.
Rogue Access Point
wireless access point that can be intercepted and give unauthorized access to secure network