Sei sulla pagina 1di 11

Chapter 11 & 12

Crowdsourcing: refers to solving a problem or achieving a goal by combining the contributions of a large,
unconstrained volunteer population
o Examples: Wikipedia, FoldIt, FreeRice, Kickstarter
Electronic Payments: has enabled faster processing of monetary funds through technological advances
o Bitcoins: money system without a central authority and can be obtained through mining or in
exchange for products/services
Intellectual property: all such human creations that are distinguished from real estate, pets, cars, and other
items available to be owned
o Software: ownership remains with the company that is marketing it, but the given individual is free
to use it; is proprietary, meaning there is no access to source code
Commercial software: software that an individual cannot sell or give away, because there is
no ownership and there is an agreement contract when installed
Shareware: software usually distributed over the internet as a trial; can be distributed and
used as a free copy
Administered through an honor system, and purchased fully if the software is liked
Open Source Software: software for which the program is publicly available
Examples: Mozilla browser
Make money through selling specialized versions to corporate clients, providing
customer support, and selling other software that interfaces to it
o Copyright: exclusive right, given to an originator or an assignee to print, publicize, perform, film, or
record literary, artistic, or musical material, and to authorize others to do the same
Established immediately and automatically in most nations of the world
Work for hire: creator no longer owns copyright, but the person who paid the creator
Fair use: use of copyrighted material for educational or scholarly purposes, to allow limited
quotation of copyrighted works for review or criticism, to permit parody, etc.
Public domain: where information is placed to use for free in any form, as long as it is
allowed within the guidelines of the original creator
Creative Commons License:
Attribution: others are allowed to copy, distribute, perform, remix, or otherwise
modify the work, as well as create other work based on it, as long as you get credit
for it
Noncommercial: others are allowed to copy, distribute, perform, remix, or otherwise
modify the work, as well as create other work based on it, as long as the result is non
for sale
No Derivative Work: others are allowed to copy, distribute, perform, or use the work
in another way, as long as those are verbatim; no derivative works can be created
from it
Share Alike: others are allowed to distribute derivative works only under a license
identical to the one governing your work
Privacy: right of people to choose freely under what circumstances and to what extent they will reveal
themselves, their attitude, and their behavior to others
Cookies: record containing seven fields of information that uniquely identify a customers session
o Exchanged between the client and the server on each transmission
Tracking:
o Online tracking: practice of a website automatically sending details about your visit to other content
providers so that they can target ads r show you products in line with what you are looking for
o Cell phone tracking: refers to the positioning information available from mobile devices used to map
your physical location and movements
Security:

o Malware: general term for software that harms computers in the risks of mischief, information theft,
spying, and/or resource theft
Virus: program such as a screensaver or game that might be shared but which contains code
to reproduce itself when the program runs; viruses ride along in other software
Worm: program that is often embedded in an email attachment
Reproduces itself and sends a copy to everyone on the contact list, thereby
propagating and moving on its own
Exploit: verb used to describe when software takes advantage of bugs in standard
commercial software to install itself and perform its unsavory activities
Trojan: malicious program performing unauthorized activities and is disguised through
benign software
Phishing (password harvesting fishing): term for social engineering process of convincing people to give up
personal data voluntarily
Cryptography (private key encryption/symmetric key cryptography): concerns constructing and analyzing
protocols that block adversaries

Database Concepts
Advantages:
o Create to ensure data integrity (accuracy), data security, data maintenance
o Extremely fast and large
Types:
o Hierarchical:
Tree-like structure, parent-child relationship
Example: IMS (IBM)
o Relational:
Reflects the relationships among the different kinds of data, uses relational algebra to operate
on data, allows the software to answer queries efficiently
Most widely used database model
Example: Oracle Corp. (Oracle), Microsoft (Access, SQL Server), IBM (DB2, Informix),
freeware (MySQL)
o Object-oriented:
Data is represented in the form of objects
Efficient when high performance is needed on complex (non-traditional) data like:
Engineering/scientific data, multimedia
Example: Chicago Stock Exchange, Motorola, SouthWest Airline
o NoSQL:
Can store extremely large amounts of data
Example: Facebook, Amazon, Google
Optimized to perform relatively simple queries on vast amounts of data
Databases and Tables:
o Both have tables of information:
In database, these related pieces of information are tightly connected
o Databases allow searches based on related information
Physical Database: stored on the disk drives of the computer and is a permanent repository of the database
Logical Database: known as the view of the database and is created for users on the fly; also customized for
the users needs
o Advantages: different users can access different information, more security
Data warehouse: copy of transaction data, and specifically structure for querying and reporting
Data mining: completing analytics on data and is a subset of business intelligence
o Used for predictive modeling

