<?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: Raymond Ottun</title>
    <description>The latest articles on DEV Community by Raymond Ottun (@raysca_93).</description>
    <link>https://dev.to/raysca_93</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%2F1249813%2F7f85864c-86e5-4445-9b98-d124ce9d2638.png</url>
      <title>DEV Community: Raymond Ottun</title>
      <link>https://dev.to/raysca_93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raysca_93"/>
    <language>en</language>
    <item>
      <title>Continuous Deployment Patterns</title>
      <dc:creator>Raymond Ottun</dc:creator>
      <pubDate>Fri, 19 Jan 2024 08:01:18 +0000</pubDate>
      <link>https://dev.to/raysca_93/continuous-deployment-patterns-4pnp</link>
      <guid>https://dev.to/raysca_93/continuous-deployment-patterns-4pnp</guid>
      <description>&lt;p&gt;In this post, I will discuss different deployment patterns that you can use to deploy your application into production. The point of these deployment patterns is reduce downtime and provide easy rollbacks incase of a defective deployment.&lt;/p&gt;

&lt;p&gt;The effect of these patterns can be observed using application telemetry data.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Recreate Deployment
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you deploy a new version of your application and delete the existing version of the application. This is the simplest deployment pattern, but it can result in downtime for your application as shown in the following diagram.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxaz2odgo91lipr8akqsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxaz2odgo91lipr8akqsv.png" alt="Recreate Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ramped
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you deploy a new version of your application alongside the existing version of the application. Once the new version is ready, you gradually shift traffic from the existing version to the new version. This is the default deployment strategy in Kubernetes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuuv0dddhut62tp4erxa9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuuv0dddhut62tp4erxa9.png" alt="Ramped Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Canary
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you deploy a new (canary) version of your application alongside the existing version of the application in production. Once the new version is ready, you shift a small percentage of traffic from the existing version to the new version and keep monitoring the canary version. If the canary version performs well, you continuosly&lt;br&gt;
shift traffic to it until all production traffic is now served by the canary version. If during the traffic shifting, the canary version performs poorly, you stop shifting traffic to it and continue to use the existing version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n1sl9681qdtx5co5y5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n1sl9681qdtx5co5y5u.png" alt="Canary Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Blue/Green
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you deploy a new version (green version) of your application alongside the existing version (blue version) of the application in production. Once the new version is ready to accept traffic, you switch 100% of the production traffic from the existing (blue) version to the new (green) version and then shut down the old version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wryehv5zkl1tvxkmfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wryehv5zkl1tvxkmfp.png" alt="Blue Green Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A/B Deployment
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you can test a new version of your application by deploying it to a subset of users alongside the existing version of the application.&lt;/p&gt;

&lt;p&gt;Usually, traffic is sliced between the versions using request headers/cookies. The load balancer can then direct traffic to different versions of the applications using these request values &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijuplf9wxsbqxn79n1t6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijuplf9wxsbqxn79n1t6.png" alt="A/B Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Shadow
&lt;/h2&gt;

&lt;p&gt;With this deployment pattern, you can test a new version of your application by deploying it alongside the existing version of the application. However, instead of sending client traffic to the new version, you send a copy of the traffic to the new version. This allows you to test the new version without impacting the existing version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fso7xed95n3mh1r5rzyea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fso7xed95n3mh1r5rzyea.png" alt="Shadow Deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully, this post has given you a better understanding of different deployment patterns that you can use to deploy your application. &lt;/p&gt;

&lt;p&gt;If I missed any deployment pattern, please do let me know in the comments below.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>discuss</category>
      <category>kubernetes</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Microservices, The bad parts</title>
      <dc:creator>Raymond Ottun</dc:creator>
      <pubDate>Mon, 15 Jan 2024 18:06:12 +0000</pubDate>
      <link>https://dev.to/raysca_93/microservices-the-bad-parts-36o5</link>
      <guid>https://dev.to/raysca_93/microservices-the-bad-parts-36o5</guid>
      <description>&lt;p&gt;If your team is considering microservices, you should be aware of the challenges associated with them.&lt;/p&gt;

&lt;p&gt;Microservices are a great way to scale your application, but they come with a lot of overhead. In this article, I will talk about the challenges and considerations associated with microservices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fso42zr8eqcuv53tcqjuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fso42zr8eqcuv53tcqjuq.png" alt="microservices" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Local Development
&lt;/h2&gt;

