<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilham Mubarok</title>
    <description>The latest articles on DEV Community by Ilham Mubarok (@ilhambara).</description>
    <link>https://dev.to/ilhambara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F271493%2Fd95422cb-7231-4b02-a452-4eaea29f1a2d.jpg</url>
      <title>DEV Community: Ilham Mubarok</title>
      <link>https://dev.to/ilhambara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ilhambara"/>
    <language>en</language>
    <item>
      <title>Learn: Write Clean and Maintainable CSS for Future Use</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Thu, 06 Jan 2022 04:23:56 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-write-clean-and-maintainable-css-for-future-use-1a9o</link>
      <guid>https://dev.to/ilhambara/learn-write-clean-and-maintainable-css-for-future-use-1a9o</guid>
      <description>&lt;p&gt;When it comes to write the CSS codes from scratch it can be time-consuming sometimes. Moreover, refactoring the codes from the apps that are already running. Not infrequently we have to read all the codes from it's beginning, only to implement some small changes.&lt;/p&gt;

&lt;p&gt;To avoid wasting time on it, I will explain 5 important points that I have learned in writing CSS code to make it maintainable for our projects. Here are the points :&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Avoid Unnecessary Id's 🙅‍♂️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First thing we have to know that the value of Id must be unique. It cannot be duplicate. In case, if we have different element with the same style, but we targeting the Id selector in CSS, we have to write the duplicate code for every different Id. &lt;/p&gt;

&lt;p&gt;Yes, for some reasons, the use of Id is important when we interact with JavaScript DOM. But, we talk about using the Id for CSS selector in this post.&lt;/p&gt;

&lt;p&gt;In addition, Id selector has a higher priority than Class selector which will make it difficult for us to change the style in the future. As we know that Class selector cannot override the Id selector because of it.&lt;/p&gt;

&lt;p&gt;Also, we will naturally targeting the class if we want to style the elements.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Using The Class Selector is Highly Recommended 📝&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Class selector is preferred over the Id selector because of it's simplicity. It will lead us to write the code that are much more simple but still consistent.&lt;/p&gt;

&lt;p&gt;One more thing to remember is that there's no need to over-specified with the Type selector that refer to a specific element. Here's the example :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next time if we have a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; with the same style, we can't apply that codes. Cause it targeting only for the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;. It means we have to write the new duplicate codes which is not effective.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Flattened Rule 🌗&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The purpose of this rule is to write CSS code that is equally or not too specific. The goal is to avoid problems related to specificity. Please read the following CSS codes and notice the difference :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;code1&lt;/span&gt;
&lt;span class="nc"&gt;.card-title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;code2&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="nc"&gt;.card-header&lt;/span&gt; &lt;span class="nc"&gt;.card-title&lt;/span&gt; &lt;span class="nt"&gt;h4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we write very specific code (like code 2), it will be difficult for us to trace the code if the code is already complex. That required more time when we need to override the styles.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;!important Doesn't Really Important 🚫&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;!important&lt;/code&gt; property is a special keyword in CSS to override any style regardless of its specificity. &lt;/p&gt;

&lt;p&gt;Why is it better not to use it?&lt;/p&gt;

&lt;p&gt;Refer to the previous problem, when the CSS codes are getting complex, and there's an element that already use the &lt;code&gt;!important&lt;/code&gt; property, then we must use this keyword in order to be able to change the styles of the element. Otherwise, any styles will not be overwritten.&lt;/p&gt;

&lt;p&gt;In short, there will be &lt;em&gt;!important civilization&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;But for the certain cases, for example when we use Bootstrap, there are several helper class which in practice use &lt;code&gt;!important&lt;/code&gt;. Because the behavior of those helper classes is to get things done quickly.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Content Agnostic Concept 📚&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of focusing on the content, it's better to pay attention to the layout.&lt;/p&gt;

&lt;p&gt;For example, if we have an article section and post section that turns out to have the same style. This will be more effective if we write the CSS code using a class for the base style. The purpose of writing the base class is for the layout. Later if we want to use it again, simply we can call the Class selector in the HTML code.&lt;/p&gt;




