<?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: Bassem</title>
    <description>The latest articles on Forem by Bassem (@bassemibrahim).</description>
    <link>https://forem.com/bassemibrahim</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%2F95554%2Fe0639e2c-e81d-4afb-97bd-616c2c443e94.jpeg</url>
      <title>Forem: Bassem</title>
      <link>https://forem.com/bassemibrahim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bassemibrahim"/>
    <language>en</language>
    <item>
      <title>4 steps to land more interviews</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Mon, 18 May 2020 08:09:47 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/4-steps-to-land-more-interviews-2ad2</link>
      <guid>https://forem.com/bassemibrahim/4-steps-to-land-more-interviews-2ad2</guid>
      <description>&lt;p&gt;Before my current job, I used to struggle quite hard with landing interviews. I was applying for tons of positions while rejection mails were vigorously hitting my inbox. In today's post, I would like to share with you 4 steps that helped me turn the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know your strengths and how to present them.
&lt;/h2&gt;

&lt;p&gt;During CV screening, Companies look at your CV, your LinkedIn, your portfolio, your cover letter, and your social media. They fill in the gaps to draw an image of you and then compare that image with their expectations. Getting rejected doesn't necessarily mean that you are not qualified. It just means that your image is not aligned with their expectations. &lt;/p&gt;

&lt;p&gt;To land more interviews you must show them your strengths. That's easier said than done. To be able to "sell" yourself. You must define your goals and strengths in the first place. That is where those feedback meetings with your manager come in to place. You could also ask your friends or colleagues. Better yet, self-reflect on your past experiences. &lt;/p&gt;

&lt;p&gt;After defining your strengths. Learn how to present them. Your CV shouldn't be just a pile of information. It needs to convey a simple message, "I am a perfect fit for the job". If you are not presenting your strongest skills and achievements effectively, you are not using your CV to your advantage.&lt;/p&gt;

&lt;p&gt;Also, This is not a one-time thing. Self-reflection is an iterative process. Your strengths and goals will change after some time. You need to self-reflect from time to time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop applying for positions that are not aligned with your plan.
&lt;/h2&gt;

&lt;p&gt;This tip only works if you have a clear goal in mind or at least a rough direction on where you want to go.&lt;/p&gt;

&lt;p&gt;You might think. Well, what harm can it do? Let me answer that,&lt;/p&gt;

&lt;p&gt;First off. Interviewers can easily tell the difference between someone who really wants to be a Frontend developer (for example) and someone who just wants to land any job out there. They will sense it and will probably reject you. That's a lot of wasted energy that could have been spent elsewhere.&lt;/p&gt;

&lt;p&gt;Also, remember step 1? You are building that image according to your strengths and goals. Applying for a backend developer vacancy while your whole image is tailored for your frontend development goal will get you rejected. Those rejections can affect you and your decisions. You might accept a job that you don't want. Or even worse, you could give up and stop applying altogether.&lt;/p&gt;

&lt;p&gt;Finally. If you did land the job, You will be working in a field that you probably hate. That's never a good thing in the long run. At least try as much as you can to avoid that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop applying for old listings.
&lt;/h2&gt;

&lt;p&gt;This golden tip I got from &lt;a href="https://www.linkedin.com/in/sarahhuendgen/"&gt;Sarah Hündgen&lt;/a&gt;, She is an awesome career mentor at &lt;a href="https://joinimagine.org/"&gt;Imagine foundation&lt;/a&gt;. She told me to start using this "Date posted" filter on LinkedIn and only apply for newly posted vacancies. &lt;/p&gt;

&lt;p&gt;Sure! It decreases the number of positions you can apply for at the same time. But, Applying early for 50 job listings across the span of 5 or 10 days is waaaay better than applying late for 50 jobs in one go. This will sky-rocket the probability of your CV actually getting read by HR.&lt;/p&gt;

&lt;p&gt;Applying for jobs posted weeks or even months ago won't help that much. Sometimes those job listings are so old, that someone has already filled the vacancy. &lt;/p&gt;

&lt;h2&gt;
  
  
  Consistency is key.
&lt;/h2&gt;

&lt;p&gt;I know it is a huge cliche, But it's important! "Don't give up" I landed a job after 7 months of actively interviewing. You can too, Don't let those heartbreaking rejection emails get to you. Delete them from your inbox and apply again.&lt;/p&gt;

&lt;p&gt;Try those 4 steps out next time you start applying. They really did help me along my journey and I am sure they can help you too! &lt;/p&gt;

