<?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 Kuncoro Wicaksono on Medium]]></title>
        <description><![CDATA[Stories by Kuncoro Wicaksono on Medium]]></description>
        <link>https://medium.com/@kuncorowicaksono?source=rss-963fba78ab39------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*l0f00BY4ZnLX8lsd2_UprQ.jpeg</url>
            <title>Stories by Kuncoro Wicaksono on Medium</title>
            <link>https://medium.com/@kuncorowicaksono?source=rss-963fba78ab39------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:42:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kuncorowicaksono/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[Formik: Simplifying Form Management in React]]></title>
            <link>https://kuncorowicaksono.medium.com/formik-simplifying-form-management-in-react-571173ccd14a?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/571173ccd14a</guid>
            <category><![CDATA[formik]]></category>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 02:10:21 GMT</pubDate>
            <atom:updated>2023-12-06T02:10:21.566Z</atom:updated>
            <content:encoded><![CDATA[<p>React, a popular JavaScript library for building user interfaces, has revolutionized the way developers create dynamic web applications. One essential aspect of many web applications is form handling, and this is where Formik, a powerful form management library for React, comes into play. In this article, we’ll explore what Formik is, its key features, and how to use it to simplify form development in React.</p><h4><strong>Problem Statement</strong></h4><p>Developers often face challenges in managing complex forms in React applications. Handling form state, validation, and submission can become a cumbersome task, leading to code that is hard to maintain and prone to errors. As applications grow in complexity, the need for a robust and scalable solution for form management becomes apparent. Formik addresses these challenges by providing a structured and efficient way to handle forms in React applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MuCQ40pktWCoSoGp5Dq1QA.jpeg" /><figcaption>Formik: Form Management</figcaption></figure><h3>What is Formik?</h3><p>Formik is a library designed to help React developers manage forms efficiently. It simplifies the process of handling form state, validation, and submission, providing a consistent and convenient way to work with forms in React applications.</p><h4>Key Features of Formik</h4><p><strong>1. Declarative Approach</strong><br> Formik encourages a declarative approach to form development. By using the `formik` hook and components, developers can define forms in a clear and concise manner, making it easier to understand and maintain.</p><p><strong>2. Form State Management</strong><br> Formik manages the form state, including values, errors, and touched fields. It automatically tracks changes, making it effortless to update UI elements based on user input.</p><p><strong>3. Form Validation</strong><br> Validation is a crucial part of form development. Formik provides a straightforward way to implement form validation, including synchronous and asynchronous validation logic. This ensures that the data entered by users meets the specified criteria.</p><p><strong>4. Form Submission Handling</strong><br> Handling form submissions is simplified with Formik. Developers can define custom submission logic, and Formik takes care of managing loading states, error handling, and resetting the form after submission.</p><p><strong>5. Field-Level Control</strong><br> Formik offers granular control over individual form fields. Developers can access and manipulate the state of each field, making it easy to implement dynamic behavior and custom interactions.</p><p><strong>6. Integration with Yup</strong><br> Formik seamlessly integrates with Yup, a JavaScript schema builder for validation. Yup simplifies the process of defining validation schemas, and Formik leverages these schemas to validate form data.</p><h3>Getting Started with Formik</h3><p>Let’s walk through the basic steps to get started with Formik in a React application:</p><p><strong>1. Installation</strong><br>Install Formik and Yup using the following commands:</p><pre>npm install formik yup</pre><p><strong>2. Basic Usage</strong><br>Import Formik and related components, and wrap your form elements with the `Formik` component:</p><pre>import { Formik, Form, Field, ErrorMessage } from &#39;formik&#39;;<br><br>const MyForm = () =&gt; {<br>  return (<br>    &lt;Formik<br>      initialValues={{ /* initial form values */ }}<br>      onSubmit={(values, actions) =&gt; {<br>        // handle form submission<br>      }}<br>    &gt;<br>      &lt;Form&gt;<br>        {/* form fields go here */}<br>        &lt;Field type=&quot;text&quot; name=&quot;fieldName&quot; /&gt;<br>        &lt;ErrorMessage name=&quot;fieldName&quot; component=&quot;div&quot; /&gt;<br><br>        {/* submit button */}<br>        &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;<br>      &lt;/Form&gt;<br>    &lt;/Formik&gt;<br>  );<br>};</pre><p><strong>3. Validation with Yup</strong><br>Integrate Yup for validation by defining a validation schema and passing it to the `validationSchema` prop:</p><pre>import * as Yup from &#39;yup&#39;;<br><br>const validationSchema = Yup.object({<br>  fieldName: Yup.string().required(&#39;This field is required&#39;),<br>  // add more validations as needed<br>});<br><br>// ...<br><br>&lt;Formik<br>  initialValues={{ /* initial form values */ }}<br>  validationSchema={validationSchema}<br>  onSubmit={(values, actions) =&gt; {<br>    // handle form submission<br>  }}<br>&gt;<br>  {/* form content */}<br>&lt;/Formik&gt;</pre><h3>Conclusion</h3><p>Formik simplifies the complexity of form management in React applications. Its declarative approach, robust state management, and seamless integration with validation libraries make it a powerful tool for building dynamic and user-friendly forms. By incorporating Formik into your React projects, you can streamline the form development process, leading to more maintainable and efficient code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=571173ccd14a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevSecOps with Vercel: Ensuring Security from Development to Deployment]]></title>
            <link>https://kuncorowicaksono.medium.com/devsecops-with-vercel-ensuring-security-from-development-to-deployment-c6f181737af7?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6f181737af7</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Wed, 11 Oct 2023 06:46:48 GMT</pubDate>
            <atom:updated>2023-10-11T06:46:48.370Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-paced software development landscape, the need for integrating security seamlessly into the development process has never been more critical. Enter DevSecOps, a methodology that combines the principles of Development (<strong>Dev</strong>), Security (<strong>Sec</strong>), and Operations (<strong>Ops</strong>) to foster a culture of security-first mindset throughout the software development lifecycle. Among the various tools and platforms available to facilitate this approach, Vercel stands out as a game-changer in the world of DevSecOps. Let’s explore how Vercel empowers organizations to prioritize security without compromising on speed and agility.</p><h4><strong>Understanding DevSecOps</strong></h4><p>DevSecOps, a fusion of DevOps and security practices, aims to integrate security into every phase of the software development process. This proactive approach helps organizations identify and mitigate vulnerabilities early, reducing the risk of security breaches and data leaks. DevSecOps encourages collaboration among development, security, and operations teams, ensuring that security concerns are not an afterthought but an integral part of the development cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9oDyQEgVbIMOQNeBbxV1xw.jpeg" /><figcaption>Vercel with DevSecOps</figcaption></figure><h3>Vercel’s Role in DevSecOps</h3><p>Vercel, known for its cloud platform that enables developers to build, deploy, and scale web applications effortlessly, plays a pivotal role in implementing DevSecOps. Here are how Vercel contributes to a robust security posture in the 6 of aspects in DevSecOps:</p><h4>1. Plan</h4><p>DevSecOps starts with planning. Vercel assists developers in identifying security requirements early in the project lifecycle. By offering a secure-by-default environment, Vercel sets a strong foundation for secure application development. Teams can define access controls, establish security policies, and plan for security reviews right from the start.</p><p>Vercel’s architecture also designed with security in mind. From the moment you start coding to deploying your application, Vercel provides a secure environment. It offers automatic HTTPS for all websites, ensuring that your data remains encrypted in transit. <a href="https://vercel.com/security">https://vercel.com/security</a></p><h4>2. Build</h4><p>During the build phase, Vercel provides a secure development environment that is conducive to best coding practices. Continuous integration and continuous deployment (CI/CD) pipelines are seamlessly integrated, allowing teams to automate code builds and vulnerability scanning. Developers can work confidently, knowing that security is integrated into their development workflows.</p><p>Vercel’s built-in CI/CD capabilities automate the deployment process, reducing the chances of human errors that could introduce vulnerabilities. With version control integrations like Git, you can ensure that only approved code changes make it to production. <a href="https://vercel.com/docs/deployments/managing-deployments">https://vercel.com/docs/deployments/managing-deployments</a></p><h4>3. Test</h4><p>Vercel facilitates robust testing by offering pre-deployment security checks. Developers can leverage automated vulnerability scanning and code analysis tools to identify and remediate security issues before they reach production. This proactive approach ensures that potential vulnerabilities are addressed early, reducing the risk of security breaches.</p><h4>4. Deploy</h4><p>Deploying secure applications is a critical aspect of DevSecOps. Vercel streamlines the deployment process, enabling developers to push secure code to production rapidly. With built-in support for secrets management and encryption, sensitive data is protected at all stages, ensuring that deployments are secure by design. <a href="https://vercel.com/docs/deployments/overview">https://vercel.com/docs/deployments/overview</a></p><h4>5. Operate</h4><p>Once applications are live, Vercel continues to prioritize security. Real-time monitoring and logging are integral components of the Vercel platform. Security incidents and anomalies are immediately detected, and automated responses can be configured to mitigate potential threats. This operational approach ensures that security is maintained throughout the application’s lifecycle. <a href="https://vercel.com/docs/observability/runtime-logs">https://vercel.com/docs/observability/runtime-logs</a></p><h4>6. Monitoring</h4><p>Continuous monitoring is vital for identifying and responding to security threats in real time. Vercel offers comprehensive monitoring tools that provide insights into application performance and security. DevOps teams can set up alerts to receive notifications of suspicious activities, enabling rapid response and reducing the impact of security incidents. <a href="https://vercel.com/docs/observability/monitoring">https://vercel.com/docs/observability/monitoring</a></p><h3>Conclusion</h3><p>In conclusion, Vercel embraces the principles of DevSecOps by seamlessly integrating security into every phase of the software development lifecycle. From planning and building to testing, deploying, operating, and monitoring, Vercel empowers developers and DevOps teams to prioritize security without compromising on speed and agility. With Vercel, you can confidently develop and deploy web applications that are not only fast and reliable but also secure from the ground up. Embrace DevSecOps with Vercel and stay ahead in the ever-evolving landscape of web development and security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6f181737af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vercel Alias: A Seamless Rollback Mechanism]]></title>
            <link>https://kuncorowicaksono.medium.com/vercel-alias-a-seamless-rollback-mechanism-a22ccb7599a9?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/a22ccb7599a9</guid>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[rollback-mechanism]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Mon, 09 Oct 2023 10:11:01 GMT</pubDate>
            <atom:updated>2023-10-09T10:11:01.047Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Have you ever questioned what would happen if a problem arises in your production environment? The immediate response is often to initiate a rollback. However, the process of rolling back can be a daunting task, especially when dealing with cloud services like AWS S3. This is where Vercel Alias comes to the rescue, offering a seamless and straightforward solution for managing rollbacks with ease.</p><h4>The Challenge of Rollbacks</h4><p>Rolling back to a previous version of your application or website can be a lifesaver in the event of unexpected issues in your production environment. It’s like hitting an “undo” button to restore your application to a known, stable state. On the other hand, URL redirections are essential for maintaining SEO rankings and ensuring a smooth user experience during site updates. However, traditional rollback and redirection mechanisms can be complex and time-consuming to manage.</p><h3>Vercel &amp; The Solution</h3><p>Vercel, a popular cloud platform for frontend developers, introduces an innovative feature known as “Vercel Alias.” This feature simplifies the process of rolling back to a previous version of your application, making it accessible and efficient for developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*D4hmHCH3y80f1q2rYrp-qQ.png" /><figcaption>Vercel Alias</figcaption></figure><h4>Key Benefits of Vercel Alias</h4><ol><li><strong>Ease of Use:</strong> Vercel Alias streamlines the rollback process, allowing developers to revert to a previous deployment with just a few clicks or commands. It eliminates the need for complex manual steps and reduces the potential for human error.</li><li><strong>Time Savings:</strong> Traditional rollback procedures can be time-consuming, especially when dealing with large-scale applications or complex infrastructures. Vercel Alias significantly reduces the time required to restore a working version of your application.</li><li><strong>Confidence in Recovery:</strong> With Vercel Alias, you can confidently experiment with new deployments, knowing that you have a reliable and quick method for reverting to a stable state if issues arise.</li><li><strong>Improved Collaboration:</strong> Vercel Alias enhances collaboration within development teams by providing a straightforward way to address problems in production. Developers can work more efficiently and communicate effectively during troubleshooting.</li><li><strong>Integration with Vercel’s Ecosystem</strong>: Vercel Alias seamlessly integrates with the Vercel platform, making it a natural choice for developers already using Vercel for their projects. This integration ensures a consistent and reliable experience.</li></ol><h4>How Vercel Alias Works</h4><p>Using Vercel Alias is straightforward:</p><ol><li>Identify the deployment you want to roll back to.</li><li>Use Vercel’s intuitive interface or command-line tools to initiate the rollback by the command vercel alias set [deployment-url][custom-domain]</li></ol><h3>Conclusion</h3><p>Vercel Alias offers a game-changing solution for the deployment and also handling rollbacks in your production environment. Its ease of use, time-saving capabilities, and seamless integration with the Vercel platform make it a valuable tool for developers seeking to maintain the stability and reliability of their applications.</p><h3>Next</h3><p>You can also learn how to use Vercel Bisect to conduct regression tests within your Vercel deployment, checking for any initial errors that may have appeared.</p><h4>Reference</h4><p><a href="https://www.youtube.com/watch?v=6CTdji6s1GQ">https://www.youtube.com/watch?v=6CTdji6s1GQ</a><br><a href="https://vercel.com/docs/cli/alias">https://vercel.com/docs/cli/alias</a><br><a href="https://vercel.com/docs/cli/bisect">https://vercel.com/docs/cli/bisect</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a22ccb7599a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UI Development Workflow with Storybook and Chromatic]]></title>
            <link>https://kuncorowicaksono.medium.com/ui-development-workflow-with-storybook-and-chromatic-238d843725e9?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/238d843725e9</guid>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[chromatics]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 11:37:55 GMT</pubDate>
            <atom:updated>2023-08-18T11:37:55.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In the rapidly evolving realm of web development, the creation of seamless, aesthetically pleasing user interfaces (UIs) is paramount. However, the challenges of maintaining design consistency, streamlining collaboration among developers and designers, and catching visual regressions during the development process often hinder the pursuit of UI excellence.</p><p>To address these challenges, this article aims to explore the potential solution offered by combining the power of Storybook and Chromatic. Storybook, an open-source UI development environment, empowers developers to construct, test, and document UI components in isolation. In tandem, Chromatic, an innovation by Storybook maintainers, introduces visual testing — a mechanism for automated screenshot comparison — to promptly identify UI inconsistencies.</p><p>This article delves into the multifaceted benefits of adopting Storybook and Chromatic, shedding light on how this dynamic duo can significantly enhance UI development practices. By presenting real-world scenarios, practical implementation strategies, and insights into seamless collaboration, this article serves as a guide for web developers striving to elevate the quality, efficiency, and collaborative aspects of their UI development workflow</p><h3>Problem Statement</h3><p>The process of developing visually consistent and functionally impeccable user interfaces faces an array of challenges. Notably, maintaining design uniformity across various UI components, facilitating effective collaboration between developers and designers, and promptly identifying and rectifying visual discrepancies remain persistent hurdles in the journey towards crafting exceptional UIs.</p><p>While traditional approaches to UI development and testing offer some solutions, they often fall short of addressing the complexities and fast-paced nature of modern web development. Manual testing methods are time-consuming, prone to human error, and struggle to keep pace with the growing array of UI components that modern web applications demand.</p><p>Additionally, collaborating on UI development across multidisciplinary teams — where developers, designers, and other stakeholders collaborate — can lead to miscommunication, slow iteration cycles, and ultimately compromise the final user experience.</p><p>The current landscape of UI development, therefore, necessitates an innovative and comprehensive approach that not only ensures design consistency and efficient collaboration but also embraces automation to swiftly identify and rectify visual anomalies.</p><p>This is where the convergence of Storybook and Chromatic comes into play. By harnessing the power of Storybook’s isolated component development and Chromatic’s automated visual testing, developers can potentially mitigate these challenges and forge a path toward a more efficient, collaborative, and visually impeccable UI development process. The integration of these tools has the potential to revolutionize how UI components are created, tested, reviewed, and refined, thereby paving the way for a new era of UI excellence in web development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*kTGXPXld908praWrO77y6Q.jpeg" /></figure><h3>Why use Chromatic?</h3><p>Chromatic, developed by Storybook maintainers, enhances the UI development process by introducing visual testing. It automates the process of capturing and comparing screenshots of your Storybook stories, allowing you to detect visual regressions and inconsistencies as you make changes to your UI components.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fzhrboql8UuU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dzhrboql8UuU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fzhrboql8UuU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/db3eb1331306950c951fef5700e8003d/href">https://medium.com/media/db3eb1331306950c951fef5700e8003d/href</a></iframe><h3>Getting Started with Storybook and Chromatic</h3><p>When it comes to developing, testing, and showcasing UI components, Storybook and Chromatic form a powerful duo that can revolutionize your workflow. Let’s delve into the process of getting started with Storybook and Chromatic, from installation to creating your first stories and enabling automated visual testing.</p><h4>Installation and Setup:</h4><p>Begin by installing Storybook globally using npm or yarn. Create a new directory for your project and navigate to it in your terminal. Run the following commands:</p><pre>npm install -g @storybook/cli<br>sb init</pre><p>Once your Storybook project is set up, integrating Chromatic is straightforward. You’ll need to sign up for a Chromatic account if you haven’t already. Next, install the Chromatic CLI by running:</p><pre>npm install - save-dev chromatic</pre><p>Configure Chromatic by adding the following code snippet to your <strong><em>.storybook/main.js</em></strong> configuration file:</p><pre>module.exports = {<br>   // … other config settings<br>   addons: [&#39;@storybook/addon-essentials&#39;, &#39;storybook-chromatic&#39;],<br>};</pre><h3>Creating Stories and Visual Testing:</h3><ol><li><strong>Defining Stories</strong><br>Stories are individual components or UI elements that you want to showcase and test in isolation. Create a new directory within your project, such as src/stories, and start creating your stories using .stories.js files. Define different states, use cases, and variations for your components within these files.</li><li><strong>Storybook Controls</strong>: <br>Storybook provides a powerful addon called “Controls” that allows you to interact with your components’ props in real-time. This is incredibly useful for testing various scenarios and visualizing component behavior.</li><li><strong>Chromatic Snapshots:</strong> <br>Once your stories are set up, you can use Chromatic to capture and compare visual snapshots of your components. As you make changes to your UI components, Chromatic will automatically generate and compare screenshots to detect any visual regressions or inconsistencies.</li><li><strong>Review Workflow:</strong> <br>Chromatic provides a web-based interface for reviewing visual changes. It allows you to compare different versions of your components, highlight differences, and collaborate with team members to ensure that UI changes meet design expectations.</li></ol><h3>Conclusion</h3><p>In the ever-evolving world of web development, the usage of Storybook and Chromatic offers a potent solution to the challenges of UI creation, testing, and collaboration. This dynamic synergy streamlines the development process from inception to deployment, providing developers with a comprehensive toolkit to ensure design consistency and efficiency.</p><p>Furthermore, the accessibility of both Storybook and Chromatic, as a FREE tools, democratizes advanced UI development and testing capabilities, empowering developers of all sizes to create exceptional user experiences. By embracing Storybook’s isolated component development and Chromatic’s automated visual testing, developers unlock a new era of UI excellence, fostering collaboration, accelerating iteration cycles, and ensuring the reliability of their UI components. Through this integration, developers are well-equipped to navigate the complexities of modern UI development, delivering impactful web applications that stand out in today’s competitive landscape.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=238d843725e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Expo vs. Vanilla React Native: Choosing the Right Approach for Your Mobile App Development]]></title>
            <link>https://kuncorowicaksono.medium.com/expo-vs-vanilla-react-native-choosing-the-right-approach-for-your-mobile-app-development-28df36365663?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/28df36365663</guid>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[expo]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Tue, 04 Jul 2023 08:19:20 GMT</pubDate>
            <atom:updated>2023-07-04T08:19:20.580Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Mobile app development has witnessed a significant surge in recent years, with developers seeking efficient frameworks to create powerful and scalable applications. React Native, a popular JavaScript framework, has gained immense popularity due to its ability to build native-like mobile apps for iOS and Android platforms. When working with React Native, developers have a choice between using Expo or building apps without Expo. In this article, we will explore Expo React Native, its benefits, and how it compares to building React Native apps without Expo.</p><h3>What is Expo?</h3><p>Expo (<a href="https://expo.dev/">https://expo.dev</a>) is an open-source platform and set of tools built around React Native. It provides a robust development environment that simplifies the app development process by abstracting many complex tasks. Expo enables developers to create and deploy cross-platform apps using JavaScript, eliminating the need for deep knowledge of native code and platform-specific tools.</p><h3>Benefits of Expo</h3><p><strong>1. Simplified Development Process:</strong> Expo offers a streamlined workflow, allowing developers to focus on building the app’s functionality rather than dealing with complex configuration and native dependencies. It abstracts the native code layers and provides a consistent API across platforms, making development faster and more efficient.</p><p><strong>2. Rapid Prototyping</strong>: With Expo, developers can quickly prototype and iterate on their ideas. The platform provides a range of pre-built UI components, modules, and APIs, reducing the time spent on building common functionalities from scratch. This accelerates the development process, enabling faster feedback and validation of app concepts.</p><p><strong>3. Over-the-Air (OTA) Updates</strong>: Expo supports over-the-air (OTA) updates, which means you can push updates to your app without requiring users to download and install a new version from the app store. This feature is particularly useful for fixing bugs, adding new features, or making improvements to your app in real-time.</p><p><strong>4. Cross-Platform Compatibility</strong>: Expo allows developers to write code once and deploy it on multiple platforms, including iOS, Android, and web. This significantly reduces the development time and effort required to create apps for different platforms, making it an ideal choice for projects with tight deadlines or limited resources.</p><p><strong>5. Access to Native Device Functionality</strong>: While Expo abstracts many native code complexities, it still provides access to a broad range of native device functionality through Expo APIs and community-built modules. Developers can leverage features like camera access, push notifications, geolocation, and more without diving deep into native code implementation.</p><h3>Comparison Vanilla React Native vs Expo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QebRswpEI8-jUyRcLqY9lw.jpeg" /><figcaption>Vanilla RN vs Expo RN</figcaption></figure><h4>Development Environment</h4><ol><li><strong>React Native:</strong> With vanilla React Native, developers set up their development environment by installing the required dependencies, such as Node.js, React Native CLI, Android Studio (for Android development), and Xcode (for iOS development). The process involves configuring these tools, which can be time-consuming and challenging, especially for beginners.</li><li><strong>Expo:</strong> Expo simplifies the development environment setup by providing a comprehensive toolkit that abstracts away the complexities of platform-specific configurations. Developers can get started quickly by installing the Expo CLI, which provides a seamless development experience across platforms without the need for additional setup.</li></ol><h4>Native Module Integration</h4><ol><li><strong>React Native:</strong> Vanilla React Native allows for easy integration of custom native modules. This is beneficial when your app requires direct access to platform-specific APIs or third-party libraries that are not readily available through Expo’s pre-built modules. However, integrating native modules requires additional configuration and may introduce potential compatibility issues during updates.</li><li><strong>Expo: </strong>Expo abstracts the native module integration process, providing a curated set of pre-built modules and APIs that cover common use cases. While Expo offers a wide range of functionalities out-of-the-box, if your project requires a custom native module, you may need to detach from Expo and transition to a bare React Native project to gain direct access to the native code.</li></ol><h4>Third-Party Library Support</h4><ol><li><strong>React Native: </strong>When using vanilla React Native, developers have access to the entire React Native ecosystem and can seamlessly integrate any third-party library available for React Native. The vast library support provides flexibility and options for incorporating specific functionalities into your app.</li><li><strong>Expo: </strong>Expo has a curated collection of pre-built modules that cover popular functionalities, such as camera access, push notifications, and geolocation. While Expo’s module collection is extensive, it may not include every library available for vanilla React Native. However, Expo offers a process called “unimodules” to integrate certain third-party libraries that are compatible with the Expo ecosystem.</li></ol><h4>Over-the-Air (OTA) Updates</h4><ol><li><strong>React Native:</strong> Vanilla React Native does not provide built-in support for OTA updates. To push updates to users, you typically need to go through the app store update process, which involves waiting for app store approval and user downloads.</li><li><strong>Expo:</strong> Expo offers built-in support for OTA updates, allowing developers to seamlessly push updates to users without requiring them to download a new version from the app store. This feature is particularly useful for bug fixes, feature enhancements, and quick iterations without the need for lengthy app store review processes.</li></ol><h3><strong>Conclusion</strong></h3><p>Choosing between React Native and Expo depends on various factors, including the complexity of your app, the need for custom native module integration, third-party library support, and OTA update requirements. React Native provides flexibility, extensive library support, and direct access to native code when needed. Expo simplifies the development process, abstracts away platform-specific configurations, offers a curated collection of modules, and supports OTA updates out-of-the-box. Consider your project’s specific needs and trade-offs to make an informed decision that aligns with your development goals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28df36365663" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Flow: Understanding Branching and Forking for Effective Version Control]]></title>
            <link>https://kuncorowicaksono.medium.com/git-flow-understanding-branching-and-forking-for-effective-version-control-7fdaf555c26e?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fdaf555c26e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[forking]]></category>
            <category><![CDATA[gitflow]]></category>
            <category><![CDATA[branching]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 08:12:11 GMT</pubDate>
            <atom:updated>2023-06-29T08:12:11.945Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Git, a free and open-source distributed version control system, plays a crucial role in facilitating collaborative software development on platforms like GitHub. With developers constantly making changes to their code, it becomes essential to have a system that can manage those changes in a central repository. Git provides the solution, allowing team members to download, modify, and submit updates to a shared codebase. In this article, we will explore the importance of understanding Git flow, specifically focusing on branching and forking, and discuss the benefits they offer in managing code changes efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hDxG4_hifaJZFbOa3LWeg.jpeg" /><figcaption>Git Flow: Branching &amp; Forking</figcaption></figure><h3>Problem: Why Understanding Git Flow is Important?</h3><p>Having a solid grasp of Git flow enables developers to effectively manage their code changes while minimizing disruptions for the entire team. By following the correct flow and utilizing appropriate Git features, developers can work on separate branches or forks, allowing them to experiment, develop new features, or fix bugs without directly affecting the main codebase. This level of isolation enhances collaboration, code quality, and project stability.</p><h3>Branching: Working on Independent Code Paths</h3><p>Branching in Git allows developers to create separate code paths within the same repository. Each branch represents a distinct line of development, allowing team members to work independently on specific features or bug fixes. It enables parallel development, where multiple tasks can progress simultaneously without interfering with each other. Branches can be easily created, merged, or deleted as needed, providing a flexible and organized approach to development.</p><h4>Benefits of Branching:</h4><p>1. Isolation: Branching allows developers to work on their assigned tasks without worrying about affecting the main codebase. This isolation promotes experimentation and innovation.<br>2. Collaboration: Team members can collaborate on specific features or bug fixes by creating separate branches. They can share their work, review each other’s code, and merge changes back into the main branch when ready.<br>3. Risk Mitigation: With branching, developers can quickly identify and isolate problematic changes. If a branch introduces bugs or errors, it can be fixed or discarded without impacting the main codebase.<br>4. Versioning: Branches provide a clear history of development iterations, making it easier to track changes, identify responsible individuals, and roll back to previous versions if needed.</p><h3>Forking: Independent Copies of the Repository</h3><p>Forking takes the concept of branching a step further by creating an independent copy of the repository. When forking a repository, a complete duplicate is created under the developer’s GitHub account. This copy allows developers to work freely without affecting the original repository until they are ready to contribute their changes back via a pull request.</p><h4>Benefits of Forking:</h4><p>1. Independent Development: Forking provides a high level of autonomy, allowing developers to make changes, experiment, and develop new features in their own isolated environment.<br>2. Collaboration and Contribution: Once changes are made in a forked repository, developers can submit a pull request to the original repository. This mechanism facilitates code review, discussion, and the integration of changes into the main codebase.<br>3. Community Engagement: Forking encourages collaboration with the broader developer community, allowing others to contribute to the project by creating their own forks and proposing improvements or bug fixes.</p><h3>Conclusion</h3><p>Understanding Git flow, including branching and forking, is crucial for effective version control and collaboration in software development. By leveraging branching, developers can work on independent code paths, enabling parallel development, risk mitigation, and simplified collaboration. Forking takes the isolation a step further, providing developers with independent copies of the repository to experiment, develop, and contribute changes back to the original project.</p><p>By following best practices, utilizing appropriate Git commands, and leveraging the power of branching and forking, developers can streamline their workflows, enhance collaboration, and ensure a stable and efficient development process. Invest the time to understand Git flow, explore branching and</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fdaf555c26e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use HTTP POST instead of HTTP PUT?]]></title>
            <link>https://kuncorowicaksono.medium.com/why-use-http-post-instead-of-http-put-9a69bf4834d4?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a69bf4834d4</guid>
            <category><![CDATA[put]]></category>
            <category><![CDATA[http-methods]]></category>
            <category><![CDATA[post]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 23:51:32 GMT</pubDate>
            <atom:updated>2023-06-25T23:51:32.087Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>When it comes to web development and working with APIs, understanding the HTTP methods is crucial. Two commonly used methods are PUT and POST, each serving distinct purposes. In this article, we will dive into the differences between HTTP PUT and POST and explore their appropriate use cases. By the end, you will have a solid understanding of when and how to use these methods effectively.</p><p>The HTTP PUT method is used to update an existing resource on the server. It sends a request to the server, containing the updated representation of the resource identified by the request URL.</p><p>The HTTP POST method is used to submit data to be processed by the server. Unlike PUT, POST requests are not idempotent, meaning that each request can have different outcomes. POST requests typically create new resources on the server or trigger non-idempotent actions that modify the server’s state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*wDAG52NamDYsr5EW6eViSQ.png" /><figcaption>http put and http post</figcaption></figure><h3>Problem Statement</h3><p>Although the HTTP PUT method is specifically designed for updating or replacing existing resources, it is often observed that developers tend to use the POST method for a wide range of operations, even when PUT might be a better fit. This raises the question: Why do many developers choose to use POST for various operations instead of strictly adhering to the intended use of PUT?</p><h3>Explanation</h3><p>1. Simplicity and Convention:<br> — Many web frameworks and libraries default to using the POST method for form submissions and general data processing, which has become a widely adopted convention.<br> — Consistently using POST can simplify the overall design and implementation of an application, following established patterns and best practices.</p><p>2. Limited Support for PUT:<br> — Older browsers, proxy servers, or caching mechanisms may have limitations in handling PUT requests, leading developers to opt for the more widely supported POST method.</p><p>3. Lack of Idempotence Requirement:<br> — PUT requests are expected to be idempotent, but in scenarios where idempotence is not strictly required, developers might choose to use POST for non-idempotent operations or when dynamic values are involved.</p><p>4. Compatibility with APIs and Services:<br> — Developers may need to conform to the required POST method when integrating with existing APIs or services that only accept POST requests for certain operations.</p><p>5. Legacy Systems and Practices:<br> — In cases involving legacy systems or older APIs, developers may need to adapt their approach based on the constraints of these systems, which might not strictly follow the distinction between PUT and POST.</p><h3>Conclusion</h3><p>While the POST method is more commonly used for a variety of operations, understanding the differences between HTTP PUT and POST methods is essential. Factors such as simplicity, convention, limited support for PUT, lack of idempotence requirement, compatibility with APIs, and legacy systems influence developers’ choices. However, it is important to be mindful of the intended purposes of PUT and POST and choose the appropriate method based on the specific requirements and constraints of your application or the APIs you are working with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a69bf4834d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Navigation Material Top Tab Navigation Event Listeners]]></title>
            <link>https://kuncorowicaksono.medium.com/react-navigation-material-top-tab-navigation-event-listeners-6a9dcb7ceae2?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a9dcb7ceae2</guid>
            <category><![CDATA[react-navigation]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 09:28:04 GMT</pubDate>
            <atom:updated>2023-06-22T09:28:04.206Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Navigation Material Top Tab Navigation Event Listeners: Listen to The Swipe Event</h3><h3>Introduction</h3><p>React Navigation provides event listeners that allow you to listen to various tab-related events in a Material Top Tab Navigator. This article will guide you on how to use event listeners to listen to tab press and swipe events, and provide code examples to demonstrate their usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*37VpbstmOvbAZqZ74Ddbiw.gif" /><figcaption>swipe react navigation</figcaption></figure><h3>Problem Statement</h3><p>One problem with using the swipeEnd event in React Navigation’s Material Top Tab Navigator is the lack of official documentation from react-navigation. As of now (2023 version 6.x), the swipeEnd event is not documented in the official React Navigation documentation for Material Top Tab Navigator. Therefore, its usage and behavior may be subject to change or not fully supported at this time.</p><h3>Listening to Tab Press and Swipe Events</h3><p>To listen to tab press and swipe events in a Material Top Tab Navigator, you can use the listeners prop on each Tab.Screen component. The listeners prop accepts an object with event callbacks for specific events. In this example, we’ll focus on the tabPress event, which is documented, and the swipeEnd event, which is not yet documented.</p><p>Code Example:</p><pre>&lt;Tab.Navigator<br>  lazy={true}<br>&gt;<br>  &lt;Tab.Screen name=&#39;FirstTab&#39;<br>    options={{ tabBarLabel: &#39;First Tab&#39; }}<br>    listeners={({ navigation }) =&gt; ({<br>      swipeEnd: (e) =&gt; {<br>        console.log(&#39;First Tab Swipe&#39;)<br>      },<br>      tabPress: (e) =&gt; {<br>        console.log(&#39;First Tab&#39;)<br>      },<br>    })}<br>    component={FirstTabList} /&gt;<br>  &lt;Tab.Screen name=&#39;SecondTab&#39;<br>    options={{ tabBarLabel: &#39;Second Tab&#39; }}<br>    listeners={({ navigation }) =&gt; ({<br>      swipeEnd: (e) =&gt; {<br>        console.log(&#39;Second Tab Swipe&#39;)<br>      },<br>      tabPress: (e) =&gt; {<br>        console.log(&#39;Second Tab&#39;)<br>      },<br>    })}<br>    component={SecondTabList} /&gt;<br>  &lt;Tab.Screen name=&#39;ThirdTab&#39;<br>    options={{ tabBarLabel: &#39;Third Tab&#39; }}<br>    listeners={({ navigation }) =&gt; ({<br>      swipeEnd: (e) =&gt; {<br>        console.log(&#39;Third Tab Swipe&#39;)<br>      },<br>      tabPress: (e) =&gt; {<br>        console.log(&#39;Third Tab&#39;)<br>      },<br>    })}<br>    component={ThirdTabList} /&gt;<br>&lt;/Tab.Navigator&gt;</pre><h4>Explanation</h4><p>In the above code snippet, we have a Tab.Navigator component containing three Tab.Screen components representing different tabs. Each Tab.Screen component has an associated listeners prop that accepts an object with event callbacks.</p><p>For each tab, we define two event callbacks:<br>- swipeEnd: This callback is triggered when the user finishes swiping the tab. Please note that the swipeEnd event is not documented in the official React Navigation documentation for Material Top Tab Navigator.<br>- tabPress: This callback is triggered when the tab is pressed.</p><p>Inside each event callback, we log a message to the console indicating the event and the tab name.</p><h4>Additional Notes</h4><p>1. As of now, the swipeEnd event is not documented in the official React Navigation documentation for Material Top Tab Navigator. Therefore, its usage and behavior may be subject to change or not fully supported at this time.<br>2. Last but not least, you can also implement the swipeStart event, which triggers when the user starts swiping away from the active tab screen. However, please note that the swipeStart event is not demonstrated in the provided code example.</p><h3>Conclusion</h3><p>By utilizing the listeners prop for swipeEnd and tabPress in a Material Top Tab Navigator, you can easily listen to tab press and swipe events. This allows you to perform custom actions or handle specific logic based on user interactions with the tabs in your React Navigation application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a9dcb7ceae2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Update Error in Docker Versions 20.10.5 to 20.10.7: The APT-Get Update Issue]]></title>
            <link>https://kuncorowicaksono.medium.com/update-error-in-docker-versions-20-10-5-to-20-10-7-the-apt-get-update-issue-88d530a99634?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/88d530a99634</guid>
            <category><![CDATA[apt-get-update]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 07:22:07 GMT</pubDate>
            <atom:updated>2023-06-18T07:22:07.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*4r_RIJeynQEPs6qUTu-WRw.png" /><figcaption>Docker Error</figcaption></figure><h3>Introduction</h3><p>Docker has become an essential tool for containerization, allowing developers to create and deploy applications with ease. However, like any software, Docker is not immune to occasional bugs and issues. In this article, we will shed light on a specific error encountered by users of Docker versions 20.10.5 to 20.10.7 when running the apt-get-update. This error relates to the execution of the APT::Update::Post-Invoke script, specifically ‘rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true’.</p><p>Let’s dive into the details of this issue and explore potential workarounds.</p><h3>Understanding the Error</h3><p>When attempting to update packages within Docker versions 20.10.5 to 20.10.7 using the “apt-get update” command, users may encounter the following error:</p><pre>Problem executing scripts APT::Update::Post-Invoke &#39;rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true&#39;.&quot;</pre><p>This error is related to the APT::Update::Post-Invoke script, which is responsible for executing specific commands after the <strong>apt-get update </strong>process completes. The mentioned script attempts to remove certain files and directories within the APT cache but encounters issues during execution.</p><h3>Impact and Implications</h3><p>The error in question might prevent the execution of the “apt-get update” command itself. Also, it can hinder subsequent processes that rely on a successful update. The failure to remove the specified files and directories may result in outdated or conflicting package versions being present in the APT cache. This can potentially lead to unexpected behavior or dependency conflicts when installing or upgrading packages within the Docker environment.</p><h3>Workarounds and Solutions</h3><p>While Docker versions 20.10.5 to 20.10.7 are affected by this error, there are a few workarounds available to mitigate the issue. Consider the following approaches:</p><h4>1. Modify the APT Configuration</h4><p>Manually modifying the APT configuration can help bypass the problematic script. Within the Dockerfile, add the following line before running the “apt-get update” command:</p><pre>RUN echo &quot;DPkg::Post-Invoke { \&quot;rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true\&quot;; }&quot; &gt; /etc/apt/apt.conf.d/99remove-archives</pre><p>This modification replaces the original script with an alternative one, allowing the update process to proceed without encountering the error.</p><h4>2. Upgrade Docker Version</h4><p>I personally recommend considering upgrading Docker to a version beyond 20.10.11 or the latest one. Docker regularly releases updates and bug fixes, which may include a resolution for the APT-Get Update issue. Check the Docker documentation and release notes for the latest stable version and consider upgrading to mitigate the problem.</p><h4>3. Seek Community Support</h4><p>Last but not least, engage with the Docker community to find potential solutions or workarounds. Docker forums, GitHub issues, or relevant online communities often provide valuable insights and contributions from users who have encountered similar problems.</p><h3>Conclusion</h3><p>The error encountered when running the apt-get update command in Docker versions 20.10.5 to 20.10.7, specifically related to the APT::Update::Post-Invoke script, can pose challenges for users. While it does not directly impact the update process in some cases but it can lead to outdated or conflicting package versions within the APT cache. By implementing the suggested workarounds, to upgrading to a newer Docker version, users can overcome this error and ensure a smooth and reliable package management experience within their Docker environments.</p><p>Remember to stay informed about Docker updates and engage with the community for the latest insights and resolutions to potential issues. Docker remains a powerful tool for containerization, and with proactive troubleshooting, you can harness its full potential for your development and deployment workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88d530a99634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of Periodically Docker System Prune: Streamlining Your Container Environment]]></title>
            <link>https://kuncorowicaksono.medium.com/the-importance-of-periodically-docker-system-prune-streamlining-your-container-environment-f7d2d1c716bf?source=rss-963fba78ab39------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7d2d1c716bf</guid>
            <category><![CDATA[efficiency-tips]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[clean-slate]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Kuncoro Wicaksono]]></dc:creator>
            <pubDate>Fri, 16 Jun 2023 04:28:38 GMT</pubDate>
            <atom:updated>2023-06-16T04:28:38.346Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In recent years, Docker has revolutionized the way software is developed, deployed, and managed by providing a convenient and efficient way to package applications into containers. While Docker offers numerous benefits, such as portability and scalability, it also generates a considerable amount of overhead in terms of storage space.</p><p>Docker containers, images, and other artifacts can accumulate over time, leading to disk space congestion and decreased system performance. To address this issue, Docker provides the <strong>“docker system prune”</strong> command, which allows users to clean up unused resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*_nJTo6NKn3Y8VlJqF2SQGA.png" /><figcaption>sudo docker system prune</figcaption></figure><h3>Problem</h3><p>Have you ever stopped to think about what happens when you create a container, like when you use it as a slave to run your Jenkins job or some automation tasks? Docker goes ahead and creates an image before spinning up the container from that image.</p><p>But here’s the kicker: even after you’re done with the job or automation, those Docker containers and images may still be lingering around. Fast forward to a year later, and suddenly you realize that your storage space is maxed out, all thanks to those forgotten containers and images.</p><p>Sure, you can run <strong>docker system prune</strong> to clean up the mess, but unfortunately, it won’t be able to remove all the unnecessary images or containers since it’s already too late.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJPDrUAU_k2weHBRRvQtbQ.jpeg" /><figcaption>Docker System Prune Periodically</figcaption></figure><h3>Benefits</h3><p>In this article, we will explore the importance of periodically performing Docker system prune and the benefits it offers to streamline your container environment:</p><h4>1. Reclaim Disk Space</h4><p>One of the primary reasons to periodically execute Docker system prune is to reclaim disk space. Docker environments tend to accumulate a vast number of unused containers, images, volumes, and networks over time. These resources consume valuable disk space, potentially causing your system to run out of storage capacity. By running the system prune command, you can safely remove all the unused and dangling resources, freeing up disk space and ensuring your Docker environment remains optimized.</p><p>When Docker containers are created, they generate various artifacts such as container layers, volumes, and networks. These artifacts can accumulate over time, especially when containers are frequently created and deleted. Docker system prune identifies and removes containers that are no longer in use, as well as associated artifacts that are no longer required, thereby recovering valuable disk space. By periodically executing Docker system prune, you can prevent disk space congestion, ensure smoother operations, and avoid the need for manual intervention when storage becomes limited.</p><h4>2. Enhanced Performance</h4><p>As your Docker environment grows and accumulates unnecessary resources, it can negatively impact system performance. Docker relies on various data structures to track containers, images, and networks. The larger these data structures become, the slower Docker operations such as container creation, image pulls, and network management can become. By regularly executing Docker system prune, you can maintain a lean and efficient container environment, leading to improved performance and faster operations.</p><p>When Docker performs operations such as listing containers or images, it needs to traverse the data structures that store metadata about these resources. The larger the data structures, the more time it takes Docker to search and retrieve the required information, resulting in slower performance. By removing unused containers, images, volumes, and networks, Docker system prune reduces the size of these data structures. This leads to faster operations and more efficient resource management within your Docker environment. Regularly performing Docker system prune helps ensure optimal performance, especially when working with large-scale container deployments.</p><h4>3. Security and Compliance</h4><p>Unused and outdated containers and images can pose security risks. Older versions of software might contain known vulnerabilities that can be exploited by malicious actors. By performing a system prune, you remove these outdated components, reducing the attack surface and enhancing the security of your Docker environment. Additionally, if you are subject to compliance regulations, keeping your Docker environment free from unnecessary and potentially insecure resources can help you meet the required standards.</p><p>Security is a critical aspect of any container environment. Over time, containers and images can become outdated, and maintaining them without proper monitoring can introduce security vulnerabilities. Docker system prune removes unused containers and images, reducing the chances of running outdated software versions that might have known vulnerabilities. By eliminating these potential security risks, you enhance the overall security posture of your Docker environment.</p><p>Furthermore, compliance regulations often require organizations to maintain a secure and up-to-date software environment. By regularly performing Docker system prune, you ensure that your Docker environment is free from unnecessary and potentially insecure resources. This practice helps you meet the compliance standards and maintain a robust security framework.</p><h4>4. Simplified Development and Testing</h4><p>During the development and testing phases, developers often create multiple containers and images for experimentation and debugging purposes. Over time, these resources can accumulate and clutter your Docker environment. By periodically running Docker system prune, you can reset your environment to a clean state, removing any artifacts from previous development iterations. This practice ensures that you have a fresh starting point for each development or testing cycle, streamlining your workflows and preventing potential conflicts between old and new resources.</p><p>When working on software development or testing, it is common to create multiple containers and images to explore different configurations or test various scenarios. However, as the development process progresses, these containers and images can become obsolete, consuming disk space and potentially causing conflicts with newer versions. Docker system prune allows you to remove these unused resources, providing a clean and organized environment for development and testing activities. By eliminating the clutter, you can focus on the current development cycle and avoid potential issues that may arise from conflicting or outdated resources.</p><h4>5. Efficient Resource Utilization</h4><p>Docker containers are designed to be lightweight and ephemeral. However, if not managed properly, they can consume significant amounts of resources, including CPU, memory, and disk space. By employing Docker system prune on a regular basis, you can eliminate unused containers and images, optimizing resource allocation. This proactive approach helps you make the most of your available resources and prevents unnecessary strain on your system.</p><p>When containers are created, they consume system resources such as CPU and memory. Over time, as containers are created and removed, some resources may remain allocated even if they are no longer in use. Docker system prune identifies and removes these unused containers, ensuring that system resources are efficiently utilized. By reclaiming resources from unused containers and images, you can allocate them to other critical tasks, improve overall system performance, and reduce wastage.</p><h3>Conclusion</h3><p>Periodically executing <strong>docker system prune</strong> in your docker container is <strong>crucial</strong> for maintaining a well-organized and efficient container environment. By reclaiming disk space, enhancing performance, improving security, simplifying development and testing, and optimizing resource utilization, Docker system prune helps streamline your operations and ensures a smooth experience with Docker.</p><p><strong>Make it a routine practice to periodically clean up your Docker environment</strong>, and enjoy the benefits of a lean, secure, and high-performing container ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7d2d1c716bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>