<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ridho Khalis on Medium]]></title>
        <description><![CDATA[Stories by Ridho Khalis on Medium]]></description>
        <link>https://medium.com/@ridhokhalis37?source=rss-7a6343eccfd1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*h03dZGbjeXcQ-LcQ</url>
            <title>Stories by Ridho Khalis on Medium</title>
            <link>https://medium.com/@ridhokhalis37?source=rss-7a6343eccfd1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 23:21:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ridhokhalis37/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Battle of Titans: REST vs. GraphQL vs. gRPC]]></title>
            <link>https://medium.com/@ridhokhalis37/the-battle-of-titans-rest-vs-graphql-vs-grpc-87450cd7a983?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/87450cd7a983</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Tue, 11 Jul 2023 13:07:13 GMT</pubDate>
            <atom:updated>2023-07-11T13:07:13.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*yBlLcMecDI28zAdZ" /></figure><p>In the thrilling world of software development, APIs (Application Programming Interfaces) are the unsung heroes, the silent enablers of the digital revolution. They are the invisible threads that weave together the fabric of our interconnected digital universe. Today, we’re going to dive into an epic battle of API architectural styles: REST, GraphQL, and gRPC. Each contender has its unique strengths and weaknesses, and we’ll explore when to deploy each one on the battlefield of software development.</p><h4>REST APIs: The Veteran</h4><p>REST, or Representational State Transfer, is the seasoned veteran in the world of API design. It’s a battle-hardened protocol that uses HTTP methods to perform CRUD (Create, Read, Update, Delete) operations on resources.</p><p><strong><em>REST’s Shining Moments</em></strong>: REST APIs are the go-to choice when you need to perform CRUD operations on data sources. They’re like the reliable old soldier, always ready to get the job done. They’re stateless, meaning they don’t need to remember anything from one mission to the next. REST APIs are also great when you’re only targeting a few resources or endpoints at a time.</p><p><strong><em>REST’s Achilles Heel</em></strong>: REST APIs may struggle in the face of heavy event-driven paradigms or use cases that need to be operated asynchronously. They might also falter when handling large-scale data in big data processing and analytics.</p><h4>GraphQL: The Agile Innovator</h4><p>Developed by the tech wizards at Facebook, GraphQL is the agile innovator of the group. It’s designed to handle the issue of loading data from different API requests from different endpoints, all while doing a graceful ballet around the limitations of REST APIs.</p><p><strong><em>GraphQL’s Shining Moments</em></strong>: GraphQL shines when a client application is gathering data from multiple data sources. It’s like a master conductor, orchestrating data from various sources and sending a consolidated response to the client. It’s also a star when many client applications share one data source but require different views of the data.</p><p><strong><em>GraphQL’s Achilles Heel</em></strong>: Despite its agility, GraphQL may not be the best choice for server-to-server communication. If you’re building a way for some back-end services to communicate with each other, you might need to look for other suitable options.</p><h4>gRPC: The Powerhouse</h4><p>gRPC is the powerhouse of the group. It’s an API framework that combines all the performance improvement and capabilities of HTTP/2. It’s like a heavyweight champion, ready to take on high throughput backends to communicate with limited CPU and memory devices.</p><p><strong><em>gRPC’s Shining Moments</em></strong>: gRPC is a good choice when designing a low-latency, highly scalable distributed system. It’s also a champion if you’re building a back-end system that includes a large number of interconnected microservices, providing efficiency, speed, and built-in features.</p><p><strong><em>gRPC’s Achilles Heel</em></strong>: Despite its power, gRPC supports only a few languages, so it may not be a good choice if your language isn’t on the supported list. It may also not be the best option if you’re building a system that communicates primarily with a web browser.</p><p>In the thrilling saga of API architecture styles, the choice of hero depends on the specific needs and constraints of your project. REST, GraphQL, and gRPC each have their strengths and weaknesses, and understanding these can help you make an informed decision. Remember, the best tool is the one that fits your use case the best. Choose wisely, and may the force of the APIs be with you!</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87450cd7a983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Differences Between Cookies, Local Storage, and Session Storage in Web Storage]]></title>
            <link>https://medium.com/@ridhokhalis37/differences-between-cookies-local-storage-and-session-storage-in-web-storage-c3410c331d86?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3410c331d86</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 14:09:19 GMT</pubDate>
            <atom:updated>2023-04-07T14:09:19.845Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkdcNXudFAEXPtnFrvxqrQ.jpeg" /></figure><p>As a web developer, you must have come across the terms “cookie,” “local storage,” and “session storage.” These three technologies allow you to store data in a user’s browser, but they have different use cases, functionalities, and limitations. In this article, we will explore the differences between them and when to use each of them.</p><h3>Cookie</h3><p>A cookie is a small text file that a website stores on a user’s device to remember the user’s preferences, login credentials, and browsing behavior. Cookies have been around since the early days of the internet and are widely used to personalize a user’s browsing experience.</p><h4>When to use Cookies</h4><p>Cookies are useful when you need to store small amounts of data that need to persist across multiple visits to your website. For example, you might use cookies to remember a user’s language preference or shopping cart contents. Cookies are also commonly used to track user behavior for analytics and advertising purposes.</p><h4>Trade-offs of using Cookies</h4><p>Cookies have some limitations and drawbacks. They are limited to a maximum size of 4KB, which means that you can’t store large amounts of data in a cookie. Cookies are also sent to the server with every HTTP request, which can slow down your website’s performance. Finally, cookies can be easily deleted by the user or blocked by the browser, which can make it challenging to rely on them for long-term data storage.</p><h3>Local Storage</h3><p>Local storage is a newer web storage technology that allows you to store key-value pairs in a user’s browser. Unlike cookies, local storage is not sent to the server with every HTTP request, which makes it faster and more efficient.</p><h4>When to use Local Storage</h4><p>Local storage is useful when you need to store larger amounts of data that need to persist across multiple visits to your website. For example, you might use local storage to store a user’s preferences, settings, or cached data. Local storage is also commonly used in web applications to store session data that needs to persist even when the user closes the browser.</p><h4>Trade-offs of using Local Storage</h4><p>The main trade-off of using local storage is that it has a maximum size of 5–10MB, depending on the browser. While this is much larger than the 4KB limit of cookies, it is still relatively small compared to other storage options. Local storage is also not suitable for sensitive data because it is stored in clear text and can be accessed by anyone who has access to the user’s device.</p><h3>Session Storage</h3><p>Session storage is a web storage technology that is similar to local storage but is limited to the current browsing session. Session storage data is cleared when the user closes the browser, which makes it useful for storing data that only needs to persist for a short time.</p><h4>When to use Session Storage</h4><p>Session storage is useful when you need to store temporary data that needs to be accessible across multiple pages within the same browsing session. For example, you might use session storage to store a user’s login credentials or shopping cart contents.</p><h4>Trade-offs of using Session Storage</h4><p>The main trade-off of using session storage is that the data is not persistent beyond the current browsing session. This means that if the user closes the browser, the data will be lost. Additionally, session storage has the same limitations as local storage in terms of maximum size and security.</p><h3>Conclusion</h3><p>In conclusion, cookies, local storage, and session storage are all useful web storage technologies with different use cases and limitations. Cookies are useful for storing small amounts of data that need to persist across multiple visits to your website. Local storage is useful for storing larger amounts of data that need to persist across multiple visits or sessions. Session storage is useful for storing temporary data that needs to be accessible across multiple pages within the same browsing session. When choosing between these technologies, it’s important to consider the size and security of the data you need to store, as well as how long you need the data to persist.</p><p>It’s also worth noting that modern web development frameworks and libraries often abstract away the details of web storage and provide higher-level APIs for managing application state. For example, React’s state and Redux store are both examples of higher-level state management systems that can simplify the process of managing data in a web application.</p><p>Finally, it’s worth emphasizing that none of these web storage technologies should be used to store sensitive or private data, such as passwords, credit card numbers, or personally identifiable information. For such data, it’s always best to use server-side storage with proper encryption and security measures.</p><p>In summary, cookies, local storage, and session storage are three distinct web storage technologies that each have their own use cases and trade-offs. Understanding the differences between them and when to use each of them can help you build more efficient and effective web applications.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3410c331d86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DFS vs BFS: Which Algorithm is Right for Your Data Structure?]]></title>
            <link>https://medium.com/@ridhokhalis37/dfs-vs-bfs-which-algorithm-is-right-for-your-data-structure-7c2514232156?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c2514232156</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 06:09:08 GMT</pubDate>
            <atom:updated>2023-04-01T06:09:08.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*LuvQDz7fl8yJL3J6.png" /></figure><p>When it comes to searching for information or nodes in a graph or tree, computer scientists have developed various algorithms to make the process efficient and effective. Two of the most commonly used algorithms for searching are Depth-First Search (DFS) and Breadth-First Search (BFS). In this article, we’ll explore the differences between these two algorithms, their advantages, and their disadvantages.</p><p>Depth-First Search (DFS)</p><p>DFS is a recursive algorithm that starts from the root node and explores each branch as far as possible before backtracking. It explores each possible path until it reaches a dead-end and then goes back to explore another path. DFS can be implemented using either a stack or recursion.</p><p>Advantages of DFS:</p><ol><li>Memory Efficient: DFS is memory-efficient as it only stores the current path and backtracks once it reaches a dead-end.</li><li>Faster for finding a single path: DFS is faster than BFS when looking for a single path, as it explores one path as far as possible before backtracking.</li><li>Easy to implement: DFS can be easily implemented using recursion, making it easier to understand and implement.</li></ol><p>Disadvantages of DFS:</p><ol><li>May not find the shortest path: DFS does not guarantee that it will find the shortest path, as it may explore long paths before reaching a shorter one.</li><li>May get stuck in infinite loops: If the graph contains cycles, DFS may get stuck in an infinite loop, resulting in an endless search.</li></ol><p>Breadth-First Search (BFS)</p><p>BFS is a non-recursive algorithm that starts from the root node and explores all the neighboring nodes before moving on to the next level. In other words, it explores all the nodes at a given level before moving on to the next level. BFS uses a queue to keep track of the nodes that need to be explored.</p><p>Advantages of BFS:</p><ol><li>Guarantees the shortest path: BFS guarantees that it will find the shortest path, as it explores all the nodes at a given level before moving on to the next level.</li><li>Will not get stuck in infinite loops: BFS will not get stuck in an infinite loop, even if the graph contains cycles.</li></ol><p>Disadvantages of BFS:</p><ol><li>Memory Intensive: BFS is memory-intensive as it stores all the nodes at a given level before moving on to the next level.</li><li>Slower for finding a single path: BFS is slower than DFS when looking for a single path, as it explores all the nodes at a given level before moving on to the next level.</li></ol><p>Which one should you use?</p><p>The choice between DFS and BFS depends on the specific requirements of the problem at hand. If you’re looking for the shortest path or if the graph contains cycles, BFS is the better choice. However, if you’re looking for a single path and memory usage is a concern, DFS is a better option.</p><p>In conclusion, both DFS and BFS are useful search algorithms with their own advantages and disadvantages. DFS is faster, memory-efficient, and easier to implement, but may not find the shortest path and can get stuck in an infinite loop. BFS, on the other hand, guarantees the shortest path, will not get stuck in an infinite loop, but is memory-intensive and slower for finding a single path. It’s important to understand these differences and choose the right algorithm for the specific problem at hand.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c2514232156" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Miss Out: 5 Game-Changing CSS Properties You Need to Try]]></title>
            <link>https://medium.com/@ridhokhalis37/dont-miss-out-5-game-changing-css-properties-you-need-to-try-6b3343cc8370?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b3343cc8370</guid>
            <category><![CDATA[css3]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 05:49:02 GMT</pubDate>
            <atom:updated>2023-04-01T05:49:02.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Qo9dCbn16TMo3wvc" /></figure><p>CSS is like the secret sauce that makes web design come to life. It’s the magic ingredient that transforms a boring website into a stunning work of art. However, just like with any recipe, there are some ingredients that are often overlooked. In the case of CSS, some properties are not used as much as others, despite their usefulness. In this article, we’ll explore some of these hidden gems and show you how to use them to create jaw-dropping designs.</p><ol><li><strong>Object-fit: Scale Your Images Like a Pro</strong><br>Images are an integral part of any website. They add visual interest and can help tell your story. However, scaling images can be a challenge, especially when trying to create a responsive design. This is where object-fit comes in handy. It allows you to control how an image scales and crops within its container. You can choose from different values, such as contain, cover, and fill, to achieve the desired effect. This property is a game-changer when it comes to creating responsive designs that look great on any device.</li><li><strong>Word-break: Break Your Words Without Breaking Your Design</strong><br>Long words can be a nightmare for web designers. They can mess up your layout and make your content look awkward. This is where word-break comes to the rescue. It allows you to specify how words should break when they reach the end of a line. You can choose from values like break-all, keep-all, and break-word, depending on your needs. This property is a lifesaver when it comes to creating readable content that looks great on any screen.</li><li><strong>Backdrop-filter: Add Some Spice to Your Backgrounds</strong><br>If you want to take your design to the next level, you need to spice up your backgrounds. This is where backdrop-filter comes in handy. It allows you to apply a filter effect to the background of an element, creating a stunning visual effect. You can choose from values like blur(), brightness(), contrast(), and more to achieve the desired effect. This property is a must-have if you want to create designs that are both beautiful and functional.</li><li><strong>Object-position: Get Your Images in the Right Place</strong><br>Sometimes, you need to adjust the position of an image within its container. This is where object-position comes in handy. It allows you to specify the position of an image within its container, giving you greater control over your layout. You can choose from values like length, percentage, and keyword values to achieve the desired effect. This property is a game-changer when it comes to creating designs that are both functional and aesthetically pleasing.</li><li><strong>Clip-path: Cut Your Elements into Shape</strong><br>If you want to create interesting shapes or effects within your design, you need to use clip-path. This property allows you to create a clipping mask for an element, cutting it into any shape you want. You can choose from values like circle(), ellipse(), and polygon(), to achieve the desired effect. This property is a must-have if you want to create designs that are truly unique and eye-catching.</li></ol><p>In conclusion, CSS has many properties that are useful for creating beautiful and functional designs. While some properties are used more often than others, it’s important to explore all the available options to find the best solutions for your projects. By using these five properties, you can create more engaging and responsive designs that stand out from the rest. So, go ahead and give them a try. Your design will thank you for it!</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b3343cc8370" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Write CSS that Your Future Self Will Thank You For]]></title>
            <link>https://medium.com/@ridhokhalis37/how-to-write-css-that-your-future-self-will-thank-you-for-130790991508?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/130790991508</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 13:12:26 GMT</pubDate>
            <atom:updated>2023-03-29T13:12:26.847Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*0adk4Ll0L9A8Fk-4" /></figure><p>As a web developer, you know that writing clean, maintainable code is essential. But when it comes to CSS, it can be easy to fall into bad habits that make your code difficult to read and maintain. In this article, we’ll go over some best practices for making your CSS code more readable and maintainable.</p><ol><li>Use a Consistent Naming Convention When you’re writing CSS, it’s essential to use a consistent naming convention for your classes and IDs. This makes it easier to read and understand your code, especially if you’re working with a team of developers. Some popular naming conventions include BEM (Block-Element-Modifier) and SMACSS (Scalable and Modular Architecture for CSS). Whichever convention you choose, make sure you stick to it consistently throughout your code.</li><li>Avoid Nesting Selectors Too Deeply While nesting selectors can be useful for organizing your code, nesting too deeply can make your code difficult to read and maintain. It’s best to limit nesting to no more than three levels deep. This makes it easier to understand the relationships between your selectors and ensures that your code remains modular and flexible.</li><li>Use Comments to Document Your Code Adding comments to your CSS code is a great way to document what your code does and why you wrote it that way. This can be especially helpful if you’re working with a team of developers, as it makes it easier for others to understand your code. Be sure to add comments for any complex or non-obvious sections of your code.</li><li>Keep Your CSS Separate from Your HTML While it can be tempting to add CSS directly to your HTML files, it’s best to keep them separate. This makes it easier to maintain your code and ensures that your HTML remains clean and organized. Instead, use an external stylesheet or add your CSS code to a separate file.</li><li>Use a Preprocessor Like Sass or Less CSS preprocessors like Sass or Less can make it easier to write clean, maintainable code. They allow you to use variables, mixins, and functions, which can simplify your code and make it easier to read. Additionally, they make it easy to organize your code into separate files, which can help you keep your code modular and flexible.</li></ol><p>By following these best practices, you can make your CSS code more readable and maintainable, which will ultimately make your life as a developer easier. Keep in mind that there are many other tips and tricks you can use to improve your CSS code, so don’t be afraid to experiment and find what works best for you.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=130790991508" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Big O Made Easy: Understanding Algorithm Efficiency]]></title>
            <link>https://medium.com/@ridhokhalis37/big-o-made-easy-understanding-algorithm-efficiency-af3ec186e564?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/af3ec186e564</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 12:58:44 GMT</pubDate>
            <atom:updated>2023-03-29T12:58:44.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*n4AeKfNzQu1XnPXl" /></figure><p>If you’re new to computer science, you may have heard of Big O notation and wondered what it means. Simply put, Big O notation is a way to measure the efficiency of algorithms. It tells you how long an algorithm will take to run based on the size of its input.</p><p>Let’s say you’re sorting a list of numbers. A simple algorithm might compare each number to every other number in the list until the list is sorted. But as the list gets longer, this algorithm will take more and more time to run.</p><p>Big O notation helps you understand how the runtime of this algorithm will change as the size of the list grows. If the runtime increases linearly with the size of the list, we say the algorithm has a Big O notation of O(n). If the runtime increases quadratically with the size of the list, we say the algorithm has a Big O notation of O(n²).</p><p>Let’s look at some examples using pseudocode.</p><h3>Example 1: Finding the Maximum Value in an Array</h3><p>Let’s say we have an array of numbers and we want to find the maximum value in that array. We can use a simple algorithm that loops through each element in the array and keeps track of the maximum value seen so far. Here’s what the pseudocode for that algorithm might look like:</p><pre>max_value = array[0]<br>for i = 1 to array.length - 1<br>    if array[i] &gt; max_value<br>        max_value = array[i]<br>return max_value</pre><p>This algorithm has a Big O notation of O(n) because it loops through each element in the array once. The runtime of the algorithm will increase linearly with the size of the array.</p><h3>Example 2: Finding the Maximum Value in a Two-Dimensional Array</h3><p>Now let’s say we want to find the maximum value in a two-dimensional array. We can use a similar algorithm that loops through each element in the array, but this time we’ll need nested loops to traverse both dimensions of the array. Here’s what the pseudocode for that algorithm might look like:</p><pre>max_value = array[0][0]<br>for i = 0 to array.length - 1<br>    for j = 0 to array[0].length - 1<br>        if array[i][j] &gt; max_value<br>            max_value = array[i][j]<br>return max_value</pre><p>This algorithm has a Big O notation of O(n²) because it has nested loops that traverse both dimensions of the array. The runtime of the algorithm will increase quadratically with the size of the array.</p><p>The goal of using Big O notation is to compare the efficiency of different algorithms and choose the best one for a given problem. If we know we’re dealing with a large two-dimensional array, we’ll want to choose an algorithm with a lower Big O notation to avoid wasting time and resources on inefficient code.</p><p>One way to improve the efficiency of your code is to choose an algorithm with a lower Big O notation. For example, if you’re sorting a list of numbers, you might choose a sorting algorithm with a Big O notation of O(n log n) instead of O(n²). This can make a big difference in runtime for large datasets.</p><p>Another way to improve efficiency is to optimize your code within the constraints of the chosen algorithm. For example, you might use memoization or dynamic programming to avoid recalculating the same values over and over again.</p><p>Understanding Big O notation is essential for making informed decisions about algorithm selection and optimization. By choosing the most efficient algorithm and optimizing your code, you can build programs that are faster and more scalable.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af3ec186e564" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Scalable Web Applications with Prisma and Next.js]]></title>
            <link>https://medium.com/@ridhokhalis37/building-scalable-web-applications-with-prisma-and-next-js-6ced35495360?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ced35495360</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[prisma]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 15:17:51 GMT</pubDate>
            <atom:updated>2023-03-27T15:17:51.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D47G51hsbuFvKAtX8qff6A.png" /></figure><p>Prisma and Next.js are two powerful tools that have gained significant popularity in the web development community. Prisma is a modern database toolkit that allows developers to work with databases in a type-safe and intuitive way. Next.js, on the other hand, is a popular React-based framework for building server-side rendered (SSR) web applications. In this article, we will discuss why you should consider using Prisma and Next.js as your web tech stack.</p><h3>Prisma</h3><p>Prisma is a database toolkit that provides a type-safe and intuitive way to work with databases. It supports various databases, including PostgreSQL, MySQL, and SQLite. One of the main benefits of using Prisma is that it provides a type-safe query builder that ensures queries are type-checked at compile time. This means that you can catch errors before runtime, reducing the likelihood of runtime errors and improving your overall productivity.</p><p>In addition to the type-safe query builder, Prisma also provides a powerful schema definition language that allows you to define your database schema in a declarative way. This means that you can easily make changes to your schema and generate migration scripts that can be used to update your database schema without losing data.</p><p>Prisma also provides a powerful ORM (Object-Relational Mapping) layer that allows you to work with your database in an intuitive and efficient way. With Prisma, you can easily perform CRUD operations, work with relationships between tables, and handle complex queries.</p><h3>Next.js</h3><p>Next.js is a React-based framework for building server-side rendered (SSR) web applications. SSR means that the server renders the initial HTML of your application and sends it to the client, allowing for faster initial page loads and better SEO. Next.js also supports client-side rendering (CSR), allowing for a seamless user experience after the initial page load.</p><p>Next.js provides a number of features that make it easy to build high-performance web applications. It supports automatic code splitting, which means that only the necessary code is loaded for each page, improving the overall performance of your application. It also provides support for serverless functions, which allows you to build APIs and backend services without having to manage a server.</p><p>Next.js also provides a powerful data fetching system that allows you to fetch data on the server and client-side, depending on your application’s needs. This means that you can optimize your application for performance and reduce unnecessary data fetching.</p><p>Why Prisma + Next.js? Now that we have discussed the benefits of Prisma and Next.js individually, let’s explore why they make a great tech stack when used together.</p><p>First, Prisma provides a powerful ORM layer that can be used to easily work with databases in a type-safe and intuitive way. This makes it easy to build complex data-driven applications with Next.js.</p><p>Second, Next.js provides a powerful framework for building server-side rendered web applications. This means that your application will have better SEO and faster initial page loads, which can improve the user experience.</p><p>Third, both Prisma and Next.js provide powerful tools for working with data. With Prisma, you can easily perform CRUD operations and work with relationships between tables. With Next.js, you can easily fetch data on the server and client-side, optimizing your application for performance.</p><p>In conclusion, Prisma and Next.js make a powerful tech stack for building modern web applications. Prisma provides a type-safe and intuitive way to work with databases, while Next.js provides a powerful framework for building server-side rendered web applications. Together, they provide a powerful set of tools for building complex data-driven applications that are optimized for performance and user experience. By using these tools together, you can create applications that are efficient, scalable, and easy to maintain.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ced35495360" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-Platform Mobile App Development: A Comparison of Flutter and React Native]]></title>
            <link>https://medium.com/@ridhokhalis37/cross-platform-mobile-app-development-a-comparison-of-flutter-and-react-native-a7c234672b1f?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7c234672b1f</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 08:11:41 GMT</pubDate>
            <atom:updated>2023-03-27T15:18:31.138Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*tajb3l-2AeBhj9ej" /></figure><p>Mobile app development has become an essential part of businesses in the digital age. With the rise of smartphones and mobile devices, businesses have started focusing on creating their mobile apps to reach a wider audience. Two of the most popular cross-platform mobile app development frameworks are Flutter and React Native.</p><p>Flutter is an open-source mobile app development framework created by Google. It allows developers to create high-performance mobile apps for both Android and iOS platforms using a single codebase. React Native, on the other hand, is a mobile app development framework created by Facebook. It allows developers to create mobile apps for both platforms using JavaScript and React.</p><p>In this article, we will compare Flutter and React Native based on various factors such as performance, development time, community support, and more.</p><h3>Performance</h3><p>Performance is one of the essential factors that determine the success of a mobile app. Both Flutter and React Native are known for their exceptional performance, but Flutter takes the lead in this aspect. Flutter uses Dart as its programming language, which compiles to native machine code, making the app run faster and smoother. React Native, on the other hand, uses JavaScript, which is interpreted at runtime, leading to slower app performance.</p><h3>Development Time</h3><p>Development time is another crucial factor that determines the success of a mobile app. Flutter wins in this aspect as well. Flutter’s hot-reload feature allows developers to make changes to the code and see the results in real-time without restarting the app, reducing development time significantly. React Native’s hot-reloading feature is not as efficient as Flutter’s and can cause delays in the development process.</p><h3>UI Components</h3><p>Both Flutter and React Native offer a wide range of UI components that developers can use to build their mobile apps. However, Flutter provides a more comprehensive set of UI components out-of-the-box, allowing developers to build complex and visually appealing user interfaces quickly. React Native, on the other hand, offers a limited set of UI components, and developers may have to use third-party libraries to achieve the desired UI.</p><h3>Community Support</h3><p>Community support is crucial when it comes to mobile app development frameworks. Both Flutter and React Native have a large and active community of developers who contribute to the growth and development of the frameworks. However, Flutter has a more extensive and robust community support system. This is because Flutter is relatively new, and Google has been actively promoting it, leading to more significant investments from businesses and developers.</p><h3>Documentation and Learning Curve</h3><p>Documentation and learning curve are critical factors to consider when choosing a mobile app development framework. Flutter has excellent documentation, making it easy for developers to learn and use the framework. Flutter’s documentation also includes a wide range of tutorials and examples that developers can use to learn the framework quickly. React Native’s documentation is also good, but it can be challenging for beginners to learn due to the complex nature of JavaScript.</p><h3>Conclusion</h3><p>Both Flutter and React Native are excellent mobile app development frameworks, and choosing between them depends on various factors such as performance, development time, community support, and more. Flutter excels in terms of performance and development time, while React Native is more established and offers a larger community of developers. Ultimately, the choice between Flutter and React Native depends on the specific needs of the project and the developer’s preferences.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c234672b1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering React: Best Practices for Building Elegant UIs]]></title>
            <link>https://medium.com/@ridhokhalis37/mastering-react-best-practices-for-building-elegant-uis-e153c419b13a?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e153c419b13a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 07:43:13 GMT</pubDate>
            <atom:updated>2023-03-27T15:18:56.304Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*qdGto60MlOuEiMsd" /></figure><p>React has become one of the most popular JavaScript libraries for building user interfaces, and for good reason. With its ability to create reusable components and manage state, React makes it easier than ever to build elegant UIs. But how do you take your React skills to the next level? In this article, we’ll explore some best practices for building high-quality and maintainable UIs with React.</p><ol><li>Component Architecture: Building Blocks of Your Application Building your application with reusable components is like building a house with Legos. It’s modular, flexible, and just plain fun. A component-based architecture improves code reusability and makes your codebase more modular, simplifying debugging. By organizing your code into components, you can create a library of reusable UI elements that can be shared across your application.</li><li>Functional Components: Simple, Readable, and Fast Functional components are simpler, easier to read, and faster than class components. With the introduction of React Hooks, functional components can now have state and other React features, without the headaches of class components. By using functional components, you can simplify your code and make it more readable, making it easier to maintain.</li><li>JSX: The Magic Behind Your UI Writing HTML in JavaScript with JSX is like having a secret weapon. JSX makes it easier to create complex UIs that are easy to read and maintain. Plus, it’s just plain fun to use. By using JSX, you can write HTML and JavaScript together, making it easier to visualize and design your UI.</li><li>State Management: Keep It Simple and Small State is like seasoning — it’s great in moderation, but too much of it can ruin the dish. Keep your state simple and small, and use props to pass data down to child components. By minimizing the amount of state in your application, you can make your code more maintainable and easier to test.</li><li>React Hooks: The Game Changer React Hooks are like the Swiss Army Knife of React. They provide a simpler, more elegant way to manage state and other React features in your functional components. By using hooks, you can simplify your code and make it more reusable, making it easier to maintain in the long run.</li><li>CSS Modules: Modularize Your CSS Global styles are like the elephant in the room — they’re hard to ignore, but can be overwhelming. Use CSS Modules to modularize your CSS and avoid naming conflicts. This makes your code more organized and easier to maintain. By using CSS Modules, you can create more elegant, maintainable UIs.</li><li>Testing with React Testing Library: Because Nobody Likes Bugs Bugs are like gremlins — they can wreak havoc on your application. So, use React Testing Library to write tests for your components and catch bugs before they become a problem. With React Testing Library, you can ensure that your components work as expected, and you’ll never have to deal with a bug-filled application again.</li><li>Performance Optimization: Make Your UIs Lightning Fast Performance is like the icing on the cake — it makes everything better. Optimize your application’s performance by using shouldComponentUpdate or React.memo to prevent unnecessary renders. By optimizing your code for performance, you can create more elegant, maintainable UIs that users will love.</li></ol><p>In conclusion, by following these best practices, you can take your React skills to the next level and build elegant, maintainable UIs that users will love. By building your application with reusable components, using functional components and JSX, keeping your state simple, using React Hooks, modularizing your CSS, testing with React Testing Library, and optimizing for performance, you can create high-quality UIs that stand the test of time. Mastering these best practices takes time and practice, but by following them consistently, you’ll become a React pro in no time.</p><p>Remember, building elegant UIs is not just about writing code — it’s about thinking carefully about the user experience, and making sure that every element of your UI is designed with the user in mind. By mastering these React best practices, you’ll be well on your way to building UIs that not only look great but are also easy to use and navigate.</p><p>So, go ahead and put these best practices to work in your next React project, and watch as your UIs come to life. With the right tools and techniques, you can create elegant, maintainable UIs that users will love.</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e153c419b13a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Next.js 13 Data Fetching: Which Strategy to Use?]]></title>
            <link>https://medium.com/@ridhokhalis37/next-js-13-data-fetching-which-strategy-to-use-ec41508c3de3?source=rss-7a6343eccfd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec41508c3de3</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ridho Khalis]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 17:08:47 GMT</pubDate>
            <atom:updated>2023-03-27T15:19:40.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*ezB4goyC-rZvqd82" /></figure><p>Data fetching is a crucial aspect of any modern web application. Imagine going to a restaurant and waiting for your food without the waiter bringing the menu to you! It would be frustrating, right? Similarly, without the right data fetching strategy, your web application can leave your users feeling annoyed and hangry. Next.js, the popular React-based framework, offers various strategies to fetch data from different sources. In Next.js 13, several new data fetching strategies have been introduced. In this article, we will compare these strategies and help you choose the best one for your application.</p><p>Server-side Rendering (SSR)</p><p>Server-side rendering is like having a personal chef who prepares your food and brings it to your table. In Next.js, SSR is enabled by default, and you can fetch data using the getServerSideProps function. This function is executed on the server-side and provides the initial data for the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*8ddYnf3JmRDPwEW8" /></figure><p>For example, imagine you are running a food delivery service that lists restaurants and their menus. You can use SSR to fetch the menus from the restaurants’ websites and display them on your website. Your users will have a better experience as they can easily browse the menus without having to visit multiple websites.</p><p>Static Site Generation (SSG)</p><p>Static site generation is like having a food truck that prepares your food in advance and brings it to you. In Next.js, SSG is achieved using the getStaticProps function. This function generates the HTML for a page at build time and provides the initial data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*nUmGOJcZxEMne9O7" /></figure><p>For example, imagine you are running a food blog that publishes recipes. You can use SSG to generate the HTML for the recipes at build time, making them easily accessible to your users. They can view the recipes without having to wait for the server to respond.</p><p>Client-side Rendering (CSR)</p><p>Client-side rendering is like cooking your food yourself. In Next.js, CSR is achieved using the useEffect hook or the getStaticProps function with the fallback option set to true.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*wqC4W6w_HXUXXgyO" /></figure><p>For example, imagine you are running a restaurant reservation service. You can use CSR to fetch the available reservation slots from your server and update the UI without reloading the page. Your users can quickly see the available slots and make a reservation without any interruption.</p><p>Incremental Static Regeneration (ISR)</p><p>Incremental static regeneration is like having a sous chef who prepares the ingredients in advance, and you cook the food whenever you need it. In Next.js, ISR is achieved using the revalidate option with getStaticProps. This option determines how frequently a page is re-generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*xVGY9gb5erBapVNl" /></figure><p>For example, imagine you are running a food ordering service that lists the availability of the items on the menu. You can use ISR to generate the HTML for the menu items at build time and update them periodically based on the availability. This way, your users can see the latest information on the menu without any delay.</p><p>In conclusion, Next.js 13 offers various data fetching strategies that cater to different needs. Server-side rendering is best for SEO, static site generation is best suited for content that doesn’t change frequently, client-side rendering is easy to implement and allows for dynamic updates, and incremental static regeneration provides a balance between server-side rendering and static site generation. The choice ultimately depends on the needs of your application. So, choose wisely and keep your users satisfied with a great dining experience on your web application!</p><p>Thank you for taking the time to read this article! If you enjoyed this content and want to stay up-to-date on my latest web development tips and tricks, be sure to follow me here on Medium.</p><p>If you have any questions or would like to discuss web development further, feel free to reach out to me through <a href="https://www.linkedin.com/in/ridho-khalis/">LinkedIn</a> or <a href="https://ridhokhalis.netlify.app/">my website</a>. I’m always happy to connect with other developers and share knowledge!</p><p>Thanks again for your support and happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec41508c3de3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>