&lt;p&gt;Developing and testing a monolith is straightforward as developers can run the entire application on their workstation. However, with a microservices architecture, developers need to run each service individually or together depending on the coupling between the services. This setup increases the complexity of the development environment and can lead to frustration and reduced productivity if not managed properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;Testing a microservices architecture, especially end-to-end or integration testing, requires a more complex setup compared to a monolith. Services may need to be mocked or spun up before tests can be executed. The testing framework needs to account for this complexity, such as waiting for services to be up and running before starting the tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging &amp;amp; Tracing
&lt;/h2&gt;

&lt;p&gt;Tracing requests through multiple services in a microservices architecture requires careful consideration. Without proper tracing in place, debugging issues in production can be challenging. For example, if a client request is handled by service A, which then calls service B, and then service B calls service C, it can be difficult to debug an issue in service C without proper tracing.&lt;/p&gt;

&lt;h2&gt;
  
  
  External Services Dependency
&lt;/h2&gt;

&lt;p&gt;Managing dependencies among services can be challenging, especially when different teams are responsible for different services. Services may need to be mocked during testing or development. Additionally, deploying microservices requires deploying each service individually, which can be time-consuming and complex to set up and debug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Versioning &amp;amp; Dependency
&lt;/h2&gt;

&lt;p&gt;Proper API versioning is crucial for managing dependencies between services. If service A depends on service B, any changes in service B may require updating and deploying service A. Deciding which service to deploy first can be tricky. If service A is deployed first, service B may be broken until service B is deployed. If service B is deployed first, service A may be broken until service A is deployed. Services should strive to be backwards compatible if versioning is not in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;Coordinating service deployments and managing multiple services require careful planning. Deployment pipelines need to be designed to handle multiple services efficiently and minimize duplication.&lt;/p&gt;

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

&lt;p&gt;While microservices offer scalability benefits, they also come with significant challenges. Designing the architecture with careful consideration can help mitigate the pitfalls mentioned above.&lt;/p&gt;

&lt;p&gt;This article is not meant to discourage you from using microservices. Instead, it is meant to help you understand the challenges associated with microservices so that you can make an informed decision about whether or not they are right for your team.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>microservices</category>
      <category>discuss</category>
    </item>
    <item>
      <title>isNaN is like gambling</title>
      <dc:creator>Raymond Ottun</dc:creator>
      <pubDate>Fri, 12 Jan 2024 08:07:39 +0000</pubDate>
      <link>https://dev.to/raysca_93/isnan-is-like-gambling-25m4</link>
      <guid>https://dev.to/raysca_93/isnan-is-like-gambling-25m4</guid>
      <description>&lt;p&gt;&lt;code&gt;isNaN&lt;/code&gt; is a nice function that checks if a value is not a number but has been the source of many sleepless nights and wasted weekends for developers. The reason for this is that &lt;code&gt;isNaN&lt;/code&gt; is not a reliable way to check if a value is not a number. Let me show you some examples:&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 1
&lt;/h2&gt;

&lt;p&gt;This is the expected behavior of isNaN. It returns true if the value is not a number and false if it is a number. In this case, 'hello' is not a number so isNaN returns true. So far so good.&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example 2
&lt;/h2&gt;

&lt;p&gt;This is where things start to get weird. The value is not a number but &lt;code&gt;isNaN&lt;/code&gt; returns false.&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is because &lt;code&gt;isNaN&lt;/code&gt; converts the value to a number before checking if it is not a number. In this case, '123' is converted to 123 which is a number so &lt;code&gt;isNaN&lt;/code&gt; returns false. So if you want to check if a value is not a number, you can use the following function:&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 3
&lt;/h2&gt;

&lt;p&gt;How about &lt;code&gt;null&lt;/code&gt;? It is not a number so &lt;code&gt;isNaN&lt;/code&gt; should return true right? Wrong. It returns false.&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;null&lt;/code&gt; is converted to 0 before checking if it is not a number. Since 0 is a number, &lt;code&gt;isNaN&lt;/code&gt; returns false.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 4
&lt;/h2&gt;

&lt;p&gt;What if your value happens to be &lt;code&gt;undefined&lt;/code&gt;?&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is because &lt;code&gt;undefined&lt;/code&gt; is converted to &lt;code&gt;NaN&lt;/code&gt; before checking if it is not a number. Since &lt;code&gt;NaN&lt;/code&gt; is not a number, isNaN returns true. In this case, &lt;code&gt;isNaN&lt;/code&gt; works as expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 5
&lt;/h2&gt;

&lt;p&gt;What if your value happens to be &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; which are not numbers or so you thought?&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;isNaN will "helpfully" convert &lt;code&gt;true&lt;/code&gt; to 1 and &lt;code&gt;false&lt;/code&gt; to 0 before checking if they are not numbers. Since 1 and 0 are numbers, &lt;code&gt;isNaN&lt;/code&gt; returns false.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 6
&lt;/h2&gt;

