<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mrosyidr</title>
    <description>The latest articles on DEV Community by mrosyidr (@mrosyidr).</description>
    <link>https://dev.to/mrosyidr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1041193%2Fa7f37d6e-11db-4add-8e5b-586ed378f884.png</url>
      <title>DEV Community: mrosyidr</title>
      <link>https://dev.to/mrosyidr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrosyidr"/>
    <language>en</language>
    <item>
      <title>Clean Coding: The Drawbacks</title>
      <dc:creator>mrosyidr</dc:creator>
      <pubDate>Wed, 28 Jun 2023 10:58:22 +0000</pubDate>
      <link>https://dev.to/mrosyidr/clean-coding-the-drawbacks-37j8</link>
      <guid>https://dev.to/mrosyidr/clean-coding-the-drawbacks-37j8</guid>
      <description>&lt;p&gt;While clean coding practices have numerous benefits, &lt;strong&gt;it's important to acknowledge that there can be some potential drawbacks&lt;/strong&gt; or challenges associated with them. Here are a few drawbacks or considerations related to clean coding:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Time and effort: Writing clean code often &lt;strong&gt;requires additional time and effort&lt;/strong&gt; compared to writing code that merely works. Adhering to clean coding principles may involve more careful planning, refactoring, and attention to detail. This can potentially slow down the development process, especially when working under tight deadlines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subjectivity: Clean coding practices are &lt;strong&gt;subjective to some extent&lt;/strong&gt;. Different developers may have different interpretations of what constitutes clean code, leading to potential disagreements or conflicts within a team. Finding a balance between personal preferences and team conventions can be challenging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learning curve: Embracing clean coding principles requires developers to &lt;strong&gt;learn and adapt to new practices and techniques&lt;/strong&gt;. It may take time for team members to understand and internalize these principles, especially when transitioning from less disciplined coding practices. This learning curve can impact initial productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Over-engineering: In some cases, an excessive focus on clean code &lt;strong&gt;can lead to over-engineering&lt;/strong&gt;. Developers may spend too much time optimizing and refactoring code that does not necessarily require it. Over-optimization can introduce unnecessary complexity and decrease overall efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trade-offs with performance: While clean code can indirectly contribute to performance improvements, there might be situations where highly optimized, but less readable or less maintainable code is necessary for specific performance-critical sections. Balancing performance requirements with clean coding practices &lt;strong&gt;may require careful consideration&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Balancing pragmatism: Clean coding principles should be applied with pragmatism. In certain situations, due to time constraints or specific project requirements, it &lt;strong&gt;may not be feasible or practical to adhere strictly to all clean coding practices&lt;/strong&gt;. Finding the right balance between clean code and meeting project needs is crucial.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's important to note that &lt;strong&gt;these potential drawbacks should not undermine the overall value of clean coding&lt;/strong&gt;. The benefits of clean code often outweigh the challenges, and the drawbacks can be mitigated through effective team communication, education, and a pragmatic approach to applying clean coding principles.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Clean code is not a project; it's a way of life."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;...always&lt;/em&gt; Happy Coding! 🔥&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>softwareengineering</category>
      <category>codingprinciple</category>
    </item>
    <item>
      <title>Clean Coding: The Benefits</title>
      <dc:creator>mrosyidr</dc:creator>
      <pubDate>Wed, 28 Jun 2023 10:06:18 +0000</pubDate>
      <link>https://dev.to/mrosyidr/clean-coding-3lno</link>
      <guid>https://dev.to/mrosyidr/clean-coding-3lno</guid>
      <description>&lt;p&gt;&lt;strong&gt;Clean coding&lt;/strong&gt; refers to the practice of writing code that is easy to read, understand, and maintain. It emphasizes the use of good programming principles and techniques to produce high-quality code. Here are some key details and benefits of clean coding:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Readability: Clean code is highly readable, with clear and self-explanatory names for variables, functions, and classes. It follows consistent formatting and indentation practices, making it easier for developers to understand and navigate the codebase. Readable code &lt;strong&gt;reduces confusion&lt;/strong&gt; and enhances collaboration among team members.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintainability: Clean code is designed to be &lt;strong&gt;easily maintainable over time&lt;/strong&gt;. It follows modular and cohesive structures, with smaller functions or methods that perform specific tasks. This makes it simpler to debug, modify, and enhance the codebase, reducing the chances of introducing bugs or unexpected behavior during maintenance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalability: Clean code is more scalable as it encourages the separation of concerns and the use of well-defined interfaces. It allows for the addition of new features or changes without significant impact on existing code. This &lt;strong&gt;promotes code reuse&lt;/strong&gt; and ensures that the system can grow and adapt smoothly as requirements evolve.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testability: Clean code is inherently more testable. It follows the Single Responsibility Principle, which means that functions or methods have clear and focused objectives, making it &lt;strong&gt;easier to write unit tests&lt;/strong&gt; for individual components. Well-tested code provides confidence in its correctness and facilitates the process of identifying and fixing issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Collaboration: Clean code &lt;strong&gt;promotes effective collaboration&lt;/strong&gt; within development teams. When code is clean and readable, it becomes easier for team members to review and provide feedback. It fosters a shared understanding of the codebase and encourages knowledge sharing among developers, improving overall team productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code reviews: Clean code is &lt;strong&gt;highly suitable for code reviews&lt;/strong&gt;. It allows reviewers to quickly grasp the purpose and logic of the code, identify potential issues, and suggest improvements. Code reviews based on clean code principles help maintain code quality standards, catch bugs early, and prevent technical debt from accumulating.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code longevity: Clean code &lt;strong&gt;has a longer lifespan&lt;/strong&gt;. It reduces the accumulation of technical debt and minimizes the need for extensive rewrites or refactoring in the future. Clean codebases are easier to understand and work with, even for developers who are new to the project, thus ensuring the long-term sustainability of the software.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;In summary, clean coding practices lead to code that is easier to understand, maintain, and collaborate on. It improves the overall quality of the codebase, reduces the likelihood of introducing bugs, and promotes efficient development processes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Hmm, it sounds interesting. But, is it improving performance as well?&lt;/em&gt;&lt;br&gt;
