Containers 101
- Containers makes it easy to package and run an app in an isolated environment
- Docker is the most popular container engine
- Kubernetes (k8s) is used to orchestrate containers
- Some public clouds provide fully-managed k8s engines, like GKE or EKS
- Containers makes it easy to package and run an app in an isolated environment
- Docker is the most popular container engine
- Kubernetes (k8s) is used to orchestrate containers
- Some public clouds provide fully-managed k8s engines, like GKE or EKS
"It depends" is the answer to all good software engineering questions
The good software engineer should know on what it depends
The good software engineer should know on what it depends
Spin locks
- Thread synchronization mechanism
- Similar to mutex
- Instead of blocking by sleeping, the process is blocked by spinning (waits doing nothing) till it can acquire the lock
- Should be held only for short, since the CPU can't do anything else while it's waiting
- Thread synchronization mechanism
- Similar to mutex
- Instead of blocking by sleeping, the process is blocked by spinning (waits doing nothing) till it can acquire the lock
- Should be held only for short, since the CPU can't do anything else while it's waiting
4 Main NoSQL data models:
- Column: Tables, rows and flexible columns. Ex: Cassandra, HBase, DynamoDB
- Document: Semi-structured data. Ex: Linkedin profiles stored in MongoDB
- Key-value. Similar to a hash table. Ex: Redis, memcached
- Graph. Ex: Twitter follow in Neo4J
- Column: Tables, rows and flexible columns. Ex: Cassandra, HBase, DynamoDB
- Document: Semi-structured data. Ex: Linkedin profiles stored in MongoDB
- Key-value. Similar to a hash table. Ex: Redis, memcached
- Graph. Ex: Twitter follow in Neo4J
In a Linux filesystem, an inode is a data structure that stores information about a file: type, permissions, where in the disk the data is located, etc.
Inodes are identified by numbers in an inode table.
Inodes are identified by numbers in an inode table.
"Computer Science is no more about computers than astronomy is about telescopes"
- Edsger W. Dijkstra
- Edsger W. Dijkstra
Linear hashing is a hash table algorithm that permits incremental hash table expansion.
File descriptors are >= 0 integers that the kernel uses to identify the files that a process is accessing.
When a file is opened/created, the kernel returns a file descriptor, used to read/write the file.
Ex: ls > f.txt -> Redirect stdout (file descriptor 1) to a file
When a file is opened/created, the kernel returns a file descriptor, used to read/write the file.
Ex: ls > f.txt -> Redirect stdout (file descriptor 1) to a file
Unix pipes cheatsheet
a | bPipe: connect output from a to input of b
< redirect standard input from file
> redirect standard output to file
2> redirect standard error to file
>> append standard output to file
2>> append standard error to file
a | bPipe: connect output from a to input of b
< redirect standard input from file
> redirect standard output to file
2> redirect standard error to file
>> append standard output to file
2>> append standard error to file
Why backend VS frontend?
Think of them as your primary and secondary strenghts
Combining of both is the most entrepreneurial
- HTML
- CSS
- JavaScript
- Python + Django
- MySQL/MongoDB
- Some Linux
You can launch full websites on your own with a stack similar to this.
Think of them as your primary and secondary strenghts
Combining of both is the most entrepreneurial
- HTML
- CSS
- JavaScript
- Python + Django
- MySQL/MongoDB
- Some Linux
You can launch full websites on your own with a stack similar to this.
PHP (Personal Homepage) developed by Rasmus Lu Dorf in 1995
It is mostly used in web development. WordPress is written in PHP
<!DOCTYPE html>
<html>
<body>
<h1>Example PHP page</h1>
<?php echo "Hello World!"; ?>
</body>
</html>
It is mostly used in web development. WordPress is written in PHP
<!DOCTYPE html>
<html>
<body>
<h1>Example PHP page</h1>
<?php echo "Hello World!"; ?>
</body>
</html>
The execute permission bit for a directory is often called the search bit, because if you want to open a file by name, you need to have execute permission in each directory in the pathname, e.g. /home/username
This is different from read permission: list content of a directory
This is different from read permission: list content of a directory
Similar GCP/AWS services
- Compute Engine ~ Elastic Compute Cloud
- Kubernetes Engine ~ Elastic Kubernetes/Container Service
- App Engine ~ Elastic Beanstalk
- Cloud Functions ~ Lambdas
- Compute Engine ~ Elastic Compute Cloud
- Kubernetes Engine ~ Elastic Kubernetes/Container Service
- App Engine ~ Elastic Beanstalk
- Cloud Functions ~ Lambdas
Check if there's a root-to-leaf path such that the sum of all the along the path equals a given sum.
bool f(Node* r, int sum) {
if(!r) return false;
if(!r->left && !r->right && sum == r->val) return true;
return f(r->left, sum - r->val) || f(r->right, sum - r->val);
}
bool f(Node* r, int sum) {
if(!r) return false;
if(!r->left && !r->right && sum == r->val) return true;
return f(r->left, sum - r->val) || f(r->right, sum - r->val);
}
Resume tip for junior devs:
Don't put junior on your CV/portfolio.
Let them decide where you fit based on your skills.
Don't put junior on your CV/portfolio.
Let them decide where you fit based on your skills.
Radix sort is an algorithm that sorts numbers by processing individual digits.
The best architectures, requirements, and designs emerge from self-organizing teams
agilemanifesto .org
agilemanifesto .org
The expected constant time property of a hash table assumes that the load factor be kept below a certain bound.
Difference between x86, i386 and x64:
- x86 is a family of instruction set architectures based on Intel 8086
- i386 or x86-32 is the 32-bit architecture of the x86 family
- x64 is the 64-bit instruction set of the x86 family. Also called amd64, designed by AMD
- x86 is a family of instruction set architectures based on Intel 8086
- i386 or x86-32 is the 32-bit architecture of the x86 family
- x64 is the 64-bit instruction set of the x86 family. Also called amd64, designed by AMD