<?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 Dogan Ogut on Medium]]></title>
        <description><![CDATA[Stories by Dogan Ogut on Medium]]></description>
        <link>https://medium.com/@ogutdgnn?source=rss-86657fd06a69------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WLENB9_1RVZFH4SkLJOLCA.jpeg</url>
            <title>Stories by Dogan Ogut on Medium</title>
            <link>https://medium.com/@ogutdgnn?source=rss-86657fd06a69------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:53:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ogutdgnn/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[How to Become a Software Developer?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ogutdgnn.medium.com/how-to-become-a-software-developer-5ac2b02f6926?source=rss-86657fd06a69------2"><img src="https://cdn-images-1.medium.com/max/2600/0*-dqkJgTrXcvJAcOa" width="3840"></a></p><p class="medium-feed-snippet">If you want to become a developer, you are in the right place.</p><p class="medium-feed-link"><a href="https://ogutdgnn.medium.com/how-to-become-a-software-developer-5ac2b02f6926?source=rss-86657fd06a69------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ogutdgnn.medium.com/how-to-become-a-software-developer-5ac2b02f6926?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ac2b02f6926</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 20:03:08 GMT</pubDate>
            <atom:updated>2023-09-13T20:03:08.675Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Polymorphism in C# with Method Overloading And Method Overriding]]></title>
            <link>https://ogutdgnn.medium.com/polymorphism-in-c-with-method-overloading-and-method-overriding-da0d5323a2cd?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/da0d5323a2cd</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[method-overriding]]></category>
            <category><![CDATA[method-overloading]]></category>
            <category><![CDATA[polymorphism]]></category>
            <category><![CDATA[comparison]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Wed, 04 May 2022 20:06:51 GMT</pubDate>
            <atom:updated>2022-05-04T20:06:51.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Polymorphism means “Many Forms”. In Polymorphism, poly means “Many” and morph means “Forms.” Polymorphism is one of the main pillars in Object Oriented Programming. It allows you to create multiple methods with the same name but different signatures in the same class. The same name methods can also be in derived classes.</p><p>There are two types of Polymorphism,</p><ul><li>Method Overloading</li><li>Method Overriding</li></ul><p>These are often confused because of their similar sounding names.</p><p>In this article, we will cover explain method overloading and method overriding concept in C#. I will try to demonstrate step by step differences between these.</p><h3>Method Overloading</h3><p>Method Overloading is known as compile-time (or static) polymorphism because each of the different overloaded methods is resolved when the application is compiled. It has several names like “Compile Time Polymorphism” or “Static Polymorphism” and sometimes it is called “Early Binding”.</p><p>Method Overloading means creating multiple methods in a class with same names but different signatures (ie. parameters). We can achieve overloading by varying the number of parameters, the order of parameters, and <a href="https://www.educba.com/hive-data-types/">data types</a> of parameters.</p><p>It permits a class, struct, or interface to declare multiple methods with the same name with unique signatures.</p><p>Compiler automatically calls required method to check number of parameters and their type which are passed into that method.</p><pre>using System;  <br>namespace DemoCsharp  <br>{  <br>    class Program  <br>    {  <br>        public int Add(int num1, int num2)  <br>        {  <br>            return (num1 + num2);  <br>        }  <br>        public int Add(int num1, int num2, int num3)  <br>        {  <br>            return (num1 + num2 + num3);  <br>        }  <br>        public float Add(float num1, float num2)  <br>        {  <br>            return (num1 + num2);  <br>        }  <br>        public string Add(string value1, string value2)  <br>        {  <br>            return (value1 + &quot; &quot; + value2);  <br>        }  <br>        static void Main(string[] args)  <br>        {  <br>            Program objProgram = new Program();  <br>            Console.WriteLine(&quot;Add with two int parameter :&quot; + objProgram.Add(3, 2));  <br>            Console.WriteLine(&quot;Add with three int parameter :&quot; + objProgram.Add(3, 2, 8));  <br>            Console.WriteLine(&quot;Add with two float parameter :&quot; + objProgram.Add(3 f, 22 f));  <br>            Console.WriteLine(&quot;Add with two string parameter :&quot; + objProgram.Add(&quot;hello&quot;, &quot;world&quot;));  <br>            Console.ReadLine();  <br>        }  <br>    }  <br>}</pre><p>Output:</p><pre>Add with two int parameter :5<br>Add with three int parameter :13<br>Add with two float parameter :25<br>Add with two string parameter :hello world</pre><p>In the above example, you can see that there are four methods with same name but type of parameters or number of parameters is different. When you call Add(4,5), complier automatically calls the method which has two integer parameters and when you call Add(“hello”,”world”), complier calls the method which has two string parameters. So basically in method overloading complier checks which method should be called at the time of compilation.</p><p><strong>Note: </strong>Changing the return type of method does not make the method overloaded. You cannot create method overloaded vary only by return type.</p><h3>Method Overriding</h3><p>Overriding, on the other hand, is the ability to redefine the implementation of a method in a class that inherits from a parent class. When a method is overridden, the name and the parameters stay the same, but the implementation that gets called depends on the type of the object that’s calling it.</p><p>It has several names like “Run Time Polymorphism” or “Dynamic Polymorphism” and sometime it is called “Late Binding”. It is called runtime (or dynamic) polymorphism because the type of the calling object is not known until runtime, and therefore the method implementation that runs is determined at runtime.</p><p>If we want to reiterate; method overriding means having two methods with same name and same signatures (ie. parameter), one should be in the base class and other method should be in a derived class (child class). You can override the functionality of a base class method to create a same name method with same signature in a derived class. You can achieve method overriding using inheritance. Virtual and Override keywords are used to achieve method overriding.</p><pre>using System;<br>namespace TestPolymorphism<br>{<br>    <br>    class BaseClass  <br>    {  <br>        public virtual int Add(int num1, int num2)  <br>        {  <br>            return (num1 + num2);  <br>        }  <br>    }  <br>    class ChildClass: BaseClass  <br>    {  <br>        public override int Add(int num1, int num2)  <br>        {  <br>            if (num1 &lt;= 0 || num2 &lt;= 0)  <br>            {  <br>                Console.WriteLine(&quot;Values could not be less than zero or equals to zero&quot;);  <br>                Console.WriteLine(&quot;Enter First value : &quot;);  <br>                num1 = Convert.ToInt32(Console.ReadLine());  <br>                Console.WriteLine(&quot;Enter Second value : &quot;);  <br>                num2 = Convert.ToInt32(Console.ReadLine());  <br>            }  <br>            return (num1 + num2);  <br>        }  <br>    }  <br>    class Program  <br>    {  <br>        static void Main(string[] args)  <br>        {  <br>            BaseClass baseClassObj;  <br>            baseClassObj = new BaseClass();  <br>            Console.WriteLine(&quot;Base class method Add :&quot; + baseClassObj.Add(-3, 8));  <br>            childClassObj = new ChildClass();  <br>            Console.WriteLine(&quot;Child class method Add :&quot; + childClassObj.Add(-2, 2));  <br>            Console.ReadLine();  <br>        }  <br>    }  <br>}</pre><p>Output:</p><pre>Base class method Add :5<br>Values could not be less than zero or equals to zero<br>Enter First value :<br>5<br>Enter Second value : <br>7<br>Child class method Add :12</pre><p>In the above example, we have created two same name methods in the BaseClass as well as in the ChildClass.</p><p>We use virtual and override keywords are used which means the base class is virtual and child class can implement this class and override means this child class has the same name and same method signature as parent class.</p><p>When you call the BaseClass Add method with less than zero value as parameters then it adds successfully. But when you call the ChildClass Add method with less than zero value then it checks for negative value. And the passing values are negative then it asks for new value.</p><p>Here the BaseClass still uses it’s own implementation, but the inherited ChildClass has it’s own overridden implementation that it uses. The application checks at runtime what the type of the class is (Base or Child) and calls the method for that particular type.</p><p>So, here it is clear that we can modify the base class methods in derived(child) classes.</p><p>Remember these restrictions:</p><ul><li>Method cannot be private.</li><li>Only abstract or virtual method can be overridden.</li><li>Which method should be called is decided at run time.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*O69NdrfYEkw4cKerky73Wg.png" /><figcaption>table courtesy of the geeksforgeeks</figcaption></figure><h3>Conclusion</h3><p>So, today we learned what Polymorphism is in OOP and we have compared two forms of polymorphism in C#, overloading and overriding. We have seen that:</p><ul><li>Overloading is determined at compile time and is static. Overriding is determined at runtime and is dynamic.</li><li>Overloading concerns giving a method with the same name different parameters. Overriding concerns defining a different implementation of the same method in inherited classes.</li></ul><p>Note: To run the codes in VS Code : <a href="https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-6-0">https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-6-0</a></p><p>Or try this interactive online IDE :<em>JDoodle Online C# Compiler IDE with the code snippets below.</em></p><p><em>Method-Overloading:</em></p><p><a href="https://www.jdoodle.com/iembed/v0/qtn">JDoodle - free Online Compiler, Editor for Java, C/C++, etc</a></p><p><em>Method-Overriding:</em></p><p><a href="https://www.jdoodle.com/iembed/v0/qtg">JDoodle - free Online Compiler, Editor for Java, C/C++, etc</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da0d5323a2cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Natro’da Ücretsiz Let’s Encrypt SSL Sertifikası Kullanımı ve Güncellenmesi*]]></title>
            <link>https://ogutdgnn.medium.com/natroda-%C3%BCcretsiz-let-s-encrypt-ssl-sertifikas%C4%B1-kullanmak-ve-g%C3%BCncellemek-7cb3238f51aa?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cb3238f51aa</guid>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[natro]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Thu, 24 Mar 2022 14:40:10 GMT</pubDate>
            <atom:updated>2022-03-27T23:05:32.391Z</atom:updated>
            <content:encoded><![CDATA[<p>*Since Natro is a widely-used web hosting company in TR, this post is written in Turkish.</p><p><a href="https://www.natro.com/">Natro</a>’nun domain hosting hizmetini kullanıyorum. Hizmeti satın alırken bir domain için ömürboyu ücretsiz SSL de verilmekte. Bu güzel bir hizmet, ancak verilen SSL’in wildcard özelliği olmaması sizleri kısıtlayabilir.</p><p>Bu arada IT ve Web dünyasını ticari veya kişisel ihtiyaçlarınız için de kullanıyor olsanız, bir tek domain’in yeterli olmadığını ve çalışmalarınızı birden fazla domain’de sürdürmek gerekliliğini tecrübe etmişsinizdir. Tabii, domain sayısı arttıkça her biri indirimli <a href="https://www.ssl2buy.com/?gclid=CjwKCAjwrfCRBhAXEiwAnkmKmc3J0yag_lEBk6eo_7bor-7wmAZxzKW_tgfTUOasdZ4bJjnbrqm9IBoCn5wQAvD_BwE">8–10 USD olan SSL’ler</a>, hele TR’deki artan döviz kurları da düşünüldüğünde bütçenizi sarsabilir. Bu bağlamda <a href="https://letsencrypt.org/getting-started/">Let’s Encrypt</a> imdadınıza yetişiyor. Ancak sadece 90 günlüğüne!!! :( Yani SSL sertifikanız 90 gün sonra sona erecektir.</p><p>Let’s Encrpt hakkında bilmek istedikleriniz ve ilk sertifika kurulumu ile ilgili olarak <a href="https://ceaksan.com/tr/lets-encrypt-nedir">https://ceaksan.com/tr/lets-encrypt-nedir</a> kaynağından yararlanabilirsiniz. Eğer 90 günlük süresi dolmak üzere olan bir Let’s Encrypt sertifikanız varsa, bu durumda da aşağıdaki prosedürü tekrarlayarak kolayca yenileyebilirsiniz.</p><p>Aslında yapılcak işlemler 10–15 dakika sürmekle birlikte DNS kayıtlarının güncelenmesi ve <strong>sertifikanın sitenizde etkin hale gelmesi 3–4 saat kadar</strong> sürebilmektedir. Bu nedenle sabırlı olmanızı tavsiye ediyorum.</p><p><strong>Domain verifikasyonu/doğrulaması:</strong></p><p><a href="https://punchsalad.com/ssl-certificate-generator/">https://punchsalad.com/ssl-certificate-generator/ </a>linkini açın ve aşağıdaki görseldeki şekilde domain bilginizi, emailinizi forma girin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GbqdOCi_Q4FmM8RPu_-G2w.png" /><figcaption>Resim-1. Free SSL Certificate Generator formunun doldurulması</figcaption></figure><p>Yukarıdaki formu doldurduktan sonra (sub-domain’lerimi eklemek için *.dastugo.com yazım. “,” işaretiyle ayırarak bir de normal domainimi dastugo.com şeklinde ekledim) en alttaki “Create Free SSL Certificate” butonuna tıklayın.</p><p>Şimdi karşınıza yeni bir form çıkacak. (Resim-2) Burada iki TXT acme kodu üretilmiş durumda. Henüz yeni açılan formdaki herhangbir butona tıklamayın. Let’s Encrypt sertifika üretmeden önce, bir önceki forma girdiğiniz domain’in sizin olup olmadığını doğrulamak istiyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*ipoDP5h1RRKKBbjwqC-GAw.png" /><figcaption>Resim-2. Doğrulama için verilen _acme.challenge kodlarını Natro’daki DNS bilgilerimize kaydedeceğiz.</figcaption></figure><p>Uyarı: yapacağımız doğrulama DNS kayıtlarında güncelleme gerektirdiğinden 30 dakikaya kadar beklemeyi gerektirebilmektedir. Bu nedenle formun tabını kapatmamaya dikkate edin.</p><p>Bunun için Natro’ya giriş yapın ve hangi domain’inize SSL sertifikası yüklemek istiyorsanız, aşağıdaki görseldeki gibi, onun karşısındaki “Web Sitesi” butonuna tıklayın, aşağı doğru açılan menüde de “DNS Yönetimi”ni seçin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*4AhGNq9lxdRIckptLoB7Xw.png" /><figcaption>Resim-3</figcaption></figure><p>Şimdi aşağıdaki gibi Natro’nun sitenizin DNS ayarlarını yapabileceğiniz penceresine ulaştınız. Burada aşağya doğru inerek “Text (TXT) Kayıtları” yazan bölüme gelin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ld_usLstD6TwUTziIjmIuQ.png" /><figcaption>Resim-4</figcaption></figure><p>Burada daha önceden txt kayıtlarınız olabilir. Eğer benim gibi Let’s Encrypt’i 3 ay önce kurup yeniliyorsanız ve doğrulama sonrasında silmediyseniz iki adet de _acme-challenge kaydı göreceksiniz. Bunların yenilerini oluşturacağımızdan eskilerini karşılarındaki silme butonlarına basarak silin. Diğer kayıtlar olduğu gibi kalsın.</p><p>Varsa mevcut _acme-chalenge kayıtlarınız sildikten sonra sağ alltaki “Yeni Kayıt (TXT)” butonuna tıklayın. aşağıdaki şekilde yeni kayıt girme penceresi açılacaktır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*tEJmBDP7XPehLCuyHOG1gg.png" /><figcaption>Resim-5</figcaption></figure><p>Şimdi yukarıdaki formu, daha önce açık bıraktığımız (Resim-2) ve bunu kullanacağız dediğimiz aşağıdaki formu kullanarak dolduracağız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*XcbEY-_kaD-UoQVYp_Ok6A.png" /><figcaption>Resim-6</figcaption></figure><p>Yukarıdaki formun sayfasından birinci key’in Value sütunundaki text değerini kopyalayın ve Natro’da açılan “Yeni Kayıt -Text(TXT)” penceresinde ilgili satıra aşağıdaki gibi yapıştırın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*aqW-xCrQW9wKwqJBbVWEww.png" /><figcaption>Resim-7</figcaption></figure><p>“Alt Alan Adı” alanına el ile klavyeden “_acme-challenge” değerini girin. “Data Server” alanına da SSL Certificate Generator’ün sizin siteniz için ürettiği text value’sunu yapıştırın. Daha sonra da “Değitir” butonuna tıklayın. Butona tıkladığınızda Natro DNS Yönetimi penceresi yenilenecektir. Tekrar aşağı doğru Text (TXT) Kayıtları bölümüne geldiğinizde yeni _acme-challenge key’inizin oluştuğunu göreceksiniz. Yukarıda anlatıldığı şekilde birinci key-value değerini Natro’da oluşturduktan sonra Resim-6&#39;daki formda gördüğünüz alttaki değeri de aynı şekilde Natro’da oluşturun. Bu işlemler sonunda aşağıda Resim-8&#39;de görüldüğü gibi iki kaydın olştuğunu göreceksiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJFdAcwoOSvcmV80XxD_xg.png" /><figcaption>Resim-8</figcaption></figure><p>Bu işlemleri yapma hızınıza ve DNS kayıtların güncellemesine bağlı olarak yaklaşık 30 dakika sonra, Resim-6&#39;daki formdaki “Check DNS” butonlarına tıklayarak site/domain doğrulamasını yaptırın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*1ji2ijVp0b9nIFoGpZJVag.png" /><figcaption>Resim-9</figcaption></figure><p>Resim-9&#39;daki gibi “Punchsalad.com says DNS Record OK” mesajını almanız gerekiyor. Eğer yeteri kadar beklemediyseniz hata mesajı alırsınız.</p><p>Her iki butona da ayrı ayrı basarak “DNS Record OK” mesajını aldıktan sonra yine Resim-9&#39;daki “Verify Domain” butonuna tıklayın.</p><p>“punchsalad.com” sitesinin reklam için ürettiği iki pop-up pencereyi sağ üstlerindeki “x” ile kapattığınızda aşağıdaki gibi SLL sertifikanızın anahtarlarının üretildiğini göreceksiniz. Burada iki ayrı text alanında uzunca anlamsız text üretilmiştir. Bu unique text sayesinde Let’s Encrypt sitenize güvenlik anahtarı işareti koyacaktır. Bu nedenle bu anahtarların üretildiği browser’i yanlışlıkla kapatmayın. Yoksa bütün işlemleri tekrarlamak gerekir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*UUKZHq0MOi8elzXNtZuHGw.png" /><figcaption>Resim-10</figcaption></figure><p><strong>SSL Sertifikasının Domain’imize kaydedilmesi:</strong></p><p>Şimdi bu textleri ilgili domain’imizin alanına yapıştırmak için tekrar Natro’ya döneceğiz.</p><p>Aşağıdaki görselde olduğu şekilde Hosting bölümünüzde “Plesk’e Bağlan” butonuna tıklayın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*PiFA6jJyT2lXYN-H473njg.png" /><figcaption>Resim-11</figcaption></figure><p>Plesk’de domain ve sub-domainlerinizin listesinin olduğu bir sayfa açılır. Burada aşağıdaki gibi SSL yükleyeceğimiz domain’i seçin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o4kEMv9el8xihYPDaSyC5w.png" /><figcaption>Resim-12</figcaption></figure><p>Açılan “Dashboard” sayfasında aşağıdaki gibi “Hosting&amp;DNS” tabına tıklayın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*9tWowe82Jzs1vfRGWm-ITg.png" /><figcaption>Resim-13</figcaption></figure><p>Daha sonra da “Hosting &amp; DNS” bölümünde aşağıdaki şekilde “Hosting Settings”e tıklayın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*vL00Rmd45yfJNLu7cRWpvA.png" /><figcaption>Resim-114</figcaption></figure><p>Burada (varsa) mevcut SSL sertifikası ile ilgili bilgiyi göreceksiniz. Aşağıda benim Aralık ayına ürettiğim ve süresi dolan sertifikamın bu domain için seçili olduğunu görüyorsunuz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*qStXGSFK44beTSow86fBJA.png" /><figcaption>Resim-15</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*qStXGSFK44beTSow86fBJA.png" /><figcaption>Resim-16</figcaption></figure><p>Şimdi yeni sertifika üretimi için tekrar Resim-13&#39;deki gibi domain’imizin “dashboard” sayfasına gidelim ve orada aşağıdaki görselde olduğu şekilde “Security” altındaki “SSL/TSL Certificates” linkine tıklayalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*C38f9wa6wkFTQowVXz3sMQ.png" /><figcaption>Resim-17</figcaption></figure><p>Açılan “SSL/TLS Certificates for dastugo.com” sayfasının alt tarfına doğru indiğinizde mevcut SSL.lerinizin (varsa) listelendiğini görebilirsiniz. Şimdi aşağıdaki görseldeki gibi “Add SSL/TSL Certificate” butonuna tıklayın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*cgRTgF1ji4j2hc8sxixKUg.png" /><figcaption>Resim-18</figcaption></figure><p>Açılan sayfadaki ayarlar bölümüne aşağıdaki gibi zorunlu bilgileri girin. Sertifikanıza bir isim vermeyi unutmayın. Çünkü bu isim ile domain ve sub-domainlerinizde Resim-16&#39;da olduğu şekilde sertifikamızı daha sonra seçip kuracağız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*D-qXpYQuprrPYrEsbw43TA.png" /><figcaption>Resim-19</figcaption></figure><p>“State or Province” bölümüne TR için il ismi, “Location(city)” bölümüne de ilçe ismi yazabilirsiniz.</p><p>Daha sonra aradaki hiçbir butona tıklamadan en alttaki “Upload the certificate as text” bölümüne ulaşın. Aşağıdaki gibi 3 adet boş text alanının olduğu bir manzara ile karşılaşacaksınız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLFBaNMEeXrXYtbJA56iQw.png" /><figcaption>Resim-20</figcaption></figure><p>Şimdi tekrar daha önceden açık bıraktığımız sertifika anahtarlarının üretildiği Resim-10&#39;daki browser tab&#39;ına geçelim.</p><p>Natro’da Resim-20&#39;deki pencerede 3 tane text alanı varken Resim-10&#39;daki tabdaki pencerede 2 adet text üretildiğini göreceksiniz.</p><p>Şimdi önce aşağıdaki gibi üstteki alandaki textin bulunduğu bölüme tıklayıp Crtl+A, Ctrl+C yaparak bütün texti seçip kopyalayalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SIj7kCpVkOZV724poVxOzw.png" /><figcaption>Resim-21</figcaption></figure><p>Daha sonra Natro’da Resim-20&#39;de “Certificate” yazan ORTADAKİ text alanına Ctrl+v ile kopyaladığımız text’i aşağıdaki gibi yapıştıralım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hebpek3AWRLSxbpcUwme_A.png" /></figure><p>Yağıştırdığımız texte baktığımızda birden fazla “Begin Cetificate”-”End Certificate” bloğundan oluştuğunu göreceğiz. En alttaki “Begin Certificate” bloğunun tamamını başlık ve son satırı dahil buradan kesip, bu text alanının altındaki “CA certificate” alanına yapıştıralım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*XXkDfLs8_SsLkqoLfGqmUg.png" /></figure><p>Daha sonra yukarıda Resim-21&#39;deki browser penceresinden “Private Key” textini kopyalatıp, Aşağıdaki gibi Natro’da “Private Key” alanına yapıştıralım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*Hn-tvjf6vksPzpg9N5b5cg.png" /><figcaption>Buradaki Private Key textini kopyala</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*w_JxiaEwmX0HXly6PN4GIQ.png" /><figcaption>Natro’daki Private Key alanına yapıştır.</figcaption></figure><p>Son olarak da (her üç text alanını kopyala-yapıştır ile doldurduktan sonra) sayfanın SOL altındaki “Update Certificate” butonuna tıklayalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*Mp3s7AQ2TSpKfkEHQRubVA.png" /></figure><p>Upload işlemi tamamlandığında Natro’nun domain’imize ait yukarıda Resim-18&#39;de degördüğümüz güncel sertifika listesinin bulunduğu sayfa aşağıdaki gibi otomatik olarak açılır ve burada yeni eklediğimiz sertifikayı görebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*_U0gS31TEBZascN6FdMafA.png" /></figure><p><strong>Geçerli Sertifikanın Domain ve Sub-Domainlerde Aktif Hale Getirilmesi</strong></p><p>Artık geçerli bir sertifikamız var ancak şimdi bunu ilgili domain ve sub-domainlerde aktif hale getirmemiz gerekiyor.</p><p>Bunun için tekrar aşağıdaki gibi domain’in “Dashboard” sayfasına gideceğiz. Ve “Hosting &amp; DNS” tabına tıklayacağız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oAy2wkukQi4e_wyrIvrkgw.png" /></figure><p>“Hosting &amp; DNS” sayfasında da “Hosting Settings”e tıklayıp aşağıdaki gibi domain’imizin “Settings” sayfasındaki “Security” bölümüne inelim. Ve burada aşağıdaki görselde olduğu şekilde listeden yeni oluşturduğumuz sertifikayı seçelim ve “Apply” butonuna tıklayalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*29AneEMebgBpppf7HDzN2A.png" /></figure><p>Evet bu şekilde ana domainimize SSL sertifikasını yüklemiş bulunuyoruz. Seritikayı üretirken “*.dastugo.com” yazmıştık ilk formumuza hatırlarsanız. Yani benim “cafe.dastugo.com”, “<a href="https://bistro.dastugo.com/Customer/Home">bistro.dastugo.com</a>” gibi “dastugo.com”’un sub-domainleri de yeni oluşan SSL sertifikasını kullanabilirler. Burada sadece ilgili sub-domain’in ayarlarını yapmamız gerekecek.</p><p>Bunun için aşağıdaki gibi Plesk’te “Websites &amp; Domains” linkini tıklayıp aktif domain ve sub-domainlerinizi listeleyin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*mM0fybei7nlUIydoP8MRAw.png" /></figure><p>Bu listeden de istediğiniz sub-domain’i seçerek Dashboard’ını aşağıdaki açın. Burada da daha öndeden de yaptığımız gibi önce “Hosting &amp; DNS” tabını , orada “Hosting Settings” linkini tıklayarak daha önceden gördüğünüz ve size tanıdık gelecek aşağıdaki domain güvenlik sertifika ayarı bölümüne gelin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*mpVXkOPV-1hMLaVwRhHPzg.png" /></figure><p>Burada yukarıdaki görseldeki şekilde sertifikanızı seçip sayfa altındaki “Apply” butonuna tıkladığınızda artık bu sub-domain için de SSL tanımlamış olacaksınız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*faziSkUfytYh7pHg_qO3yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*8_-JtdQKoJI1CS_Q30BTWw.png" /></figure><p>DNS güncellemeleri gerektiğinden süreç zaman alacaktır. Yani “Apply” tuşuna bastığınızda hemen SSL kilit işaretini göremeyebilirsiniz. Duruma göre birkaç saat sonra SSL’in yüklendiğini göreceksiniz.</p><p>90 gün boyunca kafanız rahat. Browser’a <a href="http://dastugo.com/">dastugo.com </a>yazdığımızda yanında göreceğimiz kilit işareti üzerine tıklayıp açılan pencereciği incelediğinizde geçerlilik tarihini göreceksiniz aşağıdaki gibi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*l7TDfGTTlFPj3paFAkzsww.png" /></figure><p>Takviminize bitimine 2–3 gün kala bir hatırlatma koyarak bu yazımızdaki işlemi tekrarlayabilirsiniz. Aslında sektörde olanlar için basit bir konu olabilir ama benim gibi hosting konusuyla tam zamanlı ilgilenmiyorsanız ve üç ayda bir yapıyorsanız hatırlamak için bu yazıya tekrar dönebilirsiniz.</p><p>Bu arada bu yaklaşımın çok profesyonel olmadığını da vurgulamak gerekebilir. Her ne kadar kişisel bütçemize katkı sağlasa da, kurumsal bir görüntü vermez. Web sitenizde bir profesyonel bir hizmet sunuyor veya ticari bir işlem yapıyorsanız, işinizin bir parçası olarak SSL sertifikanızı da giderlerinizin arasına dahil etmenizde fayda olduğunu değerlendiriyor, esenlikler diliyoruz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cb3238f51aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Data Types]]></title>
            <link>https://ogutdgnn.medium.com/javascript-data-types-a1bcb37bdab2?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1bcb37bdab2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[js-data-structures]]></category>
            <category><![CDATA[javascript-data-type]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sun, 18 Jul 2021 14:07:56 GMT</pubDate>
            <atom:updated>2021-07-18T14:17:02.625Z</atom:updated>
            <content:encoded><![CDATA[<p>You might be wondering why it’s important to know about data types. There is only one main reason — to gather clean and consistent data for computing in the software application. In programming, data types is an important concept. Understanding data types ensures that data is collected in the preferred format and the value of each property is as expected.</p><h4>What is a Data Type?</h4><p>In <a href="https://en.wikipedia.org/wiki/Computer_science">computer science</a> and <a href="https://en.wikipedia.org/wiki/Computer_programming">computer programming</a>, a <strong>data type</strong> or simply <strong>type</strong> is an attribute of <a href="https://en.wikipedia.org/wiki/Data">data</a> which tells the <a href="https://en.wikipedia.org/wiki/Compiler">compiler</a> or <a href="https://en.wikipedia.org/wiki/Interpreter_(computing)">interpreter</a> how the programmer intends to use the data.</p><p>Our interactions (inputs and outputs) with a program are treated in many languages as a stream of bytes. These bytes represent data that can be interpreted as representing values that we understand. Additionally, within a program, we process this data in various ways such as adding them up or sorting them. This data comes in different forms. Examples include:</p><ul><li>your name — a string of characters</li><li>your age — usually an integer</li><li>the amount of money in your pocket — usually a value measured in your local currency.</li></ul><p>A major part of understanding how to design and code programs is centered in understanding the types of data that we want to manipulate and how to manipulate that data.</p><p>A data type constrains the values that an <a href="https://en.wikipedia.org/wiki/Expression_(computer_science)">expression</a>, such as a variable or a function, might take. To be able to operate on variables, it is important to know something about the type. Therefore, the data type defines which operations can safely be performed to create, transform and use the variable in another computation.</p><p>When a programming language requires a variable to only be used in ways that respect its data type, that language is said to be <em>strongly typed</em>. <em>Strongly-typed</em> language enforces the definition of data type, and, cross type operation requires type casting. This is why in strongly-typed languages such as; C, C++, C#, Java, Python , you must define what type of value a variable will hold, and, unless some types are highly compatible you will most likely need to cast (convert) one type to another, otherwise you’ll end up with exception, or worse, unexpected operation result. This prevents errors, because while it is logical to ask the computer to add a float to an integer (1.5 + 5), it is illogical to ask the computer to add a float to a string (1.5 + ‘ClarusWay’).</p><p>On the other hand, when a programming language allows a variable of one data type to be used as if it were a value of another data type, the language is said to be <em>weakly (or loosely) typed</em>. <em>Weakly-typed</em> language does not require type definition for variables, and a variable can be assigned and reassigned to a different type of data, and data ranges simply doesn’t matter. Let’s jump into JavaScript here…</p><h4>Where does JavaScript fit?</h4><p>According to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures">MDN </a>JavaScript is a <em>loosely typed</em> and <em>dynamic</em> language. Since JavaScript is a <strong>loosely typed</strong> language; variables in JavaScript are not directly associated with any particular value type. As mentioned above, you don’t have to specify what type of information will be stored in a variable in advance. JavaScript automatically types a variable based on what kind of information you assign to it (e.g., that &#39;&#39; or &quot; &quot; to indicate string values).</p><pre>//variable declaration in JavaScript. Note that data types are not defined during the declaration. <br>let x = 99;            // x is holding a number value<br>let city = &#39;Istanbul&#39;; // city is holding a string value<br>let isExists = true;   // isExists is holding a boolean value</pre><p>In addition, since JavaScript is a <em>dynamic </em>language; any variable can be assigned (and re-assigned) values of all types. In JavaScript<em> dynamic typing</em>, variable type decide by its value after code runs the code at compiler/interpreter. This means if a value of variable is integer then the variable will be an integer and if it’s string then the variable type is also string. But the data type hold by a variable can change later when a different type of data type value assigned to it.</p><pre>let foo = 99;    // foo is now a number<br>foo     = &#39;Istanbul&#39;; // foo is now a string<br>foo     = true;  // foo is now a boolean</pre><p>Many other languages, like C#, require you to declare a variable’s type, such as int, float, boolean, or String.</p><pre>// variable declaration in C#. Note that data types should explicitly defined during the declaration.<br>int x = 99;    <br>string city = &#39;Istanbul&#39;; <br>boolean isExists = true;  </pre><p>Now, the loosely (weakly)- typed and dynamic features of JavaScript is both a blessing and a curse.</p><pre>var a = 2 + &#39;4&#39;; <br>console.log(a); //output: &#39;24&#39;</pre><pre>console.log(&#39;Istanbul&#39; + 71) // output: Istanbul71<br>console.log(7 + 1 + &#39;Istanbul&#39; + 71) //output: 8Istanbul71</pre><p>While JavaScript’s type system gives you a lot of flexibility, it lacks the capability of a strongly typed system to warn you when you are trying to add an int to an object, which protects you from spending hours debugging a type error.</p><h4>JavaScript Data and Structure Types</h4><p>The latest ECMAScript standard defines <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures">nine </a>types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*OTyPxLuMRs7xSyCV3A_leQ.png" /><figcaption>based on MDN web site</figcaption></figure><p>All types except objects define immutable values (that is, values which can’t be changed). For example (and unlike in C), Strings are immutable. We refer to values of these types as “<em>primitive values</em>”.</p><p><strong>Primitive Data Types:</strong></p><p><strong><em>undefined type:</em></strong></p><p>A variable that has not been assigned a value has the value undefined. The type is also undefined. If a variable is declared, but not assigned, then its value is undefined:</p><pre>let city;    // Value is undefined, type is undefined</pre><p>Any variable can be emptied, by setting the value to undefined. The type will also be undefined.</p><pre>country = undefined;    // Value is undefined, type is undefined</pre><p><strong><em>Boolean type:</em></strong></p><p>Boolean represents a logical entity and can have two values: true and false. This type is commonly used to store yes/no values: true means “yes, correct”, and false means “no, incorrect”. Booleans are best for conditional testing.</p><p><strong><em>String type:</em></strong></p><p>JavaScript’s <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> type is used to represent textual data. A string (or a text string) is a series of characters like “ClarusWay Courses”. Each element in the String occupies a position in the String. The first element is at index 0, the next at index 1, and so on. The length of a String is the number of elements in it.</p><p>Strings are written with quotes. In JavaScript, there are 3 types of quotes.</p><ul><li>Double quotes: &quot;Hello&quot;.</li><li>Single quotes: &#39;Hello&#39;.</li><li>Backticks: `Hello`.</li></ul><p>Double and single quotes are “simple” quotes. There’s practically no difference between them in JavaScript. On the other hand, backticks are “extended functionality” quotes. They allow us to embed variables and expressions into a string by wrapping them in ${…}, for example:</p><pre>let name = &quot;ClarusWay&quot;;  <br>// embed a variable <br>alert( `Hello, ${name}!` ); // Hello, ClarusWay! </pre><pre>// embed an expression <br>alert( `the result is ${98 + 1}` ); // the result is 99</pre><p>Unlike some programming languages (such as C), JavaScript strings are immutable. This means that once a string is created, it is not possible to modify it.</p><p>However, it is still possible to create another string based on an operation on the original string. For example:</p><ul><li>A substring of the original by picking individual letters or using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr">String.substr()</a>.</li><li>A concatenation of two strings using the concatenation operator (+) or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat">String.concat()</a>.</li></ul><p>In some languages, there is a special “character” type for a single character. For example, in the C, C# and in Java it is called “char”.</p><p>In JavaScript, there is no such type. There’s only one type: string. A string may consist of zero characters (be empty), one character or many of them.</p><p><strong><em>Number type:</em></strong></p><p>ECMAScript has two built-in numeric types: <strong>Number</strong> and <strong>BigInt</strong></p><p>The Number type is a <a href="https://en.wikipedia.org/wiki/Double_precision_floating-point_format">double-precision value</a> (numbers between -(2⁵³ − 1) and 2⁵³ − 1). Numbers can be written with, or without decimals.</p><pre>let x1 = 99.00;     // Written with decimals<br>let x2 = 99;        // Written without decimals</pre><p>In addition to representing floating-point numbers, the number type has three so-called “special numeric values: +Infinity, -Infinity, and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN">NaN</a> (&quot;<strong>N</strong>ot a <strong>N</strong>umber&quot;).</p><p>Besides regular numbers, there are so-called “special numeric values” which also belong to this data type: Infinity, -Infinity and NaN.</p><p>The number type has only one integer with two representations: 0 is represented as both -0 and +0. (0 is an alias for +0.) +0 === -0 is true. But, you are able to notice the difference when you divide by zero:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*iG-gJimxrvnl3lEddj0Vtg.png" /><figcaption>0 is represented as both -0 and +0</figcaption></figure><p>NaN represents a computational error. It is a result of an incorrect or an undefined mathematical operation, for instance:</p><pre>console.log( &quot;not a number&quot; / 2 ); // output: NaN, (because such division is erroneous)</pre><p>NaN is sticky. Any further operation on NaN returns NaN:</p><pre>alert( &quot;not a number&quot; / 2 + 5 ); // NaN</pre><p>So, if there’s a NaN somewhere in a mathematical expression, it propagates to the whole result.</p><p><strong><em>BigInt type:</em></strong></p><p><a href="https://github.com/tc39/proposal-bigint">BigInt</a> is a new primitive that provides a way to represent whole numbers larger than 2^53, which is the largest number Javascript can reliably represent with the Number primitive.</p><pre>const x = Number.MAX_SAFE_INTEGER;<br>// ↪ 9007199254740991, this is 1 less than 2^53<br><br>const y = x + 1;<br>// ↪ 9007199254740992, ok, checks out<br><br>const z = x + 2<br>// ↪ 9007199254740992, wait, that’s the same as above!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*aSzijfh82Fk4K0wEtcsxNA.png" /><figcaption>Number type is not safe beyond MAX_SAFE_INTEGER</figcaption></figure><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt">BigInt</a> type is a numeric primitive in JavaScript that can represent integers with arbitrary precision. With BigInts, you can safely store and operate on large integers even beyond the safe integer limit for Number.</p><p>A BigInt is created by appending n to the end of an integer or by calling the constructor.</p><pre>console.log(9007199254740995n);    // → 9007199254740995n<br>BigInt(&quot;9007199254740995&quot;);    // → 9007199254740995n</pre><p><strong><em>Symbol type:</em></strong></p><p>A Symbol is a <strong>unique</strong> and <strong>immutable</strong> primitive value and may be used as the key of an Object property. In some programming languages, Symbols are called “atoms”.</p><p><strong>Structural Root Primitive</strong></p><p><strong><em>null:</em></strong></p><p>The value null represents the intentional absence of any object value. It is one of JavaScript&#39;s <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive">primitive values</a> and is treated as <a href="https://developer.mozilla.org/en-US/docs/Glossary/Falsy">falsy</a> for boolean operations.</p><p>The Null type has exactly one value: null. The special null value does not belong to any of the types described above. It forms a separate type of its own which contains only the null value:</p><pre>let city = null;</pre><p>In JavaScript, null is not a “reference to a non-existing object” or a “null pointer” like in some other languages. It’s just a special value which represents “nothing”, “empty” or “value unknown”. The code above states that city is unknown.</p><p><strong>Structural Data Types</strong></p><p><strong><em>objects:</em></strong></p><p>In computer science, an object is a value in memory which is possibly referenced by an <a href="https://developer.mozilla.org/en-US/docs/Glossary/Identifier">identifier</a>. A JavaScript object is a mapping between <em>keys</em> and <em>values</em>. JavaScript objects are written with curly braces {}. Object properties are written as key:value pairs, separated by commas. Keys are strings and <em>values</em> can be anything.</p><pre>const person = {<br>               firstName:&quot;Adam&quot;, <br>               lastName:&quot;Eve&quot;, <br>               age:50, <br>               eyeColor:&quot;brown&quot;<br>            };</pre><p>The object (person) in the example above has 4 properties: firstName, lastName, age, and eyeColor.</p><p><strong><em>functions:</em></strong></p><p>Functions are regular objects with the additional capability of being <em>callable</em>.</p><h4>The typeof Operator</h4><p>You can use the JavaScript typeof operator to find the type of a JavaScript variable. The typeof operator returns the type of a variable or an expression. It’s useful when we want to process values of different types differently or just want to do a quick check;</p><pre>typeof undefined // &quot;undefined&quot;  <br>typeof 0 // &quot;number&quot;  <br>typeof 10n // &quot;bigint&quot;  <br>typeof true // &quot;boolean&quot;  <br>typeof &quot;Istanbul&quot; // &quot;string&quot;  <br>typeof Symbol(&quot;id&quot;) // &quot;symbol&quot;  <br>typeof Math // &quot;object&quot;  (*)  <br>typeof null // &quot;object&quot;  (*)  <br>typeof alert // &quot;function&quot;  (*)</pre><p>The last three lines may need additional explanation:</p><ul><li>Math is a built-in object that provides mathematical operations. It serves just as an example of an object.</li><li>The result of typeof null is &quot;object&quot;. That’s an officially recognized error in typeof behavior, coming from the early days of JavaScript and kept for compatibility. Definitely, null is not an object. It is a special value with a separate type of its own.</li><li>The result of typeof alert is &quot;function&quot;, because alert is a function. Functions belong to the object type. But typeof treats them differently, returning &quot;function&quot;. That also comes from the early days of JavaScript. Technically, such behavior isn’t correct, but can be convenient in practice.</li></ul><h4>Conclusion</h4><p>Programming languages all have built-in data structures, but these often differ from one language to another. In this article, we have covered the data types and data structures in JavaScript. The are basically 9 data types according to official <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures">MDN documentation</a>.</p><p>JavaScript is one of the most popular programming language. It is the programming language of the Web. The learning curve may be easy at the beginning but requires attention as you get into code. There are further details about “undefined” and “null” which have custom properties built-in to JavaScript. I am planning to write my next article on this topic. Until then, happy coding mates..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*V6oIvaY1gMkjHx7qrpxeTw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1bcb37bdab2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What does Clean Code mean?]]></title>
            <link>https://ogutdgnn.medium.com/what-does-clean-code-mean-2190e4aed818?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/2190e4aed818</guid>
            <category><![CDATA[clean-coder]]></category>
            <category><![CDATA[clean-coding]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 23:22:36 GMT</pubDate>
            <atom:updated>2021-07-04T23:51:15.411Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” — <a href="https://apiumhub.com/tech-blog-barcelona/microservices-vs-monolithic-architecture/">Martin Fowler</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rO107jy8HN7Mwn8HJbjgGg.jpeg" /></figure><p>Many software projects suffer from an overwhelming jump in costs. As the project survives, it becomes more and more expensive to implement new features in the existing code base.</p><ul><li>Due to its size, rewriting is not an alternative.</li><li>The software thus makes more and more difficulties in the areas of correctness and changeability.</li><li>Since very limited tests available, errors remain undetected when changes are made, and the correctness of the software deteriorates.</li><li>Since the structures are very complicated, methods and classes are too long and responsibilities are mixed up and many other things are still in trouble, the changeability is also not given.</li><li>Code that nobody understands is difficult to change.</li></ul><p>So in short, bad code is difficult to understand, more complex than it should be, not easy to test, and it makes other developers approach with frustration. While it might take longer to write clean code in the short term, it’s beyond established that writing clean code will save everyone time, effort, and ultimately money.</p><p><strong>Clean Code</strong> is a term from software development and addresses the clear, comprehensible, traceable, logical and disciplined implementation of code. The goal is to produce software efficiently and effectively, and to design the code so that it is easily</p><ul><li>readable,</li><li>changeable,</li><li>expandable</li><li>and maintainable.</li></ul><h4>Why do we need clean code?</h4><p>In today’s software development practice it is not uncommon for working code not necessarily to be “clean”. This quickly leads to errors during adaptations or problems with extensions, for example when a small change leads to a cascade of subsequent changes. The maintenance and further development of software is unnecessarily complicated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*tVMH2vff9wV2ZBKRz-AHQA.png" /></figure><p>Moreover, in real world scenarios it is highly likely that you will be working as a team of programmers to build any specific application; therefore, it is important to keep your code clean and understandable because you are not the only one working on them. If you write clean code, then you are helping your future self and your co-workers.</p><p>And finally, clean code adds to the value of the project, as it ensures that developers as well as non-programmers (generally) are able to understand what the code is actually doing with the help of the flow and structure of the program.</p><p>When we talk about clean code, we talk about a reader-focused development style that produces software that’s easy to write, read, and maintain. And because people need to understand the code we write, we can say that the code we write is not intended only for the computer but also for humans.</p><blockquote><em>Programming is the art of telling another human what one wants the computer to do.<br> — Donald Knuth</em></blockquote><h3>Clean Code Principles</h3><p>Clean code doesn’t rely on language-specific rules. Instead, it relies on language-agnostic principles agreed upon by the developer community. Here are some to list;</p><h4><a href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a>: Keep It Simple Stupid.</h4><p>A design principle originating from the U.S. Navy that goes back to 1960 already. It states that most systems should be kept as simple as possible (but not simpler, as Einstein would have said). Unnecessary complexity should be avoided. The question to ask when you’re writing code is “can this be written in a simpler way?” Don’t get fancy if you don’t have to, and don’t over-complicate problems (a common issue among software developers). By keeping it simple you can produce higher quality code, solve problems faster, work better in developer groups and have a more flexible code base, among other things.</p><h4>Understand Your Code</h4><p>As a beginner, even if you are writing simple code having an ‘if else’ statement, start by realizing the code on a piece of paper. The algorithm and the whole compiler process will look more meaningful once you understand the idea behind the code. Even for experts, the best way to solve a complex problem or formulate an algorithm to solve any complex problem is by breaking it into sub-parts and then try to formulate a solution for each. Once you start internalizing the code and solving problems you will quickly build up your confidence.</p><h4>Use Comments When Necessary</h4><p>Adding comments to your code can be invaluable — they can quickly show what a complex function is doing, or maybe even explain why certain things need to happen in a certain order. As people grow and gain experience as coders, they tend to forget one of the most basic tips that they received in their early days of programming — leave comments. Adding comments to your code is a tip that spans every programming language. It makes updating, debugging, analysis and other post-programming activities easier and more efficient. Further, if you are working as a team, having comments in the code makes it convenient for the other members to understand your idea of the code. On the other hand, they do have a downside, though, because too much commenting can have the opposite effect and actually make for messier code.</p><h4><a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a>: Don’t Repeat Yourself.</h4><p>Closely related to KISS and the minimalist design philosophy. It states that every piece of knowledge (code, in this case) must have a single, unambiguous, authoritative representation within a system (codebase). Violations of DRY are referred to as WET: We Enjoy Typing, Write Everything Twice, Waste Everyone’s Time.</p><h4><a href="https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it">YAGNI</a>: You Aren’t Gonna Need It.</h4><p>A developer should not add functionality unless deemed necessary. YAGNI is part of the Extreme Programming (XP) methodology, which wants to improve software quality and increase responsiveness to customer requirements. YAGNI should be used in conjunction with continuous refactoring, unit testing, and integration.</p><h4>Indent Your Code</h4><p>Imagine you go to a supermarket and there is no consistency over how the items are placed in the area. Some dairy products are at the clothing sections, others are at the cosmetics area, and bread products are placed with the vegetables. Indentation in the code is much like the arrangement that you need in a supermarket or any other place in the real world. When your code is indented, it becomes more readable and easier to find what you’re looking for.</p><h4>Whitespace Is Good</h4><p>Using whitespace can be incredibly powerful and normally has absolutely no downside. Sometimes in languages like JavaScript where the file size of the source code itself is important, you might want your files to be small, and that whitespace can add a few extra kilobytes. When you can, keep all your whitespace during development so the code is readable. Then, use one of the many smart little programs that go through code and chop out all the whitespace just before you upload it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*qzxRjs3tnhmwyEiaZCPTNg.png" /><figcaption><a href="https://devhumor.com/user/tecHindustan">https://devhumor.com/user/tecHindustan</a></figcaption></figure><h4>Follow Naming Convention</h4><p>This is one tip that keeps popping up in every single article about the correct way of working on any programming language, and still people tend to forget or neglect it. Having a proper naming convention is extremely important in a code as the doors for future edits and updating is always wide open. Having irrelevant or contradicting names to your pages, variables, functions or arrays will only create troubles for you in the future. Therefore, name elements on the basis of what they are and make it a habit to maintain a convention throughout your code.</p><p>It’s not because a machine can read your code that another human can. Particularly when working with multiple people on a project, always favor readability over conciseness. There’s no point in having concise code if people don’t understand it.</p><p>There are many ways to make your code more readable. Two examples are placing common numbers into well-named constants (e.g. const CACHE_TIME = 200;) and creating long names instead of shorter ones (e.g. userHasFormAccess over canAccess, which doesn&#39;t tell as much).</p><h4><a href="https://en.wikipedia.org/wiki/Composition_over_inheritance">Composition over inheritance</a></h4><p>Not an acronym, sadly. It’s a principle where you design your types over what they do instead of over what they are. It’s explained in more detail <a href="https://www.youtube.com/watch?v=wfMtDGfHWpA">in this video</a>. One of the ways to implement this principle is with the Object.assign() method in ES6.</p><p>Composition is favored over inheritance by many developers, because inheritance forces you to build a taxonomy of objects early on in a project, making your code inflexible for changes later on.</p><h4>Practice consistency:</h4><p>This is arguably the overarching principle of all clean code principles. If you decide to do something a certain way, stick to it throughout the entire project. If you have no choice but to move away from your original choice, explain why in the comments.</p><h4>Conclusion</h4><p>Clean coding is a reader-focused development style that produces software that’s easy to write, read and maintain. Often, you may be tempted to consider your work complete when the application operates as expected. But we’re not merely writing code for computer consumption. Clean code is about recognizing that your audience isn’t just a computer, it’s real-live humans!</p><p>Clean coding is not a skill that can be acquired overnight. It is a habit that needs to be developed by keeping the above mentioned principles in mind and applying them whenever you write code.</p><h4>Further reading from various resources:</h4><h4><a href="https://medium.com/@huytrongnguyen1985/lessons-learnt-from-the-clean-code-robert-c-martin-cecbe2b09139">Lessons learnt from “The Clean Code” — Robert C. Martin</a></h4><h4><a href="https://t2informatik.de/en/smartpedia/clean-code/">Clean Code</a></h4><h4><a href="https://www.freecodecamp.org/news/clean-coding-for-beginners/">Clean Code Explained — A Practical Introduction to Clean Coding for Beginners</a></h4><h4><a href="https://geniusee.com/single-blog/clean-code-cause-and-effect">WHAT IS CLEAN CODE AND HOW TO IMPROVE YOUR CODE?</a></h4><h4><a href="https://dzone.com/articles/clean-code-explanation-benefits-amp-examples">Clean Code: Explanation, Benefits, and Examples</a></h4><h4><a href="https://clean-code-developer.com/grades/grade-1-red/">Clean Code Developer</a></h4><h4>A Good summary of concept in Github (<a href="https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29">clean_code.md</a>)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*AtVmRARoKKjcXBSmiOXiYw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2190e4aed818" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some Useful CSS Tools for Front-End Developers]]></title>
            <link>https://ogutdgnn.medium.com/some-useful-css-tools-for-front-end-developers-e4556339f09d?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4556339f09d</guid>
            <category><![CDATA[css-tool]]></category>
            <category><![CDATA[css-linter]]></category>
            <category><![CDATA[css-generator]]></category>
            <category><![CDATA[online-css-tools]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 13:16:51 GMT</pubDate>
            <atom:updated>2021-07-04T13:16:51.937Z</atom:updated>
            <content:encoded><![CDATA[<p>Cascading Style Sheets (CSS) is a coding language usually used for front end programming.</p><p>Web developers use CSS to manage the visual aesthetics of a web page. CSS allows you to change the color of the text, font style, spacing between paragraphs, column size and layout, background images and colors, layout designs, device screen adaptability, and other similar effects.</p><p>At the early stage by studying others’ code, anyone can learn the basics of CSS. The key, however, is not just to read it, but to also break it down until you understand it. Once you put the effort in to study CSS, you’ll soon realize that it’s not as intimidating as it may seem at first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A3-UXsxKVrC-C-q8qHH9ew.png" /><figcaption>Some reflections from a CSS coder. (<a href="https://wpexpert.ca/34-css-puns-thatll-make-you-laugh-even-if-you-arent-a-web-designer/">full list</a>)</figcaption></figure><p>But sometimes writing CSS is like fighting monsters in a tar pit. While <a href="https://geekflare.com/best-css-frameworks/">CSS</a> is one of the most fundamental technologies powering the Web, it’s not a proper programming language or framework per se. As a result, as soon as your project starts growing more prominent, so does the mess — the selector rules seem to be all over the place, and it’s hard to find what’s where; as you include fonts, external CSS, JS, and other assets on your pages.</p><p>I have listed some useful CSS online tools that I found useful especially for fellow front-end developers at the early stage of the learning path like myself.</p><h4><a href="https://jigsaw.w3.org/css-validator/#validate_by_uri">1. W3C CSS Validation Service</a></h4><p>The W3C CSS Validation Service is a free software created by the W3C to help Web designers and Web developers check Cascading Style Sheets (CSS). It can be used on this <a href="https://jigsaw.w3.org/css-validator/">free service</a> on the web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIHzEkJ2AIyGRwH8SV72rA.png" /><figcaption>CSS Validator helps validating your page.</figcaption></figure><p>Although many modern IDE will still catch errors or warning, it is still a good option to validate your CSS to the world-wide CSS authority. As a bonus you can use their CSS badge embedded into your web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*x1pHwKAjaJAxydVTuoEI2Q.png" /></figure><h4>2.CSS Linters</h4><p>It is said that classical UI designers rarely get to hear about or benefit from a linter. On the other hand, programmers who use <a href="https://geekflare.com/online-code-editors/">good text editors</a> like VS Code, Sublime Text, or other IDEs know linter tool very well since it’s second nature to them. If you’re one of those CSS developers who gets drowned in messy CSS, you could benefit from a linter.</p><p>Simply put, a linter is a program that checks your code for errors and inconsistencies. It does this with the help of a set of rules that it has for figuring out what’s wrong and what’s inconsistent. Good linters integrate with IDEs and code editors and can be configured to run every time you save the source file. They also help you with color previews, errors, and auto-completion as you’re composing your CSS files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*OXYIl6n7ANcyQH-meRDm5w.png" /><figcaption>VS Code linter extension</figcaption></figure><p>If you follow a particular CSS styling and formatting, you can tweak the linter to your satisfaction. This ensures that the CSS within a project follows the same style guide (the linter can also be configured to auto-format the file every save/commit the source code). So, whether you’re working in a team or alone, a linter is always a great addition to your project workflow.</p><p><a href="http://csslint.net/">CssLint</a> (online tool)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yiUs-nSa18xIscMX3_CzA.png" /></figure><h4>3. CSS Specificity Calculators</h4><p>If there are two or more conflicting CSS rules that point to the same element, the browser follows some rules to determine which one is most specific and therefore wins out.</p><p>Think of specificity as a score/rank that determines which style declarations are ultimately applied to an element.</p><p>The universal selector (*) has low specificity, while ID selectors are highly specific! The <strong>!important</strong> value appended a CSS property value is an <em>automatic win</em>. It overrides even inline styles from the markup. The only way an !important value can be overridden is with another !important rule declared later in the CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*-1lcmpn9rKgdnUocMLWzBw.png" /></figure><p>This topic might be trick especially at the early stage of front-end development learning path. There some online tools might be helpful to compare and order the CSS rules:</p><h4><a href="https://polypane.app/css-specificity-calculator/#selector=">Polypane</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*uc8dXjUQh7ToIqalDk-KDA.png" /></figure><h4><a href="https://specificity.keegan.st/">Specificity Calculator</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ojm9wpgWDVLye87IzsGJGw.png" /></figure><p>4. CSS Generators</p><p>As a front-end developer sometimes you might be looking for shortcuts to save time in their routine. Many great dev tools ease the process, and it’s now easier than ever to jump in and get a finished product quickly. With the rise of <a href="https://www.hongkiat.com/blog/cloud-ide-developers/">browser-based IDEs</a> it seems web development is <a href="https://www.hongkiat.com/blog/tools-to-coding-online/">becoming less fixed to the desktop</a>. You can <strong>write code from any computer, and even test the result live in your browser</strong>.</p><p>Free online code generators will help you <strong>iterate and build onto your code quickly</strong>. Once you know what code you need to generate, it’s just a matter of finding the right tool for the job. You can try the following tools <strong>for generating CSS</strong>, and they’re all completely free to use.</p><p><a href="https://html-css-js.com/">html-css-javascript</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gSMCChVQFSr9kDJFUkiRZQ.png" /></figure><p><a href="https://webcode.tools/">Web Code Tools</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtncqThmMagagj_c4LXMDA.png" /></figure><p><a href="https://www.cssportal.com/css-generators.php">CSS Portal</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUVaNGBPjFYdmtC6yIOVQQ.png" /></figure><p>Final words..</p><p>There’s a plethora of <a href="https://developer.mozilla.org/en-US/docs/Web/CSS">online resources</a> out there to help you learn to code. And while you can teach yourself CSS, you’ll need to invest in an online web development course of your choice if you want to learn the full scope of technical abilities and soft skills that lead to a long-term full-stack career. This brings in commitment and an orderly study medium. You can be sure that a course will not teach you all, but you will join a developer community faster and learn fast.</p><p>And tha last word: Learn CSS before diving into the world of back-end development. Or otherwise…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*cqG7SJN6CgJltuozyiGscQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4556339f09d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Linting? How does a linter work?]]></title>
            <link>https://ogutdgnn.medium.com/what-is-linting-how-does-a-linter-work-49381f28fc60?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/49381f28fc60</guid>
            <category><![CDATA[linter]]></category>
            <category><![CDATA[linting]]></category>
            <category><![CDATA[lint]]></category>
            <category><![CDATA[code-forma]]></category>
            <category><![CDATA[code-rev]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 10:45:09 GMT</pubDate>
            <atom:updated>2021-07-04T10:45:09.225Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p>Software developers know that programming errors are bad. Some errors cause glitches that frustrate users. Others compromise the safety and security of a critical system. No matter what type of program you’re developing, avoiding these errors is important. That’s why many development teams rely on linting. So what is linter or linting?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*gqb_X_Tv9xFE4gJzJVVf4Q.png" /></figure><p>Here is the outline to answer this question: We start by defining the term “linter.” We will continue with a brief history. Then, we talk about the benefits of linters and proceed to talk about the different types of checks they offer.</p><p>Finally, we show you several examples of linters in the developers’ world, give some practical tips on how to get started, and wrap-up with a few final considerations.</p><p><strong>Lint</strong>, or a <strong>linter</strong>, is a <a href="https://en.wikipedia.org/wiki/Static_program_analysis">static code analysis</a> tool used to flag programming errors, <a href="https://en.wikipedia.org/wiki/Software_bug">bugs</a>, stylistic errors and suspicious constructs.</p><p><strong>Linting</strong> is a process by a <strong>linter</strong> program that analyzes source code in a particular programming language and flag potential problems like syntax errors, deviations from a prescribed coding style or using constructs known to be unsafe. In short, a linter is a tool to help you improve your code.</p><p>The term “lint” was derived from the name of the tiny bits of <a href="https://en.wikipedia.org/wiki/Lint_(material)">fiber and fluff</a> shed by clothing, as the computer command should act like a dryer machine lint trap, detecting small errors with big effects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8EuSggE5bJtJ2oYvPCsPKw.png" /><figcaption>Improve your code with lint checks</figcaption></figure><p>The term originates from a <a href="https://en.wikipedia.org/wiki/Unix">Unix</a> <a href="https://en.wikipedia.org/wiki/List_of_utility_software">utility</a> that examined <a href="https://en.wikipedia.org/wiki/C_(programming_language)">C language</a> source code. <a href="https://en.wikipedia.org/wiki/Stephen_C._Johnson">Stephen C. Johnson</a>, a computer scientist at <a href="https://en.wikipedia.org/wiki/Bell_Labs">Bell Labs</a>, came up with lint in 1978 while debugging the <a href="https://en.wikipedia.org/wiki/Yacc">yacc</a> grammar he was writing for <a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a> and dealing with <a href="https://en.wikipedia.org/wiki/Software_portability">portability</a> issues stemming from porting <a href="https://en.wikipedia.org/wiki/Unix">Unix</a> to a <a href="https://en.wikipedia.org/wiki/32-bit">32-bit</a> machine. In 1979, lint was used outside of Bell Labs for the first time in the seventh version of the <a href="https://en.wikipedia.org/wiki/Unix">Unix</a> operating system.</p><p>Both the original lint tool, as well as earlier similar utilities, had the goal of analyzing source code to come up with compiler optimizations. Over time, lint-like tools started adding many other types of checks and verification.</p><p>Even though modern <a href="https://en.wikipedia.org/wiki/Compiler">compilers</a> have evolved to include many of lint’s historical functions, lint-like tools have also evolved to detect an even wider variety of suspicious constructs. Lint tools are the most basic form of static analysis. Using lint tools can be helpful for identifying common errors, such as:</p><ul><li>Indexing beyond arrays.</li><li>Dereferencing null pointers.</li><li>(Potentially) dangerous data type combinations.</li><li>Unreachable code.</li><li>Non-portable constructs.</li></ul><h3><strong>Where to Use Lint?</strong></h3><p>A linter is great for identifying errors when you use standard rules. Remember, a linter analyzes your code for stylistic and programming errors against the rules it knows. This can depend on your programming language. Some languages are better suited for code linting than others.</p><p>For example, when it comes to compiled languages, such as C and C++, using lint software might not be enough. C and C++ are complex and may require more advanced code analysis.</p><p>On the other hand, we could say that linters are way more valuable for interpreted languages since there’s no compiler to detect errors during development time. Take Python and JavaScript, they lack a compiling phase. So, using lint software is effective for ensuring consistent coding style and resolving basic coding errors in these cases.</p><p>When it comes to code review, a linter may not exactly be a code review tool; however, it is considered as an essential part of the review process. Linters can be used for two base functions: to make developers follow the syntax requirements of any language, and to enforce stylistic guidelines.</p><p>The former shortens the code review process by catching faulty code as early as possible. The latter helps reviews by making sure all the code in the project is typed in the same format. So, it stays consistent, easily readable and saves time and effort on stylistic checks during reviews.</p><h3>Pros &amp; Cons</h3><p>Now up to this point, you probably at least a general idea of what a linter can do for your code. But in more practical terms, what are the benefits that this type of tool can provide? Here are some:</p><ul><li>Fewer errors in production. The use of linters helps to diagnose and fix technical issues — e.g. code smells — in the code. As a result, fewer defects make their way to production.</li><li>Readable, maintainable, and more consistent code. Linters can help teams achieve a more readable and consistent style, through the enforcement of its rules.</li><li>Fewer discussions about code style and aesthetic choices during code reviews. Code review discussions shouldn’t be riddled with endless arguments about stylistic preferences. Linters can take those topics out of the way.</li><li>Objective measurement of code quality. Discussions about code quality often veer into subjectivity. Linters provide an objective and measurable assessment of code quality.</li><li>More secure and performant code. Not all linters analyze source code regarding its performance and safety, but some do.</li><li>Education about code quality reaches more developers. Linters can help developers — particularly the most inexperienced ones — to learn about code quality.</li></ul><p>As you may guess, every positive approach might have disadvantages as well. Here are some of them for linting:</p><ul><li>The most obvious argument against it is about it <strong>breaking concentration. </strong>If you are trying to get into the flow and crank out lines of code, a bunch of flags and warnings popping up can take you out of it.</li><li>Another danger is developing<strong> warning fatigue.</strong> This is often the result of <a href="https://www.perforce.com/blog/qac/what-are-false-positives-and-false-negatives">false negatives</a> and making assumptions about the reliability of linters. If you get into the habit of ignoring all the flags, your linter can protect you as little as the warm, fuzzy-feeling you get inside from gazing at the ever-present check engine light.</li><li>Using a linter on a massive existing<strong> code base</strong> is something many would <a href="https://www.reddit.com/r/reactjs/comments/93kuc2/how_come_a_lot_of_developers_dont_use_code_linters/e3edqdm/">advise against</a> as “implementing a linter on a mature project becomes a tremendous task.”</li></ul><p>Notwithstanding these disadvantages, as one developer point out in this <a href="https://stackoverflow.blog/2020/07/20/linters-arent-in-your-way-theyre-on-your-side/">stackoverview contribution: </a>“Something I think that programmers don’t always appreciate is that linting isn’t an either/or proposition necessarily. A linter is exactly like the spelling/grammar checker in your word processor. It’s there to advise you.”</p><h3>Examples of linters</h3><p>There are a vast number of linters out there. Depending on the programming language, there are even more than one linters for each job.</p><h4>Linters focused on the style guide and coding conventions</h4><ul><li><a href="https://eslint.org/">ESLint</a>, <a href="https://standardjs.com/">StantdartJS</a>, <a href="https://www.jslint.com/">JSLint</a> for JavaScrtip</li><li><a href="https://docs.sourcelevel.io/engines/csslint/">CSSLint</a>, <a href="https://docs.sourcelevel.io/engines/scss-lint/">SCSS Lint</a> and <a href="https://docs.sourcelevel.io/engines/sass-lint/">Sass Lint</a> for Cascading Style Sheet</li><li><a href="https://pypi.org/project/black/">Black </a>, <a href="https://pypi.org/project/pylint/">PyLint </a>for Python</li><li><a href="https://docs.sourcelevel.io/engines/gofmt/">Gofmt</a> for Go language</li><li><a href="https://docs.sourcelevel.io/engines/swiftlint/">Swiftlint</a> for Switft</li><li><a href="https://docs.sourcelevel.io/engines/rustfmt/">rustfmt</a> for Rust</li><li><a href="https://docs.sourcelevel.io/engines/credo/">Credo</a> for Elixir</li></ul><p>And finally, it would worth mentioning <a href="https://prettier.io/">Prettier</a>, which is a special addition to this list. It’s not a fully realized linter. It’s basically a formatting ruleset you can plug into linters. It doesn’t touch the code itself, only it’s format, and it automatically reprints it in sync with the style guidelines.</p><h4>Linters focused on Security:</h4><ul><li><a href="https://docs.sourcelevel.io/engines/brakeman/">Brakeman</a> for Ruby</li><li><a href="https://docs.sourcelevel.io/engines/bandit/">Bandit</a> for Python</li><li><a href="https://docs.sourcelevel.io/engines/nodesecurity/">Node Security</a> for JavaScript</li></ul><p>The next section covers some of the types of verifications that linters provide. After reading it, you’ll understand how linters provide the advantages mentioned above.</p><h3>Types of Checks Linters Provide</h3><p>As you’ve just read, the original lint tool analyzed code to enable optimizations for compilers, but over time, more advanced and complete tools were released. Nowadays, we have myriad different linters, which provide many types of checks. Let’s quickly go through some of them.</p><h4>Syntax Errors</h4><p>The most basic and more vital type of checks that a linter can provide are syntax error verifications when it comes to JavaScript and other interpreted languages. Developers shouldn’t even push code to the mainline without it passing syntax verifications.</p><p>One way to accomplish this is to use pre-commit hooks that prevent users from pushing their code when the linter verification indicates there are issues with the code.</p><h4>Code Standards Adherence</h4><p>Another vital type of check that linters provide is adherence to coding standards. Some people might dismiss this as a purely aesthetic concern, but they’d be wrong. Having a single consistent coding style is beneficial for decreasing the cognitive load of reading, understanding, and maintaining code. A codebase that has a consistent code style will be easier to understand, and the developers that use it will be less likely to introduce bugs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*GnbnoXtaOeYZx5ijucW2mA.png" /><figcaption>Figure 1 Third Way <a href="https://xkcd.com/1285/">https://xkcd.com/1285/</a></figcaption></figure><p>That’s why there are linters that specialize in verifying codebases for adherence to code styles. Some tools are opinionated, i.e. they come with a pre-defined set of rules and conventions that can’t be changed. On the other hand, there are tools that can be highly configurable, allowing the user to adapt the tool to their preferred coding styles.</p><h4>Potential Problems (a.k.a. Code Smells)</h4><p>Code smells are signs that something might be wrong with your code. It’s amazingly useful to have a tool to detect those signs automatically, so you can investigate them further, if necessary.</p><p>For instance, many developers consider long functions to be a code smell. So, you could configure your linter to detect functions that are longer than a given number of lines.</p><h3>Conclusion</h3><p>Linters help you get more productive and save you time and money. They drive your team to better decisions (those oriented by data) and share ownership over the quality.</p><p>Linting can help with the <a href="https://sourcelevel.io/blog/what-is-a-linter-and-why-your-team-should-use-it">heterogeneous knowledge </a>on a team. For juniors, a linter is like an invisible senior team member that points out style guideline documentation, causes them to pause and question steps, and ultimately helps<a href="https://spin.atomicobject.com/2018/09/20/learn-by-linting/"> learn a new language.</a> For seniors, it is an easy way to enforce, not their style, but the use of <em>a</em> consistent style on a team. Leading by example becomes more visible and somewhat built in. It saves many shoulder taps and time during code reviews.</p><p>The process of linting can be time consuming when starting out a project; it requires the discipline to catch linter messages <a href="https://welchcanavan.com/why-i-lint-everything">from your first line of code.</a> It is, however, worth taking advantage of the ways to customize. Make use of best practices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49381f28fc60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is CSS?]]></title>
            <link>https://ogutdgnn.medium.com/what-is-css-a2e191e19190?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2e191e19190</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sat, 26 Jun 2021 22:09:32 GMT</pubDate>
            <atom:updated>2021-06-26T22:09:32.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*p5m6cZLFgEOtu7xVXxthsA.png" /><figcaption>A developer working on CSS file…</figcaption></figure><p>The beginning of the WEB was mostly an academic concept to share academic writings among themselves. As we can guess, the scientists were not worried about the look and shape of their paper, as long as they can read the paper on the screen.</p><p>HTML was never intended to contain tags for formatting a web page. It was created to describe the content of a web page,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXD-nt__JdZdHAgk5mslXQ.jpeg" /><figcaption>HTML &amp; CSS are keys for web development</figcaption></figure><p>On the other hand, as Internet and HTML grew, people began to create more colorful and artistic web pages including many styles.</p><p>When tags like &lt;font&gt;, and color attributes were added to the HTML around mid 90’s, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process.</p><p>To solve this problem, the <a href="https://www.w3.org/">World Wide Web Consortium (W3C) </a>created CSS. CSS stands for Cascading Style Sheets and it is the language we use to style a Web page.</p><p><strong>Cascading style sheets (CSS)</strong> set the presentation of HTML pages. CSS sits on top of the HTML code, like a template, and defines the design for each element on the page: Font, font color, background — web designers can set all of these design elements with CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*ry9gKL1wveY4vXckVjIdyg.png" /></figure><p>Additionally.</p><ul><li>It describes how HTML elements are to be displayed on screen, paper, or in other media</li><li>It saves a lot of work. It can control the layout of multiple web pages all at once</li><li>Most of the time HTML and CSS codes are separated, because External stylesheets are stored in CSS files.</li></ul><p>With all its good and helpful sides, there are some developers critical about CSS. Some finds it confusing on the following issues:</p><ul><li>global scope,</li><li>specificity and limited inheritance,</li><li>the box model (much better with flexbox and CSS grid),</li><li>margins/paddings (got better with box-sizing: border-box;),</li><li>lack of debug tools ( getting better with browser dev tools)</li></ul><p>These troublesome areas led discussions towards offering the idea of applying styles to elements through JavaScript as dynamic inline elements. There were suggestions on replacing <strong>style.css</strong> files with <strong>style.js</strong> ones. Although those discussions not over yet, for the foreseeable future, full stack developers will need to learn and understand the CSS.</p><p><strong>So can you avoid CSS? </strong>Basically no. If you want to web development, you’ll eventually need to get your hands dirty and learn some CSS. It’s a safe bet that you’ll need CSS skills to excel as a front-end developer, and once get skills on CSS you will be a preferable full-stack developer at most companies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2e191e19190" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS : 9 best practices for full-stack developers]]></title>
            <link>https://ogutdgnn.medium.com/css-9-best-practices-for-full-stack-developers-ac61b63e1f39?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac61b63e1f39</guid>
            <category><![CDATA[css-rules]]></category>
            <category><![CDATA[css-styling]]></category>
            <category><![CDATA[css-best-practices]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sat, 19 Jun 2021 19:43:34 GMT</pubDate>
            <atom:updated>2021-06-19T22:10:00.995Z</atom:updated>
            <content:encoded><![CDATA[<h3>CSS : 9 best practices for full-stack developers</h3><p><strong>C</strong>ascading <strong>S</strong>tyle <strong>S</strong>heets, widely referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ca38BL7C5MRI0qsdAQT3Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@pankajpatel?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Pankaj Patel</a> on <a href="https://unsplash.com/@pankajpatel?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, layout designs, variations in display for different devices, and screen sizes as well as a variety of other effects.</p><p>The CSS specifications are maintained by the <a href="http://www.w3.org/">World Wide Web Consortium</a> (W3C). Even though every browser supports CSS, there are many inconsistencies in the supported specification version. Supporting all modern browsers is a daunting task, not to mention when developers need to support old and legacy browsers. All these problems cause a lot of trouble for developers, and it is hard for them to write CSS code that will render consistently across all browsers.</p><p>As you start to work on larger stylesheets and big projects you will discover that maintaining a huge CSS file can be challenging. In this article, we will take a brief look at some best practices for writing your CSS to make it easily maintainable, and some of the solutions you will find in use by others to help improve maintainability.</p><h3><strong>1. Keep Your CSS tidy</strong></h3><p>It is smart to put your stylesheet come in the simplest way that permits you to realize elements of your code quickly. I like to recommend a top-down format that tackles designs as they seem within the ASCII text file. So, an associate degree example stylesheet could be ordered like this:</p><ul><li><em>Generic Element (body, a, p, h1, etc.)</em></li><li><em>.header</em></li><li><em>.nav</em></li><li><em>.wrapper</em></li></ul><p>It is important to always store details of the CSS code you are using. One of the best practices that you can implement for CSS code is by putting a comment for each group of CSS’s code. It is one of the best ways you can locate the CSS group that you are trying to find for the errors. Use CSS comment structure like below:</p><pre>/*-----HEADER----- */<br>  add styles here…<br>/*-----NAVIGATION----- */<br>  add styles here…<br>/*-----MAIN CONTENT----- */<br>  add styles here…<br>/*-----FOOTER----- */<br>  add styles here…</pre><p>Adding comments to your CSS will help any future developer work with your CSS file, but will also help you when you come back to the project after a break.</p><pre>/* This is a CSS comment<br>It can be broken onto multiple lines. */</pre><p>Lastly, provide stylesheet information at the top of the CSS file with comments. Put a Title, Author, Tags, Description, URL information, and so on your stylesheet. This will give the user/developer a reference person to contact whenever they need support regarding your creation.</p><pre>/*<br> Theme Name: Developer Portfolio 1.1.0<br> Description: Cogut Portfolio Website <br> Author: Cetin Ogut<br> Author URL: <a href="https://github.com/cetinogut">https://github.com/cetinogut/</a><br> Tags: Personal , Portfolio,  Website<br>*/</pre><h3><strong>2. Grouping Multiple CSS Elements</strong></h3><p>When you group CSS selectors, you apply the same styles to several different elements without repeating the styles in your stylesheet. Instead of having two, three, or more CSS rules that do the same thing (set the color of something to red, for example), you use a single CSS rule that accomplishes the same thing. The secret to this efficiency-boosting tactic is the comma. As an example, your h1, h2, and h3 components would possibly share identical font and color. Hence you can combine the same:</p><pre>h1, h2, h3, h4 {<br>    font-family: Arial, Helvetica, sans-serif;<br>    font-size: 2rem;    <br>    color: #f8eaea;<br>}</pre><p>You can place any valid selector in a group, and all elements in the document that match all the grouped elements will have the same style based on that style property.</p><p>Some designers prefer to list the <a href="https://www.lifewire.com/using-multiple-classes-on-single-element-3466930">grouped elements</a> on separate lines for legibility in the code. The appearance of the website and the load speed remain the same. For example, you can combine styles separated by commas into one style property in one line of code:</p><pre>th, td, p.red, div#firstred { color: red; }</pre><p>or you can list the styles on individual lines for clarity:</p><pre>th,<br>td,<br>p.red,<br>div#firstred<br>{<br>color: red;<br>}</pre><h3><strong>3. Use CSS Naming Convention</strong></h3><p>One of the main advantages of CSS is the ability to separate designs from content. You’ll be able to change the entire design of your website by simply modifying the CSS without ever touching the markup language. Therefore don’t create your CSS by using limiting names. Use additional versatile naming conventions and keep consistent. For instance, if you want to put a class name ‘title-red’, it might look meaningless when you happen to change the color of the title. So using ‘title’ instead of ‘title-red’ would be better. It is suggested that you name the elements on the basis of their properties rather than thinking of what purpose they fit into.</p><p>It is also important to use appropriate naming conventions for IDs and classes as this will add value and meaning to your work.</p><blockquote>There are only two hard things in Computer Science: cache invalidation and naming things. <strong>— PHIL KARLTON</strong></blockquote><p>Naming things is never easy and the nomenclature of classes and id attributes in CSS is no exception. The problem with bad naming is that it is then difficult to find yourself in its code, so it’s important to find a particular convention to organize yourself well.</p><p>The <strong>Block, Element, Modifier</strong> methodology (commonly referred to as <a href="https://en.bem.info/method">BEM</a>) is a popular <em>naming convention</em> for classes in HTML and CSS. <a href="https://en.bem.info/">Developed by</a> the team at Yandex, its goal is to help developers better understand the relationship between HTML and CSS in a given project. The BEM approach ensures that everyone who participates in the development of a website works with a single codebase and speaks the same language. Using proper naming will prepare you for the changes in the design of the website.</p><p>Here’s an example of what a CSS developer writing in the BEM style might write:</p><pre><em>/* Block component */</em> <br>.btn {}</pre><pre><em>/* Element that depends upon the block */</em>  <br>.btn__price {}</pre><pre><em>/* Modifier that changes the style of the block */</em> <br>.btn--orange {}  <br>.btn--big {}</pre><p>In the below-given example, there is a class ‘cylinder’. It has a div tag, which has an ID named ‘new’, and another div tag, which is an id of icons.</p><pre>.cylinder {<strong>width</strong>: 960px; <strong>margin</strong>: 0; <strong>padding</strong>: 0;}<br>.cylinder #new {<strong>font-family</strong>: Arial, sans-serif; <strong>font-size</strong>: 40px; <strong>color</strong>: black;}<br>.cylinder #tagline {<strong>font-family</strong>: Verdana; <strong>font-size</strong>: 20px;}</pre><h3><strong>4. Prefer External CSS</strong></h3><p>The use of external CSS is beneficial. You can pull all the CSS in an external file and include these files in your HTML.</p><p><em>Benefits of External CSS:</em></p><ul><li>All the CSS are stored within single Stylesheet.</li><li>All the style changes are done in a single CSS for each page (Easier to maintain the website).</li><li>Single CSS will be cached and page load faster.</li><li>Due to the use of external CSS, we can differentiate the CSS like web page layout CSS and Print-friendly CSS.</li></ul><p><strong>Use different version of external stylesheet in your HTML as follows:</strong></p><pre>&lt;head&gt;<br>  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;theme.css&quot; media=&quot;screen&quot;&gt;<br>  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;print.css&quot; media=&quot;print&quot;&gt;<br>&lt;/head&gt;</pre><p>Two different style sheets for two different media types (screen and print):</p><p>“screen” type is the default value and it is optional to code, this type is used for computer screens, tablets, smartphones. The “print” type is used for Print preview mode/printed pages</p><h3><strong>5. Avoid internal or inline styling</strong></h3><p>Internal or embedded CSS requires you to add <strong>&lt;style&gt;</strong> tag in the <strong>&lt;head&gt;</strong> section of your HTML document. This CSS style is an effective method of styling a single page. However, using this style for multiple pages is time-consuming as you need to put CSS rules on every page of your website.</p><pre>&lt;head&gt;<br> &lt;style&gt;<br>   body {<br>    background-color: blue;<br>   }<br>   h1 {<br>    color: red;<br>    padding: 60px;<br>   } <br> &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br><br>&lt;h1&gt;Clarusway Tutorials&lt;/h1&gt;<br>&lt;p&gt;This is our paragraph.&lt;/p&gt;<br><br>&lt;/body&gt;</pre><p>Moreover, adding the code to the HTML document can increase the page’s size and loading time.</p><p>Inline styles look and operate much like CSS, with a few differences. Inline styles directly affect the tag they are written in, without the use of selectors. Using inline styling shows the HTML code messy. Updating each HTML event style through global CSS is hard. So you always need to avoid inline style. Below is the example related to this style:</p><pre>&lt;p style=&quot;color:blue;font-size:46px;&quot;&gt;<br>      I&#39;m a big, blue, &lt;strong&gt;strong&lt;/strong&gt; paragraph<br>&lt;/p&gt;</pre><p>The p tag with the inline style attribute is the focus here. Full-stack developers do not often use inline styles when creating web pages, for many reasons. The reasons include “semantic markup”, maintainability, reusability, and scalability.</p><ul><li><strong>Semantic Markup</strong></li></ul><p>HTML is meant for conveying structured information. CSS is built to style that structured information. When inline styles are used, this clear separation between structured information and styling is blurred. By separating the CSS from the HTML, the markup can be semantic, which means that it can convey as much meaning as possible without being muddled by visual effects.</p><ul><li><strong>Maintainability, Reusability, and Scalability</strong></li></ul><p>Because inline styles only affect the tag they are written in, it can be hard to make changes. If you have written the same style 20 times in 20 different &lt;div&gt; tags, you must edit each of those places whenever you want to make a trivial change. This can be exhausting! By using a single CSS rule in a &lt;style&gt; tag or a separate CSS file, you would only need to change it in one place.</p><p>You gain the most flexibility and power by putting your CSS in a separate CSS file. If you &lt;link&gt; to that CSS file on more than one HTML page, you can reuse the same stylesheet for multiple pages. If you want a consistent style across your whole website, this is the way to go. When you want to make a change, you will only need to make the change in one file, and it will be seen on each linked page.</p><h4>Cases for inline styling:</h4><p>Professional web developers do not use inline styles often, but there are times when they are important to understand or necessary to use. Here are a few places you may see inline styles:</p><blockquote>HTML e-mail,</blockquote><blockquote>Older websites,</blockquote><blockquote>CMS content (e.g. WordPress, Drupal),</blockquote><blockquote>Dynamic content (i.e. HTML created or changed by JavaScript)</blockquote><p>Emails often include HTML content. When you receive a fancy-looking e-mail, it is either one big image file or it is an HTML e-mail. You can craft HTML e-mails yourself, but they can be tricky. The HTML viewers in email clients are not standardized, and most of them do not allow &lt;style&gt; tags. For this reason, HTML e-mail often contains lots of inline styles. Some of the styles included may be archaic, to support older e-mail-viewing clients.</p><p>Another time you will see inline styles is on dynamic websites that use JavaScript. Often, JavaScript scripts will add inline styles to HTML. For example, a common way to hide a dialog box is to add the inline-style display: none;.</p><h4>!important</h4><p>The !important rule in CSS is used to add more importance to a property/value than normal.</p><pre>&lt;div&gt;<br>   &lt;p&gt;This is some text in a paragraph.&lt;/p&gt;<br>   &lt;p class=&quot;myclass&quot;&gt;This is some text in a paragraph.&lt;/p&gt;<br>   &lt;p id=&quot;myid&quot;&gt;This is some text in a paragraph.&lt;/p&gt;<br>&lt;/div&gt;</pre><p>In fact, if you use the !important rule, it will override ALL previous styling rules for that specific property on that element!</p><pre>#myid {background-color: blue;}<br>.myclass { background-color: gray;}<br>p { background-color: red <strong>!important</strong>;}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*n5ZpYwnfFuOokC8KIGSU0A.png" /></figure><p>While !important declarations should rarely be used in code, it’s still necessary to understand what this property is and how to use it. Maybe you’ll need to use the !important rule in your user stylesheets. Maybe you’ll take over a website that contains instances of the rule. Whatever the reason, becoming familiar with the !important property is useful step in learning HTML and CSS.</p><h3>6. Shrinking CSS File Size using CSS Compressors</h3><p>If you feel that there is something wrong while the CSS codes get loaded over the browsers and it seems to be lagging behind in speed, then there is high time you tried to compress the size of the CSS files. A lot of elements, including line breaks, white spaces, and even redundant CSS styles might be interfering with your CSS file and delaying your site from loading quicker.</p><p>So you can use a tool like CSS Compressor and Minifier to get this going.</p><p>You can minify your CSS here: <a href="https://csscompressor.net/">https://csscompressor.net/</a></p><h3>7. Implementing the CSS Reset</h3><p>The major goal of a reset stylesheet is to reduce incompatibilities across various browsers — it provides general styles, which can be easily edited and styled as per your requirements.<br>One of the greatest challenges when developing the front-end design is browser compatibility. Some of the factors that are greatly affected due to browser incompatibility are style aspects, such as headings, line heights, margins, font size and paddings, and so on. These aspects might be inconsistent as they are viewed across various browsers. This is where the Reset Style Sheet comes into the bigger picture.</p><p>Very few developers start coding from scratch so Normalize or a CSS reset is almost required for modern frontend development. You have to include this reset CSS style sheet preceding your style definition under the section ‘head’ within your HTML file in order to prevent these from overriding your style definitions that follow. There is an ongoing discussion whether a heavy reset like normalize.css is still required. You can <a href="https://dev.to/hankchizljaw/a-modern-css-reset-6p3">find a well-explained modern CSS reset here</a>.</p><h3>8. The magic setup</h3><p>This trick helps you prevent most of the bad layout problems you can encounter in HTML.</p><p>Horizontal sliders, absolute-positioned items doing what they want, margins, and padding randomly everywhere: we don’t want them.</p><pre>* {<br>   padding: 0;<br>   margin: 0;<br>   max-width: 100%;<br>   overflow-x: hidden;<br>   position: relative;<br>   display: block;<br>   box-sizing: border-box;<br>}</pre><p>Especially <em>box-sizing: border-box;</em> is a favorite among many web developers, because it solves the problem of padding and layout issues. Basically, when you set a box to a specific width, and add padding to it, the padding adds to the size of the box. However, with <em>box-sizing:border-box;</em>, this is negated, and boxes stay the size they are meant to be.</p><p>Then, if you need to change something, you edit it on a specific item.</p><h3>9. Targeting Elements</h3><p>Selectors have an inherent efficiency, the o<a href="https://www.sitepoint.com/optimizing-css-id-selectors-and-other-myths/">rder of more to less efficient CSS selectors goes</a> thus:</p><ol><li>ID, e.g. #header</li><li>Class, e.g. .promo</li><li>Tag, e.g. div</li><li>General and Adjacent sibling, e.g. h2 ~ p , h2 + p</li><li>Child, e.g. li &gt; ul</li><li>Descendant, e.g. ul a</li><li>Universal, i.e. *</li><li>Attribute, e.g. [type=&quot;text&quot;]</li><li>Pseudo-classes/-elements, e.g. a:hover</li></ol><h4>Right to Left</h4><p>One of the important things to understand about how browsers read your CSS selectors, is that they read them from <strong>right to left</strong>. That means that in;</p><pre>selector ul &gt; li a[title=”home”]</pre><p>the first thing interpreted is a[title=”home”]. This first part is also referred to as the “key selector” in that ultimately, it is the element being selected.</p><h4>ID’s are the most efficient, Universal is the least</h4><p>There are four kinds of key selectors: ID, class, tag, and universal. It is that same order in how efficient they are.</p><pre>#main-navigation {   }      <em>/* ID (Fastest) */</em><br>body.home #page-wrap {   }  <em>/* ID */</em><br>.main-navigation {   }      <em>/* Class */</em><br>ul li a.current {   }       <em>/* Class *<br>ul {   }                    /* Tag */</em><br>ul li a {  }                <em>/* Tag */</em><br>* {   }                     <em>/* Universal (Slowest) */</em><br>#content [title=&#39;home&#39;]     <em>/* Universal */</em></pre><p>When we combine this right-to-left idea and the key selector idea, we can see that this selector isn’t very efficient:</p><pre>#main-nav &gt; li {   }  <em>/* Slower than it might seem */</em></pre><p>Even though that feels weirdly counter-intuitive… Since ID’s are so efficient we would think the browser could just find that ID quickly and then find the li children quickly. But in reality, the relatively slow li tag selector is run first.</p><h4>Don’t tag-qualify</h4><p>Never do this:</p><pre>ul#main-navigation {  }</pre><p>ID’s are unique, so they don’t need a tag name to go along with it. Doing so makes the selector less efficient. Don’t do it with class names either, if you can avoid it. Classes aren’t unique, so theoretically you could have a class name do something that could be useful on multiple different elements. And if you wanted to have that styling be different depending on the element, you might need to tag-qualify (e.g. li.first), but that’s pretty rare, so in general, don’t.</p><h4>Descendant selectors are the worst</h4><p>In other words, a selector like this is an efficiency disaster:</p><pre>html body ul li a {  }</pre><p>The things we’ve discussed tend to really come into their own (and their absence painfully aware) on larger builds, but they will definitely, <em>definitely</em> help you on builds of all sizes; small or large.</p><p>So, by using more classes and fewer descendants, keeping selectors short and portable, keeping selectors element-agnostic, and generally considering maintenance and chance-of-change when writing our CSS, we can really easily improve the quality of our code infinitely</p><h3>Conclusion</h3><p>It is well-known fact that best practices may change radically over time. It might depend on your personal or team’s choices. Nevertheless, documenting CSS begins with clear rules and a well-structured code base. When done as part of your workflow, it can also serve as a guide to structure your code and keep it organized as it grows. This has the additional benefit of making it clear where things are and where new code should be added, easing the onboarding of new members while fast-tracking development.</p><p>LinkedIn : <a href="https://www.linkedin.com/in/cetinogut/">cetinogut</a></p><p>GitHub: <a href="https://github.com/cetinogut">cetinogut</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac61b63e1f39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Full-Stack Development?]]></title>
            <link>https://ogutdgnn.medium.com/what-is-full-stack-development-60de3fd10999?source=rss-86657fd06a69------2</link>
            <guid isPermaLink="false">https://medium.com/p/60de3fd10999</guid>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <dc:creator><![CDATA[Dogan Ogut]]></dc:creator>
            <pubDate>Sat, 12 Jun 2021 20:47:45 GMT</pubDate>
            <atom:updated>2021-06-12T20:47:45.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phSU92EmiXTm43Sz_4Xu3g.png" /><figcaption>World of a full-stack developer</figcaption></figure><p>What is Full-Stack Development?</p><p>Developers talk about tech stacks because it makes it easy to communicate lots of information about how an application is built. A tech stack -also called solution stack- quickly summarizes the programming languages, frameworks, and tools a developer would need to interface with the application.</p><p>A tech stack refers to a set of tools, programming languages, and technologies that work together to build digital products or solutions such as websites, mobile, and web apps. The social site Facebook, for example, is composed of a combination of coding frameworks and languages including JavaScript, HTML, CSS, PHP, and ReactJS. This is Facebook’s ‘signature stack.’</p><p>Another example of the tech stack is the MERN stack, which is one of the most powerful and in-demand web stacks in 2021. MERN stands for MongoDB, Express, React, Node, after the four key technologies that make up the stack.</p><p>All tech stacks are divided between the back end and front end, also known as server-side and client-side. Both work together to create a working tech stack.</p><p><strong>Front-End</strong></p><p>The frontend tech stack is the client’s side of the application. Client-side refers to anything that a user can see or engage with on a screen. The main concern of the frontend development is to create an excellent user experience, a smooth user interface, and straightforward internal structures. Accordingly, a front-end developer is responsible for the design, format, and navigation of websites or web apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*GeCGooZ7LKjb1ZSspFRdSg.png" /><figcaption>images by thesoftwareguild.com</figcaption></figure><p>Three core languages make up front-end development:</p><ul><li><em>HTML, the structure of a Web page that holds content such as text and media</em></li><li><em>CSS, the styling of HTML elements that brings forth the design of a website</em></li><li><em>JavaScript, JavaScript is a famous scripting language used to create magic on the sites to make the site interactive for the user. It is used to enhancing the functionality of a website to running cool games and web-based software.</em></li></ul><p><strong>Back-End:</strong></p><p>Back-end development focuses on servers, applications, and databases. Developers build and maintain the technology that powers those three components using a multitude of programming languages, libraries, and other existing software. For complex websites that require features outside of front-end capabilities, back-end development is a necessity.</p><p>In essence, back-end development strives to create a dynamic end product that requires a server and database to send the right information at the right time. The backend stack includes these elements:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*EMamdbOnFXrRVvIRtLCKiQ.png" /></figure><ul><li>Programming languages — This creates logic for apps and websites. The codes link the web to a database. Some examples are JavaScript, PHP, and Python</li><li>Frameworks — it provides support of applications based on a single programming language. Laravel, Django, and Ruby on Rails are a few of the popular frameworks</li><li>Servers — You need backend servers to manage client requests. Apache, Nginx, and Microsoft’s Internet Information Server (IIS) are great examples of web servers.</li><li>Databases — It’s a digital space to store data (word document, web page, MP3 file). MongoDB, PostgreSQL, and MySQL are common databases.</li></ul><p><strong>Full-Stack Development:</strong></p><p>Full-stack development refers to the development of both front-end(client-side) and back-end(server-side) portions of web applications. Accordingly, full-stack developers have the ability to design complete web applications and websites. They work on the frontend, backend, database, and debugging of web applications or websites.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*9hb2c3XCs_p75VWM0yDq-g.jpeg" /><figcaption>Ful-stack development covers both front-end &amp; back-end</figcaption></figure><p>While in the past developers have been split between front-end (Web design) and back-end (Web development), it has become more common for programmers to straddle the fence between the two competencies.</p><p>A <strong>Full-Stack developer</strong> is a person who can develop software for both the user and the service provider. In simple language, a Full-Stack developer has the knowledge of the full stack of technology that makes up a website. They are very comfortable in both front-end and back-end languages. They mostly focus on web development on both ends.</p><p>Most of the full-stack developers aren’t working as full-stack developers at the beginning. They usually work in many roles before going for full-stack. They also tend to be comfortable with both business logic and user experience. In other words, they have enough knowledge of business to give advice to other people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*OGLTTaMbN30R9VToK34fHQ.png" /></figure><p>A Full-Stack Developer is proficient in:</p><p>· Server, network, and hosting environment.</p><p>· Relational and non-relational databases.</p><p>· How to interact with APIs and the external world.</p><p>· User interface and user experience.</p><p>· Quality assurance.</p><p>· Security concerns throughout the program.</p><p>· Understanding customer and business needs.</p><p>· HTML, CSS, and JavaScript.</p><p>· JavaScript frameworks like React or Angular.</p><p>· Programming languages like Python, Java, C# or Ruby.</p><p><strong>Top Tech Stack Models</strong></p><p>A technology or solution stack is a group of essential software that works together so often it is referred to by a name that represents the whole rather than each separate component. Typically, this name is an acronym that refers to each individual piece of the stack. These subcomponents are usually unrelated but work in tandem to provide one fully functioning software solution.</p><p>Popular Stacks:</p><p>· MEAN Stack: MongoDB, Express, AngularJS, and Node.js.</p><p>· MERN Stack: MongoDB, Express, ReactJS, and Node.js</p><p>· Django Stack: Django, Python, and MySQL as Database.</p><p>· Rails or Ruby on Rails: Uses Ruby, PHP, and MySQL.</p><p>· LAMP Stack: Linux, Apache, MySQL, and PHP.</p><p>Here are the top tech stacks to consider:</p><p><strong>MEAN</strong></p><p>One of the well-known tech stacks, MEAN brings numerous benefits to web developers. Among these benefits are the use of a single language (JavaScript) and the underlying technologies are open source and free. MEAN consists of:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*Mhs7dK8iVbtPnY-Fq4aeRA.png" /></figure><p>· MongoDB (NoSQL database)</p><p>· Express.js backend web framework</p><p>· Angular.js frontend framework</p><p>· NodeJS open-source, cross-platform server</p><p>MEAN provides a practical approach to creating fast and highly efficient apps. All the components speak <a href="https://www.json.org/">JSON (JavaScript Object Notations)</a> for data transmission and free module library access. This tech stack helps to build scalable software products. It’s great for all types of websites and interactive applications.</p><p><strong>MERN</strong></p><p>MERN stands for MongoDB, Express, React, Node, after the four key technologies that make up the stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*xdRWrL7h7QPY_aGehtp_TQ.png" /></figure><p>· MongoDB — document database</p><p>· Express(.js) — Node.js web framework</p><p>· React(.js) — a client-side JavaScript framework</p><p>· Node(.js) — the premier JavaScript web server</p><p>The key benefits of using MERN are the React integration, the ability to use codes on browsers and servers simultaneously, powerful library, and full-stack development option (frontend and backend). Additionally, React is known for its flexibility and performance in developing interactive user interfaces.</p><p>MERN is one of several variations of the <a href="https://www.mongodb.com/mean-stack">MEAN stack</a> (MongoDB Express Angular Node), where the traditional Angular.js frontend framework is replaced with React.js. Other variants include MEVN (MongoDB, Express, Vue, Node), and really any frontend JavaScript framework can work.</p><p>Express and Node make up the middle (application) tier. Express.js is a server-side web framework and Node.js the popular and powerful JavaScript server platform. Regardless of which variant you choose, ME(RVA)N is the ideal approach to working with JavaScript and JSON, all the way through.</p><p><strong>LAMP</strong></p><p>LAMP is an industry standard when it comes to tech stack models. In web development, it delivers the best cost efficiency, flexibility, and performance. It is an acronym that stands for:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*vs_N0bgG1uUmRBjJNKkmeA.png" /></figure><p>· Linux (operating system)</p><p>· Apache (HTTP server)</p><p>· MySQL (relational database management)</p><p>· PHP (programming language, it can also be Perl or Python)</p><p>All these stack layers are free and open source. Since this tech stack can run on any operating system, you can interchange or modify other components in the same stack.</p><p>XAMPP and WINS are among other popular tech stacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*J_057XD0i9PsDxyQaz6HoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*wD9J7Zc7aKolILTA1AwTWw.png" /></figure><p>SIGNATURE STACK</p><p>Websites are made up of many different technologies, which can often change based on both needs and natural evolution. When developers are looking to enhance a website with new features or even reduce tech components to something more efficient, they may look past the standard solution stacks into something customized to suit their specific needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*onveW9bFUSv6-gG1iN-QiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*rxmuI66aFtcfkwPI4J0FcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*8CT2VdWMlZp7tRbIDHGIrg.png" /></figure><p>As the digital world improves, full-stack developers offer huge benefits for an organization as they are proficient in various technologies and capable of solving problems across various streams of web and app development. Hiring full-stack developers can help companies create apps from basic and actively engage in the entire journey of application development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60de3fd10999" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>