&lt;p&gt;Have you ever mistakenly passed in &lt;code&gt;""&lt;/code&gt; or &lt;code&gt;" "&lt;/code&gt; to &lt;code&gt;isNaN&lt;/code&gt;? You are in for a surprise.&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "brilliant" &lt;code&gt;isNaN&lt;/code&gt; function will convert &lt;code&gt;""&lt;/code&gt; and &lt;code&gt;" "&lt;/code&gt; to 0 before checking if they are not numbers. Since 0 is a number, isNaN returns false.&lt;/p&gt;

&lt;p&gt;Example 7:&lt;/p&gt;

&lt;p&gt;So for whatever reason, you find yourself checking if a Date object is not a number. What do you think will happen?&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's right. &lt;code&gt;isNaN&lt;/code&gt; will convert the Date object to a number before checking if it is not a number. Since the Date object is converted to the number of milliseconds since January 1, 1970, 00:00:00 UTC, it is definitely a number so isNaN returns false.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 8
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;[]&lt;/code&gt; and &lt;code&gt;{}&lt;/code&gt; behave differently when passed to &lt;code&gt;isNaN&lt;/code&gt; further adding to the confusion.&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="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;({})&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;([])&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;{}&lt;/code&gt; is converted to &lt;code&gt;NaN&lt;/code&gt; before checking if it is not a number. Since &lt;code&gt;NaN&lt;/code&gt; is not a number, &lt;code&gt;isNaN&lt;/code&gt; returns true. On the other hand, &lt;code&gt;[]&lt;/code&gt; is converted to 0 before checking if it is not a number. Since 0 is a number, &lt;code&gt;isNaN&lt;/code&gt; returns false.&lt;/p&gt;

&lt;p&gt;Conclusion:&lt;/p&gt;

&lt;p&gt;If you want to save yourself from a lot of headaches, you should know that &lt;code&gt;isNaN&lt;/code&gt; is a very unreliable way to check if a value is not a number. If you want to check if a value is not a number, you can use the following function:&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;function&lt;/span&gt; &lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&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="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&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;This function checks if the value is a number and if it is, it checks if it is &lt;code&gt;NaN&lt;/code&gt;. If it is &lt;code&gt;NaN&lt;/code&gt;, it returns true. Otherwise, it returns false.&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="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;({})&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nf"&gt;isNotANumber&lt;/span&gt;&lt;span class="p"&gt;([])&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Preparing for the Role of a (Senior) Full Stack Developer</title>
      <dc:creator>Raymond Ottun</dc:creator>
      <pubDate>Mon, 08 Jan 2024 18:40:52 +0000</pubDate>
      <link>https://dev.to/raysca_93/preparing-for-the-role-of-a-senior-full-stack-developer-3bn8</link>
      <guid>https://dev.to/raysca_93/preparing-for-the-role-of-a-senior-full-stack-developer-3bn8</guid>
      <description>&lt;p&gt;As we embark on a new year, if you are considering a career change or aspiring to step into the realm of a (Senior) Full Stack Developer, it's essential to prepare thoroughly for potential interviews. &lt;/p&gt;

&lt;p&gt;This article aims to guide you on the key topics you should be well-versed in to confidently tackle Full Stack Developer interviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML, CSS, JavaScript
&lt;/h2&gt;

