<?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: Yusuf Ali Koyuncu</title>
    <description>The latest articles on DEV Community by Yusuf Ali Koyuncu (@jimysheepman).</description>
    <link>https://dev.to/jimysheepman</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%2F811953%2F152225af-18ee-4ae2-a087-84942a6cb964.jpg</url>
      <title>DEV Community: Yusuf Ali Koyuncu</title>
      <link>https://dev.to/jimysheepman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jimysheepman"/>
    <language>en</language>
    <item>
      <title>Clean Code Book Summary II</title>
      <dc:creator>Yusuf Ali Koyuncu</dc:creator>
      <pubDate>Thu, 25 Jan 2024 07:04:03 +0000</pubDate>
      <link>https://dev.to/jimysheepman/clean-code-book-summary-ii-365o</link>
      <guid>https://dev.to/jimysheepman/clean-code-book-summary-ii-365o</guid>
      <description>&lt;p&gt;Hello, in this article I am here with the last part of this series. You can reach the previous part of the series from the link below. So let’s start;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/jimysheepman" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eFS8_1wt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://media.dev.to/cdn-cgi/image/width%3D150%2Cheight%3D150%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto/https%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Fuser%252Fprofile_image%252F811953%252F152225af-18ee-4ae2-a087-84942a6cb964.jpg" alt="jimysheepman"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/jimysheepman/clean-code-book-summary-i-1a69" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Clean Code Book Summary I&lt;/h2&gt;
      &lt;h3&gt;Yusuf Ali Koyuncu ・ Jan 25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#softwaredevelopment&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#softwareengineering&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cleancode&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Chapter-09 Unit Tests
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_-zzHXK1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AJeTT4wlgH3EYMSr4UlBI1A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_-zzHXK1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AJeTT4wlgH3EYMSr4UlBI1A.png" alt="Unit Tests" width="495" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 rules of Test-Driven Development, these three rules keep you in the loop and iterate until the desired development is done;

&lt;ul&gt;
&lt;li&gt;You cannot write production code without writing a failed unit test.&lt;/li&gt;
&lt;li&gt;You may not be able to write more unit tests than are enough to fail, and the compiling will fail.&lt;/li&gt;
&lt;li&gt;You cannot write more production code than is sufficient to pass the already failing test.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Keep tests clean.&lt;/li&gt;
&lt;li&gt;Test code is just as important as production code.&lt;/li&gt;
&lt;li&gt;Code Base also makes it easier for us to make changes.&lt;/li&gt;
&lt;li&gt;Tests must be strictly dignified and readable.&lt;/li&gt;
&lt;li&gt;Must have one assert per test.&lt;/li&gt;
&lt;li&gt;Each test must test a single job.&lt;/li&gt;
&lt;li&gt;Clean tests follow this abbreviation. F.I.R.S.T.

&lt;ul&gt;
&lt;li&gt;Fast → Tests should be fast.&lt;/li&gt;
&lt;li&gt;Independent → Tests must be independent.&lt;/li&gt;
&lt;li&gt;Repeatable → Tests must be testable in any environment.&lt;/li&gt;
&lt;li&gt;Self-Validating → Tests must contain a result.(Fail or Pass)&lt;/li&gt;
&lt;li&gt;Timely → Writing tests on time makes test writing more successful.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-10 Classes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mc0HQQkC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AWv2htmcYHQf-U3yF9l--tA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mc0HQQkC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AWv2htmcYHQf-U3yF9l--tA.png" alt="Classes" width="577" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Class organization (according to java convention)

&lt;ol&gt;
&lt;li&gt;Variables list.&lt;/li&gt;
&lt;li&gt;Public static constants variables.&lt;/li&gt;
&lt;li&gt;Private static variables.&lt;/li&gt;
&lt;li&gt;Private instance variables.&lt;/li&gt;
&lt;li&gt;Public variable.&lt;/li&gt;
&lt;li&gt;Public functions.&lt;/li&gt;
&lt;li&gt;Private utilities.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Follows the above steps and helps the program read like a newspaper article.&lt;/li&gt;
&lt;li&gt;Encapsulation; Instead of accessing the variables in the class directly, it is to be accessed through functions.&lt;/li&gt;
&lt;li&gt;Classes must be small. To be able to measure, responsibility must be taken into account.&lt;/li&gt;
&lt;li&gt;If you use the words "if", "and", "or" and "but" when describing a class or function to someone, it means you have more than one responsibility. It is not clean.&lt;/li&gt;
&lt;li&gt;The Single Responsibility Principle (SRP); A class or module specifies only one responsibility, and it should have only one reason to change.&lt;/li&gt;
&lt;li&gt;The logic of doing something is done is wrong. You have to be focused on turning around and improving.&lt;/li&gt;
&lt;li&gt;You should have multiple structures that do the target work and rotate between themselves.&lt;/li&gt;
&lt;li&gt;Cohesion; You have to keep the structures that are close to each other together.&lt;/li&gt;
&lt;li&gt;Writing clean code greatly reduces the risk at the time of change.&lt;/li&gt;
&lt;li&gt;In some developments, that is, writing a class preserves the SRP feature of the system. This is what needs to be done. In this way, it allows us to add new structures to be added without changing the existing structure.&lt;/li&gt;
&lt;li&gt;Abstract classes for isolation, depend on interfaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-11 Systems
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bXyi5J8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AdH5NJwSZyr4XQxduG3D6RQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bXyi5J8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AdH5NJwSZyr4XQxduG3D6RQ.png" alt="Systems" width="506" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complexity should be measured.&lt;/li&gt;
&lt;li&gt;The construction phase and the usage phase are different from each other and should be separated.&lt;/li&gt;
&lt;li&gt;Builder patterns can be used.&lt;/li&gt;
&lt;li&gt;Dependency Injection; It allocates secondary responsibilities from one object (IOC) to other dedicated objects, thus supporting SRP.&lt;/li&gt;
&lt;li&gt;Dependency injection provides method and constructor arguments that inject dependencies and link dependencies together.&lt;/li&gt;
&lt;li&gt;System Design is an important element.&lt;/li&gt;
&lt;li&gt;Separate concerns adequate structure should be properly constructed.&lt;/li&gt;
&lt;li&gt;Aspect-oriented programming (AOP) should be used to solve cross-cutting concerns.&lt;/li&gt;
&lt;li&gt;Focus on systems that are simple and open to expansion.&lt;/li&gt;
&lt;li&gt;The system should be designed as testable.&lt;/li&gt;
&lt;li&gt;If you can see the standards add value, you should use them.&lt;/li&gt;
&lt;li&gt;System must be clean. Processes should be advanced and a TDD-oriented approach should be exhibited.&lt;/li&gt;
&lt;li&gt;No matter what level you are, you should think simply.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-12 Emergence
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QwGRGl_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A-FHFI63XfmxRtyRU0DXhuw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QwGRGl_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A-FHFI63XfmxRtyRU0DXhuw.png" alt="Emergence" width="501" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We find Kent Beck's four rules to be of great help in creating well-designed software. According to Kent, a design is simple if it follows these rules;

