Si tú realmente ganaste unas elecciones:
¿Necesitas bloquear redes sociales?
¿Necesitas que un tribunal certifique tu triunfo?
¿Necesitas amenazar con cárcel a tus adversarios?
¿Necesitas encarcelar a miles de personas que protestan en tu contra?
Qué extraña manera de celebrar.
Buenas, desarrollador web senior por acá.
Estuve un rato analizando la pagina y me parece un MEGA PROYECTO. No solo a nivel de ingenieria si no a nivel politico tambien, asi que va hilo🧵(1/?)
Problem: URL search params are evaluated at runtime. So they aren't strongly typed, and they're a hassle in TypeScript.
Solution:
1. Abstract reads and writes
2. Validate search params via Zod
Example: This React hook.
𝗔𝗣𝗜 𝗚𝗮𝘁𝗲𝘄𝗮𝘆 𝘃𝘀 𝗟𝗼𝗮𝗱 𝗕𝗮𝗹𝗮𝗻𝗰𝗲𝗿
Regarding a system design, we often see confusion about the roles of a Load Balancer and an API Gateway. Most of our resources are about their implementation but not their real-life use cases.
🔹 𝗔𝗣𝗜 𝗚𝗮𝘁𝗲𝘄𝗮𝘆 sits between a client and a group of backend services. It performs the function of a reverse proxy by accepting all application programming interface (API) calls, aggregating the different services needed to fulfill them, and returning the right outcome. 𝗨𝘀𝗲𝗿 𝗮𝘂𝘁𝗵𝗲𝗻𝘁𝗶𝗰𝗮𝘁𝗶𝗼𝗻, 𝗿𝗮𝘁𝗲 𝗹𝗶𝗺𝗶𝘁𝘀, 𝗮𝗻𝗱 𝘀𝘁𝗮𝘁𝗶𝘀𝘁𝗶𝗰𝘀 are common duties that API gateways take care of on behalf of a system of API services. Also, the API gateway can handle faults (circuit breaker) but also do logging and monitoring.
🔹 𝗟𝗼𝗮𝗱 𝗕𝗮𝗹𝗮𝗻���𝗲𝗿 is a service that distributes incoming traffic across many servers or resources. Usually, we have two or more web servers on the backend, and it 𝗱𝗶𝘀𝘁𝗿𝗶𝗯𝘂𝘁𝗲𝘀 𝗻𝗲𝘁𝘄𝗼𝗿𝗸 𝘁𝗿𝗮𝗳𝗳𝗶𝗰 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝘁𝗵𝗲𝗺. Its main purpose is to use resources optimally. As a result of a more equal task allocation and the system's increased capacity, this can enhance the system's responsiveness and reliability. There are three load balancers at a high level: hardware-based, cloud-based, and software-based.
So, the main thing that differs these two is that an 𝗔𝗣𝗜 𝗚𝗮𝘁𝗲𝘄𝗮𝘆 𝗶𝘀 𝗳𝗼𝗰𝘂𝘀𝗲𝗱 𝗼𝗻 𝗿𝗼𝘂𝘁𝗶𝗻𝗴 𝗿𝗲𝗾𝘂𝗲𝘀𝘁𝘀 to the appropriate service and it handles requests for APIs, while a 𝗟𝗼𝗮𝗱 𝗯𝗮𝗹𝗮𝗻𝗰𝗲𝗿 𝗶𝘀 𝗳𝗼𝗰𝘂𝘀𝗲𝗱 𝗼𝗻 𝗱𝗶𝘀𝘁𝗿𝗶𝗯𝘂𝘁𝗶𝗻𝗴 𝗿𝗲𝗾𝘂𝗲𝘀𝘁𝘀 𝗲𝘃𝗲𝗻𝗹𝘆 between a group of servers and handles requests that are sent to a single IP address, which works at protocol or socket level (TCP, HTTP).
Some 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀 of API Gateways are Amazon API Gateway, Ocelot (.NET-based), Tyk, or Apache APISIX, while Load Balancers are Azure Load Balancer, HAProxy, or Seesaw.
#technology #softwareengineering #cloudcomputing #techworldwithmilan #api
I'm a senior frontend developer.
I want to give you an idea of the kind of work I do.
A React component I had to create for one of the tasks last week:
(Would you be able to implement it?)
Create a "days slider" with the following requirements:
1. Must have 5 different marks, with an option to easily add more.
2. The marks are for 30 days, 60 days, 120 days, 1 year, and 3 years.
3. Each mark must be equally spaced on the slider, regardless of the difference in actual days between them.
4. The slider should allow the user to select any number of days within the specified range (30 days - 3 years)
5. The steps between each mark on the slider should be consistent (25 steps).
6. The component should be reusable and easily extensible to accommodate more marks.
👇Code in the comments below👇
Avoid a single meeting on a problem. Instead, have two separate meetings:
Meeting 1 - Define the problem.
Meeting 2 - Decide how to fix the problem.
Here���s why:
✅ The first meeting assures everyone understands the problem. This avoids people jumping to suggestions before we agree what the problem is.
✅ Gives people time to think about the problem before the solution meeting.
Result? More contribution and better ideas.
Via @shaneparrish in “Clear Thinking”
¡Colección de diagramas de Software y Programación!
✓ Arquitecturas y Diseños de Sistemas
✓ APIs explicadas: REST, SOAP, gRPC, Web Sockets
✓ Entiende cómo funciona GIT, CI/CD, HTTP y más
¡Perfecto para preparar tu próxima entrevista!
→ https://t.co/Fm5P2qY7CV
You’d be shocked how complex a web form can be.
I’m looking at a simple web form with 5 fields that uses:
useState
useEffect
Redux
React Query
React Hook Form
I’m trying to trace the data flow and my head is spinning.
Diagrama de cómo las empresas despliegan código a producción.
Te lo explico paso a paso:
1: El Product Owner crea User Stories basándose en las necesidades presentadas.
2: El equipo de desarrollo toma las User Stories y las convierte en tareas.
3: Los desarrolladores integran el código fuente en el repositorio de código GitHub.
4: Se inicia una build en Jenkins o GitHub Actions. El código fuente debe superar pruebas unitarias y superar las verificaciones en SonarQube o del linter.
5: Se crea un artefacto y se despliega en un entorno de desarrollo.
6: Podría haber varios equipos de desarrollo trabajando en diferentes características, por lo que se crean diferentes entornos de desarrollo.
7: El equipo de QA realiza pruebas de calidad, pruebas de regresión y pruebas de rendimiento.
8: Aquí se pueden hacer pruebas de aceptación del usuario (UAT por sus siglas en inglés) en un entorno de prueba.
9: Si las pruebas en el entorno de UAT son exitosas, las construcciones se convierten en candidatas para la liberación y se programan para ser desplegadas en el entorno de producción.
10: El equipo de Ingeniería de Fiabilidad del Sitio (SRE por sus siglas en inglés) es el encargado de monitorear la producción.
Ten en cuenta que esto es sólo una posible forma de desplegar el código a producción. Según la empresa puede ser que se utilicen otras herramientas o que se realicen más o menos pasos.
Por ejemplo, hay empresas que no utilizan entornos de prueba y en su lugar deciden usar Feature Toggle, A/B Testing o Canary Releases.
El diagrama y la explicación lo puedes encontrar aquí: https://t.co/Y1InaTz6BK
Future CSS Tip! 🔮
You can create this scrolling image pop-out effect with CSS scroll-driven animations and zero JS! 🔥
.pop {
view-timeline-name: --pop;
}
img {
animation: slide both;
animation-timeline: --pop;
animation-range: entry 100% cover 50%;
}
.skateboarder {
--x: 0;
--y: -45%;
}
@ keyframes slide {
to { translate: var(--x) var(--y); }
}
The "trick" is to layer up two image elements and keep one clipped by the container 🤙
Slide them both together and it will look like one pops out of the container 🎈 You can leverage scoped custom properties to translate by different distances too! 😎
You can use macOS's built-in image background removal tool to get the pop-out image ✨ And for added effect, you can animate the brightness on that to make it stand out ⭐️
@CodePen link below! 👇