&lt;p&gt;Mastering the fundamentals of web development is crucial. As a Full Stack Developer, ensure your proficiency in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;SEO&lt;/li&gt;
&lt;li&gt;Forms&lt;/li&gt;
&lt;li&gt;Web APIs (e.g. &lt;code&gt;localStorage&lt;/code&gt;, &lt;code&gt;fetch&lt;/code&gt;, &lt;code&gt;history&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;CSS Layout (e.g. Flexbox, Grid)&lt;/li&gt;
&lt;li&gt;JavaScript Fundamentals (e.g. &lt;code&gt;this&lt;/code&gt;, &lt;code&gt;prototype&lt;/code&gt;, &lt;code&gt;async&lt;/code&gt;, &lt;code&gt;await&lt;/code&gt;, &lt;code&gt;Promise&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example HTML, CSS, JavaScript Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is the difference between &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;undefined&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;What is event bubbling?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Web Frameworks
&lt;/h2&gt;

&lt;p&gt;Familiarity with at least one web framework is expected. Notable frameworks include React, Vue, and Angular. Focus on the following areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;State Management&lt;/li&gt;
&lt;li&gt;Routing&lt;/li&gt;
&lt;li&gt;Server Side Rendering&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example React Question
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Why use &lt;code&gt;useReducer&lt;/code&gt; instead of &lt;code&gt;useState&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;What is prop drilling and how can it be avoided?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Server Programming Language (e.g. Node.js or Python)
&lt;/h2&gt;

&lt;p&gt;Full stack developers should excel in at least one server programming language, typically Node.js. Key areas of expertise include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Express (or other web frameworks)&lt;/li&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Node.JS event loop&lt;/li&gt;
&lt;li&gt;Async programming (e.g. callbacks, promises, async/await)&lt;/li&gt;
&lt;li&gt;Streams&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Node.js Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Why is the following code not a good practice in error handling?
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;uncaughtException&lt;/span&gt;&lt;span class="dl"&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;err&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Caught exception: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;err&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;ul&gt;
&lt;li&gt;What is the difference between &lt;code&gt;process.nextTick&lt;/code&gt; and &lt;code&gt;setImmediate&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Web Security
&lt;/h2&gt;

&lt;p&gt;Understanding common web security vulnerabilities is crucial. Equip yourself with knowledge in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CORS&lt;/li&gt;
&lt;li&gt;CSRF&lt;/li&gt;
&lt;li&gt;XSS&lt;/li&gt;
&lt;li&gt;SQL Injection&lt;/li&gt;
&lt;li&gt;HTTPS&lt;/li&gt;
&lt;li&gt;Content Security Policy&lt;/li&gt;
&lt;li&gt;Authentication (e.g. JWT, OAuth)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Web Security Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is the purpose of a CSRF token?&lt;/li&gt;
&lt;li&gt;What is the purpose of a CORS policy?&lt;/li&gt;
&lt;li&gt;What is the purpose of a Content Security Policy?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DevOps
&lt;/h2&gt;

&lt;p&gt;Efficient deployment and maintenance are integral skills. Focus on the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;CI/CD&lt;/li&gt;
&lt;li&gt;AWS (or other cloud providers like Azure or GCP)&lt;/li&gt;
&lt;li&gt;Observability (e.g. logging, monitoring, tracing)&lt;/li&gt;
&lt;li&gt;Infrastructure as Code (e.g. Terraform)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example DevOps Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is the relationship between Docker and Kubernetes?&lt;/li&gt;
&lt;li&gt;Why is application observability important?&lt;/li&gt;
&lt;li&gt;What are the common stages in a CI/CD pipeline?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  General Engineering Practices
&lt;/h2&gt;

&lt;p&gt;Adopting standard engineering practices is key. Ensure familiarity with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Testing (e.g. unit testing, integration testing, end-to-end testing)&lt;/li&gt;
&lt;li&gt;Git (e.g. branching, merging, rebasing, squashing)&lt;/li&gt;
&lt;li&gt;Agile (e.g. Scrum, Kanban)&lt;/li&gt;
&lt;li&gt;Refactoring&lt;/li&gt;
&lt;li&gt;Code Review&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example General Engineering Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is the difference between unit testing and integration testing?&lt;/li&gt;
&lt;li&gt;What is the difference between rebasing and merging?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Databases
&lt;/h2&gt;

&lt;p&gt;Database knowledge is foundational. Key areas of understanding include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL (e.g. joins, aggregations, indexes)&lt;/li&gt;
&lt;li&gt;NoSQL (e.g. key-value stores, document stores, graph databases)&lt;/li&gt;
&lt;li&gt;ACID&lt;/li&gt;
&lt;li&gt;Transactions&lt;/li&gt;
&lt;li&gt;Database Indexing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Database Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is the purpose of a database index?&lt;/li&gt;
&lt;li&gt;What is the difference between a &lt;code&gt;primary key&lt;/code&gt; and a &lt;code&gt;foreign key&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, this list is a starting point. Tailor your preparation to align with the specific needs of the company you are applying to.&lt;/p&gt;

&lt;p&gt;It's natural to feel overwhelmed, but focus on continuous learning. You can acquire these skills gradually and even on the job. Be curious and open to learning.&lt;/p&gt;

&lt;p&gt;To aid your revision for a Full Stack Developer role, consider using the list of questions I've compiled in this repo in the form a quiz with a small web app to practice &lt;a href="https://github.com/raysca/revis3"&gt;Github Revis3&lt;/a&gt;, categorized by topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://revis3.web.app/web"&gt;Full Stack Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://revis3.web.app/devops"&gt;DevOps Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://revis3.web.app/javascript"&gt;JavaScript Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://revis3.web.app/react"&gt;React Questions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you find this useful. If you have any feedback, please let me know.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>interview</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
