<?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: Patrick Shema Karamuka</title>
    <description>The latest articles on DEV Community by Patrick Shema Karamuka (@karamuka).</description>
    <link>https://dev.to/karamuka</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%2F300670%2Fbd841ada-8c40-44a2-955b-1aa1812a0b94.jpeg</url>
      <title>DEV Community: Patrick Shema Karamuka</title>
      <link>https://dev.to/karamuka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karamuka"/>
    <language>en</language>
    <item>
      <title>The Challenges I Face While Working Remotely And How I Am Overcoming Them</title>
      <dc:creator>Patrick Shema Karamuka</dc:creator>
      <pubDate>Thu, 30 Jan 2020 13:49:25 +0000</pubDate>
      <link>https://dev.to/karamuka/the-challenges-i-face-while-working-remotely-and-how-i-am-overcoming-them-2l01</link>
      <guid>https://dev.to/karamuka/the-challenges-i-face-while-working-remotely-and-how-i-am-overcoming-them-2l01</guid>
      <description>&lt;p&gt;During the course of my career as a web developer, not once have I faced a job that requires me to work with a team remotely, I have always worked close to my clients and the closest I got to remote work was by phone calls and text messaging. However when I got into Andela rollup program, things took a different angle for me, because I never really worked in remote teams before, and in the rollup, almost everything seems to be carried out remotely.&lt;/p&gt;

&lt;p&gt;In this post, I’ll take you through the challenges I faced while working remotely during the rollup program and solutions you have come up with so far..&lt;/p&gt;

&lt;p&gt;Having no experience in this field, I faced some challenges at first but as I continue to work remotely with my team, I’m getting better everyday. That being said, let me work you through my challenges working remotely so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenges
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lack of a proper workspace&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited access to quality internet connectivity&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Doing things other than writing code&lt;/strong&gt;: As a software developer, I’m used to just writing and deploying code in the cloud without going through all the testing and documenting everything you do. In the rollup I spend most of the time writing tests, that is new for me and also challenging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Working in a team&lt;/strong&gt;: Spending too long working alone, taking responsibility for everything I do and making decisions without consulting anyone else made me feel like I had to do everything on my own, that changed in the rollup when I started working with people which is also new for me.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Doing things other than writing code&lt;/strong&gt;: Even though this takes time and a lot of effort, I have come to understand the beauty of it and got used to it. One of the benefits of this is writing quality code that anyone can review and understand fast without consulting me the person who wrote the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Working in a team&lt;/strong&gt;: One of the benefits of working in a team I have experienced so far is how fast one can get help from teammates when they need it. I got used to working with other people very fast thanks to my very supporting team.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As for a proper workspace and limited access to quality internet connection, unfortunately this is still an issue for me.&lt;/p&gt;

</description>
      <category>andela</category>
      <category>adc</category>
    </item>
    <item>
      <title>My Understanding of Event Loop in NodeJS</title>
      <dc:creator>Patrick Shema Karamuka</dc:creator>
      <pubDate>Thu, 23 Jan 2020 21:46:49 +0000</pubDate>
      <link>https://dev.to/karamuka/my-understanding-of-event-loop-in-nodejs-257e</link>
      <guid>https://dev.to/karamuka/my-understanding-of-event-loop-in-nodejs-257e</guid>
      <description>&lt;h1&gt;
  
  
  My Understanding of Event Loop in NodeJS
&lt;/h1&gt;

&lt;p&gt;By definition, the event loop in Node JS is what makes it possible for a Node JS to handle multiple requests at the same time without waiting/blocking other requests.&lt;/p&gt;

&lt;p&gt;Almost all operating systems nowadays are multithreaded, which means they can handle a number of different tasks at the same time. For instance, a Linux system like fedora or ubuntu can perform an I/O operation such as writing to disk and at the same time fetching data from a remote server or streaming a video online, this ability of the operating system to handle multiple tasks at the same is what NodeJS event loop uses on to delegate tasks to the host OS.&lt;/p&gt;

&lt;p&gt;So, how does NodeJS do it exactly&lt;/p&gt;

&lt;h2&gt;
  
  
  How Node JS Event loop makes use of the base operating system to serve multiple requests
&lt;/h2&gt;

&lt;p&gt;NodeJS Event loop offloads tasks to the host operating system and in turn, the operating system provides a callback as an observer for when it has finished a certain task. This happens so fast that NodeJS thread is always available for new requests.&lt;/p&gt;

&lt;p&gt;Sometimes, there are tasks that require intensive calculations and the base operating system can’t handle them or it takes longer to complete, in this case, it is when NodeJS’s thread pool comes into play. By default when you create a thread pool, it’ll have four threads assigned and you can use these to handle those tasks the OS can’t handle.&lt;/p&gt;

&lt;p&gt;What is Node Js thread pool&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the event loop(main loop) and thread pool (worker pool) in Node JS
&lt;/h2&gt;

&lt;p&gt;In Node Js, there are two types of threads, the main thread also known as event thread and thread pool in which Node JS uses to handle CPU intensive tasks.&lt;/p&gt;

&lt;p&gt;As mentioned earlier in this article there comes a time when the base OS can’t handle a specific task, and this is when the thread pool is used to handle those tasks.&lt;/p&gt;

&lt;p&gt;After reading the concepts of the thread pool in Node Js, one might understand that Node Js is not really single-threaded, but instead, it is also multi-threaded under the hood thanks to the thread pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;To summarize, Node Js is referred to as single-threaded in case of performing non-CPU intensive tasks like fetching some data from a database, and multi-threaded in case of CPU intensive tasks when using thread pool(also known as worker threads) such as complex scientific calculations or cryptographic operations. Example Node Js APIs that use the thread pool are Zlib, crypto, fs(filesystem) and DNS.&lt;/p&gt;

&lt;p&gt;Node uses the event loop to handle those non-CPU intensive tasks and thread pool for tasks that take a long time to finish.&lt;/p&gt;

&lt;p&gt;All incoming requests and outgoing responses pass through the event loop (main loop), so it’s advised not to block the event loop because if it spends long at any point, all other clients requests won’t get served. This means that every callback in your app should complete as quickly as possible to give other clients a turn.&lt;/p&gt;

</description>
      <category>adc</category>
    </item>
  </channel>
</rss>
