Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksood619 committed Nov 9, 2023
1 parent fe6108c commit 19807e7
Show file tree
Hide file tree
Showing 39 changed files with 1,150 additions and 879 deletions.
15 changes: 15 additions & 0 deletions docs/about-me/ideas/thoughts-future-ideas-vision-prediction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ What is your sample size?

[It’s Millet Time!](https://finshots.in/archive/its-millet-time/)

## Top changes

1. We will be capable of having (subject to no political barriers) Al-based near free doctors, lawyers and tutors for every citizen of the planet that will amplify our human professionals to improve accessibility and care.
2. We could have more efficient sources of plant protein to replace animal protein and much better fertilizer.
3. We could replace the majority of cars in most cities
4. In 15 years we could have flying Mach 5 planes that get us from NYC to London in 90 minutes - on sustainable aviation fuel no less
5. In 25 years there could be a billion bipedal robots (a million in 10 years). This would create a new industry larger than the current auto industry. From factory workers to farm workers and more, we could free humans from the bottom 50% of really undesirable jobs. You'd have yours, I'd have mine - and it'll totally change how we interact with the physical world.
6. There could be a billion programmers all "programming" in natural language. The "craft" of coding would be commoditised and the entire field would be opened up to those without the classic CS degree. Just one of innumerable examples of how entire industries could be shaken up.
7. A world where we can discover more resources than we consume in the next few decades.
8. We could replace all coal plants by 2050. My bet is on fusion.
9. Music and entertainment could be plentiful, and personalised. Content creation would be commoditized, but it is not going to change the celebrity-consumer relationship. That "phenomenon" would still exist as a different experience.
10. Carbon emissions could be a smaller issue (though still an issue) if we get the will to find and scale better technologies for cement, steel, agriculture, transportation, power production, HVAC, etc. Most such efforts will fail but enough will succeed to solve the problem of carbon emissions in the critical areas.

[Here are Vinod Khosla's 10 predictions for the coming decades](https://www.cnbctv18.com/technology/here-are-vinod-khosla-10-predictions-for-the-coming-decades-18240961.htm)

## Future

- [news-problems](knowledge/others/news-problems.md)
Expand Down
4 changes: 4 additions & 0 deletions docs/book-summaries/others.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
- The Law of Priorities
- The Law of Sacrifice

### Attitude Is Everything by Jeff Keller

It’s like a friend who shares stories of everyday people achieving extraordinary things. Imagine meeting someone like J.K. Rowling, who faced rejection but kept a positive attitude, leading to the creation of Harry Potter. Or consider Thomas Edison, the inventor of the light bulb who faced numerous failures and setbacks while working on his invention. However, he maintained an unwavering positive attitude, famously saying ― I have not failed. I've just found 10,000 ways that won't work. This book unveils the power of optimism in everyday life. It's your tool to overcome obstacles, just as ordinary folks like you have, to accomplish remarkable feats.

## Links

- [Productivity Game - YouTube](https://www.youtube.com/@ProductivityGame)
Expand Down
2 changes: 1 addition & 1 deletion docs/book-summaries/predictably-irrational.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If we do nothing while we are feeling an emotion, there is no short- or long-ter

Why hot is much hotter than we realize

6. The problem of procastination and self-control
6. The problem of procrastination and self-control

Why we can't make ourselves do what we want to do

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ Convert 43 bits to 7 characters long url
- These all allotments of ranges is maintained by zookeeper
- It guarantees that there are no collisions.
- Also can add some random bits to increase security.

![image](../../media/System-Design-TinyURL-image3.jpg)

Get requests can be cached using CDN
[Paste bin system design | Software architecture for paste bin](https://www.youtube.com/watch?v=josjRSBqEBI)

Expand Down Expand Up @@ -163,7 +165,9 @@ User
- name
- created
- metadata

![image](../../media/System-Design-TinyURL-image4.jpg)

DKGS - Distributed Key Generation Service

8 byte/8char
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ Adhering to an ABI (which may or may not be officially standardized) is usually
## ELF (Executable and Linkable Format)

In [computing](https://en.wikipedia.org/wiki/Computing), theExecutable and Linkable Format(ELF, formerly namedExtensible Linking Format), is a common standard [file format](https://en.wikipedia.org/wiki/File_format) for [executable](https://en.wikipedia.org/wiki/Executable) files, [object code](https://en.wikipedia.org/wiki/Object_code), [shared libraries](https://en.wikipedia.org/wiki/Library_(computing)), and [core dumps](https://en.wikipedia.org/wiki/Core_dump). First published in the specification for the [application binary interface](https://en.wikipedia.org/wiki/Application_binary_interface)(ABI) of the [Unix](https://en.wikipedia.org/wiki/Unix) operating system version named [System V Release 4](https://en.wikipedia.org/wiki/System_V_Release_4) (SVR4), and later in the Tool Interface Standard, it was quickly accepted among different vendors of [Unix](https://en.wikipedia.org/wiki/Unix) systems. In 1999, it was chosen as the standard binary file format for Unix and [Unix-like](https://en.wikipedia.org/wiki/Unix-like) systems on [x86](https://en.wikipedia.org/wiki/X86) processors by the [86open](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#86open) project.

By design, the ELF format is flexible, extensible, and [cross-platform](https://en.wikipedia.org/wiki/Cross-platform). For instance it supports different endiannesses and address sizes so it does not exclude any particular [central processing unit](https://en.wikipedia.org/wiki/Central_processing_unit) (CPU) or [instruction set architecture](https://en.wikipedia.org/wiki/Instruction_set_architecture). This has allowed it to be adopted by many different [operating systems](https://en.wikipedia.org/wiki/Operating_system) on many different hardware [platforms](https://en.wikipedia.org/wiki/Computing_platform)

ELF is used as standard file format for object files on Linux. Prior to this, the a.out file format was being used as a standard but lately ELF took over the charge as a standard.

ELF supports :

- Different processors
Expand All @@ -165,6 +168,7 @@ Each ELF file is made up of one ELF header, followed by file data. The data can
- Data referred to by entries in the program header table or section header table

![image](../../media/Basic-Computer-Organization-image11.jpg)

<https://en.wikipedia.org/wiki/Executable_and_Linkable_Format>

<https://www.thegeekstuff.com/2012/07/elf-object-file-format>
Expand All @@ -178,10 +182,15 @@ Thevon Neumann architecture - also known as thevon Neumann modelorPrinceton arch
- [Memory](https://en.wikipedia.org/wiki/Computer_memory) that stores [data](https://en.wikipedia.org/wiki/Data_(computing)) and [instructions](https://en.wikipedia.org/wiki/Instruction_set)
- External [mass storage](https://en.wikipedia.org/wiki/Mass_storage)
- [Input and output](https://en.wikipedia.org/wiki/Input_and_output) mechanisms

![image](../../media/Basic-Computer-Organization-image12.jpg)

The term "von Neumann architecture" has evolved to mean any [stored-program computer](https://en.wikipedia.org/wiki/Stored-program_computer) in which an [instruction fetch](https://en.wikipedia.org/wiki/Instruction_fetch) and a data operation cannot occur at the same time because they share a common [bus](https://en.wikipedia.org/wiki/Bus_(computing)). This is referred to as the [von Neumann bottleneck](https://en.wikipedia.org/wiki/Von_Neumann_architecture#Von_Neumann_bottleneck), and often limits the performance of the system.

The design of a von Neumann architecture machine is simpler than a [Harvard architecture](https://en.wikipedia.org/wiki/Harvard_architecture) machine - which is also a stored-program system but has one dedicated set of address and data buses for reading and writing to memory, and another set of address and [data buses](https://en.wikipedia.org/wiki/Memory_bus) to fetch [instructions](https://en.wikipedia.org/wiki/Instruction_fetch).

A stored-program digital computer keeps both [program instructions](https://en.wikipedia.org/wiki/Computer_program) and data in [read--write](https://en.wikipedia.org/wiki/Read%E2%80%93write_memory), [random-access memory](https://en.wikipedia.org/wiki/Random-access_memory)(RAM). Stored-program computers were an advancement over the program-controlled computers of the 1940s, such as the [Colossus](https://en.wikipedia.org/wiki/Colossus_computer) and the [ENIAC](https://en.wikipedia.org/wiki/ENIAC). Those were programmed by setting switches and inserting patch cables to route data and control signals between various functional units. The vast majority of modern computers use the same memory for both data and program instructions, but have [caches](https://en.wikipedia.org/wiki/CPU_cache) between the CPU and memory, and, for the caches closest to the CPU, have separate caches for instructions and data, so that most instruction and data fetches use separate buses ([split cache architecture](<https://en.wikipedia.org/wiki/Modified_Harvard_architecture#Split-cache_(or_almost-von-Neumann>) _architecture)).

Historically there have been 2 types of Computers:

1. **Fixed Program Computers --** Their function is very specific and they couldn't be programmed, e.g. Calculators.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ When a system writes data to cache, it must at some point write that data to the
## Write-through

![image](../../media/Caches-Caching-image1.jpg)

write is done synchronously both to the cache and to the backing store. The significance here is not the order in which it happens or whether it happens in parallel. The significance is that I/O completion is only confirmed once the data has been written to both places.

**Advantage:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Single-threaded synchronous model

![image](../../media/Concurrency-Models-Async-image1.jpg)

Each task is performed one at a time, with one finishing completely before another is started. And if the tasks are always performed in a definite order, the implementation of a later task can assume that all earlier tasks have finished without errors, with all their output available for use.

## Threaded model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ The write permission gives you the authority to modify the contents of a file. T
In Windows, an executable program usually has an extension ".exe" and which you can easily run. In Unix/Linux, you cannot run a program unless the execute permission is set. If the execute permission is not set, you might still be able to see/modify the program code (provided read & write permissions are set), but not run it.

![image](../../media/Unix-Linux-File-System-image1.jpg)

![image](../../media/Unix-Linux-File-System-image2.jpg)

r= read permission

w= write permission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
![image](../../media/Behavioral-Strategy-image5.jpg)

![image](../../media/Behavioral-Strategy-image6.jpg)

A strategy is a behavioral design pattern that defines a family of similar algorithms and places each of them in its own class, after which the algorithms can be interchanged right during the execution of the program.
Pros:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Name/value binding is fixed once bound
- Ex

![image](../../media/Functional-Programming-image1.jpg)

Here map can use computers parallel programming capabilities and split the list in multiple lists and then perform parallel operation as opposed to for loop.

Hence Map-Reduce, without Reduce.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ In [object-oriented programming](https://en.wikipedia.org/wiki/Object-oriented_p
## Adding Ingredients: Second Try

![image](../../media/Structural-Decorator-image3.jpg)

What we want:

- Adding a new ingredient like soy milk should not modify the original beverage classes
Expand Down
1 change: 1 addition & 0 deletions docs/computer-science/security/authentication/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Many luxury cars today come with a valet key. It is a special key you give the p
## Workflow of OAuth 2.0

![image](../../../media/Authentication_OAuth-image2.jpg)

Throughout this workflow OAuth 2.0 serves as an authorization framework, the actual authentication of user occurs through OpenID Connect, through the use of ID tokens that are passed along with the access token.

## 4 Grant Types
Expand Down
1 change: 1 addition & 0 deletions docs/computer-science/security/authentication/openid.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ To identify the user, the authenticator uses theid_token(not theaccess_token) fr
<https://openid.net/specs/openid-connect-core-1_0.html>

![image](../../../media/Authentication_OpenID-image2.jpg)

The normal process of generating these tokens is much the same as it is in [OAuth 2.0](https://oauth.net/2/):

1. User hits the sign in button on the website,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CQRS is a fancy name for an architecture that uses different data models to repr
At its heart is the notion that you can use a different model to update information than the model you use to read information.

![image](../../media/Event-driven-architecture-image1.jpg)

Event-driven architecture (EDA) means constructing your system as a series of commands and/or events. A user submits an online form to make a purchase: that's a command. The items in stock are reserved: that's an event. A confirmation is sent to the user: that's an event. The concept is very simple. Everything in our system is either a command or an event. Commands lead to events and events may lead to new commands and so on.

## Event Sourcing is a style of application design where state changes are logged as a time-ordered sequence of records
Expand Down
4 changes: 4 additions & 0 deletions docs/data-structures/graph/digraphs-directed-graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
1. Reachability - Find all vertices reachable from s along a directed path. (Use DFS)

![image](../../media/Digraphs-(Directed-Graphs)-image5.jpg)

![image](../../media/Digraphs-(Directed-Graphs)-image6.jpg)

![image](../../media/Digraphs-(Directed-Graphs)-image7.jpg)

2. ![image](../../media/Digraphs-(Directed-Graphs)-image8.jpg)

![image](../../media/Digraphs-(Directed-Graphs)-image9.jpg)

## Edge-Weighted Graph API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Get: Return value corresponding to given key, or null if no such key
Cost: Number of compares is equal to 1 + depth of node

![image](../../media/Binary-Search-Tree-image2.jpg)

Put: Associate value with key

Search for key, then two cases:
Expand Down Expand Up @@ -86,7 +87,9 @@ Find successor x of t
Delete the minimum in t's right subtree

Put x in t's spot

![image](../../media/Binary-Search-Tree-image4.jpg)

Unsatisfactory solution - Not symmetric

After a long random sequence of insert and delete operation, the height of tree becomes sqrt(N)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ This is complete but not full
## Binary trees

In computer science, a binary tree is a tree data structure in which each node has at the most two children, which are referred to as the left child and the right child."---[Wikipedia](https://en.wikipedia.org/wiki/Binary_tree)

![image](../../media/Binary-Tree-image5.jpg)

The first thing we need to keep in mind when we implement a binary tree is that it is a collection of nodes. Each node has three attributes: value, left_child, and right_child.
How do we implement a simple binary tree that initializes with these three properties?

Expand Down
1 change: 1 addition & 0 deletions docs/data-structures/linear-data-structure/linked-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Intrusive linked lists are a variation of [linked lists](https://www.data-struct
In a typical linked list implementation, a list node contains adatapointer to the linked data and anextpointer to the next node in the list.

![image](../../media/Linked-List-image2.jpg)

In an intrusive linked list implementation, the list node containsnextpointer to the next list node, but nodatapointer because the list is embedded in the linked object itself.

![image](../../media/Linked-List-image3.jpg)
Expand Down
2 changes: 2 additions & 0 deletions docs/data-structures/trie/standard-trie.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Radix Tree / Prefix Tree (Because pre-order traversal would give the nodes in le
A trie also known as radix tree or prefix tree, is an ordered tree structure that stores sets or arrays having one or more relations between the elements.
Unlike a binary search tree, an element of a trie isn't an independent entity, but more of a sequence of states following one another.
The best example that uses the trie data structure is the autocomplete function of smartphones: the entry node represents the empty character as you press space, then it gives suggestions of words (represented as leaves) that can be obtained extending the current character sequence (path between the current node and a leaf).

![image](../../media/Standard-Trie-image1.jpg)

A node that has avalue associatedrepresents a word with a higher or lower chance to be picked by the autocomplete function.
Looking up data in atrieis fast; the worst case takesO(m), wheremis the length of the string, and you don't have to worry about two different words ending up in the same location(collision).
The drawback is thattriescan take up a lot of space because they save each intermediate step. It is also hard to prevent adding long, meaningless sequences of characters to the trie.
Expand Down
2 changes: 2 additions & 0 deletions docs/data-structures/trie/ternary-search-tries-tst.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Creating associative Symbol table
![image](../../media/Ternary-Search-Tries-(TST)-image10.jpg)

![image](../../media/Ternary-Search-Tries-(TST)-image11.jpg)

Very easy to speed up and saves a lot of data.

![image](../../media/Ternary-Search-Tries-(TST)-image12.jpg)

![image](../../media/Ternary-Search-Tries-(TST)-image13.jpg)
Expand Down
1 change: 1 addition & 0 deletions docs/databases/data-warehousing/05-characteristics.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ A data warehouse is developed by integrating data from varied sources like a mai
This integration helps in effective analysis of data. Consistency in naming conventions, attribute measures, encoding structure etc. have to be ensured. Consider the following example:

![image](../../media/Data-Warehousing_Characteristics-image1.jpg)

In the above example, there are three different application labeled A, B and C. Information stored in these applications are Gender, Date, and Balance. However, each application's data is stored different way.

- In Application A gender field store logical values like M or F
Expand Down
2 changes: 2 additions & 0 deletions docs/databases/modeling/er-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
Oracle E-Business Suite (EBS) applications technical documentation. EBS is an ERP application for enterprises with huge database (24 thousand tables). Its documentation is broken down to application (a module), each having its own document. Each document hasHigh Level Design and Detailed Design.
High Level Design has a list of small diagrams each showing entities and relationships between them of one aspect/topic of the module. Diagrams only include primary key columns.
Low level design section includes a list of tables with a description of their purpose, definition of foreign keys and a list of columns with the description of their purpose.

![image](../../media/ER-Tools-image1.jpg)

Data warehouse included many tables from multiple modules (accounts payable, accounts receivable, general ledger, projects, purchasing, inventory and a few more) and this documentation can save weeks or months of figuring out where the data was, the purpose of columns, how to join tables, or which views to use.
<https://www.dbml.org>

Expand Down
Loading

0 comments on commit 19807e7

Please sign in to comment.