¿Crear y probar paletas de colores en una interfaz?
Usa Tintmint, con IA. Genera paletas con un prompt y úsalas en tiempo real en distintas vistas. ¡Fácil y rápido!
🤘🏻 https://t.co/IElMLjFAse
CAP theorem: one of the most misunderstood terms
The CAP theorem is one of the most famous terms in computer science, but I bet different developers have different understandings. Let’s examine what it is and why it can be confusing.
CAP theorem states that a distributed system can't provide more than two of these three guarantees simultaneously.
Consistency: consistency means all clients see the same data at the same time no matter which node they connect to.
Availability: availability means any client which requests data gets a response even if some of the nodes are down.
Partition Tolerance: a partition indicates a communication break between two nodes. Partition tolerance means the system continues to operate despite network partitions.
The “2 of 3” formulation can be useful, but this simplification could be misleading.
1. Picking a database is not easy. Justifying our choice purely based on the CAP theorem is not enough. For example, companies don't choose Cassandra for chat applications simply because it is an AP system. There is a list of good characteristics that make Cassandra a desirable option for storing chat messages. We need to dig deeper.
2. “CAP prohibits only a tiny part of the design space: perfect availability and consistency in the presence of partitions, which are rare”. Quoted from the paper: CAP Twelve Years Later: How the “Rules” Have Changed.
3. The theorem is about 100% availability and consistency. A more realistic discussion would be the trade-offs between latency and consistency when there is no network partition. See PACELC theorem for more details.
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/FIzCeaWsZV
Si estás estudiando programación necesitas esto.
¡Una página que te explica cualquier código!
Funciona con Python, JavaScript, C, C++ y Java
https://t.co/Lo9Az9HF1o
Ejemplo con una función recursiva paso a paso ↓
Mostrar nuestras habilidades es esencial, pero:
¿Cómo crear el PORTAFOLIO perfecto como PROGRAMADORES?
Esta es mi tabla y un tutorial de media hora para explicar todo lo que debemos añadir a nuestra web de manera obligatoria, recomendada y opcional.
Aquí te cuento todo ↓
Así de rápido se debilita tu contraseña de un año a otro.
Cada vez debe ser más robusta y cada vez es más débil.
Cambiarlas de vez en cuando es importante
𝗪𝗵𝗮𝘁 𝗮𝗿𝗲 𝗵𝗮𝗯𝗶𝘁𝘀 𝗼𝗳 𝗵𝗶𝗴𝗵𝗹𝘆 𝗲𝗳𝗳𝗲𝗰𝘁𝗶𝘃𝗲 𝗽𝗲𝗼𝗽𝗹𝗲?
Over his 25 years of dealing with successful people in business, universities, and relationship settings, Stephen Covey noticed that great achievers were frequently troubled by emptiness. To comprehend why, He read self-help, self-improvement, and popular psychology books from the past 200 years. Here, he observed a striking historical disparity between 𝘁𝘄𝗼 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗸𝗶𝗻𝗱𝘀 𝗼𝗳 𝘀𝘂𝗰𝗰𝗲𝘀𝘀.
According to Covey, 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗶𝗻𝗴 𝘆𝗼𝘂𝗿 𝗰𝗵𝗮𝗿𝗮𝗰𝘁𝗲𝗿 𝗿𝗮𝘁𝗵𝗲𝗿 𝘁𝗵𝗮𝗻 𝘆𝗼𝘂𝗿 𝗽𝗲𝗿𝘀𝗼𝗻𝗮𝗹𝗶𝘁𝘆 𝗶𝘀 𝘁𝗵𝗲 𝗸𝗲𝘆 𝘁𝗼 𝗹𝗼𝗻𝗴-𝘁𝗲𝗿𝗺 𝘀𝘂𝗰𝗰𝗲𝘀𝘀. More than what we say or do, who we are speaks volumes. A set of guiding principles is the foundation for the "Character Ethic." According to Covey, most religious, social, and ethical systems uphold these ideas as self-evident and timeless. They are applicable everywhere.
Covey’s seven habits are composed of the primary principles of character upon which happiness and success are based. 𝗧𝗵𝗲 𝟳 𝗛𝗮𝗯𝗶𝘁𝘀 𝗼𝗳 𝗛𝗶𝗴𝗵𝗹𝘆 𝗘𝗳𝗳𝗲𝗰𝘁𝗶𝘃𝗲 𝗣𝗲𝗼𝗽𝗹𝗲 puts forward a principle-centered approach to personal and interpersonal effectiveness.
The seven habits are as follows:
𝟭. 𝗕𝗲 𝗽𝗿𝗼𝗮𝗰𝘁𝗶𝘃𝗲 - Take control of your life by focusing on things within your influence rather than reacting to external events.
𝟮. 𝗕𝗲𝗴𝗶𝗻 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲 𝗲𝗻𝗱 𝗶𝗻 𝗺𝗶𝗻𝗱 - Define clear, personal, and professional goals to guide your actions and decisions.
𝟯. 𝗣𝘂𝘁 𝗳𝗶𝗿𝘀𝘁 𝘁𝗵𝗶𝗻𝗴𝘀 𝗳𝗶𝗿𝘀𝘁 - Prioritize tasks based on importance, not urgency, to manage your time and energy effectively.
𝟰. 𝗧𝗵𝗶𝗻𝗸 𝘄𝗶𝗻/𝘄𝗶𝗻 - Cultivate a mindset of mutual benefit in interactions, seeking beneficial solutions to all involved.
𝟱. 𝗦𝗲𝗲𝗸 𝘁𝗼 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱 𝗳𝗶𝗿𝘀𝘁, 𝗯𝗲𝗳𝗼𝗿𝗲 𝗺𝗮𝗸𝗶𝗻𝗴 𝘆𝗼𝘂𝗿𝘀𝗲𝗹𝗳 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗼𝗼𝗱 - Listen empathetically to others before expressing your viewpoint, enhancing communication and relationships.
𝟲. 𝗟𝗲𝗮𝗿𝗻 𝘁𝗼 𝘀𝘆𝗻𝗲𝗿𝗴𝗶𝘇𝗲 - Leverage diverse perspectives and strengths in teams to achieve better outcomes than individuals could alone.
𝟳. 𝗦𝗵𝗮𝗿𝗽𝗲𝗻 𝘁𝗵𝗲 𝘀𝗮𝘄 - Regularly renew and improve yourself in four areas: physical, social/emotional, mental, and spiritual, to maintain a balanced, effective life.
Image credits: Nathalie Tu.
#productivity
6 Must-Know Software Architectural Patterns
Event-Driven Architecture:
Decoupled Components and Asynchronous Communication.
Application: Ideal for systems where events trigger actions, fostering scalability and responsiveness.
Layered Architecture:
Hierarchical Structure with Distinct Layers (Presentation, Business Logic, Data).
Application: Common in enterprise applications, enhancing maintainability through compartmentalization and modular development.
Monolithic Architecture:
Unified Codebase and Deployment Unit.
Application: Suited for smaller applications or simplicity-focused instances. Streamlines development and deployment with potential scaling challenges.
Microservices Architecture:
Distributed System with Independent, Interoperable Services.
Application: Ideal for large and intricate systems, improving scalability, fault isolation, and enabling independent service development.
Model-View-Controller (MVC):
Segregation of Concerns into Model, View, and Controller Components.
Application: Common in web applications, enhancing code organization and maintenance by separating complex UI logic.
Master-Slave Architecture:
Centralized Control (Master) with Multiple Worker Nodes (Slaves).
Application: Ubiquitous in distributed computing, optimizing parallel processing and load balancing.
👍🏿 Subscribe to our newsletter - https://t.co/hxARDoA98l
#systemdesign #coding #interviewtips
Did you know that with 2 Python libraries, 6 lines of code and around 15 seconds, you can load satellite data from anywhere in the world?
This is so much easier than it used to be!
My recommended materials for cracking your next technical interview
Coding
- Leetcode
- Cracking the coding interview book
- Neetcode
System Design Interview
- System Design Interview Book 1, 2 by Alex Xu, Sahn Lam
- Grokking the system design by Design Guru
- Design Data-intensive Application book
Behavioral interview
- Tech Interview Handbook (Github repo)
- A Life Engineered (YT)
- STAR method (general method)
OOD Interview
- Interviewready
- OOD by educative
- Head First Design Patterns Book
Mock interviews
- Interviewingio
- Pramp
- Meetapro
Apply for Jobs
- Linkedin
- Monster
- Indeed
Over to you: What is your favorite interview prep material?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
We are often asked to design for high availability, high scalability, and high throughput. What do they mean exactly?
The method to download the high-resolution PDF is available at the end.
The diagram below is a system design cheat sheet with common solutions.
1. High Availability
This means we need to ensure a high agreed level of uptime. We often describe the design target as “3 nines” or “4 nines”. “4 nines”, 99.99% uptime, means the service can only be down 8.64 seconds per day.
To achieve high availability, we need to design redundancy in the system. There are several ways to do this:
- Hot-hot: two instances receive the same input and send the output to the downstream service. In case one side is down, the other side can immediately take over. Since both sides send output to the downstream, the downstream system needs to dedupe.
- Hot-warm: two instances receive the same input and only the hot side sends the output to the downstream service. In case the hot side is down, the warm side takes over and starts to send output to the downstream service.
- Single-leader cluster: one leader instance receives data from the upstream system and replicates to other replicas.
- Leaderless cluster: there is no leader in this type of cluster. Any write will get replicated to other instances. As long as the number of write instances plus the number of read instances are larger than the total number of instances, we should get valid data.
2. High Throughput
This means the service needs to handle a high number of requests given a period of time. Commonly used metrics are QPS (query per second) or TPS (transaction per second).
To achieve high throughput, we often add caches to the architecture so that the request can return without hitting slower I/O devices like databases or disks. We can also increase the number of threads for computation-intensive tasks. However, adding too many threads can deteriorate the performance. We then need to identify the bottlenecks in the system and increase its throughput. Using asynchronous processing can often effectively isolate heavy-lifting components.
3. High Scalability
This means a system can quickly and easily extend to accommodate more volume (horizontal scalability) or more functionalities (vertical scalability). Normally we watch the response time to decide if we need to scale the system.
🔹 Over to you: Do you have other things to share in your design toolbox?
–
Subscribe to our newsletter to download the 𝐡𝐢𝐠𝐡-𝐫𝐞𝐬𝐨𝐥𝐮𝐭𝐢𝐨𝐧 𝐏𝐃𝐅. After signing up, find the download link on the success page: https://t.co/InycEID3cZ
Hay personas que dicen que los ejercicios del nivel 0 del Discord son difíciles. Yo pienso que NO son difíciles pero estamos muy mal acostumbrados a cursos básicos de 2 horas cuyo proyecto es una calculadora. Pido opinión a los más expertos, dejo el repo: https://t.co/aPkxOS3dOV
Generador gratuito de escala tipográfica responsive con la propiedad Clamp de CSS.
- Crea las variables en CSS
- Añádelas a tu proyecto
🤘🏻 https://t.co/VGom71bKhk
¿Quieres aprender Ciberseguridad Web?
¡Curso gratuito de la Universidad de Stanford!
Aprenderás:
✓ Vulnerabilidades en JavaScript
✓ Inyección SQL y de código
✓ HTTP, Cookies y Session
✓ Ataques XSS y contramedidas
+20 horas de contenido en 19 clases:
https://t.co/2gzsTQ4Vse
How can Cache Systems go wrong?
The diagram below shows 4 typical cases where caches can go wrong and their solutions.
1. Thunder herd problem
This happens when a large number of keys in the cache expire at the same time. Then the query requests directly hit the database, which overloads the database.
There are two ways to mitigate this issue: one is to avoid setting the same expiry time for the keys, adding a random number in the configuration; the other is to allow only the core business data to hit the database and prevent non-core data to access the database until the cache is back up.
2. Cache penetration
This happens when the key doesn’t exist in the cache or the database. The application cannot retrieve relevant data from the database to update the cache. This problem creates a lot of pressure on both the cache and the database.
To solve this, there are two suggestions. One is to cache a null value for non-existent keys, avoiding hitting the database. The other is to use a bloom filter to check the key existence first, and if the key doesn’t exist, we can avoid hitting the database.
3. Cache breakdown
This is similar to the thunder herd problem. It happens when a hot key expires. A large number of requests hit the database.
Since the hot keys take up 80% of the queries, we do not set an expiration time for them.
4. Cache crash
This happens when the cache is down and all the requests go to the database.
There are two ways to solve this problem. One is to set up a circuit breaker, and when the cache is down, the application services cannot visit the cache or the database. The other is to set up a cluster for the cache to improve cache availability.
Over to you: Have you met any of these issues in production?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
¿Quieres aprender un Lenguaje de Programación?
¡Este recurso te puede ayudar en el proceso!
Escribes TypeScript y te da el código en:
Python, Java, PHP, C#, Swift, C++ y más
Así aprendes las diferentes sintaxis rápidamente:
→ https://t.co/wZFGllKPOC