<?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: anas2479</title>
    <description>The latest articles on DEV Community by anas2479 (@anas2479).</description>
    <link>https://dev.to/anas2479</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%2F576083%2F8a9a747f-701e-43e5-9281-729c41d19710.jpeg</url>
      <title>DEV Community: anas2479</title>
      <link>https://dev.to/anas2479</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anas2479"/>
    <language>en</language>
    <item>
      <title>I Made My First JS Library. Here's What I Learned.</title>
      <dc:creator>anas2479</dc:creator>
      <pubDate>Fri, 09 Jul 2021 22:15:02 +0000</pubDate>
      <link>https://dev.to/anas2479/i-made-my-first-js-library-here-s-what-i-learned-568k</link>
      <guid>https://dev.to/anas2479/i-made-my-first-js-library-here-s-what-i-learned-568k</guid>
      <description>&lt;p&gt;I'm fairly new to programming, in fact, I've started to get the gist of JS in the last few months. So I never thought I could create a well functioning web app let alone a library. Here's how I did it and what I learned from that experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;It all began 3 months ago, around March 10th. I had no intention of creating a JS library. At the time, I was trying to learn how to use the command-line, when I realized that &lt;strong&gt;the command-line was quite intimidating for newbies like me.&lt;/strong&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;My idea was simple, create a web app that serves as a playground for CLIs, but a lot friendlier and holds the user's hand while they develop their skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  but...
&lt;/h2&gt;

&lt;p&gt;How was I going to create the command-line aspect of the web app? I had some initial bad ideas, so... I went with the least bad one I had.&lt;br&gt;
I could technically use JavaScript to emulate the most common commands I could think of, and go from there. &lt;/p&gt;

&lt;h2&gt;
  
  
  Overcoming the Challenge
&lt;/h2&gt;

&lt;p&gt;After a month of trying, failing, then trying again, I had something. I managed to create the v1 of a simple "Bash Simulator" with JavaScript. I won't get into the details but here's how it worked. &lt;/p&gt;

&lt;p&gt;First, you type up your command and press enter. Then, your input is converted into a list of words. The first word would be the command name, and the rest would be parameters. The command name would reference a function that would be executed with the parameters from your input. Simple right?  &lt;/p&gt;

&lt;h2&gt;
  
  
  great, now what?
&lt;/h2&gt;

&lt;p&gt;Well, at this stage, I realized I could do so many different things and go so many different ways with it. What if I decided to create something like it in the future? Or projects with the same features?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Library
&lt;/h2&gt;

&lt;p&gt;After really taking my time and humming over the idea for 2 seconds, I decided to turn the JS code I had into a library. This way, I could create something else with it in the future, and I wouldn't have to reinvent the wheel. &lt;/p&gt;

&lt;h2&gt;
  
  
  ahh... sh*t
&lt;/h2&gt;

&lt;p&gt;I had something working, but now I had to make it flexible enough to be able to use it in a variety of different projects. Also... turns out libraries are bundled a bit differently. AND... it didn't have a way for a developer to extend and build upon it. &lt;/p&gt;

&lt;p&gt;So I had to rewrite everything from scratch with new type of users in mind, the developers that might use this library in the future.&lt;/p&gt;

&lt;p&gt;So I spent few more weeks to creating v2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So I spent 2 months creating something that no one else will probably use. But that's not all to it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My skills in JavaScript improved a ton, though I still suck at it.&lt;/li&gt;
&lt;li&gt;The way I approach problems and go about solving them has definitely improved as well.&lt;/li&gt;
&lt;li&gt;My project management skills have also improved, though I'm still messy. &lt;/li&gt;
&lt;li&gt;AND... now I have my problem solved and can proceed to creating that website I mentioned earlier.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Wheather someone will actually use it or not, it feels incredible to create something and make it open source. And I wouldn't have learned and gained more skills if I hadn't taken on this project. &lt;/p&gt;

&lt;p&gt;Anyway, here is the &lt;a href="https://github.com/anas2479/bash-mirror"&gt;link&lt;/a&gt; to the project if you want to check it out.    &lt;/p&gt;

&lt;p&gt;Any comments? &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jslibrary</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
