Footage of Adolf Hitler at the 1936 olympics where he is thought to be high on drugs.
Author Norman Ohler claims that Hitler relied heavily on a mixture of cocaine and opioids.
“Hitler needed those highs to substitute [for] his natural charisma, which ... he had lost in the course of the war," Ohler said.
How do Search Engines Work?
The diagram below shows a high-level walk-through of a search engine.
▶️ Step 1 - Crawling
Web Crawlers scan the internet for web pages. They follow the URL links from one page to another and store URLs in the URL store. The crawlers discover new content, including web pages, images, videos, and files.
▶️ Step 2 - Indexing
Once a web page is crawled, the search engine parses the page and indexes the content found on the page in a database. The content is analyzed and categorized. For example, keywords, site quality, content freshness, and many other factors are assessed to understand what the page is about.
▶️ Step 3 - Ranking
Search engines use complex algorithms to determine the order of search results. These algorithms consider various factors, including keywords, pages' relevance, content quality, user engagement, page load speed, and many others. Some search engines also personalize results based on the user's past search history, location, device, and other personal factors.
▶️ Step 4 - Querying
When a user performs a search, the search engine sifts through its index to provide the most relevant results.
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
There are over 1,000 engineering blogs. Here are my top 9 favorites:
- Netflix TechBlog
- Uber Blog
- Cloudflare Blog
- Engineering at Meta
- LinkedIn Engineering
- Discord Blog
- AWS Architecture
- Slack Engineering
- Stripe Blog
Over to you - What are some of your favorite engineering blogs?
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
🇮🇱🇱🇧 Israel bombed this Lebanese man's house while he was on TikTok live.
Israel defends itself by bombing civilian homes in Lebanon.
https://t.co/P3urFbxmo0
CAP, BASE, SOLID, KISS - What do these acronyms mean?
The diagram below explains the common acronyms in system design. Read to the end for my favorite not in the diagram.
🔹 CAP
The CAP theorem states that any distributed data store can only provide two of the following three guarantees:
- Consistency - Every read receives the most recent write or an error.
- Availability - Every request receives a response.
- Partition tolerance - The system continues operating during network faults.
However, this theorem was criticized as too narrow for distributed systems. We shouldn’t use it to categorize databases. Network faults inevitably occur in distributed systems, which must address this.
You can read more in "Please stop calling databases CP or AP" by Martin Kleppmann.
🔹 BASE
The ACID (Atomicity-Consistency-Isolation-Durability) model used in relational databases is too strict for NoSQL databases. The BASE principle offers more flexibility, choosing availability over consistency. Eventual consistency means system states will be consistent over time.
🔹 SOLID
The SOLID principle is quite famous in OOP. It has 5 components:
- SRP (Single Responsibility Principle) - Each unit of code has one responsibility.
- OCP (Open/Closed Principle) - Code is open for extension but closed for modification.
- LSP (Liskov Substitution Principle) - Subclasses substitute their base classes.
- ISP (Interface Segregation Principle) - Expose interfaces with specific responsibilities.
- DIP (Dependency Inversion Principle) - Use abstractions to decouple dependencies.
🔹 KISS
"Keep it simple, stupid!" is a design principle noted by the U.S. Navy in 1960. It states that systems work best when kept simple.
And now, for my favorite acronym:
🔹 YAGNI (You Aren't Gonna Need It)
YAGNI serves as a developer's reality check. It advises against adding features or code based on guesses about future utility. Instead, it encourages focusing on current necessities, avoiding unnecessary work and keeping things simple.
Over to you: What is your favorite acronym?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/kNfv0DVDdf
15 Ways to Tidy Your Code
I recently finished the book "Tidy First" by @KentBeck . It's an absolute masterpiece, and I strongly recommend it to others.
In the first part, it provides 15 ways to tidy your code.
1. Guard Clauses
2. Dead Code
3. Normalize Symmetries
4. New Interface, Old Implementation
5. Reading Order
6. Cohesion Order
7. Move Declaration and Initialization Together
8. Explaining Variables
9. Explaining Constants
10. Explicit Parameters
11. Chunk Statements
12. Extract Helper
13. One Pile
14. Explaining Comments
15. Delete Redundant Comments
In the second and third parts, it delves deeply into the tidying process and theory.
It's a short book, and I read it cover to cover, taking only about 2 hours (bonus).
If you are interested, you can check out the book here: https://t.co/naUGhYi9TN