&lt;p&gt;oh, yeah and good luck :)&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>7 Awesome Gnome Extensions For You</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Sat, 09 May 2020 20:16:54 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/7-awesome-gnome-extensions-for-you-35cm</link>
      <guid>https://forem.com/bassemibrahim/7-awesome-gnome-extensions-for-you-35cm</guid>
      <description>&lt;p&gt;Hey, devs from all over the world, &lt;/p&gt;

&lt;p&gt;A couple of weeks ago, I had to change my work station from a mac to an Ubuntu PC. Although Ubuntu is super awesome, I had to tweak it a bit for my own liking. To be able to customize it, I used some Gnome extensions. &lt;/p&gt;

&lt;h2&gt;
  
  
  What's Gnome you might ask!
&lt;/h2&gt;

&lt;p&gt;Great question! Gnome is the default desktop environment on many Linux distributions. Gnome extensions are some code that modifies the way your Gnome works. It can make tons of changes that could be purely aesthetic. Also, they could provide cool functionalities.&lt;/p&gt;

&lt;p&gt;Note, I am using Ubuntu and my Gnome shell version is &lt;code&gt;3.34.3&lt;/code&gt;. You might have a different Gnome shell version or a different Linux distribution. Some of the steps below might not work. Some of the extensions might also be incompatible.&lt;/p&gt;

&lt;p&gt;You can find out which version of Gnome shell you have by running this command in a terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;gnome-shell --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to add Gnome extensions
&lt;/h2&gt;

&lt;p&gt;First off, you need to do the following :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the &lt;code&gt;Gnome shell extension&lt;/code&gt;. It is a browser extension that works best on Firefox. You can find it &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/gnome-shell-integration/?src=search"&gt;here&lt;/a&gt; for Firefox or &lt;a href="https://chrome.google.com/webstore/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep?hl=ar"&gt;here&lt;/a&gt; for Chrome.&lt;/li&gt;
&lt;li&gt;Install the &lt;code&gt;Gnome tweaks&lt;/code&gt; application from Ubuntu's software center. This app will allow you to configure any installed extensions.&lt;/li&gt;
&lt;li&gt;Now you are pretty much ready to browse and install different extensions &lt;a href="https://extensions.gnome.org/"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7 Awesome Gnome extensions
&lt;/h2&gt;

&lt;p&gt;Now, Without further ado. Here are my currently installed Gnome extensions. &lt;/p&gt;

&lt;h3&gt;
  
  
  Dash to Panel
&lt;/h3&gt;

&lt;p&gt;If you like me and you divide your applications in different workspaces. You will absolutely love this extension. It has this awesome feature. You can change workspaces by using the mouse wheel while hovering over the Dash Panel. It also provides tons of different aesthetic tweaks to the Dash.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/1160/dash-to-panel/"&gt;here&lt;/a&gt;! &lt;/p&gt;

&lt;h3&gt;
  
  
  Pomodoro
&lt;/h3&gt;

&lt;p&gt;The Pomodoro Technique is a time management method that uses a timer to break down work into intervals. Usually 25 minutes in length. This extension reminds you - every X amount of time - to get up of your chair and take a quick break. It's highly customizable and really cool!&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/53/pomodoro/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Sound Input &amp;amp; Output Device Chooser
&lt;/h3&gt;

&lt;p&gt;This one shows a list of sound input and output devices for you to choose from next to the sound volume slider. Really handy with all the virtual meetings we currently have.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/906/sound-output-device-chooser/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Open Weather
&lt;/h3&gt;

&lt;p&gt;Want to get automatic weather info right into your top panel? Who doesn't! Well, You can get it using this little gem. You will need to get an API key from &lt;a href="http://openweathermap.org/"&gt;http://openweathermap.org/&lt;/a&gt; but that's no biggie.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/750/openweather/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  GSconnect
&lt;/h3&gt;

&lt;p&gt;This extension is kinda crazy! It allows you to sync so much stuff between your PC and your phone. For example, You could sync your notifications, files, clipboard, and contacts. You can also set up shell commands like &lt;code&gt;shutdown&lt;/code&gt; and run them directly from your phone.&lt;br&gt;
It's time for some pranks, I reckon. &lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/1319/gsconnect/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove Alt+Tab Delay
&lt;/h3&gt;

&lt;p&gt;This one removes the small delay when alt-tabbing. Pretty basic but still cool.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/1403/remove-alttab-delay/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Bluetooth Quick Connect
&lt;/h3&gt;