&lt;ul&gt;
&lt;li&gt;Runs all tests.
&lt;/li&gt;
&lt;li&gt;Does not contain duplicate code.
&lt;/li&gt;
&lt;li&gt;If the programmer's purpose is clearly stated.
&lt;/li&gt;
&lt;li&gt;Minimizes the number of classes and methods.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Refactoring is important. It should be done regularly and questioned.&lt;/li&gt;
&lt;li&gt;Pay attention to the naming pattern when using the design pattern. This improves readability.&lt;/li&gt;
&lt;li&gt;It takes a lot of practice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-13 Concurrency
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nHoM9Y-2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Ap2DfF_e6AdMBSwImSdMWYA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nHoM9Y-2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Ap2DfF_e6AdMBSwImSdMWYA.png" alt="Concurrency" width="503" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Objects are absorptions of processes. Threads belong to the schedule.&lt;/li&gt;
&lt;li&gt;Concurrent programming is not easy. Especially when it starts working under load, problems will arise.&lt;/li&gt;
&lt;li&gt;Concurrency is a decoupling strategy. (Decoupling)&lt;/li&gt;
&lt;li&gt;The schedule determines when it will work.&lt;/li&gt;
&lt;li&gt;Dealing with more than one thing at the same time.&lt;/li&gt;
&lt;li&gt;Concurrency can always improve performance.&lt;/li&gt;
&lt;li&gt;If a concurrency system is to be built, the design must be changed.&lt;/li&gt;
&lt;li&gt;You need to know how to deal with concurrency updates and deadlock.&lt;/li&gt;
&lt;li&gt;It is difficult to simulate the same error again.&lt;/li&gt;
&lt;li&gt;Concurrency has a life cycle. But it should be kept completely different and separate from other code parts.&lt;/li&gt;
&lt;li&gt;"Lock" is used for data consistency. Atomic structures perform the same process on the back.&lt;/li&gt;
&lt;li&gt;Keep data encapsulation ahead and reduce tampering with shared data.&lt;/li&gt;
&lt;li&gt;Threads must be independent. Examples, ReentrantLock, and Semaphore CountDownLatch. (Suggestion: Check out the classes you can use.)&lt;/li&gt;
&lt;li&gt;Execution Models; Bound Resources, Mutual Exclusion, Starvation, Deadlock, Livelock. Examples; Producer-Consumer, Readers-Writers, Dining Philosophers. (Suggestion: Learn these basic algorithms and understand their solutions)&lt;/li&gt;
&lt;li&gt;Synchronized Methods; Client-Based Locking, Server-Based Locking, Adapted Server. (Suggestion: Avoid using multiple methods on a shared object)&lt;/li&gt;
&lt;li&gt;Keep your synchronized partitions as small as possible.&lt;/li&gt;
&lt;li&gt;It is Difficult to Write the Correct Shut-Down Code. The graceful shutdown can be difficult to fix. (Suggestion: Think about shutdown early and getting it working early. It will take longer than expected. Review existing algorithms because this is probably harder than you think.)&lt;/li&gt;
&lt;li&gt;Experiment with different scenarios to test.

