yolanda edward (@nandayolanda) header
yolanda edward (@nandayolanda) profile picture

blessed beyond measureโœจ E๐Ÿ’› ใ‚ˆใ‚ใ—ใใญ๏ผ๏ผš๏ผ‰

Jakarta, Indonesia.
Joined June 2009
Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)Photo by yolanda edward (@nandayolanda)
yolanda edward retweeted
CI/CD Pipeline Explained in Simple Terms Section 1 - SDLC with CI/CD The software development life cycle (SDLC) consists of several key stages: development, testing, deployment, and maintenance. CI/CD automates and integrates these stages to enable faster, more reliable releases. When code is pushed to a git repository, it triggers an automated build and test process. End-to-end (e2e) test cases are run to validate the code. If tests pass, the code can be automatically deployed to staging/production. If issues are found, the code is sent back to development for bug fixing. This automation provides fast feedback to developers and reduces risk of bugs in production. Section 2 - Difference between CI and CD Continuous Integration (CI) automates the build, test, and merge process. It runs tests whenever code is committed to detect integration issues early. This encourages frequent code commits and rapid feedback. Continuous Delivery (CD) automates release processes like infrastructure changes and deployment. It ensures software can be released reliably at any time through automated workflows. CD may also automate the manual testing and approval steps required before production deployment. Section 3 - CI/CD Pipeline A typical CI/CD pipeline has several connected stages: - Developer commits code changes to source control - CI server detects changes and triggers build - Code is compiled, tested (unit, integration tests) - Test results reported to developer - On success, artifacts are deployed to staging environments - Further testing may be done on staging before release - CD system deploys approved changes to production -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
4
179
1
944
93,409
UI/UX Designers and Developers, here are web breakpoint cheat sheets for all devices that can help with your website's layout for your next UI design project. Bookmark it for later ๐Ÿ’œ
35
399
14
3,138
225,857
yolanda edward retweeted
How does Docker Work?
8
183
4
956
96,310
๐—”๐—ฃ๐—œ ๐—š๐—ฎ๐˜๐—ฒ๐˜„๐—ฎ๐˜† ๐˜ƒ๐˜€ ๐—Ÿ๐—ผ๐—ฎ๐—ฑ ๐—•๐—ฎ๐—น๐—ฎ๐—ป๐—ฐ๐—ฒ๐—ฟ ๐˜ƒ๐˜€ ๐—ฅ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐˜…๐˜† Regarding a system design, we often need clarification about the roles of a Load Balancer and an API Gateway. Most of our resources are about their implementation rather than 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 typical duties that API gateways take care of on behalf of a system of API services. Also, the API gateway can handle faults (circuit breaker) and log and monitor. ๐Ÿ”น ๐—Ÿ๐—ผ๐—ฎ๐—ฑ ๐—•๐—ฎ๐—น๐—ฎ๐—ป๐—ฐ๐—ฒ๐—ฟ 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 primary purpose is to use resources optimally. A more equal task allocation and increased capacity can enhance the system's responsiveness and reliability. There are three high-level load balancers: hardware-based, cloud-based, and software-based. ๐Ÿ”น ๐—ฅ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐˜…๐˜† server resides in front of backend servers and transfers client requests to these servers. Reverse proxies are typically used to increase security, speed, and dependability. A reverse proxy receives a request from a client, forwards it to another server, and then returns it to the client, giving the impression that the first proxy server handled the request. These proxies ensure that users don't access the origin server directly, giving the web server anonymity. They are usually used for Load balancing, where we need to deal with incoming traffic flow so that we may distribute that traffic between multiple backend servers or use them for caching. 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. An example of reverse proxy services is ๐—”๐—ฝ๐—ฎ๐—ฐ๐—ต๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐˜…๐˜†, ๐—ก๐—ด๐—ถ๐—ป๐˜… ๐—ผ๐—ฟ ๐—œ๐—œ๐—ฆ with additional modules (Url Rewrite). #programming #api
7
176
2
788
67,613
yolanda edward retweeted
How do we design effective and safe APIs? APIs have increasingly become the backbone of modern software. To understand some of the key principles and best practices of API design, Let's analyze a social media platform example: ๐Ÿ”น Resource naming Clarity is key when creating APIs. Adopting simple resource names, like /users for accessing user profiles and /posts for retrieving user posts, streamlines the development process and reduces mental strain. ๐Ÿ”น Use of plurals It's important to maintain a standard of consistency in API design. For consistency and readability, use plural resource names, such as GET /users/{userId}/friends vs. /friend), to avoid ambiguity in API requests. ๐Ÿ”น Cross-referencing resources Interlinking resources, like taking comments on a post using GET /posts/{postId}/comments, simplifies the retrieval of related data. It provides a more streamlined and well-organized user experience. ๐Ÿ”น Security It goes without saying, security is a must-have. To secure the API endpoints, employ authentication methods like X-AUTH-TOKEN and X-SIGNATURE, and use authorization headers for verifying user permissions. Learn more about API security here: drp.li/api-security-postman-โ€ฆ ๐Ÿ”น Versioning Using versioning and communicating version updates is another important practice. Endpoints like GET /v2/users/{userId}/posts allow API versioning to maintain functionality regardless of updates. This approach ensures backward compatibility and a smooth transition for users and us. Learn more about API versioning here: drp.li/api-versioning-postmaโ€ฆ ๐Ÿ”น Pagination This technique is important for performance. Paginate large datasets, like feeds or comment lists, with GET /posts?page=5&pageSize=20 to enhance data delivery and UX. ๐Ÿ”น Idempotency Maintaining API reliability is necessary. Idempotency ensures that operations like profile updates (PUT /users/{userId}/profile) achieve their intended result, regardless of how often they are executed. These practices are very important, but thereโ€™s still much more to API design. Learn more about API design here: drp.li/api-design-postman-z7โ€ฆ Thorough documentation, robust monitoring and logging, and consistent error handling are just a few more of the many essential habits required for designing effective and safe APIs. Adopting these principles and practices enables us to develop secure and performant APIs that deliver good user experiences.
5
226
1,055
69,854
yolanda edward retweeted
Imagine telling this story without proof: โ€œI didn't go to work because a cat fell on my head and then a dog with shoes tried to do me justice.โ€
1,191
40,347
2,128
370,981
27,824,017
yolanda edward retweeted
Object-Oriented Programming in Under 4 Minutes: Object-oriented programming (OOP) is a programming paradigm in which programs are designed using classes and objects. This design allows related functions and data to be grouped together in self-contained and reusable units. A class is a template or blueprint from which objects are made from. Classes define the properties and methods that an object can have, and objects are unique instances of a class. For example, let's say you want to create a life simulation game where players can adopt and raise pets. You would have a "Pet" class that defines the properties of each pet (like "name" and "age"), as well as behaviors they can do (like "speak" and "eat"). You could then create objects, or instances, of this class for each specific pet. Each object could have its own values for each property. For example, you could have a 2-year-old pet named "Winston", & a 1-year-old pet named "Wesley"; both initialized from the "Pet" class. Object-oriented programming has 4 main principles; encapsulation, inheritance, abstraction, and polymorphism. Encapsulation hides internal details but exposes data & methods via a public interface, preventing unintentional changes. E.g. โ€” a player can view a pet's age but can't accidentally change it. But they can run methods avail on the public interface like changing a pet's name. Inheritance allows classes to inherit properties and methods from other classes, making code reusable and organized. E.g. โ€” A "SuperPet" class that extends from "Pet "and would inherit "age", "name", "eat", and "speak"; while defining new behaviors like "fly" Polymorphism is a principle that enables objects to change their form by extending or overriding existing methods. E.g. A "Dog" & "Cat" class that extended from the "Pet", shouldn't share the same "speak" method. You'd override it to have its own logic like "woof" or "meow" Abstraction reduces complexity by only surfacing the information needed for a given context or use case. E.g. A โ€œPlayerโ€ class doesnโ€™t need to know how the โ€œeatโ€ method works in the โ€œPetโ€ class, it just needs to know how to interact with it โ€” i.e. its input and output. OOP provides a way to design your program that makes it reusable, secure, stable, and easy to understand. But it isn't without disadvantages. A couple of arguments against it are that it can lead to over-engineering and complexity on a large scale. ~~ Thank you to our partner Kickresume who keeps our content free to the community. Did you know you can turn your LinkedIn into a resume with one click? Check it out: drp.li/linkedin-to-resume-lt
11
269
2
1,391
155,644
yolanda edward retweeted
life update:
274
74,584
2,603
173,932
10,299,367
yolanda edward retweeted
Bypassing Rate Limit Protection
14
390
9
2,918
417,199
yolanda edward retweeted
This week I will cover: โ€” Strategies to prevent system misuse & overload โ€” Types of API testing โ€” How the TCP handshake works โ€” Containerization explained โ€” Principles of OOP ๐Ÿ“ฉ Enjoy my content? Subscribe to my weekly newsletter so you don't miss it: drp.li/luc-newsletter-z7tk
4
98
349
19,800
yolanda edward retweeted
This week we will cover: โ€” Understanding the components of system design โ€” GraphQL vs REST โ€” How DDoS attacks work, and how to prevent them โ€” SSL vs TLS Donโ€™t want to miss out? Subscribe to our free newsletter for a weekly deep dive & content roundup: drp.li/luc-newsletter-z7tk
3
97
2
375
22,759
Webhook vs Polling โ€” What's the difference? Imagine we run a project management platform. As users make changes to tasks, the challenge lies in ensuring these changes are reflected on every user's interface in that team. There are two ways to handle communications to achieve these synchronized updates across all user interfaces - Polling and Webhooks. ๐—”๐—ฃ๐—œ ๐—ฃ๐—ผ๐—น๐—น๐—ถ๐—ป๐—ด is a ๐—ฝ๐˜‚๐—น๐—น-๐—ฏ๐—ฎ๐˜€๐—ฒ๐—ฑ ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต operating on a "check-in" system. The client regularly makes API calls to the server to check for any changes to any tasks. To address the challenge of updating all user interfaces, polling would have the system routinely execute these API requests for changes, ensuring that, even though updates may not be instantaneous, they are still consistently captured and communicated to all users in due course. In contrast, using a ๐˜„๐—ฒ๐—ฏ๐—ต๐—ผ๐—ผ๐—ธ would ๐˜€๐—ฒ๐—ป๐—ฑ ๐—ฎ ๐—ป๐—ผ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป to the system ๐—ผ๐—ป๐—น๐˜† ๐˜„๐—ต๐—ฒ๐—ป there is ๐—ป๐—ฒ๐˜„ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ฎ๐˜ƒ๐—ฎ๐—ถ๐—น๐—ฎ๐—ฏ๐—น๐—ฒ. Webhooks adopt a ๐—ฝ๐˜‚๐˜€๐—ต-๐—ฏ๐—ฎ๐˜€๐—ฒ๐—ฑ ๐—บ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐—ผ๐—น๐—ผ๐—ด๐˜†. This setup entails the server taking the initiative to send notifications. When a task undergoes any modification, it triggers an immediate alert from the server, which dispatches information directly to the project management platform's ๐—ฝ๐—ฟ๐—ฒ๐—ฑ๐—ฒ๐—ณ๐—ถ๐—ป๐—ฒ๐—ฑ ๐˜„๐—ฒ๐—ฏ๐—ต๐—ผ๐—ผ๐—ธ ๐—จ๐—ฅ๐—Ÿ. This payload contains the details of the updated task. Once the platform has received the data, it reflects the changes across all user interfaces. In our scenario, using polling would mean our application would waste resources continuously querying the server, & communicating tasks updates would be delayed. Using a webhook, on the other hand, ensures that as soon as a task is updated, everyone receives the update, as well as no resource wastage. Deciding between polling and webhook depends on your needs. Choose Polling for: ๐Ÿ”ธ Scenarios where simplicity and ease of implementation are more important than immediate data delivery ๐Ÿ”ธ Preference for controlled, periodic update checks ๐Ÿ”ธ Integrating with older systems that do not support webhook capabilities Opt for Webhooks when: ๐Ÿ”ธ Your application needs to be notified as soon as new data is available. ๐Ÿ”ธ You need to minimize the frequency of your API calls. ๐Ÿ”ธ Youโ€™re looking to decouple systems for better scalability ๐Ÿ”ธ Your system needs to receive updates from a data source that is frequently updated. Webhooks provide a more efficient and real-time solution, enabling immediate data synchronization as opposed to the delayed response of polling. However, they do come with the trade-off of increased complexity in setup and maintenance. ~~~ A big thank you to our partner Postman who keeps our content free to the community. Postman have made it possible to test your API without leaving your code editor thanks to Postmanโ€™s VS Code extension. Check it out: drp.li/postman-vscode-z7tk ๐Ÿ“ฉ If you found this helpful, consider subscribing to our newsletter where we help you level up your engineering and system design skills: drp.li/luc-newsletter-z8lk
4
81
1
321
26,870
yolanda edward retweeted
The 'happiness hormones' and how to activate them
84
2,002
76
8,636
873,971
pemilu dipantau yesus
2,409
21,308
3,917
95,946
2,873,756
yolanda edward retweeted
Visualizing a SQL query SQL statements are executed by the database system in several steps, including: - Parsing the SQL statement and checking its validity - Transforming the SQL into an internal representation, such as relational algebra - Optimizing the internal representation and creating an execution plan that utilizes index information - Executing the plan and returning the results -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
12
366
5
1,591
90,626
yolanda edward retweeted
REST API vs. GraphQL When it comes to API design, REST and GraphQL each have their own strengths and weaknesses. REST - Uses standard HTTP methods like GET, POST, PUT, DELETE for CRUD operations. - Works well when you need simple, uniform interfaces between separate services/applications. - Caching strategies are straightforward to implement. - The downside is it may require multiple roundtrips to assemble related data from separate endpoints. GraphQL - Provides a single endpoint for clients to query for precisely the data they need. - Clients specify the exact fields required in nested queries, and the server returns optimized payloads containing just those fields. - Supports Mutations for modifying data and Subscriptions for real-time notifications. - Great for aggregating data from multiple sources and works well with rapidly evolving frontend requirements. - However, it shifts complexity to the client side and can allow abusive queries if not properly safeguarded - Caching strategies can be more complicated than REST. The best choice between REST and GraphQL depends on the specific requirements of the application and development team. GraphQL is a good fit for complex or frequently changing frontend needs, while REST suits applications where simple and consistent contracts are preferred. โ€“ Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
14
281
5
1,032
112,976
yolanda edward retweeted
CI/CD Simplified Visual Guide Whether you're a developer, a DevOps specialist, a tester, or involved in any modern IT role, CI/CD pipelines have become an integral part of the software development process. Continuous Integration (CI) is a practice where code changes are frequently combined into a shared repository. This process includes automatic checks to ensure the new code works well with the existing code. Continuous Deployment (CD) takes care of automatically putting these code changes into real-world use. It makes sure that the process of moving new code to production is smooth and reliable. This visual guide is designed to help you grasp and enhance your methods for creating and delivering software more effectively. Over to you: Which tools or strategies do you find most effective in implementing CI/CD in your projects? -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
16
436
3
1,756
108,998
yolanda edward retweeted
What are the differences between cookies and sessions? The diagram below shows how they work. Cookies and sessions are both used to carry user information over HTTP requests, including user login status, user permissions, etc. ๐Ÿ”น Cookies Cookies typically have size limits (4KB). They carry small pieces of information and are stored on the usersโ€™ devices. Cookies are sent with each subsequent user request. Users can choose to ban cookies in their browsers. ๐Ÿ”น Sessions Unlike cookies, sessions are created and stored on the server side. There is usually a unique session ID generated on the server, which is attached to a specific user session. This session ID is returned to the client side in a cookie. Sessions can hold larger amounts of data. Since the session data is not directly accessed by the client, the session offers more security. โ€“ Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
14
401
4
1,566
130,271
yolanda edward retweeted
I'm a senior frontend developer, currently working with React. A lot of people wonder what kind of work I do. A while ago I had to implement this component, as a part of a bigger task: (Can you implement it too?) 1. Display a step-by-step component that represents four distinct user roles: - No Role - User - Moderator - Admin 2. If the user exists - Automatically set the step (user role) according to the fetched data. 3. If you're creating a new user - Allow the user to manually select a step (user role) by clicking on it. 4. Display only a checkmark inside the circle of the selected step. 5. Display the label (role name) below each step circle. Do you think you'd be able to implement it? ๐Ÿ‘‡See code down below๐Ÿ‘‡
38
50
3
632
139,956
yolanda edward retweeted
How does HTTPS work? Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP.) HTTPS transmits encrypted data using Transport Layer Security (TLS.) If the data is hijacked online, all the hijacker gets is binary code. How is the data encrypted and decrypted? Step 1 - The client (browser) and the server establish a TCP connection. Step 2 - The client sends a โ€œclient helloโ€ to the server. The message contains a set of necessary encryption algorithms (cipher suites) and the latest TLS version it can support. The server responds with a โ€œserver helloโ€ so the browser knows whether it can support the algorithms and TLS version. The server then sends the SSL certificate to the client. The certificate contains the public key, host name, expiry dates, etc. The client validates the certificate. Step 3 - After validating the SSL certificate, the client generates a session key and encrypts it using the public key. The server receives the encrypted session key and decrypts it with the private key. Step 4 - Now that both the client and the server hold the same session key (symmetric encryption), the encrypted data is transmitted in a secure bi-directional channel. Why does HTTPS switch to symmetric encryption during data transmission? There are two main reasons: 1. Security: The asymmetric encryption goes only one way. This means that if the server tries to send the encrypted data back to the client, anyone can decrypt the data using the public key. 2. Server resources: The asymmetric encryption adds quite a lot of mathematical overhead. It is not suitable for data transmissions in long sessions. Over to you: how much performance overhead does HTTPS add, compared to HTTP? โ€“ Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
11
242
5
1,112
146,937