&lt;p&gt;This one allows you to connect or disconnect Bluetooth devices directly from the Gnome system menu. No more digging into settings to connect your headset.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://extensions.gnome.org/extension/1401/bluetooth-quick-connect/"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;That's about it! Let me know which ones you liked the most. Also, Are you using any extensions that are not here?&lt;/p&gt;

&lt;p&gt;PS! I still miss my mac.&lt;/p&gt;

&lt;p&gt;As always,&lt;br&gt;
&lt;strong&gt;Happy coding 🔥🔥&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;“كود بسعادة”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>How can I fix the post's cover image on social media</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Sat, 09 May 2020 13:38:27 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/how-can-i-fix-the-post-s-cover-image-on-social-media-pp</link>
      <guid>https://forem.com/bassemibrahim/how-can-i-fix-the-post-s-cover-image-on-social-media-pp</guid>
      <description>&lt;p&gt;I am designing my own post's cover images and adding them using the &lt;code&gt;cover_image&lt;/code&gt; metadata attribute.&lt;/p&gt;

&lt;p&gt;In the question mark help section, It says &lt;code&gt;The best size is 1000 x 420.&lt;/code&gt; This works perfectly on dev.to but when you share the post on Facebook, Linkedin, or Twitter.&lt;/p&gt;

&lt;p&gt;That &lt;code&gt;1000 x 420&lt;/code&gt; cover image gets cropped around the edges. Is there a way to fix that?&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>How am I dealing with anxiety during COVID-19</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Fri, 08 May 2020 09:47:58 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/how-am-i-dealing-with-anxiety-during-covid-19-545h</link>
      <guid>https://forem.com/bassemibrahim/how-am-i-dealing-with-anxiety-during-covid-19-545h</guid>
      <description>&lt;p&gt;It's safe to say that everyone's anxiety levels have been skyrocketing due to COVID-19. Some lost their jobs, some are finding it hard to find a job. Everyone is stressing over their future, their finances, and their lifestyle.&lt;/p&gt;

&lt;p&gt;I am no different. I found myself in an even more tricky situation because I resigned from my job not so long before corona hit.&lt;/p&gt;

&lt;p&gt;The first couple of weeks were the hardest. Feeling completely lost and watching my plans crumble. I also had lots of free time because I wasn't working. I binge-watched corona updates and overstressed myself even more.&lt;/p&gt;

&lt;p&gt;It was a vicious cycle. I wake up in the morning. I watch the news. I get stressed. I play video games to calm myself. I get a small relief. I overthink about how unproductive I am, I get even more stressed. It felt like hell. Every time I try to get myself out of it and reduce my anxiety, I end up increasing it somehow.&lt;/p&gt;

&lt;p&gt;Now, after some time have passed. I am more in control, I managed to escape this cycle and I want to share with you what helped me do it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quit/Reduce social media
&lt;/h2&gt;

&lt;p&gt;That was key! Yes, Scrolling for hours on end may numb the pain and pass the time. but, social media have always been - for me - in some way behind every bit of stress and anxiety.&lt;/p&gt;

&lt;p&gt;Not watching the news might feel like burying your head in the sand. Think about it for a sec! You already know all the necessary info about this virus. The numbers and the graphs will only give you anxiety.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start running
&lt;/h2&gt;

&lt;p&gt;All my life, I thought running was boring. COVID-19 changed my mind. After they closed swimming pools, gyms and pretty much every place you can exercise in. I started running just to keep doing any form of physical exercise. I never thought that running was super important for my mental health.&lt;/p&gt;

&lt;p&gt;After sticking to the habit of running every other day. Turns out, running gives me something much more important - for me - than being fit. It gave me a "Clear head". Something that I used to travel long ways, pay money, and spend 3-4 days to get. Something that I desperately needed after a couple of weeks of overthinking &amp;amp; anxiety. &lt;/p&gt;

&lt;p&gt;I asked my super awesome cousin why she runs and she responded&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I consider it a form of meditation"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Its time for me to brag a bit. I recently completed my first 5km. Fingers crossed, I will finish a 10km next month. A half marathon (21k) is slowly creeping into my 2021's bucket list. It's crazy how a couple of months ago, I genuinely believed that running is boring.&lt;/p&gt;

&lt;p&gt;Running and quitting social media are helping me overcome anxiety during these crazy days. What about you, What worked for you? Please let me know in the comments below. If you feel like you are still struggling with anxiety, What are you waiting for? Go for a run. Now!!&lt;/p&gt;