Entities: defines a table


o Attribute: each column, where each colum contains the attributes values
o Entity instances: each row, specific set of values for the attributes of an entity

Chapter 3
Synchronous communication: requires that both the sender and the receiver are active at the same time
o Telephones
Asynchronous communication: requires that both the sender and the receiver are active at different times
o Postcards
Number of receivers:
o Broadcast: involves a single sender and many receivers
Television and radio
o Multicast: involves many receivers, but the intended recipients are not the whole population
Magazines
o Point-to-point: involves one specific sender and one specific receiver
Text messages and phone calls
Client/server structure:
o Client computer (self) server computer (where website is stored, hence the name Web server)
o Reference when one computer, the client, receives services from another computer, the server
IP address: sequence of four numbers ranging from 0-255 separated by dots
o IP packet: means through which each computer communicates
Composed of sequence numbers, bits, and a payload
Domain names: actual names of addresses as opposed to IP addresses, where each is a member of the next
larger domain
Domain Name System (DNS): hierarchical structure used to name computers
o Peers: domains at the same level
Top-level domains: popular sets of domains
o .com, .edu, .gov, .int, .mil, .net, and .org
Transmission Control Protocol/Internet Protocol (TCP/IP): breaks up the entirety of the information into
sections which are labeled and sent over different streams to the intended address, where they are reordered
and assembled
o IP packet: sequence of small fixed-size units sent individually over different routes to a specific
destination, where they are assembled back together to create a larger whole unit
Wide Area Networks (WANs): networks designed to send information between two locations widely
separated and not directly connected
o Uses TCP/IP (software)
Local Area Networks (LANs): networks designed to send information between two locations closely linked
o Geographically close and uses Ethernet (software stack)
Types of connections:
o ISP: connection to the internet via an Internet service provider
o Campus/enterprise network: connection from the network server to the Internet gateway
o Wi-Fi: where a wireless router is connected via a modem to the ISPs internet modem
World Wide Web: compilation of web servers and their files
o Protocol: includes the HTTP, which instructs the computer regarding the handling of a file
o Server name: includes the name or server in the domain hierarchy
o Pages pathname: includes the final part of the URL which navigates to the desired page or file
Description of a web page:
o Source files: descriptions of how a webpage or information should appear on the screen
HTML or other source files

Chapter 7
PandA representation: fundamental physical representation of a bit of information that deals with either the
presence or absence, and no in-between
o Bit: information produced in one PandA observation
o Discrete binary system
Binary number system: means through which computers represent information
Hexadecimal numbering system: has base 16 numbering system (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)
Comparison between binary and decimal numbers: binary numbers are limited to two digits rather than the
customary ten digits
Converts to: hexadecimal, decimal, and binary
ASCII: early and widely used 7-bit code for characters
o 27 or 128 symbols
o Advantages of standard:
Computer parts built by different manufacturers can be connected
Programs can create data and store it so that other programs can process it later
Extended ASCHII: larger, improved encoding (8-bit) now known as ISO-8859-1
o 28 or 256 symbols
o ASCII became a subset of this (leftmost bit set to 0)
o Handles many languages from the Latin alphabet
Byte: 8-bit sequences and standard unit for computer memory
Unicode: characters for non-Latin based languages
Metadata: information describing information
o Does not require its own binary encoding
o Separate from information it describes
Structure tags:
o <hw> headword </hw>
o <pr> handles pronunciation
o <ph> handles phonetic notations
o <ps> handles parts of speech
o <hm> handles homonym numbers
o <e> surrounds the entire entry
o <hg> surrounds the head group