&lt;ul&gt;
&lt;li&gt;Handle threading errors.&lt;/li&gt;
&lt;li&gt;Run nonthreaded codes first.&lt;/li&gt;
&lt;li&gt;Make thread code pluggable.&lt;/li&gt;
&lt;li&gt;Make thread code adjustable.&lt;/li&gt;
&lt;li&gt;Invoke more threads than the number of processors.&lt;/li&gt;
&lt;li&gt;Run on different platforms.&lt;/li&gt;
&lt;li&gt;Use code to try errors and force the system.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-14 Successive Refinement
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V8IdWFdx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AVZW3wSvNFWgZ2grKlpP1eQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V8IdWFdx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AVZW3wSvNFWgZ2grKlpP1eQ.png" alt="Successive Refinement" width="545" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This chapter is a case study examining the argument parser structure of a CLI application.&lt;/li&gt;
&lt;li&gt;It is explained through the code. This chapter should be read directly.&lt;/li&gt;
&lt;li&gt;Working code is just useless. It will break in the future and will not work.&lt;/li&gt;
&lt;li&gt;The impact of bad code on a project is huge.&lt;/li&gt;
&lt;li&gt;Bad code creates a lot of technical debt.&lt;/li&gt;
&lt;li&gt;It costs a lot of time to clean the code.&lt;/li&gt;
&lt;li&gt;Bad code creates multiple dependencies and makes it more difficult to resolve.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-15 JUnit Internals
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TkQB-F15--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A9XzI2tjujkvH5TLTveB-sw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TkQB-F15--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A9XzI2tjujkvH5TLTveB-sw.png" alt="JUnit Internals" width="548" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This chapter critiques some of the JUnit framework.&lt;/li&gt;
&lt;li&gt;It is explained through the code. This chapter should be read directly.&lt;/li&gt;
&lt;li&gt;When it comes to frameworks, JUnit is simple in design, precise in definition, and clever in implementation.&lt;/li&gt;
&lt;li&gt;Coverage of tests is important.&lt;/li&gt;
&lt;li&gt;Each of us has a responsibility to leave the code a little better than we found it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-16 Refactoring SerialDate
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4BCpI8-Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AW6OgGAzZ3lI7YRKqIrAtdA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4BCpI8-Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AW6OgGAzZ3lI7YRKqIrAtdA.png" alt="Refactoring SerialDate" width="584" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In this chapter, the org.jfree.date package of the JCommon library has the SerialDate class and refactors it.&lt;/li&gt;
&lt;li&gt;It is explained through the code. This chapter should be read directly.&lt;/li&gt;
&lt;li&gt;Criticism is good and it develops people.&lt;/li&gt;
&lt;li&gt;First make the code work. Make sure you test everything and make sure it passes the tests.&lt;/li&gt;
&lt;li&gt;Leave the code cleaner than you found it. This may take time, but it’s worth it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-17 Smells and Heuristics
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A680qw0_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Aw3QgEvALWYOJMEzbe4cS8Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A680qw0_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Aw3QgEvALWYOJMEzbe4cS8Q.png" alt="Smells and Heuristics" width="564" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This chapter talks about the definition of “Code Smells” in Martin Fowler’s Refactoring book.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comments
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inappropriate Information;&lt;/strong&gt; keep everything but the code in a different place. Comments should be reserved for technical notes on code and design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Obsolete Comment;&lt;/strong&gt; Reviews age fast. You should delete the comment at the point where you can.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redundant Comment;&lt;/strong&gt; unnecessary comments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poorly Writer Comment;&lt;/strong&gt; There should be no incomplete or poorly written comments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commented-Out Code;&lt;/strong&gt; if a code is being commented out, it’s an abomination.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Environment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build Requires More Than One Step;&lt;/strong&gt; Running a project should be simple.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests Require More Than One Step;&lt;/strong&gt; Running tests should be easy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Too Many Arguments;&lt;/strong&gt; functions must have few arguments. Question yourself if he has more than 3–4 arguments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output Arguments;&lt;/strong&gt; If the function needs to change the state of an object, have it change the state of the object it is called from, rather than passing it as output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flag Arguments;&lt;/strong&gt; Having a boolean parameter means that it is overworking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dead Function;&lt;/strong&gt; delete dead functions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  General
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multiple Languages in One Source File;&lt;/strong&gt; avoid using multiple languages within a file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Obvious Behavior Is Unimplemented;&lt;/strong&gt; The code we read should meet our expectations. It shouldn’t offer anything different while waiting for an output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incorrect Behavior at the Boundaries;&lt;/strong&gt; don’t trust the code you wrote, try to write a test for each boundary condition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overridden Safeties;&lt;/strong&gt; skip security steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplication;&lt;/strong&gt; It is one of the most important rules. Dave Thomas and Andy Hunt called it the DRY principle (Don’t Repeat Yourself). Kent Beck has made this one of the core tenets of Extreme Programming, “Once, and only once.” said. Ron Jeffries ranks this rule just below making sure all tests pass. Any time you see duplication in code, it represents a missed opportunity for abstraction. Replace switch/case or if/else structures with polymorphism. Modules that have similar algorithms but don’t share similar lines of code are even more subtle. This is again a repetition and should be handled using “TEMPLATE METHOD” or “STRATEGY PATTERN”.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code at Wrong Level of Abstraction;&lt;/strong&gt; There should be no abstraction at the wrong level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Base Classes Depending on Their Derivatives;&lt;/strong&gt; The base class should not depend on what comes from the subclass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too Much Information;&lt;/strong&gt; well-defined modules have very small interfaces that let you do a lot with very little. This way interfaces should be defined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeadCode;&lt;/strong&gt; dead ie unused codes should be detected and deleted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vertical Separation;&lt;/strong&gt; variables and function should be defined close to where they are used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistency;&lt;/strong&gt; names should be named consistently according to the work they do on the whole project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clutter;&lt;/strong&gt; You should delete what you don’t use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Artificial Coupling;&lt;/strong&gt; Things that are not connected should not be artificially combined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Envy;&lt;/strong&gt; The methods of one class should deal with the variables and functions of the class they belong to, not the variables and functions of the other class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selector Arguments;&lt;/strong&gt; It’s better to have many functions than to pass some code to one function to choose the behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Obscured Intent;&lt;/strong&gt; The code must be meaningful and readable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Misplaced Responsibility;&lt;/strong&gt; Make sure you put the code you are using in the right place. You have to keep related structures together.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inappropriate Static;&lt;/strong&gt; You should prefer non-static methods to static methods. If you really want a function to be static, make sure you don’t have the chance to want it to behave polymorphically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Explanatory Variables;&lt;/strong&gt; variable names should be good and descriptive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Function Names Should Say What They Do;&lt;/strong&gt; A function name should describe what it does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand the Algorithm;&lt;/strong&gt; The best way to understand the algorithm is to refactor the function until you have something clean and meaningful enough to clearly show how it works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make Logical Dependencies Physical;&lt;/strong&gt; if one module depends on another, that dependency must not only be logical but also physical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefer Polymorphism to If/Else or Switch/Case;&lt;/strong&gt; When writing code, replace the switch/case or if/else structure with polymorphism.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow Standard Conventions;&lt;/strong&gt; Team rules and standards need to be determined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replace Magic Numbers with Named Constants;&lt;/strong&gt; having raw numbers in your code is a bad idea. You should hide them behind well-named constants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Be Precise;&lt;/strong&gt; The reason for ambiguities and inconsistencies in the code is either the result of disagreements or laziness. In both cases, they must be eliminated. That’s why you have to be determined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structure Over Convention;&lt;/strong&gt; we must keep the structural rules above all else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encapsulate Conditionals;&lt;/strong&gt; If more than one structure is checked in the if condition, it should be extracted in a method and the method should be called in the if condition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Negative Conditionals;&lt;/strong&gt; Positive conditions should be checked in the if condition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functions Should Do One Thing;&lt;/strong&gt; the function should be responsible for and do a single job.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden Temporal Couplings;&lt;/strong&gt; use arguments that make temporal coupling explicit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don’t Be Arbitrary;&lt;/strong&gt; Your code structure should be correct and consistent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encapsulate Boundary Conditions;&lt;/strong&gt; +1 or -1 may be needed in some controls. Don’t let them leak all over the code. We don’t want the +1’s and -1’s to scatter left and right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functions Should Descend Only One Level of Abstraction;&lt;/strong&gt; The expressions within the function must all be written at the same abstraction level, which must be one level below the operation described by the function name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep Configurable Data at High Levels;&lt;/strong&gt; high-level constants are easy to change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Transition Navigation;&lt;/strong&gt; A to B; If B and C cooperate, we don’t want modules A to know about C. So A; He must not know C over B.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Java
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Long Import Lists by Using Wildcards;&lt;/strong&gt; If you are using two or more classes from a package, import the entire package.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don’t Inherit Constants;&lt;/strong&gt; constants are hidden at the top of the inheritance hierarchy. Don’t use inheritance as a way to cheat the language’s scope determination rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constants versus Enums;&lt;/strong&gt; Refer to enum instead of defining public static final int.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Names
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choose Descriptive Names;&lt;/strong&gt; Choose descriptive and meaningful names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose Names at the Appropriate Level of Abstraction;&lt;/strong&gt; Choose correct naming according to abstraction level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Standard Nomenclature Where Possible;&lt;/strong&gt; use nouns denoting the work done in all nomenclature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unambiguous Names;&lt;/strong&gt; Do not be afraid of long names, the important thing is that it is descriptive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Long Names for Long Scopes;&lt;/strong&gt; The nomenclature should be chosen according to its scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Encodings;&lt;/strong&gt; Do not use encrypted names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Names Should Describe Side-Effects;&lt;/strong&gt; naming should describe everything that a function, variable, or class is or does. Do not store Side-Effects with a naming, specify them in the naming.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Insufficient;&lt;/strong&gt; test code should test anything that might break in the code. Tests are inadequate as long as there are unverified tests or conditions undiscovered by calculations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a Coverage Tool;&lt;/strong&gt; Use tools to see what tests cover in the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don’t Skip Trivial Tests;&lt;/strong&gt; Don’t be afraid to write tests, even if the cases are trivial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An Ignored Test is a Question about an Ambiguity;&lt;/strong&gt; If you’re ignoring your test, query your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Boundary Conditions;&lt;/strong&gt; Take particular care to test boundary conditions. Often we get the middle of an algorithm right, but we get the bounds wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exhaustively Tested Near Bugs;&lt;/strong&gt; When you find a bug in a function, it’s wise to do a thorough testing of that function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns of Failure Are Revealing;&lt;/strong&gt; poorly organized test cases will reveal failure patterns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Coverage Patterns Can Be Revealing;&lt;/strong&gt; Looking at code that may or may not be executed by passed tests gives clues as to why failed tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests Should Be Fast;&lt;/strong&gt; a slow test is a test that will not run. Do what you have to do to keep your tests fast.&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;“Bad programmers worry about the code. Good programmers worry about data structures and their relationships.” — Linus Torvalds&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>softwareengineering</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Clean Code Book Summary I</title>
      <dc:creator>Yusuf Ali Koyuncu</dc:creator>
      <pubDate>Thu, 25 Jan 2024 06:39:04 +0000</pubDate>
      <link>https://dev.to/jimysheepman/clean-code-book-summary-i-1a69</link>
      <guid>https://dev.to/jimysheepman/clean-code-book-summary-i-1a69</guid>
      <description>&lt;p&gt;Hello, I would like to share with you an issue that is accepted as a touchstone in the software world and that has entered the literature, such as if you write “clean” in the industry.&lt;/p&gt;