</description>
      <category>mentalhealth</category>
      <category>anxiety</category>
    </item>
    <item>
      <title>What's Ecma &amp; TC39 ?!</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Sun, 12 Apr 2020 09:24:04 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/what-s-ecma-tc39-206b</link>
      <guid>https://forem.com/bassemibrahim/what-s-ecma-tc39-206b</guid>
      <description>&lt;p&gt;Hey devs from all over the world 😊&lt;/p&gt;

&lt;p&gt;I have been working with JavaScript for more than 2 years and I have never during those 2 years looked up ECMA or TC39. Well, I did now - about time huh! -  and I am here to tell you guys all about them.&lt;/p&gt;

&lt;p&gt;First off, you need to know what ECMA is. it stands for the European Computer Manufacturers Association. - wow, that's a mouthful - It's an organization that standardizes information and communication systems. They work on lots of standards. ECMAScript is one of them and its called &lt;code&gt;standard ecma-262&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;TC39 is the committee that works on &lt;code&gt;ecma-262&lt;/code&gt; they create, accept and reject new proposals to the ECMAScript language specification. They are composed of different members 🤓 representing big corporations like browser vendors.&lt;/p&gt;

&lt;p&gt;Enough with the boring stuff, I got a fun fact for you! 👻 Here is the &lt;a href="https://tc39.es/ecma262/"&gt;ECMAScript language specification&lt;/a&gt;, It's a huge document and it doesn't have the term "JavaScript" in it. 😱 That's because Oracle owns the trademark for "JavaScript". So they just called it ECMAScript instead! &lt;/p&gt;

&lt;p&gt;That's where the term ECMAScript comes from, "legal rights". 🤯&lt;/p&gt;

&lt;p&gt;It's hard for me to say this. Not so long ago, I genuinely thought that ECMAScript is the new hotshot JS because JS was getting old or something. - whaat!! 😮 -&lt;/p&gt;

&lt;p&gt;Let's just set one thing straight! ECMAScript is just the term everyone uses for JS when talking about language specification. That's all it is! Don't get confused because of "legal rights".&lt;/p&gt;

&lt;p&gt;Anyway, Let's dive into what TC39 do during their meeting. 🏊‍♂️&lt;/p&gt;

&lt;p&gt;They meet every 2 months to discuss different proposals. Each proposal needs to pass through 5 stages to be added to the language specification. From S0 to S4. More about those stages &lt;a href="https://tc39.es/process-document/"&gt;here&lt;/a&gt;. What's important here is that S4 means that the proposal is finished and ready to be included in the next ECMAScript version.&lt;/p&gt;

&lt;p&gt;They operate by consensus. That means that decisions must have a large "agree" and no one is strongly "disagreeing". Also, Every proposal needs a "Champion". He is the one responsible for working out the details of the proposal and presenting it to the committee. &lt;/p&gt;

&lt;p&gt;They track proposals on this GitHub &lt;a href="https://github.com/tc39/proposals"&gt;repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As always,&lt;br&gt;
&lt;strong&gt;Happy coding 🔥🔥&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;“كود بسعادة”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ecmascript</category>
    </item>
    <item>
      <title>UI component libraries are awesome!</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Wed, 08 Apr 2020 13:50:29 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/ui-component-libraries-are-awesome-1i4n</link>
      <guid>https://forem.com/bassemibrahim/ui-component-libraries-are-awesome-1i4n</guid>
      <description>&lt;p&gt;Hey devs from all over the world 😊&lt;/p&gt;

&lt;p&gt;We all know what UI component libraries are, There are tons of great ones out there. I am more interested in building them though. It's like laying a foundation that will be used in every project to come! To me, That's both super scary and super cool!&lt;/p&gt;

&lt;h3&gt;
  
  
  Its impact
&lt;/h3&gt;

&lt;p&gt;I love the idea of writing code that will be used and maintained by every developer in every project. I mean you are not just building a boring &lt;code&gt;contact-us&lt;/code&gt; page or anything, you are writing components for every future project.&lt;/p&gt;

&lt;p&gt;Of course, it is not a one-time project kinda thing. UI libraries should always be &lt;code&gt;In development&lt;/code&gt;. That being said, maintaining an already mature UI library is one thing but "laying the foundation" sounds way cooler to me.&lt;/p&gt;

&lt;h3&gt;
  
  
  It is sophisticated
&lt;/h3&gt;

&lt;p&gt;A couple of years ago, The only way frontend code gets used over and over again is by making CSS classes. That's it! A couple of CSS rules that get applied to multiple elements. It was a big thing! I remember how changing a small value in those famous classes impacted the whole project. &lt;/p&gt;