Chapter 8
Digitizing color:
o RBG: represented through intensity through a binary number
Smallest (black): 0000 0000 or 00 00 00 in hex
Largest (white): 1111 1111 or FF FF FF in hex
Required:
1 byte for each color, and 3 bytes for a single pixel of color
Lightning: Add binary numbers by through conversion of decimal to binary
o Brightness: refers to how close to white the pixels are
To do so, you lighten or darken every pixel
o Contrast: refers to the size of the difference between the darkest and lightest portions of the image
Add a smaller amount for darker pixels
Add a larger amount for light pixels
Stretch = (size of the new interval) divided by (size of the old interval)
Pn = (Po lowest number) times stretch + lowest number

o Adding color to black and white photographs


Setting boundaries between highlights, midranges, and shadows with specified color settings
Digitizing sound:
o Sample: refers to measurement taking at regular intervals
o Sampling rate: number of samples in a second
o Nyquist rule: sampling rate must be at least twice as fast as the fastest frequency of the sound
o More accurate measurements = more bits
o Bit depth: measurement of waves (both positive and negative)
o MP3: use compression ratios (of usually 10:1) allowing music bits to reduce substantially
Digitizing images and video
o Image compression: change the representation in order to use fewer bits to store or transmit data
Run-length encoding (lossless compression, as opposed to lossy compression)
o JPEG: lossy compression technique that exploits the same kinds of human perception
characteristics that the MP3 does
Sensitive to luminance, but not chrominance (different colors)
o GIF: standard for encoding icons, cartoons, and simple art
Lossless encoding
o MPEG: where JPEG-type compression is applied to each frame

Chapter 9
Fetch/Execute Cycle (Machine Cycle)
o Consists of receiving the next instruction, figuring out what to do with it, gathering the data needed
to do it, doing it, saving the result, and then repeating the cycle
o Steps:
Instruction Fetch (IF)
Instruction Decode (ID)
Data Fetch (DF)
Instruction Execute (EX)
Result Return (RR)
Memory
o Stores both the program while it is running and the data on which the program operates
o Properties:
Discrete locations (each is composed of 1 byte, or a sequence of 8 bits)
Addresses (begin with whole numbers starting at 0)
Values (recorded or stored)
Finite capacity (limited capacity to store data)
CPU: Control Unit
o Hardware implementation of the Fetch/Execute Cycle, where it fetches an instruction from memory
and performs the other operations of the cycle on it
o Registers (places to store a word or two of memory):
Instruction Register: where the control unit keeps the instruction that its working on
Program Counter (PC): gives the memory location of the next instruction that the control unit
will work on
o Process:
Fetching instruction at the memory location specified by the PC
Decoding the information, figuring out where in the memory the data for the instruction is
located, and where the result should go once its computed
Asking the memory to send those data values to the ALU
Computing by ALU to produce result
Asking the ALU to send the result back to the memory to the address decoded

CPU: ALU (Arithmetic/Logic Unit)


o Generally completes the actual computing during the Instruction Execute step of the F/E Cycle
o Data Fetch: gets the values (or operands) from memory for the ALU so it can perform operations
ADD or MULTIPLY
o Result Return: returns answers from the ALU to the memory at the address specified in the
instruction
Input Unit and Output Unit
o Peripherals: devices that connect to the processors input/output ports, providing it with input or
receiving its output
Not considered part of the processor, because they are specialized gadgets that encode and
decode information between the processor and the physical world
o Input Unit: moves information from the peripheral into the memory
o Output Unit: moves information from the memory and delivers it to the device
Program Counter (PC)
o Utilized in the Instruction Fetch step of the F/E Cycle
o Specifies the following address needed to be processed
o Each instruction equals 4 bytes of memory, allowing PC+4 to be the new destination of instruction
Branch and Jump Instructions
o Resets the PC to a new value, allowing it to override the selection of the next instruction in the
sequence, ultimately making the PC address some other instruction in memory that it has already
executed, but will repeat
Fetch/Execute Cycle Tick
o Processors use an electronic clock, and the step advances with each tick
Faster clocks mean faster processors
o Pipelined (new cycles beginning each tick) to increase speed

Chapter 4
Bold: <b>text</b>
Italic: <i>text</i>
Paragraph: <p>text</p>
Singleton:
o <br/> or <hr/>
Required:
o Barebones
Headings: <h1>text</h1>
White space: spaces inserted for readability
o Avoided through preformatted text, as in <pre> and </pre>
Escape codes:
o &copy copyright symbol
o &lt less than sign
o &gt greater than sign
o &amp ampersand
Markup validation service: used to check HTML violations and rules
Anchor tags: enables linkage between webpages (<a> and </a>)
o Unvisited: blue
o Visited: purple
o Visiting: red
Absolute pathname: hyperlink reference that exists as an entire URL

