<?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>Forem: Mouad K.</title>
    <description>The latest articles on Forem by Mouad K. (@mouadkh9).</description>
    <link>https://forem.com/mouadkh9</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%2F403661%2Fb7827dd7-5689-43c8-ab84-e2e4f68746cb.jpg</url>
      <title>Forem: Mouad K.</title>
      <link>https://forem.com/mouadkh9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mouadkh9"/>
    <language>en</language>
    <item>
      <title>Hacking the consistency algorithm</title>
      <dc:creator>Mouad K.</dc:creator>
      <pubDate>Mon, 10 Aug 2020 16:19:17 +0000</pubDate>
      <link>https://forem.com/mouadkh9/hacking-the-consistency-algorithm-pk7</link>
      <guid>https://forem.com/mouadkh9/hacking-the-consistency-algorithm-pk7</guid>
      <description>&lt;p&gt;This article is not about motivation. Motivation is great but it's highly unpredictable and if you rely solely on it, your life would be a roller-coaster.&lt;/p&gt;

&lt;p&gt;Instead, we'll be talking about consistency; how you can stick to your short term and long term goals. In the next few paragraphs, I'll try to summarize what works from my personal experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two-day rule
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q1ohiaJK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/al6juscbxoe3k6499czr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q1ohiaJK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/al6juscbxoe3k6499czr.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No matter how consistent you are, or how perfectly you plan your days, you will drop the ball every once in a while and that's okay. It's all about finding your rhythm once again, and that's when this rule comes in.&lt;/p&gt;

&lt;p&gt;The two-day rule is very straightforward: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Never, ever, under any circumstance, skip 2 days of a habit in a row.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This simple rule has helped me get back to track so many times. Give it a try next time you're feeling like giving up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visualizing progress
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FXAd1QIT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c5mra6yrvwn00rjnlcf4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FXAd1QIT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c5mra6yrvwn00rjnlcf4.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simply planning your todos for a day (or even planning your whole day using your favorite calendar app) can increase your productivity.&lt;br&gt;
Personally, I like planning my whole day in &lt;a href="http://calendar.google.com/"&gt;Google Calendar&lt;/a&gt;. This allows me to have a record of everything I do and where I can improve. This and a good todos app make a great pair to conquer your days.&lt;br&gt;
My favorite todos apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://todoist.com/"&gt;Todoist:&lt;/a&gt; Simple and effective.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://habitica.com/"&gt;Habitica:&lt;/a&gt; Gamifies your todos and habits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Physical activity:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--16KU5hnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9u1zibq69yzwgnbow0xi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--16KU5hnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9u1zibq69yzwgnbow0xi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to research, exercise is shown to reduce stress, combat fatigue, improve performance. A natural stress reducer, exercise combats chronic stress often suffered by many. With exercise your sleep quality also improves, thus, you wake rested and ready to tackle another day.&lt;/p&gt;

&lt;p&gt;Lifting weights, doing cardio or yoga, whatever your style is, physical activity will clear your mind and give you that sharpness we all crave.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mental health
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--37frXKsx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1h40dm14u3cxbr87qum.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--37frXKsx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1h40dm14u3cxbr87qum.png" alt="Taking breaks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Burnout is a very real threat if you disregard your mental health, I think it's quite obvious how important it is to take care of it, but how do we do it?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Taking breaks: If you want to go for the long run, make sure to pace yourself and always take a break to catch your breath.&lt;/li&gt;
&lt;li&gt;Sleep quality: Sleeping quality and work quality are &lt;strong&gt;very&lt;/strong&gt; tightly coupled. &lt;/li&gt;
&lt;li&gt;Entertainment: "Time you enjoy wasting is not wasted time." is a very important quote that illustrates how good entertainment can increase your productivity.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Everything we've talked about so far is great in theory, but you won't know for sure what works for you unless you try! So I'd love to hear your feedback and please let me know if I missed anything that you think is a must-do.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What would you like to read about next? You can suggest any subject (technical or not) to me on &lt;a href="https://twitter.com/Mouad__KH"&gt;twitter&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>Do we still need jQuery in 2020?</title>
      <dc:creator>Mouad K.</dc:creator>
      <pubDate>Fri, 31 Jul 2020 16:20:54 +0000</pubDate>
      <link>https://forem.com/mouadkh9/do-we-still-need-jquery-in-2020-4n48</link>
      <guid>https://forem.com/mouadkh9/do-we-still-need-jquery-in-2020-4n48</guid>
      <description>&lt;p&gt;Last week, Bootstrap launched their latest version (v5 alpha) and one of the new features was that they no longer depend on jQuery, that got me thinking, do we actually need JQuery in 2020?&lt;/p&gt;

