<?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 Rifqi Farel Muhammad on Medium]]></title>
        <description><![CDATA[Stories by Rifqi Farel Muhammad on Medium]]></description>
        <link>https://medium.com/@rifqifarel222?source=rss-8ded6d047113------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*za9kr1DS2nlDJAMp</url>
            <title>Stories by Rifqi Farel Muhammad on Medium</title>
            <link>https://medium.com/@rifqifarel222?source=rss-8ded6d047113------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:49:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rifqifarel222/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[Get Closer to Product Validation: A Simple Approach to Building Successful Products]]></title>
            <link>https://medium.com/@rifqifarel222/get-closer-to-product-validation-a-simple-approach-to-building-successful-products-5cb739d29d7b?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cb739d29d7b</guid>
            <category><![CDATA[product-validation]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 14:42:14 GMT</pubDate>
            <atom:updated>2024-04-23T14:42:14.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*XPg2lowkgE57mpWl.png" /><figcaption>Image from <a href="https://www.dewsolutions.in/">https://www.dewsolutions.in/</a></figcaption></figure><p>In the application development process, there is an ideation stage where the team actively generates, gathers, validates, and evaluates various ideas to obtain potential solutions to identified problems or needs. This indicates that the entire application originates from just ideas that are then developed and implemented to be used by many people to solve their problems or meet their needs. The application development process can involve many people, which then raises an issue, namely differences in understanding related to the “thing” to be implemented.</p><p>The possibility of differences in understanding not only occurs among application developers but also among users or application stakeholders. Just imagine, the problems or needs of various users and stakeholders need to be combined and brought to the developer team for further discussion to find the best solution to be implemented. Based on this case, it is evident that there are many possibilities for differences in understanding of the product to be created. This is where the importance of the concept of “product validation” lies.</p><p>In this article, I will share my experience in implementing the concept of product validation in my team, CirrhoCheck, to demonstrate to you how important product validation is.</p><h4>What is product validation?</h4><p>Product validation is the process of ensuring that the product being developed meets user needs and can solve user problems. Product validation can be done by collecting, testing, and evaluating feedback from users. The main goal of product validation is to ensure that all changes are acceptable and meet user expectations.</p><h4>Key components of product validation</h4><p><strong>1). Idea generation and refinement</strong></p><p>As I mentioned at the beginning of the article, sparks of ideas that will be refined to become solutions to a problem signal the start of the application development journey. Yes, the ideas that arise initially are raw materials that need to be processed further through refinement and validation of ideas, which are then analyzed to obtain a solution to the user’s problem. The team will brainstorm, conduct further research, and create prototypes to refine their ideas — solutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*CifuqlMHY8ODg-hvfc0EQw.png" /><figcaption>CirrhoCheck idea generation (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*kBLzyejHRG3L0dpqDAkr2g.png" /><figcaption>CirrhoCheck idea generation (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*arHP69e0wgM2LmTPhY7Fvg.png" /><figcaption>CirrhoCheck idea refinement (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*1XRmD_IEAxBHw7ZPllZDNA.png" /><figcaption>CirrhoCheck idea refinement (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*0BH5xZ50k3Ps9LSe2kd0Sg.png" /><figcaption>CirrhoCheck idea refinement (in Bahasa)</figcaption></figure><p><strong>2). Pitching and Stakeholder Engagement</strong></p><p>After obtaining good ideas that are suitable for solving problems or meeting user needs, the team will present them to stakeholders to validate whether the team’s ideas can meet user and stakeholder expectations. This is a very important stage, and it must be ensured that there is no miscommunication between both parties, detailed idea validation is necessary. However, presentations also need to be done in an engaging and non-boring way to keep the audience interested in listening to the explanation from start to finish and to ensure that no information is overlooked.</p><p>After the presentation, the team will request feedback from stakeholders to use as material for improving and enhancing the existing ideas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qw0fOk3LbDw6OM9W" /><figcaption>Pitching to the lecturers in sprint planning</figcaption></figure><p><strong>3). Validation with Users</strong></p><p>User validation is the most important component of product validation. User validation needs to be done as detailed and as much as possible to ensure that the product truly meets the needs and desires of users. The team needs to solicit feedback from users through various forms, such as interviews, surveys, prototype testing, and usability studies, which will then be collected and analyzed to evaluate the existing ideas — solutions. User validation should be done from the beginning to the end so that the team can always be up-to-date with user needs and adjust ideas — solutions to always meet user needs until the application is fully developed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQFY51i0w1UdDpZkV1Glhg.png" /><figcaption>User validation (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*XU8TqMaY33vrk0HWmIfzdA.png" /><figcaption>User validation (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*ZXsSllhp5GRZGjcpz90SBw.png" /><figcaption>User validation (in Bahasa)</figcaption></figure><h4>Tips and tricks for successful product validation</h4><ol><li><strong>Applying Agile principles</strong>: Product validation needs to be done iteratively and continuously to ensure that the developed product can consistently meet the needs and expectations of users and stakeholders throughout the development process. Therefore, each time the product validation process is carried out, it needs to be made as fast and reliable as possible to maximize and maintain the effectiveness of the product validation process (iterations and quick adjustment of needs).</li><li><strong>Excited about feedback</strong>: Feedback is not a negative thing, on the contrary, it can drive continuous improvement and learning. Active communication and collaboration among team members, stakeholders, and users are signs that the product is being developed to fully meet user needs. Therefore, feedback needs to be encouraged so that the product can always be improved (in my opinion, there is no such thing as an end in the product development process).</li><li><strong>Always rely on data</strong>: If you want to validate, then validate using data, not expectations or anything else. Collect feedback from users and stakeholders as much as possible and turn that feedback into qualitative and quantitative data that can be used to develop the product. Use this data as the primary basis for product improvement and development.</li></ol><h3>Conclusion</h3><p>Essentially, ideas in the product development process are raw materials that can become two things depending on how we process them, either gold that generates a lot of profit or a disaster that will make things difficult and harmful. Therefore, ideas must be processed correctly and carefully. Conducting product validation, such as idea validation and being excited about feedback, can help us navigate uncertainty and the possibility of idea failure. Always involve users and stakeholders from the beginning to the end of the product development process to maintain the quality of ideas and products to meet the needs and desires of users and stakeholders.</p><h4>References</h4><ul><li><a href="https://rubygarage.org/blog/product-validation-guide">How to Validate a Product: Steps to Validating a New Product (rubygarage.org)</a></li><li><a href="https://qualitance.com/blog/how-to-validate-your-product-idea-in-5-steps/">How to validate your product idea in 5 steps — QUALITANCE</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cb739d29d7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CirrhoCheck Design System: Enforcing Brand Identity Through Visual Consistency]]></title>
            <link>https://medium.com/@rifqifarel222/cirrhocheck-design-system-enforcing-brand-identity-through-visual-consistency-639861e8ff77?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/639861e8ff77</guid>
            <category><![CDATA[design-system-ui]]></category>
            <category><![CDATA[design-system-tips]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 08:18:50 GMT</pubDate>
            <atom:updated>2024-05-06T17:07:51.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TgChvRBc7k63iS8t" /><figcaption>Image from author</figcaption></figure><p>Some might think that creating a design system is complicated and time-consuming, but actually, with a design system in place, consistency becomes much easier to achieve, and product development can be scaled and adapted more easily. Additionally, having a design system accelerates the process of creating prototypes and UI designs since the rules and guidelines are already established.</p><p>Design systems are continuously developing collections of reusable components, principles, and guidelines that provide designers and engineers with a common framework for consistent product and web design (Web flow). Here are the tips on creating them.</p><ul><li>Get feedback from stakeholders and teams. Before creating the design system, you need to know first about the requirements of the product, what it is for, the target users, the goals of the product, what the client wants, etc.</li><li>Define your design language, choose your overall design system that includes guidelines for color palettes, typography, illustrations, etc.</li><li>Provide examples of usage</li><li>Update, iterate, once you use it and try to test it, sometimes your design system needs to be updated.</li></ul><p>This article will elaborate on how I developed the CirrhoCheck design system and its implementation within the project.</p><h4>UI Library / UI Kit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*oVrR1KXenFUMgcXI" /><figcaption>Chakra UI</figcaption></figure><p>To streamline development, CirrhoCheck employs the Chakra UI Kit for its user interface design. This choice is driven by several factors, including Chakra UI’s comprehensive and well-known documentation, which aids in quick learning and application. Additionally, Chakra UI is highly compatible with the React framework, making it a convenient option for developers who can integrate and use the toolkit directly within their projects.</p><p>However, to ensure that the UI elements align with CirrhoCheck’s branding and aesthetic, we have customized the Chakra UI components according to our style guidelines. This customization allows us to maintain brand consistency across the application while benefiting from the efficiency and functionality of using a pre-built UI kit. This approach not only accelerates the development process but also ensures that the user interface remains true to the CirrhoCheck brand identity.</p><h4>Component Library</h4><p>The project utilizes a comprehensive component library that features a couple interfaces elements. This includes, but is not limited to, inputs, buttons, navigation bars, cards, modals, and calendars. These components are integral to the design and functionality of the application, providing the building blocks for creating a seamless and interactive user experience. Each component is designed to fulfill specific user interface requirements, ensuring that the application is both functional and aesthetically pleasing. The components also follow CirrhoCheck’s style guide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*3B34pigaOE6yC6c1" /><figcaption>CirrhoCheck component library</figcaption></figure><p>Every component in the library, including the calendar mentioned, is interactive and features various states. These states allow for dynamic user interactions, such as selecting dates, highlighting, which enhance the user experience and make it easier for developers to translate it into codes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/0*qGhr22vVKYbn5NV3" /><figcaption>Interactive calendar design</figcaption></figure><p>Other than the benefits mentioned, this will make prototype and designing easier, and that will lead to presenting to clients a lot easier.</p><h4><strong>Icon Library</strong></h4><p>For the icons within the application, CirrhoCheck utilizes the react-icons library. This decision is made for several reasons. Firstly, react-icons offers a wide array of consistent and standardized icons, which adhere to general icon conventions. This consistency helps maintain a uniform appearance and feel across the user interface.</p><p>Additionally, using react-icons simplifies the development process. It integrates seamlessly with React, allowing developers to easily import and use icons as React components. This integration streamlines the workflow and reduces the complexity of managing various icon files, making it more straightforward and time-efficient for developers to implement and maintain the icons throughout the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*kfITwZdaMnPVkjae" /><figcaption>React Icons</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*GD56cvqYcSIzJJLU" /><figcaption>React Icons</figcaption></figure><h4><strong>Brand Style Guide</strong></h4><p>The style guide, which includes typography and color palette, serves as the foundation for all components and UI designs in CirrhoCheck. Adhering to this brand style guide is essential for maintaining consistency across the platform, and it simplifies and accelerates the work process for the design team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/0*cgJccdF4Kg6a5VCd" /><figcaption>CirrhoCheck color palette</figcaption></figure><h4><strong>Color Meaning</strong></h4><p>The color palette of CirrhoCheck features several shades, including neutral tones like white, gray, and black, each with varying hues. White has been chosen as the primary color to facilitate a light mode aesthetic, while blue serves as the secondary color. This selection is strategic, aiming to convey a medical look and feel, aligning with CirrhoCheck’s goal of supporting the medical community. White is often associated with medical environments, evoking a sense of cleanliness and precision, which are pivotal in healthcare settings. Similarly, blue is frequently linked with the medical field and is celebrated for its psychological effects, including promoting feelings of credibility, trust, knowledge, professionalism, cleanliness, calmness, and focus. These qualities, as highlighted by doctor multimedia, are precisely what CirrhoCheck aims to embody and communicate through its application design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*-exVo1F7ZoUcEHft" /><figcaption>CirrhoCheck logo</figcaption></figure><h4><strong>Logo Meaning</strong></h4><p>A logo is a graphical element that encapsulates and represents a brand’s identity, effectively conveying its essence at a glance. Given its pivotal role as the first point of visual contact between a brand and its audience, it is crucial to design a logo that serves as an excellent representative of the brand. This ensures that the initial impression is both impactful and aligned with the brand’s values and message.</p><p>According to Victor Adîr, George Adîr, and Nicoleta Elisabeta Pascu in their 2014 article, logos can be categorized into three typologies: iconic (which involves graphic representations), logotype (which involves words or letters), and complex logos (which incorporate both elements). For CirrhoCheck, we have chosen a complex logo design that includes both the initials of “CirrhoCheck” and a graphical symbol.</p><p>The same article also outlines several criteria that contribute to the effectiveness of a logo, stating that a good logo should be simple, relevant, distinctive, memorable, adaptable, reproducible, legible, and coherent. CirrhoCheck’s logo is designed with these qualities in mind. It aims to be easily recognizable due to its simplicity and visual appeal. Additionally, it strives to be relevant and coherent, aspects that I will detail later with regards to the symbolism and meaning embodied in the logo. This combination ensures that the logo not only captures attention but also clearly communicates CirrhoCheck’s brand identity and values.</p><p>The logo of CirrhoCheck is designed to align with the color palette and the overarching theme of the brand. It employs the same colors for a cohesive look that instantly communicates its medical purpose. When someone sees the CirrhoCheck logo, it is immediately apparent that it represents a medical app, designed to assist individuals within the healthcare sector. The logo incorporates the initials of CirrhoCheck, enhancing brand recognition.</p><p>Moreover, the logo is characterized by sharp edges. This design choice is intentional, reflecting the precision and professionalism that is critical in the medical field. These sharp edges symbolize the focused and attentive care required in healthcare services, underscoring the app’s dedication to supporting those in need of medical attention. This design effectively conveys the values and sharp focus that are essential in medical practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/0*0m-g2plpGNJ71rsj" /><figcaption>CirrhoCheck logo and font family</figcaption></figure><p>For the typography, CirrhoCheck utilizes the Poppins font family to achieve a clean and simple aesthetic within the application. Poppins is chosen for its excellent readability, which is crucial for ensuring that information is easily accessible and digestible for users. Moreover, this font also carries a sense of class and aesthetic appeal, enhancing the overall user experience by balancing functionality with style. The choice of Poppins supports the application’s objective of presenting medical information in a manner that is both professional and visually pleasing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*_b8QL57BkFHFE7cq" /><figcaption>CirrhoCheck illustrations</figcaption></figure><p>Illustrations used in the CirrhoCheck, which we get from free platforms. These illustrations describe medical activities.</p><h4><strong>Content Guideline</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*YRAQZLFrDsL8vWF6" /><figcaption>CirrhoCheck language setting feature</figcaption></figure><p>This section outlines the guidelines for language or textual content, which can significantly influence the overall tone depending on its application. In CirrhoCheck, English is the default language to ensure consistency and to meet the needs of our primary audience. However, based on client requests, we have added an option for users to choose between two languages: Bahasa and English, allowing them to select the language they prefer.</p><h4><strong>In Development</strong></h4><p>Here is the final project where the guideline already used in the website development:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xYrmN5AlFsbRpJXEKD7QQ.png" /><figcaption>CirrhoCheck Login Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qHXj-rD2Zm-PxkkNmydJzQ.png" /><figcaption>CirrhoCheck Home Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jh2f-81taWja-cb9VbbW3Q.png" /><figcaption>CirrhoCheck Calculator Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FVdgfCcBY2p2QdBS4KyAQ.png" /><figcaption>CirrhoCheck Calculator Page (Confirmation Modal)</figcaption></figure><h3>Conclusion</h3><p>Design is the personality and identity of an application. A design with distinct characteristics and high consistency will make the application easily remembered by users. To maintain design consistency, creating a design system is highly recommended. Although it requires more time for design, the positive effects resulting from the creation of a design system are very useful for improving the quality of the application’s design. Additionally, ensure that there is meaning behind each design to further convey a distinctive impression in the design.</p><h4>References</h4><ul><li><a href="https://doctormultimedia.com/medical-logos-blue/">https://doctormultimedia.com/medical-logos-blue/</a></li><li><a href="https://webflow.com/blog/design-systems">https://webflow.com/blog/design-systems</a></li><li>Adîr, V., Adîr, G., &amp; Pascu, N. E. (2014). How to design a logo. <em>Procedia — Social and Behavioral Sciences, 122, 140–144</em>. <a href="https://doi.org/10.1016/j.sbspro.2014.01.1316">https://doi.org/10.1016/j.sbspro.2014.01.1316</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=639861e8ff77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring the Capabilities of Modern Software Monitoring Platforms]]></title>
            <link>https://medium.com/@rifqifarel222/exploring-the-capabilities-of-modern-software-monitoring-platforms-2cc77274619d?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cc77274619d</guid>
            <category><![CDATA[sentry]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[monitoring-tools]]></category>
            <category><![CDATA[monitoring-software]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 20:16:07 GMT</pubDate>
            <atom:updated>2024-05-12T12:33:45.031Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tp4W7kQxfrrDBo9pI91IOA.jpeg" /><figcaption>Image from <a href="https://www.manageengine.com/">https://www.manageengine.com/</a></figcaption></figure><p>As a software engineer, we are required to build good and bug-free software. There is a long process that needs to be passed to achieve this, such as creating a Product Requirements Document and System Design Specification, determining the process model and implementation approach to be used, implementation (I highly recommend applying TDD here), testing, and monitoring. In this article, I will further discuss the monitoring stage and share my experiences in monitoring our software, CirrhoCheck.</p><h3>What is software monitoring and why is it important?</h3><p>Software monitoring is the process of collecting real-time data metrics of a software in production environment. Some examples of metrics collected include the number of requests, the number of responses and average response time, the number of errors and how errors occur, latency (both code latency and database query latency), resource utilization, and software availability. All of this data is gathered and monitored by software engineers to gain insights into the software being developed, particularly in production environment.</p><p>Software monitoring is highly important to determine whether the software that has been completed and deployed in a production environment is functioning properly even when used by many users. It’s not uncommon for cases where software runs smoothly in a development and testing environment but encounters errors or even becomes unusable in a production environment due to various factors, such as the software not being able to handle too much load or encountering errors or corner cases that were not handled during the development or testing process.</p><h3>Monitoring Tools</h3><p>There are many monitoring tools that can be implemented and used easily, such as Highlight.io and Sentry DSN. Our team has conducted research regarding the strengths and weaknesses of these two monitoring tools. Here are the advantages and disadvantages that we can convey.</p><p><strong>Highlight.io:</strong></p><p>(+) Easy to implement and use.</p><p>(+) Being able to store user sessions (user interaction history) is great if you want to implement it on your user side.</p><p>(+) Having many frameworks that can be easily configured.</p><p>(+) There are many external applications that can be integrated, such as webhooks, analytics, product management, etc.</p><p>(-) Having limitations in capturing user sessions and errors for its free plan.</p><p>(-) There aren’t too many built-in tools that can be used.</p><p><strong>Sentry DSN:</strong></p><p>(+) Easy to implement and use.</p><p>(+) Having many frameworks that can be easily configured.</p><p>(+) It has a lot of built-in tools that can be used, such as error monitoring, performance monitoring, profiling, webhook, etc.</p><p>(-) Having limitations in using certain features for its free plan.</p><p>After discussing and considering the strengths and weaknesses of both monitoring tools as well as the needs of our application and team, who are looking for a comprehensive package (with many features) yet easy to access, we have decided to use<strong> Sentry DSN</strong> as our application monitoring tool.</p><h4>A simple tutorial to set up Sentry DSN</h4><p>1). Login or register to Sentry through the following link <a href="https://sentry.io/auth/login/">Sign In | Sentry</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URSjn6xwZgClIX7gNbQu5Q.png" /><figcaption>Sentry login page</figcaption></figure><p>2). Create a new organization for your software. Choose the nearest location from the main region of your software for its Data Storage Location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKxEs8H4cDA2HE9qVF7iPw.png" /><figcaption>Sentry create new organization page</figcaption></figure><p>3). Go to the <strong>Projects</strong> page and create a new project. Choose your software platform. There are many platforms available here, so it’s likely that the platform you use is available (even Rust is available here 😍). In this tutorial, I will provide an example using Django as the platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeQru1zeslQueQu4JOhjFQ.png" /><figcaption>Sentry create new project page</figcaption></figure><p>4). Select the alert frequency according to your needs and enter your project name and your project team, then press the “Create Project” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukwq2Cd1Tl-tKeEx49dPbg.png" /><figcaption>Sentry create new project page</figcaption></figure><p>5). On this page, you just need to follow the tutorial provided by Sentry, and the configuration process will be completed. It’s quite easy, isn’t it? Next, press the button according to what you want to do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VE8klvTqArYesTDvKhWb5Q.png" /><figcaption>Sentry project configuration tutorial page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWKozLLddHmvkuAQ7za48g.png" /><figcaption>Sentry project configuration tutorial page</figcaption></figure><h4>Built-in tools in Sentry DSN</h4><p>In this section, I will discuss the built-in tools from Sentry DSN that we have used and found to be very useful, and we recommend using them in your software.</p><p><strong>1). Project detail page and issue detail page</strong></p><p>On this page, you can view the issues or errors occurring in your application with various additional features, such as filtering, and a user-friendly interface that makes it easy for users to understand the available data.</p><p>In the initial view of the project detail page, we will be presented with several important pieces of information regarding the project, such as the number of releases/deployments, Application Performance Index (Apdex), and failure rate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhMtYUm27Ra4PWdFoXG1zQ.png" /><figcaption>Sentry project detail page</figcaption></figure><p>Furthermore, at the bottom of the project detail page, Sentry displays a list of issues that have occurred. By default, Sentry will show unhandled issues, allowing us to leverage this information for bug fixes or improvements in our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nu_mqYisIUwutR-B4L3Z0Q.png" /><figcaption>Sentry project detail page</figcaption></figure><p>If you click on any of the existing issues, you will be directed to a detailed issue page, which is very useful for developers in bug fixing as it provides detailed information about the issue at hand. Some of the information displayed on this page includes the web domain, web browser, framework or programming language, operating system where the error occurred, as well as the number of error events and affected users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Al-H-kkZT3DfqtDIEr6ig.png" /><figcaption>Sentry issue detail page</figcaption></figure><p>Not only that, Sentry even offers a feature that I find very useful and powerful, which is Sentry can show and even highlight the part of the code that causes the error. Through this feature, we don’t need to debug to find out the cause of the error, thus saving time in fixing errors. Amazing!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8berkZRAwOShoQfO_R-Siw.png" /><figcaption>Sentry issue detail page</figcaption></figure><p>Feeling unsatisfied or unable to fix errors just by looking at the code alone? Don’t worry, Sentry also displays query parameters and the body of the request that caused the error to occur. Not only that, there is still a lot of information related to the request causing the error that you can explore further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVa00XZj2vdqiSj9mR4HZQ.png" /><figcaption>Sentry issue detail page</figcaption></figure><p><strong>2). Dashboard page</strong></p><p>This page provides a variety of widgets that display various metrics visualized effectively so that users can easily understand insights from these metrics. On the dashboard page, we can see the number of events, errors, issues, users impacted by errors, handled and unhandled issues, APIs with the highest throughput, and much more.</p><p>In Sentry, there are several template dashboard options provided by Sentry that can be customized and used directly, such as the General Dashboard, Frontend Dashboard, Backend Dashboard, and Mobile Dashboard. We can also create a custom-designed dashboard (without a template) by pressing the ‘Create Dashboard’ button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRN29FYgEX-_OWrSGHMKfw.png" /><figcaption>Sentry dashboard page</figcaption></figure><p>In the dashboard, there is more comprehensive and detailed information compared to what is available on the project detail page, such as the number of errors and issues, number of handled and unhandled issues, number of transactions, browsers affected by errors (sorted in descending order by the highest count), endpoints with high throughput transactions (sorted in descending order by throughput), and many more. Below is an example dashboard along with its data found in CirrhoCheck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eL3VFySbEkP4kaQs-qd2nA.png" /><figcaption>Sentry general dashboard page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8K1UhntmjhVpGjwKPftyCg.png" /><figcaption>Sentry general dashboard page</figcaption></figure><p><strong>3). Metric page</strong></p><p>This page has functionality similar to the dashboard page, namely visualizing metrics. However, on the dashboard page, the metrics displayed are not very detailed because the focus of the dashboard page is to display various metrics so that users can understand the overall quality of the software they are developing. Meanwhile, the metric page displays a single metric along with its details such as metric value graphs, APIs affecting the metric, and other customizable details manually.</p><p>Here is an example of transaction duration metrics along with sampled events (sorted by the last accessed API time) available in CirrhoCheck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FB9oYL4vhTj-G3hkST5EHw.png" /><figcaption>Sentry metric page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UFxMjl9vfJbCn0qX2rdnag.png" /><figcaption>Sentry metric page</figcaption></figure><p><strong>4). Alerts webhook</strong></p><p>This feature is very useful so that the entire team can always stay up to date on the issues that occur, allowing them to be resolved more quickly. There are various alert settings that can be applied and various platforms that can be selected as the alert delivery platform. In the alert that I created, I set it up so that if an issue is created, an alert will be sent to my team’s Discord with a specific text channel for the alert message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*g0Ednlm1tAg-k782-_0ZkA.png" /><figcaption>Sentry Discord bot sends alert messages to the specified text channel</figcaption></figure><p>How to setup Sentry alert webhook:</p><p>1). Open the integration page in Settings -&gt; Integrations, then select the platform where you want to set up the Sentry Discord bot to send alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IW806_mMnfnUci8ETH8dg.png" /><figcaption>Sentry Integration page</figcaption></figure><p>2). Press the “Add Installation” button and follow the installation process until it’s completed, and the platform you chose will be well integrated with Sentry DSN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BVa-IFcTe7PVi5L2AfrmA.png" /><figcaption>Sentry Discord integration page</figcaption></figure><p>3). Open the alerts page and press the “Create Alert” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Inei79bqK3CNAYKA5-lyLg.png" /><figcaption>Sentry alerts page</figcaption></figure><p>4). Select the type of alert according to your needs and press the “Set Conditions” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xc92x7F_-LH6nhKQrndsDQ.png" /><figcaption>Sentry create alert page</figcaption></figure><p>5). Fill in and adjust the options from all the fields, then press the “Save Rule” button if all the data has been filled in correctly, thus completing the configuration process of the alert webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMGpAWY8T4-X2gdeYI7M_w.png" /><figcaption>Sentry set alert conditions page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ABIKJY_fwEZ6iKZSFfC3tg.png" /><figcaption>Sentry set alert conditions page</figcaption></figure><h4>How Sentry helps me in maintaining the project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*r89t5dosf4XuWZDYAxO2nw.png" /><figcaption>Issue detected by Sentry and sent via alert webhook</figcaption></figure><p>Sentry helps me in finding unhandled errors in CirrhoCheck. As seen in the image above, the webhook alert that I configured previously sent an alert indicating that there is an unhandled value error. I then conducted further analysis to determine the cause of the error and found the following information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnpr8M-AGKX8r3LyelxacA.png" /><figcaption>Code that is causing the issue</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bYfvwstDR0d5_diYuNlDQ.png" /><figcaption>Request query param that is causing the issue</figcaption></figure><p>Based on further analysis, it turns out the error occurred because the code created by my team member did not handle the possibility of query parameter inputs related to dates receiving non-date values, such as ‘null’. As additional information, the API where the error occurred accepts several query parameters that will be converted into dates and decimals. Furthermore, after I opened the code and reanalyzed it, it appears that the code also did not handle the possibility of inputs that should be decimal receiving inputs that are not decimal. Here are the error details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wFE-NQmG0KO2OpwalZHUFQ.png" /><figcaption>Another code that is causing an issue</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yBeNv0dclmbjSAw2Jm96qQ.png" /><figcaption>Another request query param that is causing an issue</figcaption></figure><p>I made changes to the code to handle this issue. Here are the changes I made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*G_2mY-ZOXCyfGCanwZ8thw.png" /><figcaption>Code changes to handle the issue</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*MWolRlcmJH8KTS-n4GV8tw.png" /><figcaption>Code changes to handle the issue</figcaption></figure><p>After fixing, don’t forget to validate by testing the API with the same flow or input that caused the error to occur. If everything is safe, resolve the issue so that other developers know that the issue has been handled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IM-idgAZVa5e6-OlODGK-g.png" /><figcaption>Resolve issue button</figcaption></figure><h3>Google Analytics</h3><p>Google Analytics is a free service provided by Google that allows developers to track and analyze the traffic of their applications’ users. Developers can gather information such as the number of visitors, user behavior, user history, and much more.</p><h4>How to setup Google Analytics</h4><p>1). Open the Google Analytics website (<a href="https://marketingplatform.google.com/about/analytics/">Analytics Tools &amp; Solutions for Your Business — Google Analytics</a>) and then press the “Get started today” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJMs5SQcyx-77LiozCgFwg.png" /><figcaption>Google Analytics in Google Marketing Platform</figcaption></figure><p>2). Setup Google Analytics account and then press the “Next” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x2B-IKE5W2Ivy3nRPXdc0Q.png" /><figcaption>Google Analytics create account page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ohWMvSV9MHEosHKKRtAjfg.png" /><figcaption>Google Analytics create account page</figcaption></figure><p>3). Setup Google Analytics property and then press the “Next” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csv-qUiEYKnW6DEYfWecBQ.png" /><figcaption>Google Analytics create property page</figcaption></figure><p>4). Enter your business software information and then press the “Next” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vb6b5UY25I2yyVpWUgMQwQ.png" /><figcaption>Google Analytics business details page</figcaption></figure><p>5). Select your business software objective and then press the “Create” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ka4UxQhZeSG3lwP6KbJ-5w.png" /><figcaption>Google Analytics business objectives page</figcaption></figure><p>6). A modal terms of service agreement will appear, check the available checkbox and press the “I Accept” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*hrXeDH3Upv1mQWo4p161Ew.png" /><figcaption>Google Analytics terms of service modal</figcaption></figure><p>7). Select your software platform (for this tutorial, I will choose “Web”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zUZpRDeu0ZrRiGWtIUcMg.png" /><figcaption>Google Analytics data collection page</figcaption></figure><p>8). Setup data stream and then press the “Create stream” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TlHV0G6bqLXLhNtA1uGhXA.png" /><figcaption>Google Analytics setup data stream modal</figcaption></figure><p>9). Select the installation method (in this tutorial, I will choose to install manually), then proceed with the installation process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JYVLOdsMoeqnJGUKI6E9KA.png" /><figcaption>Google Analytics installation instructions modal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQjjPRAQmm5G1QagTcz_oA.png" /><figcaption>Google Analytics installation instructions modal</figcaption></figure><p>CirrhoCheck uses NextJS as its frontend framework. Here is an example of the code setup and configuration of Google Analytics in NextJS that I applied in CirrhoCheck. Note: Don’t forget to use environment variables for data that should not be exposed publicly to maintain project security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*iN9bNdf9Zt5JRVM5nO__qQ.png" /><figcaption>Code implementation for installing Google Analytics in Next.js</figcaption></figure><p>10). Validate the setup by typing “dataLayer” in the console. If the displayed output is the same as shown in the following image, then the setup process is complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oM6KuKC8eydHgHIeqOWlkA.png" /><figcaption>Google Analytics setup validation</figcaption></figure><p>For further validation, you can check the Google Analytics dashboard (Report snapshot). For now, there should be at least one user accessing your website. You can also see a lot of other information related to marketing analytics data for your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ugZ-ftxt26QOQHkNv4hzg.png" /><figcaption>Google Analytics dashboard page</figcaption></figure><h3>Conclusion</h3><p>From business perspective, software is expected to be used by many users, which will also increase the workload of the software and increase the likelihood of various activities occurring during software usage, thus increasing the chances of encountering unhandled corner cases during development and testing environments. This is where the role of modern software monitoring platforms, such as Highlight.io, Sentry, and Google Analytics, comes in. They have tremendous capabilities where we can understand and analyze various aspects related to the developed software with one or several tools. Now, developers can easily monitor software in the production environment as if they were monitoring a room using CCTV.</p><h4>References</h4><ul><li><a href="https://www.techtarget.com/searchitoperations/definition/IT-monitoring">What is IT monitoring? | Definition from TechTarget</a></li><li><a href="https://www.prisma.io/blog/monitoring-best-practices-monitor5g08d0b">What is monitoring, how to monitor, and tools for monitoring (prisma.io)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cc77274619d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey Towards Higher Quality People Management]]></title>
            <link>https://medium.com/@rifqifarel222/journey-towards-higher-quality-people-management-7462a8ee27f9?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/7462a8ee27f9</guid>
            <category><![CDATA[people-management]]></category>
            <category><![CDATA[people-person]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 15:27:04 GMT</pubDate>
            <atom:updated>2024-03-24T16:19:03.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T2Xx0kCgceAa0G60.jpeg" /><figcaption>image from <a href="https://miro.medium.com/">https://miro.medium.com/</a></figcaption></figure><p>Working in a team requires many additional aspects that are rarely needed when working individually. Some of these additional aspects include communication, tolerance, empathy, and many more. Working in a team means we will be working with many people and each person has their own traits and characteristics. Therefore, if the team is not managed well and does not encompass all team members, it can lead to conflicts that hinder or even destroy teamwork in developing a product. Hence, in a team, a leader is needed who has the ability to manage teamwork well so that the teamwork process can run better and with better quality. In addition to having a leader with good team management skills, team members who are willing to be organized, open to suggestions and criticisms, and willing to learn are also needed so that the teamwork process can run as expected.</p><p>In this article, I will tell you about the dynamics of my team, CirrhoCheck, as well as my efforts to become a leader who wants to unite and manage the team well. Let’s take a look!</p><h3>People Management</h3><p>People management is a skill in managing human resources and ensuring all their needs to complete their work are met. People management focuses on providing welfare, inspiration, and removing all barriers that hinder all team members from doing their best work so that the team can achieve its goals effectively. So, how can we train and implement people management effectively? According to kitalulus.com, there are 7 key skills in people management.</p><h4>1. Communication and open-minded</h4><p>One fundamental aspect of collaboration is communication, without it, cooperation cannot function. It’s important to remember that for team communication to function effectively, it needs to be two-way. No one should just give orders, and no one should just receive them, they must engage in argumentation and provide feedback during discussions. In other words, the communication referred to here is discussion, and productive discussion requires an open-minded approach from all participants to yield the best outcomes that are acceptable to all involved.</p><p>In the early stages of my team’s formation, there were many people I didn&#39;t know before, and to be honest, I initially felt that my team would fail due to a significant lack of compatibility among its members. However, I didn’t want to let this happen without a fight. I made efforts to create and strengthen relationships and bonds among team members by inviting them to casual conversations, engaging in activities together, and being ready to help whenever a team member faced difficulties (not only during task execution but also in general hardships). Fortunately, I had team members who were communicative, open-minded, and willing to collaborate, thus dispelling my concerns about the team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*J2lG-Ylztd9YcwSZ4qJVDg.png" /><figcaption>Communication in CirrhoCheck (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*-JrnlPeG2bOWjmenzwC8uQ.png" /><figcaption>Helping team members when they face difficulties (in Bahasa)</figcaption></figure><h4>2. Good listener and having empathy</h4><p>As I mentioned earlier, communication here needs to be two-way. Thus, there will be those who speak and those who listen. Therefore, being a good listener becomes an important trait to practice in maintaining team collaboration. Additionally, often we feel the need for empathy when we speak, especially when we experience difficulties, so empathy is also something we need to possess.</p><p>At CirrhoCheck, we always hold regular meetings (standups) every two weeks. This is aimed at providing us with a space to discuss progress, ask questions, and even address any difficulties we may be facing. If there are any questions or difficulties during the standup, we will help each other by answering questions or solving the problems together. Additionally, if a team member cannot attend the standup, they can request permission and provide updates, questions, or difficulties they have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*jnBOPOTu7hlfRK-DdI3iLg.png" /><figcaption>Conversation in inviting for standup and permission for not attending standup (in Bahasa)</figcaption></figure><h4>3. Conflict management and patience</h4><p>Working in a team means we will collaborate with others who may have very different personalities, traits, and characteristics from us. Therefore, conflicts or debates are common occurrences. Although they are normal, it doesn’t mean we can just let them be. As much as possible, conflicts, debates, and emotions should be resolved as quickly as possible with the least escalation possible (not adding to existing tension). Therefore, skills in conflict management and patience are required in people management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*_CzYEp5GcvFtytmj9hVTPw.png" /><figcaption>Discussion about problem-solving related to the deployment process (in Bahasa)</figcaption></figure><p>The conversation above illustrates one of the ways we resolve conflicts. Problem-solving starts by identifying the issue at hand, followed by discussing possible solutions, and finally implementing the problem-solving strategy. One thing I’d like to mention here is that when encountering a problem, initiate a discussion with team members about the issue and how to resolve it, rather than blaming other team members.</p><h4>4. Collaboration and organizational skills</h4><p>When it comes to teamwork, collaborative and organizational skills are crucial to achieve common goals. These abilities are vital to ensure that all parties involved in the teamwork process are engaged without being dominated by one or a few individuals, allowing the resulting product to be more optimal. One way we implement this aspect is by conducting code reviews. Every time we create a merge request, we notify other developers and ask them to review the code additions/changes in the merge request. Since we use Discord as our communication platform, whenever a new merge request is created, we create a new thread to ensure that the discussion for a particular merge request doesn’t get mixed up with others. If there are parts of the code that need to be modified, we notify them through comments on the merge request. If there are aspects of the code that need to be discussed, we have discussions through the thread of the merge request. If all code additions/changes look good, we approve the merge request and appreciate the team member who submitted it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*txHchpCgTmQL0lSqLWvDCA.png" /><figcaption>Creating a thread for each merge request made</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDCvKb0fjjYLHpBlTsppeA.png" /><figcaption>Discussion regarding the code additions/changes made in the merge request (in Bahasa)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*0xC0rQJucJVsaommXXEadA.png" /><figcaption>Providing comments regarding the code additions/changes on the merge request made</figcaption></figure><h4>5. Delegation and trust</h4><p>In my opinion, this aspect is one of the most challenging to implement. Because in this aspect, you are required to entrust tasks to team members, and “trust” is something very valuable and difficult to give to someone. This aspect aims to convey that leaders must have confidence in the potential and abilities of each member and trust that each team member will perform their tasks well. This aspect is essential because through this, every team member will have tasks and contributions in product development.</p><p>At CirrhoCheck, this aspect is implemented through the delegation of tasks related to initial requirement documents and features that need to be developed. The task allocation process is conducted through direct discussions to ensure that everyone is aware of and agrees to the tasks they receive. Each person can directly choose the task they want to work on. If there is someone who does not have a specific preference, the task delegation process is done by randomly selecting a task for them to work on. The results of the task allocation are recorded in our group meeting notes and Linear scrum board.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*PjF8zRgWAA6jemR6JoVgzw.png" /><figcaption>Task allocation results recorded in the group meeting notes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*anaXaa5VM8dMtC1dktp9eg.png" /><figcaption>Task allocation results recorded in the Linear scrum board</figcaption></figure><h4>6. Flexibility and recognition</h4><p>In implementing people management, we must understand and accept that there is not only one way to complete a task or solve a problem. Thus, recognition from all team members is needed if there are issues in completing tasks or problems, and leaders must be flexible to change the resolution plans. One implementation of this aspect in our team is changing the schedule of regular meetings (standups) because some of our team members are unable to attend the scheduled standup time set previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*Q1uc0aQEvHMdQQoYO59Z7Q.png" /><figcaption>Discussion regarding the change in standup schedule (in Bahasa)</figcaption></figure><h4>7. Leadership spirit and adaptation</h4><p>Lastly, it is only fitting for a leader to possess leadership spirit, as through this, all subordinates will perceive their leader as someone worthy to lead them. Since not everyone is born with leadership talent, a process is required to enhance leadership spirit. The process can start with small things like more frequent motivation and encouragement or providing advice to subordinates, always being present when subordinates need a leader figure, and so on. Often, a leader cannot immediately implement this because they are not used to doing so, so the leader requires a quick and flexible adaptation process to become the leader expected by their subordinates as soon as possible.</p><p>One of my implementations in applying this aspect is striving to be a leader figure in my team. As I mentioned earlier in the article, I tried to prevent the mismatch in my team from happening just like that. Of course, this was not easy for me because I still lacked experience in leadership. However, I forced myself to adapt to the situation so that my team could be more solid as it is now.</p><h3>Conclusion</h3><p>People management is one of the most important aspects of working in a team. It can create a good and comfortable working environment, thus enhancing the productivity of all team members and the quality of teamwork to become more solid. To implement a good people management process, all team members need to be involved because it requires as much support as possible to meet expectations.</p><h4>References</h4><ul><li><a href="https://www.betterup.com/blog/what-is-teamwork">What Is Teamwork and Why Does It Matter? (betterup.com)</a></li><li><a href="https://www.learnerbly.com/articles/what-is-people-management">What Is People Management, and Why Is It so Important? (learnerbly.com)</a></li><li><a href="https://www.kitalulus.com/blog/bisnis/people-management-adalah/?source=post_page-----73bd075fd069--------------------------------">Pengertian People Management, Tujuan, dan Skill yang Wajib Dimiliki — KitaLulus</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7462a8ee27f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Test-Driven Development (TDD): Path to Minimizing the Bugs]]></title>
            <link>https://medium.com/@rifqifarel222/test-driven-development-tdd-path-to-minimizing-the-bugs-3f7711f4f060?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f7711f4f060</guid>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[tdd]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Fri, 22 Mar 2024 22:04:39 GMT</pubDate>
            <atom:updated>2024-05-15T09:55:10.376Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*nJ2QGFeHMWvcLdgK" /><figcaption>image from <a href="https://th.bing.com/">https://th.bing.com/</a></figcaption></figure><p>Test-Driven Development (TDD) is one of the testing approaches that is very different from traditional testing. In traditional testing, the flow involves writing the code =&gt; writing the test =&gt; testing =&gt; refactoring. Whereas, TDD has a flow consisting of writing the test (which will surely fail) =&gt; writing the code =&gt; testing =&gt; refactoring. Thus, the most noticeable difference is when we write unit tests and code.</p><p>Because in TDD there is a phase where we create unit tests that are guaranteed to fail and write code to make those unit tests pass, TDD follows the Red-Green-Refactor cycle. The Red phase involves creating unit tests, the Green phase involves creating code implementations to make the unit tests pass, and Refactor is the phase of making changes or adjustments to both the unit tests and code implementations. In this article, I will describe how I apply TDD with the Red-Green-Refactor cycle in my current project — CirrhoCheck.</p><h4>RED (All unit tests fail)</h4><p>In this phase, I create a skeleton function that will process requests to the API I will implement, and I create unit tests that cover all possible positive cases, negative cases, and edge cases. Through this approach, we can ensure that the code implementation we are going to make is well-tested and functionally correct. In other words, TDD encourages us to create code implementations based on unit tests, rather than creating unit tests based on code implementation.</p><p>Actually, there are several ways to implement TDD and this RED step, but at least this is the way I applied it in our project, CirrhoCheck. As mentioned above, the first step to be taken in this phase is to create a skeleton function service (response processor) that is already connected to the controller framework you are using so that the API can be hit but does nothing, just returns an empty response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgaR2iVeFc8r2enS5Aml8A.png" /><figcaption>Skeleton function for the Change Password API</figcaption></figure><p>The second step is to create unit tests to test the API to be implemented. It is necessary to ensure that the unit tests cover all cases. Make sure that no cases are left unhandled in the unit tests created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5DI7BCEKnZnNfYOU8_Vkg.png" /><figcaption>Unit tests I have created for the Change Password API</figcaption></figure><p>Finally, commit and push all the changes made, and ensure that the pipeline (especially the job to run unit tests) is running.</p><p>Note: If you don’t have a job script to run unit tests in your CI/CD yet, I’ll provide an example CI/CD script for unit tests that I use in my project at the end of the <strong>Refactor</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*VL3Mh86C5YmR8MEvYBDvyQ.png" /><figcaption>Failed pipeline</figcaption></figure><p>As you can see, because we haven’t created the code implementation yet, the tests didn’t pass during the pipeline run. Due to this, the pipeline will fail and displaying a red cross icon. This is why this phase is called the “Red” phase.</p><h4>GREEN (All unit tests pass)</h4><p>During this stage, I implement all the necessary code, functions, and classes. This process uses the skeleton function created in the ‘Red’ phase as its foundation. This phase is considered complete when all unit tests have passed, and the pipeline turns green again. Because we focus on making the function produce the response as specified in the unit test, we ensure that the processes within the function operate as desired.</p><p>Here is an example of my commit that refines or continues the implementation of the skeleton function previously created in the RED phase. Ensure that the implementation of the API has passed all the existing test cases (which were also created in the RED phase). Tip: you can run the script that executes unit tests and calculates coverage in your CI/CD script locally here to ensure everything is okay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siA-xuy1Am_8XP3YMMVh0g.png" /><figcaption>Implement Change Password API</figcaption></figure><p>After all implementations are completed and the implementation passes all existing unit tests, commit and push the changes made. You will see that the pipeline will pass and display a green checkmark icon. This is why this phase is called the “Green” phase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*un20hbyMkH72UzO1XgJYCw.png" /><figcaption>Passed pipeline</figcaption></figure><h4>Refactor</h4><p>You might wonder why there’s a “Refactor” phase when all implementations have passed testing. I’ll try to explain using a case I’ve encountered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BLlLlj0BX70VQ6wvDq7f-A.png" /><figcaption>Optimize and fix N+1 query</figcaption></figure><p>Based on the code snippet above, there is a query to retrieve a user based on the id present in the prediction object on lines 176–180, but another query related to the user is performed again on line 188, which is a query to retrieve the full name of the user. These two queries result in the N+1 problem (repeated or unnecessary additional database queries leading to unnecessary cost increase), hence optimization is needed to improve the application’s quality. This is the usefulness of the refactor stage, as in this stage, we can optimize or improve the code to make the application more efficient and robust. Therefore, I performed a refactor to eliminate the N+1 problem. Since the refactor stage is only about optimization and improvement, the pipeline should run smoothly (pass). This becomes one of the advantages and goals of TDD, which is to help ensure that changes made do not alter the correctness of the existing implementation.</p><p>Additionally, there is a possibility that the unit tests created in the “Red” phase may not be sufficient to cover the entire code implementation. Therefore, in this phase, don’t forget to check the code coverage. Ensure that the code coverage has a high value. In my case, I ensure that the code coverage of my project is 100% to minimize the occurrence of bugs or issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*C6l9kYTWlwC8akcFQ-1tpg.png" /><figcaption>Code coverage</figcaption></figure><p>Do you find it troublesome to check code coverage every time you make changes (refactoring)? If yes, you can use static analysis tools like Sonar (such as SonarQube, SonarCloud, etc.) to check the code coverage of your project. Not only code coverage, but it also analyzes and provides insights into the overall quality and reliability of the program. You can integrate Sonar with CI/CD so that the analysis process is performed automatically every time you commit-push (continuous integration), and you can easily check code coverage, quality, and reliability of the program all in one tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*KOyvV_n9cvmSBvCT9Q01MA.png" /><figcaption>Code coverage, quality, and reliability of the program on SonarQube</figcaption></figure><p>Here is a snippet of our CI/CD project, CirrhoCheck, which integrates Sonar and automated testing.</p><pre>UnitTest:<br>  image: python:3.10-slim<br>  stage: test<br>  before_script:<br>    - export DB_NAME=$DB_NAME<br>    - export DB_USER=$DB_USER<br>    - export DB_PASSWORD=$DB_PASSWORD<br>    - export DB_HOST=$DB_HOST<br>    - export DB_PORT=$DB_PORT<br>    - export SECRET_KEY=$SECRET_KEY<br>    - pip install -r requirements.txt<br>    - python manage.py makemigrations<br>    - python manage.py migrate<br>    - pip install coverage-badge<br>  script:<br>    - coverage run manage.py test -v 2<br>    - coverage report <br>    - coverage xml <br>    - coverage-badge -o coverage.svg<br>  coverage: &#39;/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/&#39;<br>  artifacts:<br>    paths:<br>      - coverage.xml<br>      - coverage.svg<br>    reports:<br>      coverage_report:<br>        coverage_format: cobertura<br>        path: coverage.xml<br>  only:<br>    - development<br>    - /(?i)PBI-.*/<br>    - /(?i)feat.*/<br>    - /(?i)fix.*/<br><br>SonarScanner:<br>  image: sonarsource/sonar-scanner-cli:latest<br>  stage: sonarqube<br>  dependencies:<br>    - UnitTest<br>  script:<br>    - sonar-scanner <br>      -Dsonar.projectKey=$PROJECT_KEY<br>      -Dsonar.host.url=https://sonarqube.cs.ui.ac.id <br>      -Dsonar.login=$SONAR_TOKEN<br>  only:<br>    - development<br>    - /(?i)PBI-.*/<br>    - /(?i)feat.*/<br>    - /(?i)fix.*/</pre><h4>Error Monitoring</h4><p>To maximize the security and robustness of the code, we can integrate the application with an error monitoring platform. Through error monitoring, we can identify any bugs that have not been handled by the code, thus making the application more bug-free. In CirrhoCheck, we use Sentry as the error monitoring platform. You can read more about Sentry in the following article: <a href="https://medium.com/@rifqifarel222/exploring-the-capabilities-of-modern-software-monitoring-platforms-2cc77274619d">https://medium.com/@rifqifarel222/exploring-the-capabilities-of-modern-software-monitoring-platforms-2cc77274619d</a>. Here are examples of errors in CirrhoCheck that are caught by Sentry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E0c99xGhgMAGcbOC3m2zgg.png" /><figcaption>Issues Page</figcaption></figure><p>In Sentry, we can also see the details of each issue. In the issue detail page, we can find out the path of the issue occurrence and the code section that caused the issue to happen. Additionally, we can see the IP address, browser, framework/programming language, and operating system most used by the user experiencing the issue. And not only that, there are still many details related to the issue that can be seen on this issue detail page. Amazing! So powerful.</p><p>Here is a snippet of the detailed issue present in CirrhoCheck and has been resolved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBjlxRxgfyNC1rA7rjtvwA.png" /><figcaption>Issue Detail Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*62KOvs-TC0mzyC7gb4D1UQ.png" /><figcaption>Issue Detail Page</figcaption></figure><h3>Conclusion</h3><p>TDD emerges as a solution to the common challenges in software development, that is ensuring that implementations align with the initial plans, minimizing bugs and issues, and maintaining implementation correctness despite code changes. Additionally, TDD enforce us to develop implementations following predefined paths and constraints, namely the unit tests created initially. Through TDD, the development process can be carried out more efficiently, safely, and easily, resulting in improved software quality and client satisfaction.</p><h4>References</h4><ul><li><a href="https://www.geeksforgeeks.org/test-driven-development-tdd/">Test Driven Development (TDD) — GeeksforGeeks</a></li><li><a href="https://katalon.com/resources-center/blog/what-is-tdd">A Full Guide To Test-driven Development (TDD) With Examples (katalon.com)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f7711f4f060" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being Aware of Program Quality for Continuous Development]]></title>
            <link>https://medium.com/@rifqifarel222/being-aware-of-program-quality-for-continuous-development-00585347b656?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/00585347b656</guid>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[sonarqube]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Sat, 16 Mar 2024 22:46:51 GMT</pubDate>
            <atom:updated>2024-05-26T13:07:56.804Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgfCCK_jEmELDYAb-c9PBQ.jpeg" /><figcaption>image from <a href="https://www.smartsheet.com/">https://www.smartsheet.com/</a></figcaption></figure><blockquote>This article will discusses several best practices that can be applied to maintaining program quality, which will then be validated through static analysis, without delving into detail on why program quality is important to implement.</blockquote><p>Ensuring high program quality is a best practice in product development that software engineers should prioritize. Maintaining program quality ensures that our programs remain minimal in bugs, errors, and code smells. Additionally, by maintaining program quality, program maintenance can be easily carried out.</p><h3>Best Practices in Maintaining Program Quality</h3><h4>1. Reduce code smell and comment</h4><p>FYI (if you don’t already know), a program can still run even if it has code smells. However, the program may not run optimally because code smells can increase the risk of bugs and program failures. This can happen because code smells refer to code that has problems or shortcomings in design or implementation. Therefore, it’s important to reduce or even eliminate code smells from the program to maintain program robustness.</p><p>Code smells can be reduced by refactoring and applying design patterns as well as best programming practices. One of the best programming practices I often use is the <strong>Don’t Repeat Yourself (DRY) principle</strong>. This principle emphasizes avoiding code duplication and encourages developers to create modular, reusable, and maintainable code. Here is an example of implementing DRY and other best practice programming in Next.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*1Mf4AFplfpNRWjnPA10eHQ.png" /><figcaption>The function useApi which contains custom HTTP fetch</figcaption></figure><p>Based on the example above, I created a function called useApi that contains custom HTTP fetch integrated with authentication. Additionally, there is a isLoading variable directly linked to the HTTP fetch process status, where it&#39;s true when sending a request and waiting for a response, and false otherwise. The base URL is also integrated into this function, which retrieves its value from the environment variables. So, if I or my team members need to send an HTTP request, we can directly use this function, which provides all the necessary elements for sending requests and receiving responses, and some attribute values ​​can also be added to adjust to our needs. Through this function, I have applied the <strong>DRY principle</strong> and the <strong>open/closed principle</strong>.</p><p>Furthermore, in the example above, it can be seen that I use the environment variables to store confidential data that is used globally. This can enhance the security and flexibility of the program because the confidential data remains protected and can be easily modified if needed. Moreover, in the useApi function, there is no usage of comments at all. Despite the absence of comments, my code remains easily understandable because I strive to make my code readable by applying the concept of clean code. So, just focus on <strong>implementing clean code</strong>, and <strong>your code will be your comment</strong>.</p><h4>2. Active in testing the program</h4><p>I highly recommend implementing unit tests integrated with CI/CD and conducting functional testing. Unit tests help us validate that all units within the program are working as expected and have handled all possible cases. If we make changes to the code, unit tests also help us check that the changes do not alter the program’s correctness. Unit tests integrated with CI/CD also make it easier for us to validate further, as we may forget to check the correctness of unit tests, and inform other developers that all units continue to function as expected and the changes are safe to use and deploy. Meanwhile, functional testing can be conducted by performing User Acceptance Testing (UAT) to validate whether all features run and integrate well. Below are examples of unit tests and UAT in CirrhoCheck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*ihnAkph7oPkzzIajeOiPvg.png" /><figcaption>Functional tests integrated with CI/CD (automated testing)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*fw9_bQNx3_zJh4dNabdkEA.png" /><figcaption>UAT test case (using Bahasa as the language)</figcaption></figure><p>We can also open the program and use it as if we are the users of our program to validate that the entire program, including program UI and program flow, is ready to be used by the user. Because there may be newly discovered issues or improvements that come to mind when we do this.</p><h4>3. Utilize the CI/CD</h4><p>I feel that many developers are still unaware of the power of using CI/CD in continuous program development. Through CI/CD, we can automate everything that needs to be done continuously, so we don’t need to bother and reduce the chances of forgetting to do those things. For example, my team uses CI/CD for automated deployment, automated testing, and automated code checking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*r7c6r0uKRP6qFVARzcYkiw.png" /><figcaption>Use CI/CD for automated testing, automated code checking, and automated creating deploy preview</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*qXMBJdkxssBmmgIz1SPC9g.png" /><figcaption>Use CI/CD for automated deployment</figcaption></figure><p>Through CI/CD, I don’t need to perform the same tasks every time I commit and can easily validate that changes to the program do not reduce program quality.</p><h4>4. Active in reviewing your partner code</h4><p>Every time your team members make changes to the program code and create a merge/pull request, review and validate the code to ensure that all the best practices mentioned above are maintained. If there are changes to the program code that could threaten program quality, provide suggestions for changes and ask them to make the changes before you approve the merge/pull request. Once there are no changes to the code that threaten program quality (based on your observation and knowledge), approve the merge/pull request and ensure that the pipeline in the target branch is successful. Because there is a possibility that code changes threatening program quality may go unnoticed by a developer, I highly recommend that an MR/PR requires at least two approvals from developers to better ensure that the code changes minimally, if at all, threaten program quality. Here is an example conversation I had with my team members regarding changes to the code that may threaten the quality of our team’s program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*nF3OyVlpjNFb57L3tXcdPg.png" /><figcaption>The issue related to sensitive data being hard-coded</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*AXWaTCClrkT2wcld0BQ1Eg.png" /><figcaption>Asking team members to refactor elements into sub-elements for better readability (clean code)</figcaption></figure><p>Through this, we strive to maintain the same quality and consistency in the programs we develop.</p><h3>Static Analysis</h3><p>Even though we have implemented all the best practices, there is still a possibility of having code in the program that could degrade the program quality. This can happen if we or our team members are unaware of code that could threaten the program quality. This is where the usefulness of static analysis tools such as SonarQube, SonarCloud, and SonarScanner.</p><p>Through static analysis, we can further analyze or validate whether there are any code segments that could degrade the quality of the program (based on the knowledge of the static analysis tool being used). Static analysis tools provide various tools or features that we can use to check the quality of the program. In this article, I will focus on providing examples using SonarQube as the static analysis tool used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fOoXiOAgos3YnnFnjZodiw.png" /><figcaption>SonarQube analysis results</figcaption></figure><p>Based on the SonarQube analysis results above, our team’s application has good reliability, security, and maintainability because SonarQube gives an A rating for these metrics. The existing unit tests have also covered 100% of the code lines. Based on these results, it can be said that our program has quite good quality. Through this, we can minimize the occurrence of bugs, errors, and code smells in our program. One of the factors that enabled us to achieve this is that our team adheres to all the best practices mentioned above. Nevertheless, there is still a possibility that our program may have bugs, errors, and code smells that might not be detected by all developers and the static analysis tool. Therefore, even after achieving such good results, we must remain vigilant and diligent in testing and reviewing to ensure users do not experience problems or obstacles when using the program. If we find bugs, errors, or code smells from the developer team’s investigation or user reports, we will coordinate with other team members to discuss how to handle them.</p><p>Furthermore, we can also obtain detailed information regarding the performance of each package and file in the Code feature. This makes it easier for us to understand, manage, and maintain the quality of our code more specifically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cPpbfd79nr9FLQnoqRAmGQ.png" /><figcaption>Code feature</figcaption></figure><p>Sonar also has the Measures feature, which allows us to assess code quality more easily as it is represented using graphs with colors indicating code quality. In SonarQube, the further to the bottom left the point is on the graph, the better the quality of our code. Here is the graphical representation provided by CirrhoCheck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnQ40GshC7gy_XjAW-Ms3Q.png" /><figcaption>Measures feature</figcaption></figure><h4>How to set up</h4><ol><li>First, log in to SonarQube and connect to your Github/Gitlab account, then select the project you want to integrate with Sonar.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*evsjZbzjfsgqth23wOYrDw.png" /><figcaption>Selecting the project to be integrated with Sonar</figcaption></figure><p>2. Second, generate a new token or use existing token (you can create on your profile, then select Security tab) and enter the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ird3NjfG-u0_jVsLhCIHew.png" /><figcaption>Registering the token to be used in the SonarQube project (new token or existing token)</figcaption></figure><p>3. Third, copy the script and paste to .gitlab-ci.yml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kryWBQnb6QCRz4lBwRGTOg.png" /><figcaption>The integration script provided by SonarQube (available in some build providers)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*jzWDtQDVfYUj3Yu2HVHd2A.png" /><figcaption>Example of CI/CD script for integration with SonarQube used by us</figcaption></figure><p>4. Finally, commit and push the changes, and then check your CI/CD pipeline, the Sonar stage will run and perform code quality analysis, and the results will appear in the SonarQube project you created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*n9G9s108XPooHmaS3aY7Og.png" /><figcaption>The Pipeline (test job and SonarQube job)</figcaption></figure><h3>Conclusion</h3><p>Program quality is one of the crucial aspects in developing a program. By maintaining program quality, we can create programs with minimal bugs and issues, thereby reducing the likelihood of errors or program failures. Some best practices to maintain program quality include reducing code smell and the use of comments, being active in testing the program and reviewing your partner’s code, and utilizing CI/CD. After performing these tasks, don’t forget to further analyze and validate using static analysis tools like SonarQube to determine if there are still any code segments threatening the program quality that are captured by the static analysis tool or not. All the best practices mentioned before can facilitate you in continuous development.</p><h4>References</h4><ul><li><a href="https://www.browserstack.com/guide/how-to-improve-software-quality">15 Techniques to Improve Software Quality | BrowserStack</a></li><li><a href="https://www.geeksforgeeks.org/code-smell-a-general-introduction-and-its-type/">Code Smell — A General Introduction and it’s Type — GeeksforGeeks</a></li><li><a href="https://www.geeksforgeeks.org/dont-repeat-yourselfdry-in-software-development/">Don’t repeat yourself(DRY) in Software Development — GeeksforGeeks</a></li><li><a href="https://wiki.ppl.cs.ui.ac.id/s/82ddef13-37d5-41ae-adb5-437708acb15b">Panduan SonarQube — Wiki PPL (ui.ac.id)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00585347b656" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Nielsen’s 10 Heuristics: Let’s Upgrade your UI Design Now!]]></title>
            <link>https://medium.com/@rifqifarel222/exploring-nielsens-10-heuristics-let-s-upgrade-your-ui-design-now-337b7b0b8b85?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/337b7b0b8b85</guid>
            <category><![CDATA[eight-golden-rules]]></category>
            <category><![CDATA[nielsen-heuristics]]></category>
            <category><![CDATA[ui]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 11:16:31 GMT</pubDate>
            <atom:updated>2024-03-05T17:23:09.499Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiO2t7rbk9upcq4rDb4i0A.png" /><figcaption>CirrhoCheck Mobile Design</figcaption></figure><p>The User Interface is the first thing seen by users when using a software application. It’s not uncommon for users to come back to using a software application because they like its user interface. Therefore, the User Interface is a key factor in determining the quality of a product and the sustainability of an application business. Hence, it is crucial for us as developers to create applications with a good user interface so that users feel happy and satisfied when using the application.</p><p>How do I upgrade the UI Design of my application? Perhaps this question arises in your mind (and maybe you already know the answer from the title of this article :D). We can apply UI design rules or principles that can make the created product more user-friendly and efficient for its users, one of which is Nielsen’s 10 heuristics.</p><p>Next, we will explore further about Nielsen’s 10 heuristics and how to apply them using examples from my team’s project.</p><h3>1. Visibility of System Status</h3><p>System should always provide information to users about what is happening so that users have control over the ongoing processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*NonzPo9FAiPDq2CBbL1oyQ.png" /><figcaption>image from author</figcaption></figure><p>For example, the image above indicates that there are still empty form fields, so the system provides information that the user needs to fill in all those form fields correctly to proceed to the next step.</p><h3>2. Match Between System and The Real World</h3><p>In my team’s project, there are form fields that require users to input something related to dates. We use a calendar that resembles a real-world calendar, with date, month name, and year, and has the same layout as an real calendar. Through this, users can be more familiar with and easily understand and use the features functionality without needing explanations or extra effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*fTS1yaCtn9ThrIGXI7pmiA.png" /><figcaption>image from author</figcaption></figure><h3>3. User Control and Freedom</h3><p>As a UI designer, we should provide clear options or suggest clear paths that users can take. This allows users to feel the freedom to make decisions and take actions while still being guided by the system, enabling them to immediately understand the available options and paths they can take. This also provides better flexibility for users to choose options according to their needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*dkQgVcG7hD93t8H5x0JJhg.png" /><figcaption>image from author</figcaption></figure><p>Like the example above, it is evident that the user has the freedom to choose the patient setting (emergency or inpatient).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*HH7qGoE7P_KNI9V5uUtocQ.png" /><figcaption>image from author</figcaption></figure><p>Confirmation Modal, as shown above, can enhance User Control and Freedom, especially User Freedom, as users can be given the freedom to choose whether to proceed with a process or not. Moreover, the confirmation modal above also displays the data filled in by the user, allowing them to validate their input before deciding to proceed with the process or not.</p><h3>4. Consistency and Standards</h3><p>Just as in recognizing a person, an application should have uniqueness and consistency to establish an identifiable identity for users. Moreover, users of our application may also be users of many other digital products. Therefore, by maintaining consistency and standards, users can use the application more efficiently and achieve their goals faster because they don’t need to wonder how to use the application or learn something new to use it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiO2t7rbk9upcq4rDb4i0A.png" /><figcaption>image from author</figcaption></figure><p>In the CirrhoCheck design, all pages are created consistently and use the same components, such as grid layout, margins, padding, and even applying auto layout properties from Figma to enhance design consistency. Additionally, the existence of design systems ensures uniformity in colors, typography, and components.</p><h3>5. Error Prevention</h3><p>The interface system should always prevent issues in every way possible, so users can experience or create fewer (or ideally, no) problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*w2v7-20TyBxBvYx56eGUEA.png" /><figcaption>image from author</figcaption></figure><p>We can use the example above. The system restricts user input for the medical record number, allowing only digits. This reduces the possibility of input errors for the medical record number. If the user inputs a value that includes non-digit characters, they won’t be able to locate the intended patient, leading to an error.</p><h3>6. Recognition Rather Than Recall</h3><p>Users should be assisted by the interface system in recognizing interface elements so that users are not forced to memorize things related to interface elements, except in specific cases (cases that are extremely crucial and absolutely necessary).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*A4fxFrlwov3acSZfEOKU3A.png" /><figcaption>image from author</figcaption></figure><p>When a user opens the navbar, the currently accessed page will be marked with a symbol, making it distinct from other pages (those that are not currently accessed). This makes it easier for the user to know which page they are on without closing the navbar, and they don’t need to remember which feature they are currently using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*YXIJN749W79_YR8x2bVDRg.png" /></figure><p>Furthermore, the history feature also makes it easy for users to recognize what has been done or happened, so they don’t need to recall it.</p><h3>7. Flexibility and Efficiency of Use</h3><p>Simply put, this heuristic requires the interface system to provide features that make it easier for the user to perform a task and can be accessed easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*6D6oDQZ9IM6L91xxMp3bVw.png" /><figcaption>image from author</figcaption></figure><p>We can use the top navbar as an example. Users can open the navbar from any page, and they can access important features through the navbar, making it easier for users to access the desired features.</p><h3>8. Aesthetic and Minimalist Design</h3><p>Good UI design is not about prioritizing visual elements that only serve to beautify the page. A good UI design emphasizes functionality over aesthetics. Information or design elements that are not highly relevant or necessary do not need to be added to the interface. With this approach, the interface won&#39;t consist of many distracting design assets, allowing users to focus on the functionality of the features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiO2t7rbk9upcq4rDb4i0A.png" /><figcaption>image from author</figcaption></figure><p>We can see that CirrhoCheck Mobile Design is considered minimalist because there are not many design assets that distract the user, allowing them to focus directly on its main features.</p><h3>9. Help Users Recognize, Diagnose, and Recover from Errors</h3><p>If there are issues or errors, the system should accommodate the user so that they can easily understand what problem is occurring through clear informational messages. This allows the user to resolve the issue quickly and efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*w2v7-20TyBxBvYx56eGUEA.png" /><figcaption>image from author</figcaption></figure><p>As an example, in the form above, the system informs the user about the issue and suggests a solution to resolve it.</p><h3>10. Help and Documentation</h3><p>The interface system provides documentation and help services for users to better utilize the application. These features should be easily found and accessed by the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*x3ScTMXZ7YLnsfWRpxXsKQ.png" /><figcaption>image from author</figcaption></figure><p>On the CirrhoCheck landing page, there is a section that contains documentation about the application and help center.</p><h4>Other best practices</h4><p>Actually, we have implemented another UI design rules or principles when applying Nielsen’s 10 heuristics, namely Shneiderman’s eight golden rules of design. This is because all the heuristics in Nielsen’s 10 heuristics already encompass the entire rules in Shneiderman’s eight golden rules of design. Here are the pairs of heuristics in Nielsen’s 10 heuristics that align with the rules in Shneiderman’s eight golden rules of design:</p><ul><li><strong>Visibility of system status </strong>and <strong>help users recognize, diagnose, and recover from errors </strong>in Nielsen’s 10 heuristics aligns with o<strong>ffer informative feedback</strong> and <strong>design dialogue to yield closure</strong> in Shneiderman’s eight golden rules of design</li><li><strong>Match between system and the real world</strong> and <strong>recognition rather than recall </strong>in Nielsen’s 10 heuristics aligns with <strong>reduce short-term memory load</strong> in Shneiderman’s eight golden rules of design</li><li><strong>User control and freedom</strong> in Nielsen’s 10 heuristics aligns with <strong>support internal locus of control </strong>and <strong>permit easy reversal of actions</strong> in Shneiderman’s eight golden rules of design</li><li><strong>Consistency and standards</strong> in Nielsen’s 10 heuristics aligns with <strong>strive for consistency </strong>in Shneiderman’s eight golden rules of design</li><li><strong>Error prevention </strong>in Nielsen’s 10 heuristics aligns with <strong>offer simple error handling </strong>in Shneiderman’s eight golden rules of design</li><li><strong>Flexibility and efficiency of use </strong>in Nielsen’s 10 heuristics aligns with <strong>enable frequent users to use shortcuts </strong>in Shneiderman’s eight golden rules of design</li></ul><p>Another best practice that can be done is to create several design alternatives. This is to explore the most suitable designs and provide the product owners and stakeholders with several design options to obtain the most preferred design. Here are several design alternatives for my team’s project for the same page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N00PThgNe8popRAu0hUzyA.png" /><figcaption>image from author</figcaption></figure><p>All of these design alternatives will be evaluated by product owners and stakeholders to determine the most suitable design.</p><h3>Conclusion</h3><p>The implementation of UI design rules or principles, such as Nielsen’s 10 heuristics and Shneiderman’s eight golden rules of design, plays a crucial role in user satisfaction and the sustainability of application business. However, we also need to add some other best practices, one of which is creating multiple design alternatives based on user research, which will then be evaluated by product owners and stakeholders to determine the most suitable design. So, in reality, there are many things that need to be applied in the UI design process to create an interface that meets the needs and expectations of users and stakeholders.</p><h4>References</h4><ul><li><a href="https://www.teacuplab.com/blog/nielsen-10-heuristics-explained-examples/">Nielsen’s 10 heuristic principles explained with examples (teacuplab.com)</a></li><li><a href="https://www.figma.com/resource-library/what-is-ui-design/">What is UI Design? | Figma</a></li><li><a href="https://www.pinterest.cl/pin/shneidermans-eight-golden-rules-of-interface-design--496662665141079330/">Shneiderman’s “Eight Golden Rules of Interface Design” | Golden rule, Interface design, Senior project (pinterest.cl)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=337b7b0b8b85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving Quality and Efficiency in Developing a Project with Agile Scrum]]></title>
            <link>https://medium.com/@rifqifarel222/improving-quality-and-efficiency-in-developing-a-project-with-agile-scrum-9eabf9de0f81?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/9eabf9de0f81</guid>
            <category><![CDATA[scrum-agile]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[tools]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 11:55:04 GMT</pubDate>
            <atom:updated>2024-05-09T06:46:54.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pb-UFzN7FV7r1rZI.png" /><figcaption>image from <a href="https://hygger.io/">https://hygger.io/</a></figcaption></figure><blockquote>Everything in this article happened because my team consists of people who are still learning (students), so the key point to be discussed in this article is how my team adapts our collaboration methods to the situation</blockquote><p>The success and quality of a project are influenced by external factors, such as market conditions, and internal factors, such as team quality and teamwork. However, in this article, I will only discuss the quality of teamwork.</p><p>Based on my research and experience, the quality of teamwork is strongly determined by the following factors:</p><ol><li>Team members</li><li>Tools used in teamwork</li><li>How teamwork is carried out</li></ol><p>Let’s discuss each of these three factors one by one, accompanied by examples of issues that my team faced and how we resolved them.</p><h3>1. Team Members</h3><p>If we are discussing teamwork, one crucial aspect to address is the team members. A team is a group of people working on tasks that depend on each other to achieve common goals. Therefore, within a team, we encounter individuals with their own uniqueness. This is where the challenge of teamwork lies — how to unite each individual into a solid entity so that the teamwork process can run smoothly. Interesting, isn’t it?</p><p>One best practice in teamwork for developing a project is reviewing the work of team members, like doing a code review on a pull request to ensure that the code to be merged is consistent and have the same quality with the existing code, and that the project continues to function well after the code changed. But, currently, I am studying at university, so when there are group assignments, I collaborate with team members who are also in the learning process, just like me. At first, we found it challenging to decide who should review the work of other team members (as typically, this is the responsibility of the CTO or manager).</p><p>After the discussion, we decided to implement a unique system by introducing the roles of <strong>Partner</strong> and <strong>Leader</strong> into the Agile Scrum framework. <strong>Partner</strong> is responsible for <strong>ensuring the accuracy</strong> of the work, every team member will take on this role, and each member with assigned tasks will have at least one partner. On the other hand, <strong>Leader</strong> is responsible for ensuring that the work is <strong>consistent</strong> and have the <strong>same quality </strong>with the existing code. In our case, this role is filled by the Product Owner because we have two Product Owners. If your case involves only one PO, the Scrum Master can be included in this role.</p><h3>2. Tools Used in Teamwork</h3><p>We use tools commonly used in Agile Scrum development, such as a Scrum board. For the Scrum board, we use Linear. There are several reasons why we use Linear, and here is the summary of our reasons:</p><ul><li>Has variety of features that can support and facilitate us in updating progress and knowing the progress of other team members, such as Projects and Roadmaps</li><li>Easy to use (very user-friendly, especially for us who are still learning)</li><li>Very flexible, one example is in the selection of the type of story points used</li><li>Majority of our group members have used it in other courses, and we feel comfortable using it, so we decided to use it again</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-sczOCeXZ5QeOI_03UBYMw.png" /><figcaption>Active Issues Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWcFjmbI32w6ltE_SCZYzA.png" /><figcaption>Backlog Page</figcaption></figure><p>From the image above, it’s evident that with Linear, we can identify tasks that are still in backlog, tasks that are todo for a sprint, tasks that are in progress for a sprint, tasks that are in review for a sprint, and tasks that have been completed for a sprint. With this, we can easily track the progress of tasks and the performance of each team member in a sprint. We can also assign an engineer to work on the task, along with its story point, project, and label.</p><p>Not only that, as mentioned earlier, we can also flexibly determine the type of story points to be used. By default, Linear provides options for story points types such as exponential, fibonacci, linear, and t-shirt (honestly, I just found out about this story point type in Linear 😂).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*GD6bdWcYi1MKMYkutaANyw.png" /><figcaption>Story Point Setting Page</figcaption></figure><p>Previously, I mentioned label and project, perhaps some of you are confused about what I mean by label and project. This is another advantage of Linear, we can define entire projects (perhaps the more general term is sprint) and view the product roadmap on the projects roadmap page. On the projects roadmap page, we can see statistics for each project/sprint and who has contributed to a project/sprint, complete with story points, start date, and end date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLRqQjShrTlD1lqNpgRUKg.png" /><figcaption>Projects Roadmap Page</figcaption></figure><p>As for labels, they are a feature provided by Linear that can indicate what a task is related to. At CirrhoCheck, we use this feature to determine whether a task falls into creating a new feature (Feature), improving existing features (Improvement), or fixing bugs found in existing features (Bug), as well as determining whether a task is related to Backend or Frontend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*umjrkYdE-8HCgM6esCyHlQ.png" /><figcaption>Label Setting Page</figcaption></figure><p>Additionally, we utilize commit messages and PR descriptions to monitor team members’ work and the changes they make. Therefore, each commit message and PR description needs to be written clearly to describe what is being done. Here are some examples of commit messages, MR descriptions, and MR discussions that we create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*1b1XY5nt4pD0lrBBfOs3Mw.png" /><figcaption>Commits history with clear message</figcaption></figure><p>In CirrhoCheck, we enforce a rule that every merge request must be accompanied by a note detailing the changes made in the merge request and adding additional notes if any. Merge requests also need to be approved by one of the engineers or reviewers, where before approval, a strict review process is carried out, such as ensuring there are no conflicts, no code that could introduce bugs or reduce code efficiency and robustness, and that the changes and features already implemented work well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ciMbnVIv8z48UpcxcQSapQ.png" /><figcaption>Merge Request with clear description</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a6LiRtOYX-AS52scxSc56g.png" /><figcaption>Merge Request Discussion</figcaption></figure><p>All updates that occur on Linear or any commits and pull requests made by team members can be monitored by the entire team through the Discord webhook. This makes the Discord application the place where we integrate the working progress of all team members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQKz8mtDo2H_pCevOblc8g.png" /><figcaption>Discord text channel for webhooks (Linear &amp; GitLab)</figcaption></figure><p>Basic? But it’s not just that. We also have other issue. Because we use Agile Scrum, we need to do sprint planning, daily scrum or standup, and sprint review. We want all the discussions in our meetings to be recorded in one place that is integrated, making it easy for us to find something that has been discussed in a meeting. That’s why we use Google Documents stored on our team’s Google Drive so that we can easily access notes from every meeting and other documents stored on Google Drive. With the modified Google Documents, we can record and track anything that has been discussed in a meeting. Here are some examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhPHS2KTxtgV6zPFC_63Dw.png" /><figcaption>CirrhoCheck Google Document we use to place all notes from each sprint planning, standup, and sprint review</figcaption></figure><p>Additionally, as an extra, we use Google Calendar, which is integrated with all team members’ Google Calendar, so we can easily see important dates in the development process.</p><h3>3. How Teamwork is Carried Out</h3><p>Perform the necessary tasks in the project development process with Agile Scrum, such as sprint planning, daily scrum or standup, and sprint review. As we know, daily scrum is conducted every day for a relatively short duration. However, due to conflicting availability time of our team members (the main factor causing this issue is the difference in class schedules), we had to adjust the daily scrum or standup to be held only 2–3 times a week. Nevertheless, in my opinion, this is not a problem because we can monitor team members’ work through other means, such as checking sprint backlog updates or commits and pull requests made by team members. However, this is not a behavior I recommend as it is not a best practice. We do this because of the circumstances and situations that force us to do so.</p><h3>Conclusion</h3><p>Working within a team requires a suitable structure and tools that align with the team’s situation to ensure smooth and effective teamwork. We can start by using the basic structure and tools provided by a framework, such as Agile Scrum. After running the teamwork process and encountering any issues, discuss with other team members to determine how the team can solve the issues. Another key point that can be taken from this discussion is not to hesitate to communicate with other team members because communication is one of the examples of teamwork.</p><h4>References</h4><ul><li><a href="https://asq.org/quality-resources/teams#:~:text=A%20team%20is%20defined%20as%20a%20group%20of,improvement%20team%20organized%20to%20solve%20a%20particular%20problem.">What is a Team? Types of Teams &amp; Processes | ASQ</a></li><li><a href="https://www.atlassian.com/agile/scrum">What is Scrum? [+ How to Start] | Atlassian</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9eabf9de0f81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practice Programming: SOLID Principles and A Better Project Structure in Next.js]]></title>
            <link>https://medium.com/@rifqifarel222/best-practice-programming-a-better-project-structure-and-solid-principles-in-next-js-16b454179a08?source=rss-8ded6d047113------2</link>
            <guid isPermaLink="false">https://medium.com/p/16b454179a08</guid>
            <category><![CDATA[project-structure]]></category>
            <category><![CDATA[solid-programming]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[best-practice-programming]]></category>
            <dc:creator><![CDATA[Rifqi Farel Muhammad]]></dc:creator>
            <pubDate>Sat, 24 Feb 2024 18:47:53 GMT</pubDate>
            <atom:updated>2024-05-16T14:59:57.516Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Best Practice Programming: </strong>SOLID Principles and A Better Project Structure in Next.js Framework with Typescript</h3><h3>The SOLID Principles</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*li4XFQoUyRq4TGbu0Tm1bQ.jpeg" /><figcaption>image from <a href="https://www.lexicon.com.au/">https://www.lexicon.com.au/</a></figcaption></figure><p>The SOLID acronym stands for five key principles in programming, that is:</p><ul><li><strong>S</strong>ingle Responsibility Principle (SRP)</li><li><strong>O</strong>pen/Closed Principle (OCP)</li><li><strong>L</strong>iskov Substitution Principle (LSP)</li><li><strong>I</strong>nterface Segregation Principle (ISP)</li><li><strong>D</strong>ependency Inversion Principle (DIP).</li></ul><h3>1. Single Responsibility Principle (SRP)</h3><p>SRP states that a class, component, module, or function should have only one specific purpose or responsibility. In other words, they should only have one reason to change, which is when there is a change in business requirements or use cases.</p><pre>// src/components/modules/LandingPageModule/index.tsx<br>export const LandingPageModule = () =&gt; {<br>    return (<br>        &lt;h1&gt;This is Landing Page&lt;/h1&gt;<br>    )<br>}</pre><p>This module only returns the landing page. The module does not handle other things, such as returning the user profile page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j54pl5Uox7UKlk4GRji6tw.png" /><figcaption>Example of SRP I applied in the CirrhoCheck project</figcaption></figure><p>In the example above, I created a context that serves to retrieve the currently logged-in user. This context consists of several important aspects, namely user, setUser, the getUser function, and the refreshWindow function. setUser is a set function from NextJs’s useState, through which we can change the state value of its pair, which in this case is the user storing the object and data of the currently logged-in User. The created User object is a custom type of User that currently only stores the user’s ID but can be easily expanded if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5Lo0JYQJ6WDvW71otZfmQ.png" /><figcaption>Custom User type</figcaption></figure><p>The getUser function is a function that will always be executed whenever the CirrhoCheck web is accessed (regardless of which page the user is on) because it uses useEffect, which will utilize setUser and refreshWindow to set the currently logged-in user. Meanwhile, the refreshWindow function is another function that retrieves the token from local storage and requests assistance from another function to parse the token to obtain the object (key-value) stored within the token and validate that the user’s token has not expired and can still be used to identify the user. Through this, each function has only one responsibility, thus enabling the effective implementation of SRP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*e3qXj58uOLO-v4Se_jfyEA.png" /><figcaption>The refreshWindow function calls the validateJwtExp function to validate that the user’s token has not expired and can still be used, and the parseJwt function to parse the token to obtain the object (key-value) stored within the token</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*FDwUpQIDZwMuQeq9v1x1Kg.png" /><figcaption>The validateJwtExp function also calls the parseJwt function to assist it in obtaining the token expiration time</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*8zf7yXTFIfxXr-4rDPedtA.png" /><figcaption>The parseJwt function will parse the token to obtain the object (key-value) stored within the token</figcaption></figure><p>Finally, AuthContext is placed in _app.tsx and positioned at the outermost level but within your UI provider (in my case, ChakraProvider) so that the getUser function is always executed whenever the user accesses the CirrhoCheck web and its children components can utilize everything provided by the AuthContext (user &amp; setUser).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTLIWxT4QQwFTo0hrveLNQ.png" /><figcaption>The placement of AuthContext</figcaption></figure><h3>2. Open/Closed Principle (OCP)</h3><p>OCP states that a class, component, or module should be designed in a way that is open for extension but closed for modification. This allows us to add logic or functionality to a code without having to modify the existing code.</p><pre>// src/components/elements/types/title.d.ts<br>interface TitleProps {<br>  text: string<br>  className?: string<br>}</pre><pre>// src/components/elements/Title/index.tsx<br>export const Title = ({ text, className }: TitleProps) =&gt; (<br>  &lt;h1 className={`text-xl font-bold text-center ${className}`}&gt;<br>    {text}<br>  &lt;/h1&gt;<br>)</pre><pre>// src/components/modules/LandingPageModule/index.tsx<br>import { Title } from &#39;@elements&#39;<br><br>export const LandingPageModule = () =&gt; {<br>    return (<br>        &lt;Title <br>          text=&quot;This is Landing Page&quot; <br>          className=&quot;px-8 py-6&quot;<br>        /&gt;<br>    )<br>}</pre><p>The className of Title element can be easily added/extended without modifying the existing code of the Title element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1LoUKwp4bT0nhHTxHtu6Q.png" /><figcaption>Example of OCP I applied in the CirrhoCheck project</figcaption></figure><p>In the example above, I created a reusable component for title text (H1 tag), named Title, which allows developers to add new CSS styling through the className parameter but cannot alter the existing structure. The most important aspect of the existing structure is that the font size for desktop view will be larger than mobile view, and Title helps us maintain consistency in font size for each title on every page. Here is the default appearance of Title for mobile view and desktop view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*Z9m-3ue3ajF6db5-wIEHww.png" /><figcaption>Default appearance of Title for mobile view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Wwod4ACfw71fxnc_qudJA.png" /><figcaption>Default appearance of Title for desktop view</figcaption></figure><p>Next, I will demonstrate an example code that attempts to use the className parameter of Titleto add new CSS styling and modify existing CSS styling, namely the font size for mobile view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*PUqmVwthOxlcVVqikfastQ.png" /><figcaption>Example code that attempts to use the className parameter of Title</figcaption></figure><p>Based on the code above, I attempted to modify the CSS styling of the Title by hiding the Title if the user is in desktop view, changing the text color to blue 500 (hexcode: #3B82F6), and increasing the text size for mobile view from text-xl (font size: 20px) to text-3xl (font size: 30px). Since I have directly defined the font size for mobile as text-xl in the Title, the font size should not change even if I modify it in the className parameter. However, for the text color, since I haven’t defined the text color previously, the text color defaults to the HTML default text color, which is black. Therefore, if we change the text color through the className parameter, the text color of the Title will change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vl2NBtjnk0xUXKjQ0aK-Aw.png" /><figcaption><strong>Left: </strong>default appearance of Title for mobile view. <strong>Right: </strong>appearance of Title for mobile view after modifying the appearance using the className parameter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JxKDanKrmX8tJmbBwF-3iA.png" /><figcaption>Appearance of Title for desktop view after modifying the appearance using the className parameter</figcaption></figure><p>The Title component allows developers to add new CSS styling (extension) but developers cannot modify the existing CSS styling of the Title via the className parameter. In other words, Title is open for extension but closed for modification of the existing code and has implemented the Open/Closed Principle (OCP).</p><h3>3. Liskov Substitution Principle (LSP)</h3><p>LSP states that derived classes, components, or modules (subclass, subcomponent, submodule) should be able to be used as substitutes for the base class (superclass, supercomponent, supermodule) without affecting the correctness of the program.</p><pre>// src/components/elements/types/customInput.d.ts<br>interface CustomInputProps {<br>  placeholder: string<br>  label: string<br>  children?: ReactNode<br>}</pre><pre>// src/components/elements/CustomInput/index.tsx<br>export const CustomInput= ({ placeholder, label, children }: CustomInputProps) =&gt; (<br>  &lt;div className=&quot;flex flex-col gap-1 w-full&quot;&gt;<br>    &lt;label&gt;{label}&lt;/label&gt;<br>    &lt;div className=&quot;flex flex-row gap-1 w-full&quot;&gt;&gt;<br>      &lt;input placeholder={placeholder}&gt;<br>        {children}<br>      &lt;/input&gt;<br>    &lt;/div&gt;<br>  &lt;/div&gt;<br>)</pre><pre>// src/components/modules/LandingPageModule/index.tsx<br>import { Title, CustomInput } from &#39;@elements&#39;<br>import { IoArrowBack } from &#39;react-icons/io5&#39;<br><br>export const LandingPageModule = () =&gt; {<br>    return (<br>        &lt;div&gt;<br>            &lt;Title <br>              text=&quot;This is Landing Page&quot; <br>              className=&quot;px-8 py-6&quot;<br>            /&gt;<br>            &lt;CustomInput <br>              placeholder=&quot;Please input the value&quot;<br>              label=&quot;Value&quot;<br>            &gt;<br>              &lt;IoArrowBack /&gt;<br>            &lt;/CustomInput&gt;<br>        &lt;/div&gt;<br>    )<br>}</pre><p>We can create an input form using both the &lt;input&gt; and &lt;CustomInput&gt; components. Therefore, &lt;input&gt; and &lt;CustomInput&gt; can be used interchangeably.</p><p>I also implemented this example in CirrhoCheck. I created a custom input, named CustomInput, consisting of several Chakra UI input components that I combined to make a reusable component. CustomInput was created to maintain consistency and apply the DRY principle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKwIL_HipdlZ8c4jcmCceg.png" /><figcaption>Example of LSP I applied in the CirrhoCheck project</figcaption></figure><p>Here`s an example of the usage code and appearance of CustomInput.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*ldXemVN3v3lEHawSK2qOQA.png" /><figcaption>Example of the usage code of CustomInput</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WV27Ml5clE_7UEafMU96OQ.png" /><figcaption>Example of the appearance of CustomInput</figcaption></figure><p>CustomInput is a subcomponent of Chakra UI input components with additional CSS styling, to maintain consistency among inputs, and input label. CustomInput provides developers with convenience in creating consistent text inputs and displaying error messages. What if we use its supercomponent, the Chakra UI input components?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*6xcdcikpIowjCkX-_365Xw.png" /><figcaption>Example of the usage code of Chakra UI input components</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_8so4IyaCB5UPWykwIFzvw.png" /><figcaption>Example of the appearance of Chakra UI input components</figcaption></figure><p>In terms of the number of lines of code, the use of CustomInput and Chakra UI input components is more or less the same, but Chakra UI input components do not provide labels and CSS styling, making it difficult for developers to maintain consistency among inputs and reducing the implementation of DRY. In terms of appearance, it is certainly less favorable in terms of UI/UX because there are no labels on each input, reducing the visibility of inputs and making it difficult for users to identify an input. In terms of functionality, everything works fine, just like when using CustomInput. Therefore, CustomInput (subcomponent) as well as Chakra UI input components (supercomponent) can be used by developers to provide text input for a form without affecting the correctness of the program.</p><h3>4. Interface Segregation Principle (ISP)</h3><p>ISP states that a class should only have the methods it needs.</p><pre>// src/components/modules/TestButtonModule/index.tsx<br>export const TestButtonModule = () =&gt; {<br>    const handleTestButton = () =&gt; {<br>      // Implementation here<br>    }<br><br>    return (<br>        &lt;button onClick={handleTestButton}&gt;<br>          Test<br>        &lt;/button&gt;<br>    )<br>}</pre><p>In this module, there is only the handleTestButton function intended for use by a button within this module. It&#39;s evident that only the necessary function is present in this module.</p><p>The example I provided in the implementation of OCP will lead us to the implementation of ISP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TICJW97RvNKGRLoyr6RYgA.png" /><figcaption>Title component</figcaption></figure><p>In the Title, there is a call to the BackButton component. Let’s see what’s inside the BackButton component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*zBytb-BeNRm5uSQDpfvUPw.png" /><figcaption>Example of ISP I applied in the CirrhoCheck project</figcaption></figure><p>In the BackButton, there is only one function called handleBackButton, which functions to go back to the previous step. This function is used by the button within the BackButton component. The BackButton exists because in CirrhoCheck, there are pages that have a form consisting of multiple inputs but with different purposes, so we divided the form into several states/steps to have a good user experience, and this is where the purpose of the BackButton component and the handleBackButton function comes in. Let’s see an example of a page in CirrhoCheck that uses the BackButton.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaTYh4U1_JhhCA18BWSyAw.png" /><figcaption>Example of a page that uses the BackButton</figcaption></figure><p>The images above are from the same page, namely the calculator page. The calculator page provides users (medical staff at a hospital) to calculate the likelihood of mortality for patients suspected of having Cirrhosis. The image on the left is the first step of the calculator form, which asks the user to input the patient profile to be calculated. Meanwhile, the image on the right is the second step of the calculator form, which asks the user to input the variables needed to calculate the likelihood of mortality. In the second step of the form, we provide a back button so that users can return to the previous step to review or revise the data that has been previously entered (implementing the aspect of freedom). When the user presses the back button, the handleBackButton function in the BackButton is called. Besides handleBackButton, there are no other functions or variables in BackButton, thus BackButton has implemented ISP.</p><h3>5. Dependency Inversion Principle (DIP)</h3><p>DIP states that high-level modules should not depend on low-level modules, but both should depend on abstractions.</p><pre>// src/components/elements/types/dip.d.ts<br>interface DipProps {<br>  condition: string<br>}</pre><pre>// src/components/elements/Dip/index.tsx<br>import { Title, Input } from &#39;@elements&#39;<br>import { IoArrowBack } from &#39;react-icons/io5&#39;<br><br>export const Dip = ({ condition }: DipProps) =&gt; {<br>    return (<br>        &lt;div&gt;<br>            {condition === &#39;TITLE&#39;? <br>              &lt;Title <br>                text=&quot;This is Landing Page&quot; <br>                className=&quot;px-8 py-6&quot;<br>              /&gt;<br>              : condition === &#39;INPUT&#39;?<br>              &lt;Input <br>                placeholder=&quot;Please input the value&quot;<br>                label=&quot;Value&quot;<br>              /&gt;<br>              : &lt;IoArrowBack /&gt;<br>            }<br>        &lt;/div&gt;<br>    )<br>}</pre><pre>// src/components/modules/LandingPageModule/index.tsx<br>import { Dip } from &#39;@elements&#39;<br><br>export const LandingPageModule = () =&gt; {<br>    return (<br>        &lt;Dip condition=&#39;TITLE&#39; /&gt;<br>    )<br>}</pre><p>By breaking down several React components, we can implement abstraction by simply calling the names of these components without concerning ourselves with their implementation details. In the LandingPageModule, we can determine which component to return by specifying its name in the condition parameter within the Dip element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TICJW97RvNKGRLoyr6RYgA.png" /><figcaption>Title component</figcaption></figure><p>In the Title component, there is a conditional to display the BackButton or not. The abstraction of the BackButton is done with an optional parameter called canBack, which is located in the Title and determines whether the BackButton is displayed along with the Title or not. So, if the developer wants to display the BackButton, they only need to add canBack = {True} when calling the Title, and the BackButton will immediately appear on the screen without needing to think about the implementation details, such as how to go back to the previous step and how to unite the button and text. Here are examples of calling the Title both without the BackButton and with the BackButton.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y04nrUGMAHPqfEE-m7TqCg.png" /><figcaption>How to calling the Title without the BackButton</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NfaeORt4Ln7Wq7H_WHWpw.png" /><figcaption>How to calling the Title with the BackButton</figcaption></figure><p>And here are the display results from calling the Title using both methods above (the photo on the left shows the Title without the BackButton, and the photo on the right shows the Title with the BackButton).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaTYh4U1_JhhCA18BWSyAw.png" /><figcaption>Example of a page that uses the BackButton</figcaption></figure><p>Because PatientProfile and PatientData call the Title module that implements abstraction, the code already implements DIP.</p><h3>Project Structure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkHgBnAFjZ3kJGTSwE033g.jpeg" /><figcaption>image from <a href="https://www.imaginarycloud.com/">https://www.imaginarycloud.com</a>/</figcaption></figure><p>Project Structure becomes crucial when working with a project team. A well-organized project structure, clearly defining the function of each part, will enhance code consistency and clarity. Thus, if there are changes or additions to the code, developers can easily find the needed code and manage all their work efficiently. The separation of concerns plays a significant role in this discussion.</p><p>In this article, we will explore how to implement best programming practices and a better project structure in the development of projects using Next.js and TypeScript. So, let’s delve into practical examples to better understand their advantages.</p><blockquote>There is no definitive reference for project structure. This article is written based on my experience and opinion, so feel free to explore further and discover project structures that suit you best!</blockquote><p>Here is the project structure if you use only the src directory (without the app directory).</p><pre>project-root-directory<br>│<br>└── public<br>│<br>└── src<br>    │<br>    ├── components<br>    │<br>    ├── pages<br>    │<br>    └── styles</pre><h4>Public Package</h4><pre>project-root-directory<br>│<br>└── public<br>    │<br>    ├── icons<br>    │   │<br>    │   ├── favicon.svg<br>    │   │<br>    │   ├── exampleIcon.svg<br>    │   │<br>    │   └── ... (another icons)<br>    │<br>    ├── images<br>    │   │<br>    │   ├── exampleImage.png<br>    │   │<br>    │   └── ... (another images)<br>    │<br>    └── ... (feel free to add new folder for spesific file type)</pre><ul><li><strong>public</strong>: Files that will be displayed to the user through HTML (public files).</li><li><strong>icons</strong>: Icon files, like svg.</li><li><strong>public/images</strong>: Image files, like png, jpg, jpeg, etc.</li></ul><h4>Components Package</h4><pre>project-root-directory<br>│<br>└── src<br>    │<br>    └── components<br>        │<br>        ├── contexts<br>        │   │<br>        │   ├── ExampleContext<br>        │   │   │<br>        │   │   ├── index.tsx<br>        │   │   │<br>        │   │   ├── constant.ts<br>        │   │   │<br>        │   │   └── ... (another tsx files)<br>        │   │<br>        │   ├── types<br>        │   │   │<br>        │   │   ├── exampleContext.d.ts<br>        │   │   │<br>        │   │   └── ... (another types for another contexts)<br>        │   │<br>        │   ├── ... (another contexts)<br>        │   │<br>        │   └── index.ts<br>        │<br>        ├── elements<br>        │   │<br>        │   ├── ExampleElement<br>        │   │   │<br>        │   │   ├── module-elements<br>        │   │   │   │<br>        │   │   │   ├── ExampleModuleElement.tsx<br>        │   │   │   │<br>        │   │   │   ├── ... (another tsx files)<br>        │   │   │   │<br>        │   │   │   └── index.ts<br>        │   │   │<br>        │   │   ├── index.tsx<br>        │   │   │<br>        │   │   └── constant.ts<br>        │   │<br>        │   ├── types<br>        │   │   │<br>        │   │   ├── exampleElement.d.ts<br>        │   │   │<br>        │   │   └── ... (another types for another elements)<br>        │   │<br>        │   ├── ... (another elements)<br>        │   │<br>        │   └── index.ts<br>        │<br>        ├── hooks<br>        │   │<br>        │   ├── useExampleHook<br>        │   │   │<br>        │   │   ├── index.ts<br>        │   │   │<br>        │   │   └── constant.ts<br>        │   │<br>        │   ├── types<br>        │   │   │<br>        │   │   ├── useExampleHook.d.ts<br>        │   │   │<br>        │   │   └── ... (another types for another hooks)<br>        │   │<br>        │   ├── ... (another hooks)<br>        │   │<br>        │   └── index.ts<br>        │<br>        ├── modules<br>        │   │<br>        │   ├── ExampleModule<br>        │   │   │<br>        │   │   ├── module-elements<br>        │   │   │   │<br>        │   │   │   ├── ExampleModuleElement.tsx<br>        │   │   │   │<br>        │   │   │   ├── ... (another tsx files)<br>        │   │   │   │<br>        │   │   │   └── index.ts<br>        │   │   │<br>        │   │   ├── sections<br>        │   │   │   │<br>        │   │   │   ├── ExampleSection.tsx<br>        │   │   │   │<br>        │   │   │   ├── ... (another tsx files)<br>        │   │   │   │<br>        │   │   │   └── index.ts<br>        │   │   │<br>        │   │   ├── index.tsx<br>        │   │   │<br>        │   │   └── constant.ts<br>        │   │<br>        │   ├── types<br>        │   │   │<br>        │   │   ├── exampleModule.d.ts<br>        │   │   │<br>        │   │   └── ... (another types for another hooks)<br>        │   │<br>        │   ├── ... (another modules)<br>        │   │<br>        │   └── index.ts<br>        │<br>        ├── utils<br>        │   │<br>        │   ├── exampleUtil<br>        │   │   │<br>        │   │   ├── index.ts<br>        │   │   │<br>        │   │   └── constant.ts<br>        │   │<br>        │   ├── types<br>        │   │   │<br>        │   │   ├── exampleUtil.d.ts<br>        │   │   │<br>        │   │   └── ... (another types for another utils)<br>        │   │<br>        │   ├── ... (another utils)<br>        │   │<br>        │   └── index.ts<br>        │<br>        ├── ... (feel free to add new folder for spesific component)<br>        │<br>        └── index.ts</pre><ul><li><strong>components</strong>: All components (ts or tsx files) within the project.</li><li><strong>components/contexts</strong>: A collection of contexts separated by folders (1 folder = 1 context). Each context folder will consist of an index.tsx, a constant.ts(optional), and other tsx files.</li><li><strong>components/elements</strong>: A collection of elements separated by folders (1 folder = 1 element). An element is a React component used in different modules/pages. In other words, the elements referred to here are <strong>reusable React components</strong>. Each element folder will consist of an index.tsx, a constant.ts (optional), and a module-element folder (optional). The module-element folder is a folder that contains tsx files and an index.tsx. This folder will exist if your element consists of small components used multiple times, allowing them to be reused within a React element. Each small component will have its own tsx file placed in the module-element folder.</li><li><strong>components/hooks</strong>: A collection of hooks separated by folders (1 folder = 1 hook). Each hook folder will consist of an index.tsand a constant.ts (optional). Generally, the naming convention for hooks in Next.js is `use&lt;hookName&gt;`.</li><li><strong>components/modules</strong>: A collection of modules separated by folders (1 folder = 1 module). Each module folder will consist of an index.tsx, a constant.ts (optional), a module-element folder (optional), and a section folder (optional). A module is a cohesive React element or a single HTML page. The module will be directly returned in pages/&lt;page&gt;.tsx. This is done because there is a possibility that pages/&lt;page&gt;.tsx requires server-side rendering (SSR), making it neater and cleaner to separate SSR from the HTML page itself. The section folder is a folder that contains sections forming a cohesive HTML page, allowing the index.tsx to remain cleaner by only calling these sections.</li><li><strong>components/utils</strong>: A collection of utils separated by folders (1 folder = 1 util). Each util folder will consist of an index.tsand a constant.ts (optional). If you’re confused about the difference between hook and util, the following may help you a bit. Util is a simplified version of a hook and doesn’t involve managing state (so it will only be used once per call).</li><li><strong>types folder</strong>: In each components section (contexts, elements, etc.), there is a “types” folder. This folder contains several d.ts files (with the naming format: types/&lt;folderName&gt;.d.ts) to store all the interfaces and types needed. This way, all developers can easily understand the required props, the expected response, and other details.</li><li><strong>constant.ts file</strong>: This file is optional and will contain all the constant variables needed in a folder.</li><li><strong>index.ts file</strong>: Since we place all components in a folder, this file will help us export all components, eliminating the need to write the element directory too deeply. Here is an example of the contents of the index.ts file:</li></ul><pre>// src/components/index.ts<br>export * from &#39;./contexts&#39;<br>export * from &#39;./elements&#39;<br>export * from &#39;./hooks&#39;<br>export * from &#39;./modules&#39;<br>export * from &#39;./utils&#39;</pre><h4>Tips</h4><p>Add the following code to your tsconfig.json file:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;paths&quot;: {<br>      &quot;@contexts&quot;: [&quot;src/components/contexts&quot;],<br>      &quot;@elements&quot;: [&quot;src/components/elements&quot;],<br>      &quot;@hooks&quot;: [&quot;src/components/hooks&quot;],<br>      &quot;@modules&quot;: [&quot;src/components/modules&quot;],<br>      &quot;@utils&quot;: [&quot;src/components/utils&quot;],<br>    },<br>    ..<br>  },<br>  ...<br>}</pre><p>Now, you can import all components located in the components folder by simply writing @&lt;section&gt;, like the following code:</p><pre>import { ExampleModule } from &#39;@modules&#39;</pre><h4>Pages Package</h4><pre>project-root-directory<br>│<br>└── src<br>    │<br>    └── pages<br>        │<br>        ├── _app.tsx<br>        │<br>        ├── _document.tsx<br>        │<br>        ├── index.tsx<br>        │<br>        └── ... (another tsx files for another pages)</pre><p>There are no changes to the project structure here, only in each page file, you need to make some adjustments since we are using modules to store our HTML files. Here is an example of the modified page file:</p><pre>// src/pages/example.tsx<br>import { NextPage } from &#39;next&#39;<br>import { ExampleModule } from &#39;@modules&#39;</pre><pre>const Example: NextPage = () =&gt; &lt;ExampleModule /&gt;</pre><pre>export default Example</pre><pre>// You can add SSR here</pre><h4>Styles Package</h4><pre>project-root-directory<br>│<br>└── src<br>    │<br>    └── styles<br>        │<br>        ├── globals.css<br>        │<br>        └── ... (another css files)</pre><p>There are no changes here.</p><h3>Conclusion</h3><p>Applying best programming practices and SOLID principles is crucial in creating high-quality, maintainable, and scalable applications (SOLID applications). Additionally, a well-structured project within a project team will facilitate developers in the development, debugging, and maintenance processes.</p><h4>References:</h4><ul><li><a href="https://nextjs.org/docs">Docs | Next.js (nextjs.org)</a></li><li><a href="https://github.com/DJaegerScript/next-stride">DJaegerScript/next-stride: CLI tools for Next JS App 🚀 (github.com)</a></li><li><a href="https://en.wikipedia.org/wiki/SOLID">SOLID — Wikipedia</a></li><li><a href="https://medium.com/backticks-tildes/the-s-o-l-i-d-principles-in-pictures-b34ce2f1e898">The S.O.L.I.D Principles in Pictures | by Ugonna Thelma | Backticks &amp; Tildes | Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16b454179a08" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>