Relative pathname: hyperlink reference that refers to pages on the same site which is stored in the same or
nearby folders
Moving in a hierarchy
o Deeper into a folder: give the path from a current folder down to the file
o Higher into the hierarchy: use ../ to the beginning of the path name
Including a picture as a link: utilize the actual image code where the link would normally go
Attributes:
o HREF: hypertext reference
o SRC: source for an image
o ALT: enables a description when the image is unable to be rendered
Style: how to structure and present content on a webpage
o <style = property_name:specification>
o <style = property_name:value>
o When there is no specific tagline, use <span>
CSS: cascading style sheets
o Inline: using style attribute in HTML elements
o Internal: using the <style> element in the header section
o External: using external CSS files
Attribute versus element
o Attribute: when used inside a tag
o Element: when used in the header section
Lists:
o Ordered: first scribed with <ol> followed with a <li> and <li> for each segment
<ol type=type>
o Unordered: first scribed with <ul> followed with a <li> and <li> for each segment
<ul type=type>, square, disk, etc.
Tables:
o Utilizes the <table> tag followed by <tr> and then either <th> for a header or <td> for data
o <table border=1> allows for a table border of 1px
o <caption> allows for a centered caption at the outer top of the table
o Colspan allows for a data section to stretch or shrink over a series of columns
<t(d or h) colspan=value>
o Rowspan: allows for a data section to stretch or shrink over a series of rows
<t(d or h) rowspan=value>

Chapter 17
Programming Concepts:
o Variables: names with changing values
Identifiers: letter sequence that makes of a variables name
Generally, must begin with a letter, followed by a sequence of letters, numerals, or an
underscore
o Declarations
Declaring variables: variables being used within a program
Defined as var and separated by commas
Statement terminator: terminates after each specific statement
Defined with semicolon
Undefined variables: those that have not yet been defined but still exist
Initializing: declaring initial values for variables
o Data (value) types: different kinds of values of a programming language
Numbers

Do not include units such as $ or %


Can range from as small as 10-324 to as large as 10308
String literals
Surrounded by single or double quotes, and can be used within each other
Can initialize a declaration through variables
Empty string: string with the minimum, zero, characters
Can use codes to type things that cannot be typed literally
o Examples include:
\b backspace
\n new line
\t tab
\ double quote
\ apostrophe or single quote
Booleans
True and false values, even if they are written as letter sequences
o Assignment Statement
Changes a variables value
<variable> <assignment symbol> <expression>;
o <variable> is an declared variable in the program
o <assignment symbol> is the languages notation for the assignment operation,
and is usually denoted by an equal sign (=, :=, or )
o <expression> is a kind of formula telling the computer how to compute the
new value
Key point:
All three components must be given
Flow of the value to name is always right to left
Values of any variables used in the expression are their values before the start of
execution of the assignment
o Expressions
Describe the means of performing the actual computation and are built out of variables and
operators
Operators: standard arithmetic operations, such as addition, subtraction, multiplication, and
division, and operate on operands (values operated on)
Arithmetic Operators: symbols of basic arithmetic
Binary operators: operate on two values (addition and multiplication)
Unary operators: operate on single values (negate)
Modulus (mod) operation: divides two integers and returns the remainder
Relational Operators: used to make comparisons between numerical values and outcomes
with a Boolean value (less than, greater than, equal to, etc.)
Logical Operators
Types:
o Logical and: &&
o Logical or: ||
o Logical not: !
Operator overload: property in which operators, like +, have different meanings
depending on their operand data types
Concatenation: property to join strings
o Conditionals
Statement that tests numbers and strings
Types:
If Statements

o Predicate: (<Boolean expression>)


o Outcome: <then-statement>;
Compound Statements
o Collections of statements surrounded by {}
If/Else Statements
o In addition to the If Statement, it includes:
else <else-statement>;
o Where outcome normally becomes false, it skips the <then-statement>; and
refers to the <else-statement>;
Nested If/Else Statements
o Where <then-statements>; and <else-statements>; include if/else statements
within themselves