&lt;p&gt;Those are 5 points about writing clean and maintainable CSS codes based on what I have learned. If you want to get a better explanation about it, here is the main source in Indonesian language :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=Mj8hCjjUQ94"&gt;#TheCinCSS: Bagaimana Menulis Kode CSS Yang Maintainable?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Special thanks to &lt;strong&gt;Array ID&lt;/strong&gt; for the useful knowledge!&lt;/p&gt;

</description>
      <category>learn</category>
      <category>css</category>
      <category>tips</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Learn: Why It Took So Long to Finish The Side Project</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Fri, 30 Apr 2021 16:04:16 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-why-it-took-so-long-to-finish-the-side-project-3go4</link>
      <guid>https://dev.to/ilhambara/learn-why-it-took-so-long-to-finish-the-side-project-3go4</guid>
      <description>&lt;p&gt;We may have heard the phrase that &lt;em&gt;"coming up with a new idea for a side project is easier than getting it done"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And it actually happens to most of us.&lt;/p&gt;

&lt;p&gt;Before we move too far, let me share a bit of my story when I'm about to rebuild my personal portfolio. For version one, it was completed last year. But I was decided to migrate the entire tech-stacks. The main reason was, this version only uses the basic knowledge to build it: HTML and CSS.&lt;/p&gt;

&lt;p&gt;With the increasing features that will be presented on this project, I think I have to migrate to a framework that can handle 'the heavier work' in the future. Since I was planning to add it.&lt;/p&gt;

&lt;p&gt;From here, I realize there will be some roadblocks that may occur. So, here are some suggestions from me if you may facing the same roadblocks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set the priority of this side project&lt;/strong&gt;. If it looks like it will take up a lot of time to work on, plan carefully in terms of how much time will you spend on it. Don't let the side project took away so much time in your life.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn about the technologies to be used&lt;/strong&gt;. Make sure that at least you are familiar with the technologies. One thing you have to believe that migration in the middle of the process is a bad idea.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Determine the purpose in mind&lt;/strong&gt;. In order to avoid a side project that sinking in the middle of its journey, there are generally three things as a goal — to learn something, to develop a specific product, or to show up your skill.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because in the end, as all things should be, &lt;em&gt;done is better than perfect&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>learn</category>
      <category>story</category>
      <category>sideprojects</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Learn: Get To Know Before Integrating Google APIs &amp; Services into Our Projects</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Thu, 18 Mar 2021 14:12:09 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-get-to-know-before-integrating-google-apis-services-into-our-projects-2me9</link>
      <guid>https://dev.to/ilhambara/learn-get-to-know-before-integrating-google-apis-services-into-our-projects-2me9</guid>
      <description>&lt;p&gt;Have you ever wonder how a Sign-In with Google button works? Or displaying a location using Google Maps? These can be done by integrating Google APIs &amp;amp; Services into our project.&lt;/p&gt;

&lt;p&gt;In my personal experience, I was trying to show a Maps that integrated with EONET from &lt;a href="https://api.nasa.gov/"&gt;NASA Open APIs&lt;/a&gt;. About this project, I store it on my GitHub &lt;a href="https://github.com/ilhambara/volcano-tracker-map"&gt;here&lt;/a&gt;. But I can't fully show the Maps cause there's a watermark "for development purposes only" that covers up the entire Maps.&lt;/p&gt;

&lt;p&gt;Moving on to my next project recently when I'm about to use Google Sign-In API. Besides, showing static maps using Google Maps Javascript API based on geolocation. The sign-in process and display of the information are smooth. But the problem here, the static maps that used latitude and longitude by accessing the coordinates can't be shown.&lt;/p&gt;

&lt;p&gt;Then I came up with a conclusion after &lt;em&gt;understanding the roadblocks&lt;/em&gt;. It tells me that I should :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Activate my billing on &lt;a href="https://console.cloud.google.com/"&gt;Google Cloud Platform&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Make sure that APIs and Services are enabled.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Importance of &lt;strong&gt;setting up billing on Google Cloud Platform&lt;/strong&gt; is a must if we want to have full access to the services.&lt;/p&gt;

&lt;p&gt;Friendly reminder: The bill costs. Do not forget.&lt;/p&gt;