&lt;p&gt;Now, UI component libraries are much more sophisticated! First off, These components contain both the HTML &amp;amp; the CSS, They render differently depending on the props (input) you give them, They should also be able to handle as much use cases as possible. Of course, They won't be able to handle all of them out there! This is more of a utopia kinda thing. But still, UI libraries are not just about your use cases, They are built for everyone!&lt;/p&gt;

&lt;h3&gt;
  
  
  Its a bridge between design and dev
&lt;/h3&gt;

&lt;p&gt;Designers usually have lots of systems in place. They have systems for colors, typography, sizes. They even build components like buttons and input fields. Then they use those systems and components all over their designs.&lt;/p&gt;

&lt;p&gt;UI components libraries are the closest thing to a design system in the dev world. They should be built upon the design system. That will ensure those systems are more of rules not just guidelines and make sure the look &amp;amp; feel is consistent across all projects that use the same UI library. &lt;/p&gt;

&lt;h3&gt;
  
  
  It speeds up development
&lt;/h3&gt;

&lt;p&gt;I am sure UI libraries do speed up development if they are mature enough. But, they still take a big investment upfront. Also, they should be maintained all the time to handle new use cases and business logic. &lt;/p&gt;

&lt;p&gt;I think they are an investment that only bears its fruit in the long term. I was never involved in the process of building a UI library from scratch before. I would love to someday!&lt;/p&gt;

&lt;p&gt;That's basically it! Now it's your turn, tell me how you feel about UI libraries? Have you ever been involved in building one from the start? Do you have any tips and tricks that you learned while building one?&lt;/p&gt;

&lt;p&gt;As always,&lt;br&gt;
&lt;strong&gt;Happy coding 🔥🔥&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;“كود بسعادة”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
    </item>
    <item>
      <title>7 Linux operators you should know about</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Wed, 01 Apr 2020 12:03:08 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/7-linux-operators-you-should-know-about-2m3f</link>
      <guid>https://forem.com/bassemibrahim/7-linux-operators-you-should-know-about-2m3f</guid>
      <description>&lt;p&gt;Hey devs from all over the world 😊&lt;/p&gt;

&lt;p&gt;Okay! I know I am a Frontend developer, but I really like Linux. Just hear me out!&lt;/p&gt;

&lt;p&gt;Today, I want to tell you guys about some Linux shell operators that you absolutely can't live without while chaining commands. 🤯&lt;/p&gt;

&lt;p&gt;Going forward, we need an example of a command to explain the operators on. Due to our current situation and my absolute hatred, I am using this one :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="nt"&gt;--force&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I know it won't work! but, maybe because no one tried it before. 🙄&lt;/p&gt;

&lt;p&gt;Let's dive right in, 🌊&lt;/p&gt;
&lt;h2&gt;
  
  
  Are you after the output?
&lt;/h2&gt;

&lt;p&gt;Starting off, We have the write operator &lt;code&gt;&amp;gt;&lt;/code&gt; This one is used to write the output to a file. For example,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="nt"&gt;--force&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; res.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Wait a sec! This &lt;code&gt;&amp;gt;&lt;/code&gt; will overwrite the content of the file. If you care about &lt;code&gt;res.txt&lt;/code&gt; you will have to use the append &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; operator which will append the output to the content of the file.&lt;/p&gt;

&lt;p&gt;Actually, The output operator &lt;code&gt;&amp;gt;&lt;/code&gt; is just a shorthand for &lt;code&gt;1&amp;gt;&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;Is there a &lt;code&gt;2&amp;gt;&lt;/code&gt;? Yes! &lt;/p&gt;

&lt;p&gt;Is there a &lt;code&gt;3&amp;gt;&lt;/code&gt;? Don't get carried away!✋  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;1&amp;gt;&lt;/code&gt; is for standard program output, while &lt;code&gt;2&amp;gt;&lt;/code&gt; is for error output. For example,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="nt"&gt;--force&lt;/span&gt; 1&amp;gt; res.txt 2&amp;gt; err.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  What if your program requires some input file?
&lt;/h2&gt;

&lt;p&gt;I know you guessed it! Just flip it over &lt;code&gt;&amp;lt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="nt"&gt;--force&lt;/span&gt; &amp;lt; doctorsList.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  One command is not enough.
&lt;/h2&gt;

&lt;p&gt;Okay, Let's say it's not that easy. What if we need more? You can chain commands one after the other using the AND operator &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; like this :&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="nt"&gt;--force&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; rebuild
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; is an AND operator. It will only run the next program &lt;strong&gt;if&lt;/strong&gt; the previous one exited successfully. &lt;/p&gt;