Chapter 19
Functions:
o Standard form: used to declare function
function <name> (<paramenter list> ) {<statement list>}
<name>: identifier for the function
<parameter>: values that the function computes on (input, scope of reference)
o Must begin with a defined value
o Do not need to be declared (no var necessary)
o Can only be inside a function (inside the statement list)
<statement list>: gives the function definition, or how to produce the result
o Call: to ask the computer to execute the statements of the function to return the needed values
Write functions name and give the input value(s), or arguments
Global variables: variable that can be referenced in any function, unlike parameters, which can only be
referenced in the function in which they are in the parameter list (local variable)
Built-in Functions:
o Math.round(): rounds a number to he nearest integer
o Math.random(): pseudo-random number that produces a result within [0, 1)
o Math.floor(): returns the largest integer less than or equal to an inputted number
o Date(): returns the present date and time
o toString(): converts a number to a string
Benefits of using functions:
o Ability to reuse
o Reduce complexity

Chapter 20
Iteration: looping through a series of statements to repeat them
for Loops:
o Standard form:
for (<initialization>; <continuation>; <next iteration>) {<statement list>}
<statement list>: what is repeated depending on the constructs of the parentheses
Control specification: includes (<initialization>; <continuation>; <next iteration>) of for
Loop by using an iteration variable
Example: for (var j=0; j < 3; j=j + 1) {<statement list>}, where j = iteration variable
o Process:
Initialization: sets the iteration variables value for the first (if any) iteration of the loop
Continuation: has the same as the predicate in a conditional statement

If the test results in a false, the loop terminates


If the test results in a true, the loop continues through the statement list
Next iteration: changes the iteration variable to accommodate the loops finished process
After the first loop is complete, the loop then begins at continuation and continues until the
loop is terminated.

o Rules:
World-Famous Iteration (WFI): for (var j=0; j < n; j + +) {}
Iterations can be any variable, although usually are single letters
Starts at 0 to simplify the loop
Continuation n is replaced with any numeric value
J++ is the same as writing j=j+1
Values following the < in the continuation step is exactly the number of times
through the loop
Iteration variables should never be changed somewhere within the loop, because it
will create an infinite loop
Indexing: process of creating a sequence of names by associating a base name with a number
o Element: indexed item of the base-named sequence
o Index origin: point at which indexing begins
Array: indexed base name
o Standard form:
var <identifier> = new Array(<number of elements>)
Array elements: given by the <number of elements>
Array length: refers to the number of elements in an array
Signified by <variable>.length
o Rules:
Arrays are normal variables initialized by: new Array(<number of elements>)
Array indexing begins at 0
Number of elements within in an array is its length
Greatest index of an array is <number of elements> - 1, because 0 is its origin
o Array reference syntax:
Array reference: what must be written to get the value of an array element
Consists of the array name together with an index (constant, variable, or expression)
enclosed in brackets and evaluating to an index value (a non-negative integer)
Busy Animation
o Using a timer to initiate animation:
setTimeout(<event handler>, <duration)
<event handler>: string giving the JavaScript computation that will run when the
timer goes off
<duration>: any positive number of milliseconds that refers to how far in the future
the timer should go off
Handles: code computers use to identify the timer
Can cancel a timer by:
o timerID=setTimeout(animate(), 30);
o clearTimeout(timerID)
Buttons to start/stop timers through onclick events
Start: sets the timer
Stop: clears the timer
o Prefetching images
Prefetching: process of loading images ahead of time to avoid slow transfer along Web
Image object: blank instance of an image
Using:

for (var i = 0; i < pics.length; i++) {pics[i].src = gifpix/Busy + i + .gif


Building the image source, allows for a single array to accommodate several different
pictures

Excel
Relative cell references: changes the reference cell by a difference, meaning it changes with every cell
affected
Absolute cell reference: does not change position, and is marked by the $ symbol
Functions:
o Sum: adds the given cells values together
o Average: finds the average of all the given cells values
o Max: finds the highest, or maximum, of all the given cells vales
o Min: finds the lowest, or minimum, of all the given cells values
Advanced:
o If: relates information within the function
Logical function, answer if true, answer if false
o Vlookup: relates a given cells value to match another
Value being assessed, selection of table values to refer to, number of column where answer is
found
o PMT: finds the value of payments for a given range of data