&lt;p&gt;jQuery is one of the most popular libraries in the world, so popular that it’s used by 75.9% of all the websites. In this article we’ll talk about how it became so widely used, and if it’s still worth learning in 2020.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why is jQuery so popular?
&lt;/h1&gt;

&lt;p&gt;JQuery was created in 2006, back when Internet Explorer was the most used browser and the web was totally different place than it is now. It solved a lot of problems for front-end developers back then; it provided a simple and clear API to build websites with ease. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOM manipulation:&lt;/strong&gt; Using CSS selectors and some functions you can traverse and manipulate the DOM so easily compared to the vanilla Javascript approach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Animations:&lt;/strong&gt; JQuery provides some easy to use out-of-the-box functions for animating DOM elements, without needing to get messy with CSS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AJAX:&lt;/strong&gt; Making AJAX requests without jQuery was a hassle, but with JQuery you can do it in a couple of lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-browser compatibility:&lt;/strong&gt; JQuery provides an API that can work on most browsers, something that's very hard to achieve if you're using javascript, this saved developers a lot of problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Is it still worth learning in 2020?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;The short answer is no&lt;/strong&gt;, here's why: &lt;/p&gt;

&lt;h3&gt;
  
  
  Better alternatives:
&lt;/h3&gt;

&lt;p&gt;Javascript has matured so much during these last years, it supports a lot of new APIs and its community has built so many great libraries to fill any void jQuery might leave. &lt;a href="http://youmightnotneedjquery.com/"&gt;"You might not need JQuery"&lt;/a&gt; is a website that states alternatives for (almost) every JQuery feature, for example, let's say you want to add a class to a certain element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Solution in jQuery&lt;/span&gt;
&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;addClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;className&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// What you need to do in pure JS:&lt;/span&gt;
&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;className&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So as you can see, jQuery is more replaceable than we used to believe, especially with the emergence of front-end frameworks like React and Vue.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PS: Mixing two frameworks like React and JQuery is a &lt;strong&gt;very&lt;/strong&gt; bad idea.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Size matters
&lt;/h3&gt;

&lt;p&gt;Amazon famously found that every 100ms of delay in the load time of amazon.com cost them 1% in sales.&lt;br&gt;
So loading an 80KB JQuery is a &lt;em&gt;big&lt;/em&gt; problem, a problem we can avoid if we can find lighter alternatives.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion:
&lt;/h1&gt;

&lt;p&gt;To summarize, I think the web right now is passed JQuery, we have better, and lighter tools at our disposal. But as a web developer, it's sometimes still required to use JQuery because as I've mentioned before, it's widely used, so you might run into situations where you have to use it, in such a case, you can just refer to their documentation and you won't have a problem because you'll be so well versed in javascript by that point.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>My developer journey: learn from my mistakes</title>
      <dc:creator>Mouad K.</dc:creator>
      <pubDate>Sun, 26 Jul 2020 09:15:00 +0000</pubDate>
      <link>https://forem.com/mouadkh9/my-developer-journey-learn-from-my-mistakes-1c1j</link>
      <guid>https://forem.com/mouadkh9/my-developer-journey-learn-from-my-mistakes-1c1j</guid>
      <description>&lt;p&gt;Learning to become a developer can be a tricky matter with the number of options we have. Whether you're self-taught or a college graduate, whether you started as a 12-year-old or switched careers later in life, I am certain you have a very unique roadmap.&lt;/p&gt;