&lt;p&gt;We also have an OR operator &lt;code&gt;||&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;I honestly don&lt;span class="s1"&gt;'t know what to write here! 🤯)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This one will only run the next program &lt;strong&gt;if&lt;/strong&gt; the previous one failed ( Let's hope It doesn't ).&lt;/p&gt;
&lt;h2&gt;
  
  
  Is that it?
&lt;/h2&gt;

&lt;p&gt;No! We still have more.&lt;/p&gt;

&lt;p&gt;Killing covid19 is gonna take some time 😔 We can use the ampersand &lt;code&gt;&amp;amp;&lt;/code&gt; at the end to make it run in the background. Leaving the terminal free to run any other programs like this :&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 &amp;amp; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Wait! I am saving the best for last. The most awesome pipe operator &lt;code&gt;|&lt;/code&gt; This one can pass the output of one program to the next. Let's try to count the number of lines killing covid19 will output. (cause why not!)&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;kill &lt;/span&gt;covid19 | &lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it for now. If you guys liked it, please let me know down in the comments section.&lt;/p&gt;

&lt;p&gt;You could also check my &lt;code&gt;Know Your Linux&lt;/code&gt; series here on dev.to.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;div class="ltag__link__content"&gt;
    &lt;div class="missing"&gt;
      &lt;h2&gt;Article No Longer Available&lt;/h2&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Also, I have a small recommendation -unpaid- for you guys, I have been hacking away my quarantine days and you could too. Check out &lt;a href="http://tryhackme.com"&gt;tryhackme.com&lt;/a&gt;. It is super cool!&lt;/p&gt;

&lt;p&gt;If you want to know more or if you would like a hacking wingman, hit me up on discord at &lt;code&gt;Bassem Mohamed#3921&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As always,&lt;br&gt;
&lt;strong&gt;Happy coding 🔥🔥&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;“كود بسعادة”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>How important UX design knowledge for frontend devs?</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Mon, 09 Mar 2020 13:00:27 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/how-important-ux-design-knowledge-for-frontend-devs-1ah1</link>
      <guid>https://forem.com/bassemibrahim/how-important-ux-design-knowledge-for-frontend-devs-1ah1</guid>
      <description>&lt;p&gt;Hey devs,&lt;/p&gt;

&lt;p&gt;I am a frontend developer, I don't design mockups or wireframes. The UX team provide those for me. I just build them using code! 💻&lt;/p&gt;