</description>
      <category>learn</category>
      <category>story</category>
      <category>google</category>
      <category>api</category>
    </item>
    <item>
      <title>Learn: Developed Extension Pack for Visual Studio Code</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Wed, 17 Feb 2021 03:32:53 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-developed-extension-pack-for-visual-studio-code-3adk</link>
      <guid>https://dev.to/ilhambara/learn-developed-extension-pack-for-visual-studio-code-3adk</guid>
      <description>&lt;p&gt;This post will not cover step by step on how to create Visual Studio Code Extension Pack. If you are looking for a tutorial, I found this article helpful :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup"&gt;https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moving on to my first intention when I developed it cause I have to re-install operating system in my laptop. For the cleaner installation, I decided to delete any installed programs. It means that I need to set everything up from the very start. &lt;/p&gt;

&lt;p&gt;Focus on the Code Editor that I use all this time and it's Visual Studio Code. So, I think that I have to setup my developer environment again. There are many options that can be taken, but I choose to make the VS Code Extension Pack to solve it. The reason was...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you can create a tool that may give the benefit to others as long as it also solved your problem. Share it instead!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are willing to take a glance at my Visual Studio Code Extension, come visit the &lt;a href="https://marketplace.visualstudio.com/items?itemName=BaraJS.extension-pack"&gt;VS Code Marketplace&lt;/a&gt;. Feedbacks are welcome and I really appreciate that.&lt;/p&gt;

</description>
      <category>learn</category>
      <category>story</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Learn: Speed Up The Development Process Using Figma</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Tue, 12 Jan 2021 12:28:03 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-speed-up-the-development-process-using-figma-hf9</link>
      <guid>https://dev.to/ilhambara/learn-speed-up-the-development-process-using-figma-hf9</guid>
      <description>&lt;p&gt;Before we start, I would recommend you to try Figma. Why? This will give you a clarity.&lt;/p&gt;

&lt;p&gt;While created side projects, I straightly run to code it for most of the time. My consideration before were only around "What tech stack would I use to complete it". I only thought about technicalities of the process, but didn't really deep dive into the interface design of the application that I built.&lt;/p&gt;

&lt;p&gt;And then I realized by now that I spent quite a bit of time to design proper Interfaces. I need to define the style as it represent how my apps will look alike. I have to create a prototype first.&lt;/p&gt;

&lt;p&gt;Built somethings in prototyping tools is not my first time experience. I've used &lt;code&gt;Adobe XD&lt;/code&gt; before, though not that often.&lt;/p&gt;

&lt;p&gt;Speaking of which, I'm exploring Figma documentation and read/watch some tutorials recently. Then I try to install Figma and start crafting my first design. It turns out that there are so many interesting concepts from Figma to learn.&lt;/p&gt;

&lt;p&gt;For now on, I have decided to join &lt;strong&gt;#TeamFigma&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>learn</category>
      <category>story</category>
      <category>figma</category>
    </item>
    <item>
      <title>Learn: Blade Templating Engine and Eloquent ORM on Laravel</title>
      <dc:creator>Ilham Mubarok</dc:creator>
      <pubDate>Tue, 01 Dec 2020 08:16:07 +0000</pubDate>
      <link>https://dev.to/ilhambara/learn-blade-templating-engine-and-eloquent-orm-on-laravel-2086</link>
      <guid>https://dev.to/ilhambara/learn-blade-templating-engine-and-eloquent-orm-on-laravel-2086</guid>
      <description>&lt;p&gt;I never thought of deep diving into Laravel this far. The main reason that pushed me to learn it was "My college project".&lt;/p&gt;

&lt;p&gt;It was my first time using Laravel. But I've been exploring CodeIgniter for two semester before. Hence I thought it was not that scary to learn. &lt;/p&gt;

&lt;p&gt;Refers to what I've mentioned in the title. The Blade Templating Engine gives me so many things to expand as much as the benefit it has. For the Eloquent ORM, I surprised a lot cause it can hugely reduce my codes. Also gives me more insights about the MVC method.&lt;/p&gt;

&lt;p&gt;I can say that Laravel keeps me learn more. And code more often.&lt;/p&gt;

</description>
      <category>learn</category>
      <category>story</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
