Section 1

Preview this deck

centralized data store options

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (29)

Section 1

(29 cards)

centralized data store options

Front

external database or an external persistent cache (like Redis)

Back

Cross-Site Scripting (XSS)

Front

An attack that injects scripts into a Web application server to direct attacks at clients. A Client-side code injection attack. Usually seen in forums or places with a form that other users see the output from. Usually harnesses Javascript, through which one can access user cookies (which can then be used to get sensitive data from some server), HTML5 things like geolocation/microphone/webcam, and can redirect page for phishing. You're vulnerable when your page prints unsanitized user input.

Back

Polymorphism

Front

Defining a shell method in the parent class that the children classes need to define themselves.

Back

Describe the method lookup process for the following code. class Ghost; end casper = Ghost.new casper.boo

Front

casper is an instance of the Ghost class and is the receiver of the message :boo in this example. The receiver first looks in its singleton_class for a method named :boo (the singleton class for the receiver is casper.singleton_class). If it does not find a method, it will continue up the ancestor chain to look for the method. Here is the ancestor chain for this example: ghost.class.ancestors # => [Casper, Object, Kernel, BasicObject]. If there are no classes that respond to the message, then method_missing is called.

Back

Sharding

Front

Sharding is a type of database partitioning that separates very large databases the into smaller, faster, more easily managed parts called data shards. Downsides - join queries are hard, searching with ranges is hard.

Back

Imperative Programming

Front

Imperative programming, as opposed to functional programming, is a paradigm in programming that is often referred to as procedural, where a developer writes code that describes in exacting detail the steps that the computer must take to accomplish the goal. Most of the mainstream programming languages, such as C++, Java, and Python, are considered imperative languages.

Back

Interfaces

Front

(Java) A way to achieve multiple inheritance, sort of. Specify what a class must do and not how. It is the blueprint of the class. If a class implements an interface and does not provide method bodies for all functions specified in the interface, then class must be declared abstract. Used to achieve loose coupling and to implement abstraction.

Back

Rubinious

Front

Ruby interpreter written in Ruby itself (but there are still some parts written in C++)

Back

Tool to make sure all servers update at same time (for Rails)

Front

Capistrano

Back

CDN

Front

A content delivery network (CDN) is a globally distributed network of proxy servers, serving content from locations closer to the user.

Back

translates a domain name to an IP address

Front

DNS - Domain Name System

Back

OWASP Top 10 List

Front

- Injection - Broken Authentication - Sensitive Data Exposure - XML External Entities - Broken Access Control - Security Misconfiguration - Cross Site Scripting (XSS) - Insecure Deserialization - Using components with known vulnerabilities - Insufficient Logging and Monitoring

Back

Reasons not to use Heaps for priority queues

Front

ChangeKey and Deletions require you to know index/reference to the node in questions. So: 1) You need to break abstraction storing that index in your logic. or 2) You can just not do ChangeKey and Deletion. 3) You can have them be really slow because you need to search the tree (n) for your value before Changing/Deleting (nlogn total) 4) When of equal priority, fifo order not necessarily preserved.

Back

Sets datatype in ruby

Front

require 'set' s = [1, 2, 3].to_set OR s = Set.new([1, 2, 3]) union operator: s | (1..10) (works on anything enumerable) # Set: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} difference operator: products - (3..4) # Set: {1, 2, 5, 6, 7, 8, 9, 10} intersection operator: Set.new(1..3) & Set.new(2..5) # Set: {2, 3} . (gives elements in common) exclusive-or operations: Set.new(1..3) ^ Set.new(2..5) # Set: {1, 4, 5} (gives elements not in common)

Back

Formulas for parent/child indexes in binary trees

Front

1. (index − 1)/2 (parent index) 2. 2 ∗ index + 1 (left child) 3. 2 ∗ index + 2 (right child)

Back

Linked lists are best suited for (2)

Front

- when you have an unknown number of items to store. (avoids resizing algorithms for arrays/hashes which are linear runtime) - when you will only remove nodes at either the head or tail of the list (to maintain a constant run time) (O1).

Back

Reverse Proxy

Front

a web server placed in front of application servers. Good because: - can handle load balancing - client can point to its IP address, hiding IPs of application servers - it can handle security checks/whitelists/decryption so the servers don't have to.

Back

SQL Execution Cycle

Front

Parse, Bind, Execute, Fetch

Back

MRI (ruby)

Front

Matz's Ruby Interpreter or Ruby MRI (also called CRuby) was the reference implementation of the Ruby programming language named after Ruby creator Yukihiro Matsumoto ("Matz"). Written in 1995 & is entirely in C

Back

Abstract Class vs Interface

Front

(java) Abstract Class will be inherited by a child class, and child class can choose not to define some methods who's shells are defined in parent abstract class. Abstract class can also include non-shell methods with actual defined functionality.

Back

Method Overloading

Front

The ability to define two or more different methods with the same name but different method signatures. (Not possible in Ruby, instead use *args and conditionals.)

Back

JRuby

Front

Ruby interpreter which is written in Java & runs on the JVM (Java Virtual Machine). One thing you can do, that isn't possible in any other Ruby interpreter, is to use Java libraries in your code.

Back

Interpreters

Front

A program that reads your source code, converts it into a series of executable instructions & then runs them. Like a compiler, but it runs your code directly, without producing an output file. in Ruby - MRI (what most people use), Rubinius, JRuby

Back

Bypass scope gate for class and methods

Front

Nike = Class.new do define_method(:speak) do

Back

virtual hosting

Front

A method for hosting multiple domain names on a single server. This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name. Sometimes called vhost. Different domains are distinguished via the host header. Using host headers makes you vulnerable to host-header attacks, where the X-Forwarded-Host header is used to exploit a vulnerability in your site.

Back

Email Header Injection

Front

Also referred to as SMTP header injection. A CRLF character is included in an contact-me form, usually allowing a bcc attribute to be added. Then hacker can spam or phish. Mitigate by having a whitelist of disallowed characters for that form, including new line characters (
)

Back

Functional Programming

Front

As opposed to imperative programming, is a pure functional approach to problem solving. Functional programming is a form of declarative programming. Languages that fit this description include Scheme, Haskell, LISP, Racket, and F#.

Back

Database master-slave replication

Front

Creating a bunch of replicas of db to handle get requests in order to alleviate master's load. (most requests to db's are get requests anyway). Issue is possible replication lag = slaves aren't updated quick enough, out-of-date info is gotten from a slave.

Back

Encapsulation

Front

Keeping details (like data and procedures) together in one part of a program so that programmers working on other parts of the program don't need to know about them. Reduces system complexity and increases robustness by decoupling components. Setting some methods to public while others are private.

Back