&lt;p&gt;I have been thinking lately about taking UX courses and put myself in their shoes. Mainly because I want to be able to build cooler looking websites even in my free time. ( Just like &lt;a href="http://bassemmohamed.me/"&gt;my personal website&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;Aside from the fact that learning is cool and important for everyone whatever his profession is, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is learning UX particularly important for frontend devs? 🤔&lt;/li&gt;
&lt;li&gt;Can it impact dev's career somehow? 🤔&lt;/li&gt;
&lt;li&gt;Will it make a better developer? 🤔&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Let's review each other's personal websites.</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Fri, 27 Dec 2019 15:57:35 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/let-s-review-each-other-s-personal-websites-1064</link>
      <guid>https://forem.com/bassemibrahim/let-s-review-each-other-s-personal-websites-1064</guid>
      <description>&lt;p&gt;Hey, devs from all over the world. 😊&lt;/p&gt;

&lt;p&gt;I have been working a lot lately on &lt;a href="https://bassemmohamed.me"&gt;my personal website&lt;/a&gt;. It is in no way done but I am really liking what I have done so far. 😎&lt;/p&gt;

&lt;p&gt;I wanna get comments and feedback from you guys and possibly do the same for you. 🧐🙌&lt;/p&gt;

&lt;p&gt;Come on now! 👏&lt;br&gt;
Post your personal websites in the comments below! 🔥&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The perfect React's component doesn't exist. 🤯</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Mon, 16 Dec 2019 06:58:54 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/the-perfect-react-s-component-doesn-t-exist-fgn</link>
      <guid>https://forem.com/bassemibrahim/the-perfect-react-s-component-doesn-t-exist-fgn</guid>
      <description>&lt;p&gt;Hey devs from all over the world 😊&lt;/p&gt;

&lt;p&gt;In today's post, I want to tell you all about React's performance. How can we optimize our react components to reduce the number of undesired re-renders? I will be talking about React's &lt;code&gt;PureComponent&lt;/code&gt; class, &lt;code&gt;Memos&lt;/code&gt; and the truly awesome &lt;code&gt;shouldComponentUpdate&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Oki, As most of you know. React uses the virtual DOM 🔥to reduce the costly real DOM manipulation operations. This virtual DOM is a representation of the actual DOM but built with javascript. &lt;strong&gt;When a component updates,&lt;/strong&gt; React builds the new virtual DOM then compares it with the previously rendered one to decides whether an actual DOM update is required or not. 👨‍⚖️&lt;/p&gt;

&lt;p&gt;That what makes React stand out from other frontend frameworks out there. 🥇Now, Let's talk about how to make &lt;strong&gt;your React components stand out&lt;/strong&gt;. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  The perfect React's component doesn't exist. 🤯
&lt;/h2&gt;

&lt;p&gt;Ohh yeah! I love &lt;a href="https://www.google.com/#q=Minimalism"&gt;minimalism&lt;/a&gt; and I like to think that we are applying it's concepts here. Think about it for a second. &lt;strong&gt;LESS CODE == LESS TROUBLE&lt;/strong&gt;, isn't it? 🤯&lt;/p&gt;

&lt;p&gt;We can discuss this in another article though. In our today's article, it is more like &lt;strong&gt;LESS RE-RENDERS == MORE PERFORMANCE&lt;/strong&gt;, We want to stabilize our component's as much as we can. cause every re-render means that react will &lt;strong&gt;at least&lt;/strong&gt; check for the difference between new and old virtual DOM. If we don't need that re-render in the first place. That just means computations down the drain. which is obviously &lt;strong&gt;a big no-no&lt;/strong&gt; when it comes to performance. 🙅‍♂️&lt;/p&gt;

&lt;h2&gt;
  
  
  shouldComponentUpdate to the rescue 🚀
&lt;/h2&gt;

&lt;p&gt;I am sure most of you guys know about &lt;code&gt;shouldComponentUpdate&lt;/code&gt; but if you don't, let me give a quick introduction. It is a component lifecycle method that tells React whether to continue updating the component or not. It runs every time there is a change in the props or the state and it defaults to true.&lt;/p&gt;

&lt;p&gt;So for example, if we have a component with a &lt;code&gt;shouldComponentUpdate&lt;/code&gt; like this :&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="nx"&gt;shouldComponentUpdate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nextProps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nextState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&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;It will basically never ever update without forcing it. &lt;code&gt;shouldComponentUpdate&lt;/code&gt; doesn't get called for the initial render or when &lt;code&gt;forceUpdate()&lt;/code&gt; is used.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Wait a sec! Are you saying we should write a shouldComponentUpdate method by hand for every component just to prevent a couple of undesired renders ?! 🤯Nobody got time for this! 😠&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not exactly! 🙄&lt;/p&gt;

&lt;h2&gt;
  
  
  What is React's PureComponent? 🤔
&lt;/h2&gt;

&lt;p&gt;It is similar to React's component class but it implements &lt;code&gt;shouldComponentUpdate&lt;/code&gt; with a &lt;strong&gt;shallow&lt;/strong&gt; prop and state comparison by default.&lt;/p&gt;

&lt;p&gt;In other words, every prop/state update in a PureComponent will not trigger re-render unless there is a &lt;strong&gt;shallow&lt;/strong&gt; difference between current &amp;amp; previous props or current &amp;amp; previous state.&lt;/p&gt;

&lt;p&gt;This &lt;strong&gt;shallow&lt;/strong&gt; part is a little tricky, as it could lead to false-negatives ( Not updating when we actually want a re-render ) in the case of complex data structures like arrays or objects. let's go for an example.&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="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="nx"&gt;onSomeUserAction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;itemsArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;itemsArray&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;Now imagine this scenario where we have an array in the state and we want to push an item into that array on some user action.&lt;/p&gt;

&lt;p&gt;This will actually produce a false negative if it is a &lt;code&gt;PureComponent&lt;/code&gt;. After this &lt;code&gt;setState&lt;/code&gt;, &lt;code&gt;shouldComponentUpdate&lt;/code&gt; will &lt;strong&gt;shallowly&lt;/strong&gt; compare the old state to the new one just like this &lt;code&gt;this.state == nextState&lt;/code&gt; and because our &lt;code&gt;itemsArray&lt;/code&gt; reference is exactly the same this condition will be truthful and the PureComponent will not re-render. This is also a similar case for objects like this example.&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="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="nx"&gt;onSomeUserAction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;user&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;h3&gt;
  
  
  Immutable everywhere 🙌
&lt;/h3&gt;

&lt;p&gt;We can fix this issue by using &lt;code&gt;forceUpdate()&lt;/code&gt; but thats not exactly elegant and it goes against everything we just said so scrap that!&lt;/p&gt;

&lt;p&gt;What we should do is create a new object/array every time like this :&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="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="nx"&gt;onSomeUserAction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;itemsArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;itemsArray&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;or&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;objects&lt;/span&gt;

    &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="nx"&gt;onSomeUserAction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&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;Using some not so new JavaScript features like destructing and the spread operator. It doesn't only look cooler but it is also considered a whole new object. Now the &lt;code&gt;this.state == nextState&lt;/code&gt; is no longer truthful and the &lt;code&gt;shouldComponentUpdate&lt;/code&gt; is no longer producing a false-negative.&lt;/p&gt;

&lt;p&gt;Now, what about functional components? Well, you should use &lt;code&gt;Memo&lt;/code&gt; for that like this&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MyComponent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;memo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="cm"&gt;/* render using props */&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Memo&lt;/code&gt; is just like &lt;code&gt;PureComponent&lt;/code&gt; but for functional components instead of classes.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;PureComponent&lt;/code&gt; or &lt;code&gt;Memo&lt;/code&gt; and creating new object/arrays with &lt;code&gt;setState&lt;/code&gt;, We can now safely celebrate our better performing components, give yourselves a great round of applause. 👏👏&lt;/p&gt;

&lt;p&gt;You made it all the way here! Thanks for reading and I really hope you enjoyed it. If you did, Don't forget to let me know and if you really liked it &lt;a href="https://twitter.com/BassemMohamed94"&gt;follow me on twitter&lt;/a&gt; to never miss a future post. 😊 &lt;/p&gt;

&lt;p&gt;As always,&lt;br&gt;
&lt;strong&gt;Happy coding 🔥🔥&lt;/strong&gt;&lt;br&gt;
“&lt;strong&gt;كود بسعادة”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>optimization</category>
    </item>
    <item>
      <title>Why am I finding code challenges so damn hard?</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Mon, 28 Oct 2019 14:20:35 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/why-am-i-finding-code-challenges-so-damn-hard-1hdg</link>
      <guid>https://forem.com/bassemibrahim/why-am-i-finding-code-challenges-so-damn-hard-1hdg</guid>
      <description>&lt;p&gt;Hey devs from all over the world😊&lt;/p&gt;

&lt;p&gt;I have been doing interviews lately and I still have a couple to tackle. That's why I have been on Codewars &amp;amp; Hackerrank, Solving some coding challenges in preparation. After all, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“By failing to prepare, you are preparing to fail.” ― Benjamin Franklin&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a frontend developer, I &lt;strong&gt;rarely&lt;/strong&gt; encounter code challenges at my day to day work. Don't get me wrong! I know they are important, I am just saying they are more important in the interviewing phase. &lt;/p&gt;

&lt;p&gt;The issue is. I feel like I need to get better at coding challenges. I am not all bad. By Hackerrank standards, If It's an easy one I can do it. If its a medium I struggle. Some mediums are ok, others I have to look at the discussions to get ideas. If it's hard, I don't even bother.&lt;/p&gt;

&lt;p&gt;Most interviews don't ask around the hard level anyway. In my experience, they somewhat below the medium level. Maybe because I am interviewing for junior to mid-level positions. However, solving those challenges live is a whole different story!&lt;/p&gt;

&lt;p&gt;My strategy up till now is to solve as much as I can. But, I find myself wondering...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are there any other strategies out there?&lt;/li&gt;
&lt;li&gt;Is there a way to get better at them other than solving as much as you can?&lt;/li&gt;
&lt;li&gt;Are there some concepts out there (Math or programming) that someone needs to know before even trying to solve a coding challenge?&lt;/li&gt;
&lt;li&gt;How do you guys prepare for coding challenges in interviews?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>question</category>
    </item>
    <item>
      <title>What's the value of x?</title>
      <dc:creator>Bassem</dc:creator>
      <pubDate>Sat, 26 Oct 2019 16:28:15 +0000</pubDate>
      <link>https://forem.com/bassemibrahim/what-s-the-value-of-x-34nk</link>
      <guid>https://forem.com/bassemibrahim/what-s-the-value-of-x-34nk</guid>
      <description>&lt;p&gt;Hey, devs from all over the world. 😊&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What's the value of &lt;code&gt;x&lt;/code&gt;? 🤔🤔&lt;/p&gt;

</description>
      <category>question</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
