In many cases it seems thus far dynamic programming refers to recursion. Under this pattern, we break the problem down into sub-problems and optimize for redundant inputs. Complexity Estimates When estimating the complexity of a recursive function, we consider the time and space complexity as follows. Time We can visualize the time complexity as a…
Whenever we face a given problem, we would be wise to remember that we are not the first people to encounter it! While there may be some unique elements to our given case, problems can be reduced into discrete, finite categories defined by their optimal solution. And while there may be many ways to satisfy a given set of product requirements, not…
When navigating a tree, there are two general paths available: Depth First Search (DFS) and Breadth First Search (BFS). When using DFS, we start from the leaves of the tree and make our way toward the root. Conversely, when using BFS, we terminate our search on the leaves of the tree and look at every sibling node on each level before moving along…
A LinkedList (LL) is an ordered data structure. The end of the list is "the tail" and the start is "the head." How does a LL compare to an array? First, some terminology differences: Elements of an array vs Nodes of a LL Indexes of an array vs Positions of a LL More substantial, arrays are stored "contiguously" in memory. This means all elements…
Problem Statement: Given an integer array and a window of size w, find the current maximum value in the window as it slides through the entire array. Note: If the window size is greater than the array size, we will consider the entire array as a single window. This solution prompts us to use the two pointers strategy. The real effort here is…
Event driven architecture can be contrasted with one oriented around the database. There are a handful of challenges which this more traditional architecture presents with the expectation of contemporary users. One of the most obvious is that it is a synchronous transaction where a single resource is the bottleneck for the entire flow of the…
We can rely on the tsc to infer types. We can also statically type a variable to be a Union Type : This gets tricky when you introduce objects. The solution is to utilize type guards like the typeof and instanceof operators. This is the same thing we would do without TypeScript, but not doing it will result in an error. Union types are…
Working with types in JavaScript is a lot easier when you have a few tips and tricks under your belt. This post goes over a few of them. The main theme is the introduction of basic classifications of types. Prepended keywords The Partial keyword allows you to specify that a given input or return is of a certain type, but may omit certain…
PostgreSQL is a popular relational database. This post will focus on the parts of SQL which I don't understand very well or have little to no experience. What are Indexes? An index is similar to a Chapter in a book. It organizes a table. The name of the index gives an idea of what criteria is used to organize it; for example, birth-date might…
A function is the bread and butter of any program or application. While there are other pieces, the functions which make up a program are ultimately responsible for what makes a program/application executable. Functions are the engine of the program. When I was first learning how to code I was really tripped up by a couple of things related to…
In former times, the way a website would be served by the browser is by making a blocking request to a server for an .html document. A "blocking request" means that the browser itself would load until this request resolves. This makes for a bad user experience. Everytime a user goes to a new link inside the same website, it would reload. Nowadays…
There are lots of terms to know for d3. Not all of them have a direct correspondence to a specific methond in the API, but are useful for articulating how to build certain visualizations. Term Definition API Continuous Domain/Range A set of data with incremental values .domain()/.range() Discrete Domain/Range A set of data with concrete, specific…
Data Driven Documents (d3) is generally considered the industry standard for data visualization in the browser. The basic task which I use d3 for is the proportional mapping of a set or domain of input values to a designated set or range of output values. Here are a few examples: Linear Mapping In this case, we can now invoke linearScale(…
Amazon Web Services were designed with certain principles and values in mind. These are specified throughout their documentation and in various white papers. Services should be decoupled and composable together. We shouldn't have massive application on one computing resource incapable of horizontal scaling. Here are some of the potential features…
Durability : existence of items in storage. Availability : fetching items in storage. Resiliency : ability to recover from failure. Elasticity : scaling resources up/down. Reliability : system providing functionality. Redundancy : Horizontal scaling. Fault Tolerance , refers to the feature of resilience.
Infrastructure as Code. Ballin. Configuration Object yaml or JSON Required Key: resources Example: The first key, cat-pics is considered a logical resource which creates what’s known as a stack . A stack is a physical resource, in this case an S3 Bucket, derived from a template.
This AWS Service provides Virtual Machines (or dedicated physical servers) available in a variety of pricing models. The main selling point behind EC2 is the removal of a need for traffic forecasting by the implementation of auto-scaling. Auto scaling refers to the ability to scale compute resources up or down based traffic. Horizontal scaling, as…
Users are considered those with an AWS Identity that can log in to the console. These identities are governed by policies which can be associated with a role or a group. Groups do not sign in to the AWS Console, nor do roles; only users — those with an AWS Identity. AWS Account w/ Root User AWS IAM Users w/ Access to Resources inside AWS Account Or…
A basic understanding of networking is helpful for understanding AWS. This covers the basics of how devices can communicate with one another. The Seven Layers of an Open Systems Interconnection (OSI) Network Each layer is encapsulated. It doesn’t know anything about what the other layers have done to the data, it just has it’s own responsibility…
Multi AZ Deployments In deploying a DB, you can specify if you want Multi AZ. In this option, the standby db is synchronously replicated in the secondary AZ. Failover Automatic failover comes with Multi-AZ deployment so that only ~60-120 seconds of downtime occurs and the DNS record is updated to point at the standby DB. Triggered by any of the…
Security Object storage in AWS is encrypted in transit by default, but not at rest. Encryption at Rest Client side: Strictest form of encryption — requires client to manage the encryption/decryption process. SSE-C: S3 manages everything but the keys — not stored in S3 — which must be provided in every PUT/GET. SSE-S3 S3 manages everything…
Networking concepts Peering VPCs Constraints: VPC Endpoints Egress Only to Internet Network Routing & Firewalls Network routing is defined by a Route Table. These rules are protected by firewalls. Firewalls NACL Security Groups #aws/associate/test-prep
Direct Connect is a physical, expensive, non-internet connection to the AWS network. VAPN is an internet-based
Configuring the Instance This instance has WordPress installed on apache http services We configured all the assets in wp-content/uploads to be redirected to our cloud front distribution, which stands in front of an s3 Bucket, which has the same assets as wp-content/uploads We also have cron jobs scheduled to do two things first : sync any…