&lt;p&gt;In this article, I will share with you the notes I took while reading this book. The book consists of 17 chapters in total, and I will talk about all chapters. I planned this as a series and I will share 2 parts in total. While taking notes, I wrote down the points that I consider important, so this is a summary. The best source, of course, is to read the book itself. I aim to convey it to you in a simple way by progressing from a long article, rather than a long article. Let’s get started, foremost, let me briefly talk about the book and its author.&lt;/p&gt;

&lt;p&gt;Robert C. Martin (Uncle Bob); A software expert since 1970, Robert has spent the last 40 years improving the field, from launching the Agile Alliance to writing landmark books on Agile Programming, Clean Code and more. This book is technical, pragmatic, and important in content. The author is highly experienced and professional, dedicated to writing what works in practice as opposed to what might work in theory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dynnx0rxl1uvx8ba9ju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dynnx0rxl1uvx8ba9ju.png" alt="Clean Code" width="681" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When writing code, there should be minimal and straight logic. In this way, maintenance is easy and problems in error handling are minimal.&lt;/li&gt;
&lt;li&gt;The written code must be able to convey its intention simply and effectively, that is, directly.&lt;/li&gt;
&lt;li&gt;Must be highly legible. For example, it should not get stuck when reading from top to bottom, such as a newspaper, and it should be easily understandable.&lt;/li&gt;
&lt;li&gt;The person reading the code must be able to meet their expectations.&lt;/li&gt;
&lt;li&gt;When a code is clean, it is understood by how few comments are made while reading it. For example, the less we say the question of what he meant here, or what it does, the cleaner it will be.&lt;/li&gt;
&lt;li&gt;Must pass all tests. Tests increase the stability of a code and minimize errors.&lt;/li&gt;
&lt;li&gt;There should be no repetitive pieces of code in the code.
It should be a minimal class, method, or function.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter — 2 Meaningful Names
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Nvd0pvu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2Ak6W5yVc7Cw0mx-JbQQ0WaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Nvd0pvu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2Ak6W5yVc7Cw0mx-JbQQ0WaA.png" alt="Meaningful Names" width="697" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variable names should be clear when read.&lt;/li&gt;
&lt;li&gt;Constant values should be kept as static variables.&lt;/li&gt;
&lt;li&gt;Variable names must be the same as common names. For example, constant names of the language used, or the nomenclature used by the Unix platform should be avoided.&lt;/li&gt;
&lt;li&gt;The programmer should avoid leaving false clues that obscure the meaning of the code&lt;/li&gt;
&lt;li&gt;We should not add "List" to the end of any list to specify it. We should use the plural, what it belongs to. For example, animal → animals.&lt;/li&gt;
&lt;li&gt;We should not make meaningful distinctions, so we should avoid using noisy words("the", "a", "an", etc.)&lt;/li&gt;
&lt;li&gt;We must use pronounceable nomenclature.&lt;/li&gt;
&lt;li&gt;We should put searchable nomenclature. It's like writing-related things with a specific pattern.&lt;/li&gt;
&lt;li&gt;The naming meaning given to a variable scope should increase at the right rate.&lt;/li&gt;
&lt;li&gt;We should avoid using encoded variable names.&lt;/li&gt;
&lt;li&gt;Class naming should not be a verb.&lt;/li&gt;
&lt;li&gt;Methods naming must be verb or verb phrase.&lt;/li&gt;
&lt;li&gt;Do not be playful, funny, and sarcastic in naming. So don't play word games.&lt;/li&gt;
&lt;li&gt;Choose a different word for each abstract concept and stick to it.&lt;/li&gt;
&lt;li&gt;Remember that people who read your code will be programmers. You can use Computer Science terms, algorithm names, pattern names, math terms, etc. use it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter — 3 Functions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uRgCSpD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AGfPMZImVfMGIzrLsc9wgSQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uRgCSpD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AGfPMZImVfMGIzrLsc9wgSQ.png" alt="Functions" width="572" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Functions and methods manage behaviors of classes.&lt;/li&gt;
&lt;li&gt;A function length must not exceed 100 lines. If it passes, it makes it harder to write tests.&lt;/li&gt;
&lt;li&gt;Line length must not exceed 150 characters. If it passes, it reduces readability.&lt;/li&gt;
&lt;li&gt;The function must be responsible for a single job. So it should only do one thing.
"Functions should do one thing. They should do it well. They should do it only."&lt;/li&gt;
&lt;li&gt;To make sure our function does only one thing, we need to make sure that all expressions in the function are at the same abstraction level.&lt;/li&gt;
&lt;li&gt;The code should flow from top to bottom. (The Step-down Rule)&lt;/li&gt;
&lt;li&gt;When dividing our function, we should do domain-based division.&lt;/li&gt;
&lt;li&gt;We can't always avoid switch cases, but we can make sure that each switch case low-level class is embedded and can never be repeated. We do this, of course, with polymorphism.&lt;/li&gt;
&lt;li&gt;With the Switch case, we should call classes, not functions.&lt;/li&gt;
&lt;li&gt;Function names should not be too long or in encoding format.&lt;/li&gt;
&lt;li&gt;A function should not exceed 3–4 arguments. We should avoid more. It complicates testability.&lt;/li&gt;
&lt;li&gt;To send more arguments, we must either send an object or a list.&lt;/li&gt;
&lt;li&gt;We should avoid the common monodic form.&lt;/li&gt;
&lt;li&gt;We should avoid adding flag arguments. Indicates that this function does more than one thing. The flag does one thing if it's true, and another if it's false!&lt;/li&gt;
&lt;li&gt;It should not cause side effects. So it shouldn't be secretly affecting other things.&lt;/li&gt;
&lt;li&gt;The function should either do something or respond to something, not both. Either your function should change the state of an object or return some information about it.&lt;/li&gt;
&lt;li&gt;It is a thing in error handling and must be managed separately.&lt;/li&gt;
&lt;li&gt;The DRY principle (Don't Repeat Yourself) is a powerful principle that comes across as not repeating yourself. Repetitive tasks increase complexity.&lt;/li&gt;
&lt;li&gt;First write the function as it works and then refactor it to clean.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-04 Comments
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CNIzOkHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AB2m4O2vTxsKwUD1QyQhrfg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CNIzOkHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AB2m4O2vTxsKwUD1QyQhrfg.png" alt="Comments" width="653" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Random comments should not be written. It should not be written at all, instead of having no purpose or being written randomly.&lt;/li&gt;
&lt;li&gt;It is a failure to explain the things that you can tell with the code with comments.&lt;/li&gt;
&lt;li&gt;Comments don't make up for bad code. Comments are not written for bad code.&lt;/li&gt;
&lt;li&gt;Describe what you are trying to tell with code.&lt;/li&gt;
&lt;li&gt;The best comment is the one you didn't find a way to write.&lt;/li&gt;
&lt;li&gt;Sometimes our corporate coding standards force us to write certain comments for legal purposes. So we can write a legal comment.&lt;/li&gt;
&lt;li&gt;We can write informative comments. (date format, regex, etc.)&lt;/li&gt;
&lt;li&gt;We should use the interpretation when trying to express our intention.&lt;/li&gt;
&lt;li&gt;When writing a test or what the result of an operation should come to, the code can be written in the comments.&lt;/li&gt;
&lt;li&gt;Comments can be made on the code that has been canceled or caused problems.&lt;/li&gt;
&lt;li&gt;TODO comments can be written.&lt;/li&gt;
&lt;li&gt;A part that seems insignificant can be written to emphasize its importance.&lt;/li&gt;
&lt;li&gt;Bad comment is an excuse for bad code.&lt;/li&gt;
&lt;li&gt;If you're going to do it for the sake of doing it, don't do it at all. It is necessary to write a comment with thought and thought.&lt;/li&gt;
&lt;li&gt;Comments summarizing the code should not be written.&lt;/li&gt;
&lt;li&gt;The comment should be specific for what it is written for.&lt;/li&gt;
&lt;li&gt;Keep diary-style comments at the top of the code.&lt;/li&gt;
&lt;li&gt;Do not write empty comments. (Noise Comments)&lt;/li&gt;
&lt;li&gt;Do not write the same code you wrote in the comments. (Scary Noise)&lt;/li&gt;
&lt;li&gt;Sometimes programmers like to mark a specific location in a source file. Don't do this. (Position Markers)&lt;/li&gt;
&lt;li&gt;Adding an author as a comment to the code.&lt;/li&gt;
&lt;li&gt;Do not write which one is closed at the end of a closing parenthesis as a comment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-05 Formatting
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hiQAUfVJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AN-nLUkHUnQTbOBVR3UvyGQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hiQAUfVJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AN-nLUkHUnQTbOBVR3UvyGQ.png" alt="Formatting" width="537" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Formatting is an important issue. Changes are never made when different formats are detected. The diff in code is always incomprehensible.&lt;/li&gt;
&lt;li&gt;Vertical formatting is important. There is a general answer to the question of how big a source file should be. It is recommended not to be too long. Note that this is a log scale, so a small difference in Vertical position means a huge difference in absolute size.&lt;/li&gt;
&lt;li&gt;The Newspaper Metaphor; it should be like a newspaper article or a source file. The name should be simple but descriptive. The name alone should be enough to tell us if we are in the right module. The top part of the source file should provide high-level concepts and algorithms. The detail should increase as you go down until you finally find the lowest-level functions and details in the source file. A newspaper consists of many articles; most are very small. Some are a little bigger. Few contain as much text as one page can hold. This makes the newspaper usable. If the newspaper were a long story with an untidy pile of facts, dates, and names, then we wouldn't be reading it.&lt;/li&gt;
&lt;li&gt;Vertical Openness Between Concepts; almost all code is read from left to right and top to bottom. Each line represents a statement or a sentence, and each set of lines represents a complete thought. These thoughts should be separated from each other by blank lines.&lt;/li&gt;
&lt;li&gt;Vertical Density; If openness separates the concepts, Vertical Density means a close relationship. Therefore, tightly related lines of code should appear vertically dense.&lt;/li&gt;
&lt;li&gt;Vertical Distance; Closely related concepts should be kept vertically close together. Invalid for concepts in separate files. Closely related concepts should not be separated into separate files.&lt;/li&gt;
&lt;li&gt;Variable Declarations; variables should be defined as close to where they are used as possible.&lt;/li&gt;
&lt;li&gt;Instance variables; must be defined at the top of the classes.&lt;/li&gt;
&lt;li&gt;Dependent Functions; If one function calls another, they should be vertically closed and the collar above the caller if possible.&lt;/li&gt;
&lt;li&gt;Conceptual Affinity; certain pieces of code want to be close to other pieces. They have a certain conceptual affinity. The stronger this closeness is,
there should be the less vertical distance between them. For example; assert functions because they share a common naming scheme and perform variations of the same basic task.&lt;/li&gt;
&lt;li&gt;Vertical Ordering; In general, we want function call dependencies to point downward. So a called function must be below a calling function&lt;/li&gt;
&lt;li&gt;Horizontal formatting is important. This shows that we should try to keep our lines short. Our line length can be up to 100–120 characters.&lt;/li&gt;
&lt;li&gt;Horizontal Openness and Density; We use spaces to separate them according to whether the relationship between them is strong or weak.&lt;/li&gt;
&lt;li&gt;Horizontal Alignment; Horizontal alignment is useless when defining a variable.&lt;/li&gt;
&lt;li&gt;Indentation; the code has a structured outline from top to bottom. This must be complied with.&lt;/li&gt;
&lt;li&gt;Breaking Indentation; Don't reduce short definitions to one line.&lt;/li&gt;
&lt;li&gt;Team Rules; every programmer has his own favorite formatting rules, but if he works in a team, then the team makes the rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-06 Objects and Data Structures
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--korhNnRq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A4RkX89zheJCo--4KxMlxMw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--korhNnRq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A4RkX89zheJCo--4KxMlxMw.png" alt="Objects and Data Structures" width="537" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can store our data with data abstraction. (Getter, Setter)&lt;/li&gt;
&lt;li&gt;The use of procedural code allows adding existing functions without changing existing data structures.&lt;/li&gt;
&lt;li&gt;Object-Oriented code makes it easy to add new classes without changing existing functions.&lt;/li&gt;
&lt;li&gt;Adding new data structures is difficult as all functions of the procedural code have to change.&lt;/li&gt;
&lt;li&gt;Object-Oriented code is difficult to add new methods because all classes have to change.&lt;/li&gt;
&lt;li&gt;Hybrid structures should be avoided. It complicates everything.&lt;/li&gt;
&lt;li&gt;In an Object-term structure, the object cannot be accessed through it. Data structures cannot be accessed from a rotating structure, from above it.&lt;/li&gt;
&lt;li&gt;Hybrid structures should not be built from data structures and objects.&lt;/li&gt;
&lt;li&gt;Data Transfer Objects; The concise form of a data structure is a class with public variables and no functions. This is sometimes called a data transfer object or DTO. DTOs are especially useful when communicating with the database or parsing messages from sockets etc. They are very useful structures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-07 Error Handling
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d4IQa1kc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AVl3qXf_Fau0Uc5HJ3bAKNQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d4IQa1kc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AVl3qXf_Fau0Uc5HJ3bAKNQ.png" alt="Error Handling" width="571" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return expectation rather than checking the code with if-else.&lt;/li&gt;
&lt;li&gt;We can create different errors and manage them.&lt;/li&gt;
&lt;li&gt;When you execute code in the Try portion of a Try-Catch-Finally statement, you indicate that execution can be canceled at any point and then resumed in a catch. Try blocks are like transactions in a way. The catch should leave your program in a consistent state no matter what you try.&lt;/li&gt;
&lt;li&gt;It's good practice to start with the Try-Catch-Finally statement when writing code that can throw an Exception.&lt;/li&gt;
&lt;li&gt;Use Unchecked Exceptions.&lt;/li&gt;
&lt;li&gt;Provide Context Exceptions.&lt;/li&gt;
&lt;li&gt;You should set up your error handling structure.&lt;/li&gt;
&lt;li&gt;Functions should not return null.&lt;/li&gt;
&lt;li&gt;Null values should not be passed to functions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chapter-08 Boundaries
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1irWupaP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Avitst9mV9reyqzW5PBl-VQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1irWupaP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Avitst9mV9reyqzW5PBl-VQ.png" alt="Error Handling" width="594" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sometimes we buy Third-Party packages or use open source. We have to somehow integrate this foreign code cleanly into our code. In this section, we look at practices and techniques for keeping the boundaries of our software clean.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using Third-Party Code; direct use. This code creates many dependencies and vulnerabilities. Instead, you can write a single client that uses it and access it in a more restricted way from anywhere in your code. It results in code that is easier to understand and harder to abuse.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you have a Third-Party dependency, you can test it with mock data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It may be in our interest to write tests for Third-Party code. Assuming it's not clear how to use our Third-Party library. We might spend a day or two (or more) reading the documentation and deciding how to use it. Then we can write our code to use Third-Party code and see if it does what we think. We wouldn't be surprised if we find ourselves stuck in long debugging sessions trying to figure out whether the bugs we encounter are in our code or theirs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Difficult to learn and integrate Third-Party code. Doing both at the same time is twice as difficult. Instead of trying and experimenting with new things in our production location, we can write some tests to explore our understanding of Third-Party code. Jim Newkirk calls these types of tests learning tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learning tests cost nothing. We had to learn the API anyway, and writing these tests was an easy and isolated way to get that knowledge. Learning tests are definitive experiences that help increase our understanding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The learning tests are free and have a positive return on investment. When there are new versions of the Third-Party package, we run learning tests to see if there are any behavioral differences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sometimes it is necessary to work in a module that will connect to another module under development, and we have no idea how to send the information as the API has not been designed yet. In these cases, it is recommended to create an interface to encapsulate communication with the waiting module. This way we have control of the module and can test it even though the second module is not yet available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interesting things are happening at the borders. Change is one of them. Good software designs adapt to change without major investments and rework. When we use code beyond our control, special care must be taken to protect our investment and ensure that future changes are not too costly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;“Details matter, it’s worth waiting to get it right.” -Steve Jobs&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>softwareengineering</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Where should I start programming, How can I be a good programmer?</title>
      <dc:creator>Yusuf Ali Koyuncu</dc:creator>
      <pubDate>Fri, 10 Feb 2023 06:30:16 +0000</pubDate>
      <link>https://dev.to/jimysheepman/where-should-i-start-programming-how-can-i-be-a-good-programmer-5g2n</link>
      <guid>https://dev.to/jimysheepman/where-should-i-start-programming-how-can-i-be-a-good-programmer-5g2n</guid>
      <description>&lt;h2&gt;
  
  
  Foreign Language
&lt;/h2&gt;

&lt;p&gt;Foremost, if you have a foreign language problem, you have to deal with it before you start programming. “Can’t it be done without a foreign language?” The answer to the question is not yes. Because almost all documentation and resources are available in English, and you need to constantly read and research to improve yourself. In addition, improving your language will enable you to communicate with employment opportunities and other communities and will allow you to receive information directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communications Skills
&lt;/h2&gt;

&lt;p&gt;Good communication skills directly correlate with good development skills. The ability to communicate is crucial for understanding problems clearly, being able to break them down into hypotheses and propose solutions in a coherent manner. You should be able to learn concepts quickly. And yes, this is a skill that improves through practice.&lt;/p&gt;

&lt;p&gt;If English is not your first language, make sure you know it well and can communicate it effectively. In the world of technology, English is the de facto language of most documentation and developer interactions. If you don’t speak it well enough, interpreters or translators may be required, making your knowledge second hand and easily outdated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Desire to Learn
&lt;/h2&gt;

&lt;p&gt;The desire to constantly learn and improve will make you different from other people throughout your life. Although we are not likely to see this difference immediately, as time passes, the sense of awareness in ourselves and the satisfaction of knowledge will remind you that you are a few steps away from success. If you want to be successful while starting this process, you should want to be a lifelong student, that is, to learn lifelong. Answering the question “Which language should I learn?”; Each language has different uses, pros and cons. What matters is what you want to do. Purpose-oriented learning will save you time. Choose what you want to do and learn the most popular language used in that field.​&lt;/p&gt;

&lt;h2&gt;
  
  
  Foster deep knowledge
&lt;/h2&gt;

&lt;p&gt;Carefully select the technologies you want to work with. Aim to become an expert in a couple — but competent with many. Research skills carefully and you can future-proof your career. I’ve answered a question about this on Quora, which you may want to take a look at. Always follow coding standards and write code that is understandable and commented where necessary and can be passed on to someone else easily. This was always important, but in the remote age, it’s essential.&lt;/p&gt;

&lt;h2&gt;
  
  
  University​
&lt;/h2&gt;

&lt;p&gt;Firstly, I recommend you to get into a good university and study in one of the departments of Computer, Software, Information Engineering. Studying in these departments will give you the opportunity to learn computer science. The most important point here is to study in a good school. Because a good university hosts good teachers, and good teachers improve your horizons. It also has other advantages. A good university means competition, and too much competition will force you to improve. Remember that studying at a good university will not save you. In general, the biggest mistake people make is to immerse themselves in entertainment, travel and games when they go to university. Of course, they should be, but in moderation. Suggestions that will take you forward while reading;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Entering and managing clubs according to your interests at school, if not, establishing and managing them. This will both socialize you and give you the ability to manage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In general, student projects are opened every semester. This is opened by your department teachers and participate in projects where they have successfully built (high grade point average) and developed over the course of a semester or a year. This both improves you and provides a plus in your business life. You also have the chance to win a scholarship in some projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Although not always, some projects are carried out jointly with large companies and organizations. Participate in these projects. In some cases, a monthly payment is provided to the student.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do an internship in a company every summer while you are studying, do it in different fields so that you can discover your field of interest and make yourself liked by the people there as much as possible and communicate well, this will open many doors in your business life in the future.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do an Erasmus or Erasmus internship. This will provide you with the chance to see abroad, as well as the opportunity to study with different people and see different working disciplines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Working while studying. Working part-time in a company will take you further. It will teach you to stand on your own feet, as well as to see what it is like to work. If you can’t find a job, earn money by doing homework. There are sites that work with domestic or international companies, and you are paid for the work you do.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is a process called co-education in the last period of school. You get some of your courses counted, work in a company for 6 months, prepare a report and present it to the school, and it replaces your courses of that semester.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if you apply any of these items, it will move you forward a lot. Do as much as you can. “I’m studying at a bad university, what should I do?” answer the question; Try to apply the above items and raise your grade point average as high as possible. Remember that 4 years at university will shape your 40 years. If you work hard and invest in yourself while you are traveling, you will only enjoy your life in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can it be done without studying at university?
&lt;/h2&gt;

&lt;p&gt;Yes it does. Up to 15% of the employees of large companies such as IBM and Google are without a diploma. It is unnecessary and absurd to pay for a course or a place to learn a language or a programming language first here. Because you can access everything on the internet for free. Complete item 1st and 2nd. Once you’ve dealt with them, you can access unlimited information from the following sources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YouTube: freeCodeCamp, MIT OpenCourseWare, CS50, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second channel is the Massachusetts Institute of Technology (MIT) university, which videotapes and uploads all its lectures and allows you to get the same education as the people there, even if you don’t go there. You can turn on the translation in the subtitles section of both channels and watch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Websites: Coursera, Udacity, Khan Academy, GeeksforGeeks, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Form Sites: It is possible to learn the information you want from the form sites in the form of question and answer and with virtual dialogue as content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Books: I recommend it for those who love to read and learn in depth. You can buy any book you want and improve yourself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Documentation: There is also a section called documentation, and this is the most important part. They don’t teach in this school or anywhere else. You can access the documentation of any language, library or framework you want. The people who created these languages and tools prepare these documents and explain everything.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Have a positive attitude
&lt;/h2&gt;

&lt;p&gt;It doesn’t matter how hard you work, if your attitude is bad, you won’t get very far. It’s important to show that you care about your work and that you are willing to go the distance to get the job done. A good way to keep a positive attitude is to work on projects that are interesting to you. It sounds obvious, but many people will agree to roles they have no interest in. Playing it safe won’t make you a great developer!&lt;br&gt;
Keep Up to date with new technologies&lt;/p&gt;

&lt;p&gt;There is no point in being an expert in dates tech. You should be highly competent with Agile development, task management software (Jira, Trello…), version control (Git…), and different environments (local development environment and working knowledge of deploying applications).&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning Ability
&lt;/h2&gt;

&lt;p&gt;Every programmer will experience a situation where they don’t know an answer. The great programmers will work to find that answer. They will look at different resources, talk to the right people and find the solution no matter what. Great developers have mastered the skill of self-learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time Management
&lt;/h2&gt;

&lt;p&gt;It’s important to be reliable and show up at meetings on time. If you want to be great at what you do, you should be able to manage your time effectively. Another vital skill is the ability to estimate the amount of time needed to complete a task, communicating this and delivering on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be a Team Player
&lt;/h2&gt;

&lt;p&gt;Great developers help other developers improve. They offer teammates help when they are stuck, teach new skills to others and write documentation that would help teammates not only in their organization but the developer community in general.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expertise is overrated
&lt;/h2&gt;

&lt;p&gt;As much as specific skill expertise is important, it shouldn’t be the single factor you focus on. A great [insert any skill here] developer is not necessarily a great developer. It’s the addition of the soft skills above that make them great. The ability to learn quickly and jump into a project seamlessly, to help others out, to always have a great attitude. These are the skills that make you invaluable to a business. Consider implementing some (or all!) of these characteristics, and you can easily become a good (if not great) programmer much faster.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We don’t have to be smarter than the rest. We have to be more disciplined than the rest.” -Warren Buffett&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