&lt;p&gt;In this article, I'll show you mine and I'll point out the mistakes I've made so you can avoid them.&lt;/p&gt;

&lt;h1&gt;
  
  
  My first encounter
&lt;/h1&gt;

&lt;p&gt;I was 14 years old when I first came in contact with software development, I found a "Visual Studio 2010" CD, and I remember being curious as to what was that, so I installed it, launched it and started playing around with Visual Basic not understanding a thing. One thing led me to another until I found myself watching youtube videos talking about alien things to me &lt;em&gt;(eg. variables? functions?? events???)&lt;/em&gt;.&lt;br&gt;
So that was my first mistake, I jumped headfirst into something so new without understanding the basics.&lt;/p&gt;

&lt;h1&gt;
  
  
  A slightly better start
&lt;/h1&gt;

&lt;p&gt;After that first confusing introduction, I decided to start from scratch and learn &lt;strong&gt;java&lt;/strong&gt;, this time I followed some online courses and got the basic right and even a bit on Object-Oriented Programming.&lt;br&gt;
Being 15 years old, learning the basics at a reasonable pace gets boring, so I made my second mistake and tried to make some games with the little knowledge I have.&lt;br&gt;
I started learning about some java games libraries and I was successful at using some of them, and by successful I mean I copied the code from the documentation and got it to run. Other than that, I struggled to understand parts because I had skipped some very important steps, mainly OOP concepts in java.&lt;/p&gt;

&lt;h1&gt;
  
  
  Web development
&lt;/h1&gt;

&lt;p&gt;After the failed attempt at game development, I started learning web development, I began with some HTML and CSS and didn't give much attention to Javascript (spoiler alert: &lt;em&gt;big mistake&lt;/em&gt;), and even when I did use Javascript I relied heavily on JQuery. Then I've jumped to PHP, learning also the basics alongside MySQL.&lt;br&gt;
So far the only framework I've ever heard of was AngularJS and I had no interest learning for some reason, so I kept on practicing with the technology I've known for the next couple of years, not being too serious about since I was in high school.&lt;/p&gt;

&lt;h1&gt;
  
  
  Getting serious
&lt;/h1&gt;

&lt;p&gt;I am 18 years old, it's time to get serious with this if I wanna go anywhere, so that's what I did for the past 3 years. I started learning NodeJS and built a few projects to practice it that summer, then ReactJS, and made a weight tracking app to put everything I know into use. React and Redux for the frontend, Express/Node for the backend, and MongoDB. This was the first project I was serious about and it was a success, it gave me that sweet feeling of seeing all your work unravel before you, and it made hungry for more.&lt;br&gt;
From there I went on to learn many new frameworks and languages and with time I developed a sense for clean and readable code.&lt;br&gt;
During that time I was also studying Computer Science in college so I had more of an academic perspective on things, that helped have a broader view.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;To summarize, I've made a lot of mistakes (obviously), here they are and how I would have fixed them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Skipping the basic at first:&lt;/strong&gt; This is quite obvious yet tricky, make sure to go at a slow pace and build a strong base, a good plan also makes the journey easier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switching too much between technologies:&lt;/strong&gt; I know it can be tempting to try new things, but make sure you give everything enough time before moving on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not asking for help:&lt;/strong&gt; Asking for help and guidance is critical, try to get outside help whenever you feel lost or stuck.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Being isolated:&lt;/strong&gt; Being in as many communities as possible can help greatly, or even just reading articles/watching videos on a regular basis.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>firstyearincode</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