&lt;a href="https://i.giphy.com/media/rmBu9NiKSMzWLjPsok/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/rmBu9NiKSMzWLjPsok/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clean coding practices primarily focus on improving the readability, maintainability, and overall quality of the code. While clean code indirectly contributes to performance improvements, it is not its primary goal. However, there are some ways in which clean code can impact performance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Optimized logic: Clean code encourages writing code with clear and concise logic. By following best practices and avoiding unnecessary complexity, developers can write more efficient algorithms and avoid performance bottlenecks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code organization: Clean code promotes modular and well-structured code organization. This allows developers to identify and optimize specific sections of the codebase that may be causing performance issues. Clean code encourages separation of concerns, making it easier to isolate and optimize critical parts of the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Refactoring opportunities: Clean code often goes hand in hand with refactoring. Refactoring is the process of restructuring existing code to improve its internal structure and maintainability without changing its external behavior. During refactoring, developers can identify and eliminate code smells, such as duplicated code or inefficient algorithms, which can lead to performance improvements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing and profiling: Clean code is easier to test and profile. By writing clean and modular code, developers can more effectively identify and isolate performance bottlenecks during testing and profiling processes. This allows for targeted optimizations and improvements.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While clean coding practices can indirectly contribute to performance improvements, it's important to note that optimizing performance often requires specific techniques, profiling, and fine-tuning of critical sections. &lt;strong&gt;Performance optimization goes beyond just clean code&lt;/strong&gt; and involves considerations such as algorithmic efficiency, hardware constraints, caching strategies, and more. Therefore, while clean code can positively impact performance, it is not a direct guarantee of improved performance on its own.&lt;/p&gt;

&lt;p&gt;Again,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Leave the code cleaner than you found it"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Happy Coding, Cleaner! 🔥&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>softwareengineering</category>
      <category>codingprinciple</category>
    </item>
    <item>
      <title>The Boy Scout Rule</title>
      <dc:creator>mrosyidr</dc:creator>
      <pubDate>Wed, 28 Jun 2023 09:56:43 +0000</pubDate>
      <link>https://dev.to/mrosyidr/the-boy-scout-rule-4jag</link>
      <guid>https://dev.to/mrosyidr/the-boy-scout-rule-4jag</guid>
      <description>&lt;p&gt;This is one of popular clean code principles from Uncle Bob. You can find it on his book (Clean Code: A Handbook of Agile Software Craftmanship by Robert C. Martin. Chapter 1: Clean Code, page 14.)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Leave the campground cleaner than you found it."&lt;/em&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This was adapted from Robert Stephenson Smyth Baden-Powell’s farewell message to the Scouts: “Try and leave this world a little better than you found it . . .”&lt;/p&gt;

&lt;p&gt;This principle is often used metaphorically in software development to emphasize the importance of &lt;strong&gt;writing clean, maintainable code and leaving the codebase in a better state than it was before making any changes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Like what the scouts did cleanup in campfire, the software developers should implement this principle as well. The cleanup doesn’t have to be something big. Change one variable name for the better, break up one function that’s a little too large, eliminate one small bit of duplication, clean up one composite &lt;code&gt;if&lt;/code&gt; statement. These improvements will make &lt;em&gt;"our world"&lt;/em&gt; a better place.&lt;br&gt;
&lt;em&gt;...and it will guide us to &lt;strong&gt;clean coding&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExbWN3NjFrdmhma2ljYjc5dDZ1N3AybHVtc3RldDh4NHFnOXBncWhjdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7TKy3KWDYOA7OUSI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExbWN3NjFrdmhma2ljYjc5dDZ1N3AybHVtc3RldDh4NHFnOXBncWhjdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7TKy3KWDYOA7OUSI/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Okay, then. Now what?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding, Scouts! 🔥&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>softwareengineering</category>
      <category>codingprinciple</category>
    </item>
  </channel>
</rss>
