<?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: Harsh Joshi</title>
    <description>The latest articles on DEV Community by Harsh Joshi (@josharsh).</description>
    <link>https://dev.to/josharsh</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%2F686210%2F16f974d6-f348-47a0-9923-a87a4c0e2a30.PNG</url>
      <title>DEV Community: Harsh Joshi</title>
      <link>https://dev.to/josharsh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josharsh"/>
    <language>en</language>
    <item>
      <title>Pasting images in claude-code now works!</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Fri, 15 Aug 2025 08:45:00 +0000</pubDate>
      <link>https://dev.to/josharsh/pasting-images-in-claude-code-now-works-5hip</link>
      <guid>https://dev.to/josharsh/pasting-images-in-claude-code-now-works-5hip</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Claude Code users cannot paste screenshots or images directly into the terminal using standard keyboard shortcuts (⌘V/Ctrl+V). Current workarounds require saving files and drag-dropping, breaking the keyboard-centric workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.producthunt.com/products/claude-utils" rel="noopener noreferrer"&gt;https://www.producthunt.com/products/claude-utils&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fg3yg590tap9sndbvcecf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fg3yg590tap9sndbvcecf.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>claudecode</category>
      <category>devtools</category>
    </item>
    <item>
      <title>New MCP Testing Framework</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Fri, 13 Jun 2025 08:52:54 +0000</pubDate>
      <link>https://dev.to/josharsh/new-mcp-testing-framework-3374</link>
      <guid>https://dev.to/josharsh/new-mcp-testing-framework-3374</guid>
      <description>&lt;p&gt;Check out this MCP Server Testing framework which lets you test MCP Servers on CLI, CICD, and anywhere you code as a test suite&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/mcp-jest" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/mcp-jest&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>testing</category>
      <category>cli</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Introducing MCP Server Boilerplate: Build Extensible Python MCP Servers for LLMS and Agents</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Sun, 20 Apr 2025 20:38:17 +0000</pubDate>
      <link>https://dev.to/josharsh/introducing-mcp-server-boilerplate-build-extensible-python-mcp-servers-for-llms-and-agents-5hj</link>
      <guid>https://dev.to/josharsh/introducing-mcp-server-boilerplate-build-extensible-python-mcp-servers-for-llms-and-agents-5hj</guid>
      <description>&lt;h1&gt;
  
  
  MCP Server Boilerplate (Python) 🚀
&lt;/h1&gt;

&lt;p&gt;I'm excited to share &lt;a href="https://github.com/josharsh/mcp-server-boilerplate" rel="noopener noreferrer"&gt;MCP Server Boilerplate&lt;/a&gt;, a production-ready, extensible template for building Model Context Protocol (MCP) servers in Python. This project is designed to help you rapidly create, extend, and deploy MCP servers that expose tools, prompts, and resources to LLMs and agentic clients.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Transport Support:&lt;/strong&gt; STDIO, SSE, HTTP, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modular Tools/Prompts/Resources:&lt;/strong&gt; Add new features by creating a class and registering it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type-Safe Input Validation:&lt;/strong&gt; Uses Pydantic for schemas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Best Practices:&lt;/strong&gt; Directory sandboxing, input validation, error handling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensible &amp;amp; Maintainable:&lt;/strong&gt; Clean separation of concerns, base classes, and registries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production-Ready:&lt;/strong&gt; Logging, environment management, Docker support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comprehensive Documentation:&lt;/strong&gt; For users and contributors&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Getting Started
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install dependencies:&lt;/li&gt;
&lt;li&gt;pip install -r requirements.txt&lt;/li&gt;
&lt;li&gt;Configure environment: 
Copy .env.example to .env and fill in required values.&lt;/li&gt;
&lt;li&gt;Run the server:
python main.py --transport=stdio&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Why MCP?
&lt;/h1&gt;

&lt;p&gt;Model Context Protocol (MCP) is a new standard for exposing tools, prompts, and resources to LLMs and agentic clients. This boilerplate is the recommended starting point for all new Python MCP server projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check it out, star the repo, and let me know what you build!
&lt;/h2&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>Concurrency Model in Javascript</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Mon, 18 Jul 2022 18:58:00 +0000</pubDate>
      <link>https://dev.to/josharsh/concurrency-model-in-javascript-5li</link>
      <guid>https://dev.to/josharsh/concurrency-model-in-javascript-5li</guid>
      <description>&lt;p&gt;Also find this article on &lt;a href="https://www.scaler.com/topics/javascript/event-loop-in-javascript/"&gt;Scaler Topics&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oVdNQHUg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzvrwhbfkv6wqd0hrygr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oVdNQHUg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzvrwhbfkv6wqd0hrygr.jpeg" alt="Image description" width="880" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The idea of concurrency in a language which runs on a single thread is an interesting one. For those of you who don’t already know, concurrency is simply doing multiple things at the same time. Just like you are doing different stuff in different tabs while you’re also reading this. &lt;br&gt;
Imagine you were bound to do only one thing at a time. No Netflix while you eat! Sure that might help you focus but in your day to day life, but you might feel less productive. &lt;br&gt;
Your resources are getting under utilised. Not just that, you see your contemporaries who are able to multiple things at at the same time.  The outline of this article is precisely this. Instead of you, it is javascript we are going to talk about.&lt;/p&gt;
&lt;/blockquote&gt;


💡 Since you are here reading about event loop in JS, this article assumes that you are well aware of the fundamental principles of Javascript. You could start looking at “Link” to read about the fundamentals.



&lt;p&gt;Javascript started as a single threaded synchronous language. A programming language which is supposed to run on a single thread means that this will be able to do only one thing at a time. Doing one thing at a time will require it to follow some order of execution. It is thus called synchronous.&lt;/p&gt;

&lt;p&gt;In case of synchronous Javascript code will be executed line by line.&lt;br&gt;
Here’s an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line is executed one by one. &lt;strong&gt;Synchronous code is also called as blocking&lt;/strong&gt;. This is because line 2 can’t be executed until line 1 is not done executing. You might not realise the “blocking” in this example because operations are usually quick.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;thisCalculationTakesTwoMinutes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, line 2 involves a calculation which takes two minutes to complete. While this call is happening you can’t really go to line 3, even if the computing capacity of your machine has capability to do more at that time. &lt;/p&gt;

&lt;p&gt;💡 This is where the concept of concurrency becomes important in Javascript. Given that the language is single threaded unlike other languages like Java which can use multiple threads to achieve concurrency, this curious case of concurrency in JS becomes further interesting.&lt;/p&gt;

&lt;p&gt;With the advent of concurrency, javascript took &lt;em&gt;“your child can do more”&lt;/em&gt; very seriously. Before we come to talk about concurrency in detail, let us try to define some fundamental concepts that are closely associated. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single Threaded:&lt;/strong&gt;&lt;br&gt;
Javascript is a single threaded language. This means all applications ever written using Javascript will use only one thread to run. This idea of single thread is unpopular among the likes of languages like Java, and Python which use Multithreading. (Doing multiple things with more than one thread at once). Single threaded also means that the order of execution is always one at a time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non Blocking:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To put it simply, non blocking means that the execution of the program will not be blocked because of some code which takes unusually long to execute. If line one has a slow operation, it should not block line two from executing. Didn’t we just want that? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Asynchronous:&lt;/strong&gt; Asynchronous means that two or more tasks can happen in parallel. This might sound contradicting to what you read above, but it’s true. In Javascript you can actually do many things at once. We will dive deeper into in the lines to come. &lt;/p&gt;
&lt;h2&gt;
  
  
  How does code execute in Javascript?
&lt;/h2&gt;

&lt;p&gt;To maintain the order of what’s currently running, Javascript uses a stack while executing the code. You might already be aware that the executions happen inside execution contexts. If not, think of executions contexts as javascript objects that contain the execution of code. Functions have local executions contexts which are generated when the functions are called and everything else is run on the global execution context. &lt;/p&gt;

&lt;p&gt;The execution context of the code currently being executed will be on top of the stack. Once it is done execution the execution context is popped out of the stack. This data structure is famously known as the call stack. &lt;/p&gt;

&lt;p&gt;Let’s understand with an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sayHello&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="err"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello &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="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sayBye&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="err"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Bye &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="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;communicate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;thingToSay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;thingsToSay&lt;/span&gt;&lt;span class="s2"&gt;`)}

console.log(”Communication Started”)
sayHello("Harsh")
communicate("This is how code is executed in JS")
sayBye("Harsh")
console.log(”Communication Over”)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;“Doing things” in Javascript is achieved using a call stack and JS Engine. While JS Engine executes the code, the call stack maintains the order of execution. To begin with, think of call stack as an ordinary stack (the data structure) which holds some objects. The top of the stack is the object representing call in current execution, which upon completion/termination will be popped out and the control will be passed to the next call/ execution context.&lt;/p&gt;

&lt;p&gt;Though this is not related here but you should note that sayHello, sayBye and communicate are functions expressions and hence initialisation for them will differ from function declaration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s what shall happen during execution of the above code. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A global execution context is created and immediately put on the call stack which was earlier empty. Once the context is in the call stack the JS engine begins executing the code. &lt;/li&gt;
&lt;li&gt;When the control reaches line 4, it logs “Communication Started” on the console. &lt;/li&gt;
&lt;li&gt;On reaching line 4, the control finds a function invocation which creates a local execution context, immediately the execution context of sayHello is put on top of the call stack. &lt;/li&gt;
&lt;li&gt;JS Engine will only execute the code within the context of the top element of the stack and hence the code inside sayHello begins executing and “Hello Harsh” is printed on the console.&lt;/li&gt;
&lt;li&gt;Since there is no code to further execute The context of sayHello is popped out of the stack and the control moves to the next line. &lt;/li&gt;
&lt;li&gt;The control finds another function invocation and the process from 3 to 5 happens for the communicate function. As a result “This is how code is executed in JS” is printed on the console.&lt;/li&gt;
&lt;li&gt;When control reaches next line, similar process follows and “Bye Harsh” is printed on the console. &lt;/li&gt;
&lt;li&gt;Now, the control is back with the global execution context which was only half done executing. The control starts executing from where it left off and “Communication Over” is logged&lt;/li&gt;
&lt;li&gt;Since there is no code left in the global execution context, that is always popped out of the call stack and call stack is empty. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  But where is Concurrency?
&lt;/h2&gt;

&lt;p&gt;Concurrency is the ability to do multiple things at once. It comes with asynchronicity which is the soul of the present day Javascript. It bring along another special data structure called a callback queue. Let’s try to understand with a classic example of setTimeout.&lt;/p&gt;

&lt;p&gt;Yes, setTimeout introduces most of the developers to the soul(asynchronicity) of Javascript. Whether it has any other use is a debate for another day. &lt;/p&gt;

&lt;p&gt;setTimeOut accepts two parameters, a callback function and time in mili seconds. &lt;/p&gt;

&lt;p&gt;Back to an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;setTimeOut&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;delayThis&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="err"&gt;”&lt;/span&gt;&lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;will&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;delayed&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;)},&lt;/span&gt; &lt;span class="mi"&gt;5000&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;End&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;What do you think will be the out of the above lines of code?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whenever setTimeOut is called, the call stack now contains setTimeOut and waits for the delay to happen before moving on the next line&lt;/li&gt;
&lt;li&gt;When setTimeout is called, the function call goes to the top of the call stack but is immediately popped. The next line gets executed immediately (without waiting for the delay)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s try to understand the order of execution here. When the code begins executing, the first thing that is logged on the console is “Start”. This is pretty obvious. &lt;/p&gt;

&lt;p&gt;When the control comes to second line, setTimeout is called and a callback function is registered for future execution. &lt;/p&gt;

&lt;p&gt;💡 If you don’t already know, a callback function is a function which is passed to another function as parameter. Since functions are first class citizens in Javascript they can be passed or returned from another function. You can read more about it on this “blog url”&lt;/p&gt;

&lt;p&gt;The control does not wait for the delay to happen. Essentially delay does not mean “a delay in the program” rather it means “a delay in execution of the callback function”. Both are very different things. &lt;/p&gt;

&lt;p&gt;Next up the control immediately moves to the third line and the execution context associated with calling of setTimeout is destroyed. When this happens, the callback function is still in the memory just not in that execution context. When it was being registered the callback function is moved to a different memory unit. When the callback is ready for execution (10 seconds have elapsed) for execution, it is moved backed to a data structure, just like all functions calls are moved to call stack for execution. &lt;/p&gt;

&lt;p&gt;💡 Note: Not all callbacks have same priority. Some callbacks use a special queue known as the micro task queue/Job queue which has higher priority order than callback queue. It introduces more interesting concepts like starvation in a queue. Job Queue/microtask queue is out of scope of this article but you can read more about it here [URL]&lt;/p&gt;

&lt;p&gt;Here’s a more practical example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;asyncNetworkCall&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;End&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;💡 Assume that the asyncNetworkCall is implemented as an asynchronous function. Which means while the network call is still in function, the control is able to move to line 3 and log something to the console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event Loop
&lt;/h2&gt;

&lt;p&gt;Before we start talking about Event Loop. Let’s go back to the building blocks again. There is some javascript code hanging out with your favourite code editor. We know by this point that JS Engine and the call stack are the primary things responsible for running the javascript code. In order for the code to be executed it has to be brought on the call stack for JS Engine to execute it. &lt;/p&gt;

&lt;p&gt;Now recall the callback function in the example above. Last we heard of it was when it was in some fancy new memory unit called the callback queue. After 10 seconds have passed, it has to be executed. Event loop is such a mechanism which handles this. This means it manages the lifecycle of a callback function from the callback queue to the call stack. &lt;/p&gt;

&lt;p&gt;💡 Whenever you read about event loop next, think of it as a mechanism than anything else.&lt;/p&gt;

&lt;h3&gt;
  
  
  But How does it work?
&lt;/h3&gt;

&lt;p&gt;Let’s begin with stating the universal truth - “A call stack will have to be empty for event loop to bring anything in it”.  &lt;/p&gt;

&lt;p&gt;Whenever the call stack is empty, the first entered unit in the callback queue is brought to the call stack by the event loop which was observing both call stack and callback queue. &lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Did You Notice?&lt;/strong&gt;&lt;br&gt;
setTimeout of a ‘n’ seconds does not guarantee execution exactly when ‘n’ seconds have passed, rather it guarantees a minimum delay of ‘n’. &lt;br&gt;
This is because after a defined limit, the callback function moves to the callback queue (stating ready for execution) where the event loop is supposed to pick it for actual execution.&lt;/p&gt;

&lt;p&gt;A very interesting piece of information about event loop is an event loop does not block. Operations that might potentially require waiting are performed using callbacks and events. &lt;/p&gt;

&lt;p&gt;💡 Event loop Visualisation.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;JS is single threaded. It has only one call stack.&lt;/li&gt;
&lt;li&gt;Execution of code in javascript is always. line by line&lt;/li&gt;
&lt;li&gt;Code in javascript is executed by JS Engine which uses the call stack to determine the order of execution&lt;/li&gt;
&lt;li&gt;Event loop is a mechanism through which the ‘calls waiting for execution’ in the callback queue/job queue can be put on the call stack.&lt;/li&gt;
&lt;li&gt;For any event from callback queue/job queue to come to call stack, the call stack will have to be empty.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Fun Experiment: Bringing lazy execution to JS!</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Mon, 17 Jan 2022 09:53:04 +0000</pubDate>
      <link>https://dev.to/josharsh/fun-experiment-bringing-lazy-execution-to-js-319g</link>
      <guid>https://dev.to/josharsh/fun-experiment-bringing-lazy-execution-to-js-319g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Bringing lazy execution to higher order functions in JS!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xSYlENUE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FJPlI_saAAArL5h%3Fformat%3Djpg%26name%3D4096x4096" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xSYlENUE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FJPlI_saAAArL5h%3Fformat%3Djpg%26name%3D4096x4096" alt="Teaser" width="880" height="491"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;How to Use&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Install the package&lt;br&gt;
&lt;code&gt;npm i lazy-hofs&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add to your project&lt;br&gt;
&lt;code&gt;require("lazy-hofs");&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;lazySome()&lt;/strong&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazySome&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;it&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;arr&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="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyEvaluate&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;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;lazyMap()&lt;/strong&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyMap&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;it&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;arr&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="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyEvaluate&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;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;lazyFilter()&lt;/strong&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyFilter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;it&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&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="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;arr&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="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyEvaluate&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;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;lazyReduce()&lt;/strong&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyReduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;it&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;acc&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="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&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;arr&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="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lazyEvaluate&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;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Join me here: &lt;a href="https://npmjs.com/package/lazy-hofs"&gt;https://npmjs.com/package/lazy-hofs&lt;/a&gt;&lt;br&gt;
Contributions welcome!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>npm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>The UI revolution on Android: Jetpack Compose</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Tue, 02 Nov 2021 17:47:20 +0000</pubDate>
      <link>https://dev.to/josharsh/jetpack-compose-is-trending-but-why-should-you-care-3ej</link>
      <guid>https://dev.to/josharsh/jetpack-compose-is-trending-but-why-should-you-care-3ej</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;It is a &lt;strong&gt;product&lt;/strong&gt; led world. Products today are &lt;strong&gt;design&lt;/strong&gt; led. Design further is &lt;strong&gt;experience&lt;/strong&gt; led.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As much as a product is an experience, It is also &lt;strong&gt;a relationship&lt;/strong&gt; and &lt;strong&gt;an expression&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jetpack compose is a new way of expression in the world of native android apps.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;You must already have experienced the &lt;em&gt;depth of such a relationship&lt;/em&gt; when you took your phone to washrooms, scrolled to sleep with Instagram or checked Whatsapp notifications as the first thing in the morning. &lt;/p&gt;

&lt;p&gt;Today's product is not just "How it works" but is also (perhaps more) an expression of &lt;em&gt;"How it feels"&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The essence of a product as a relationship and expression is far more than just a mere usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jetpack Compose is here to make this process fast, accelerated and efficient.&lt;/strong&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Jetpack Compose?
&lt;/h2&gt;

&lt;p&gt;Google developer docs define Jetpack compose as "&lt;strong&gt;Android’s modern toolkit for building native UI&lt;/strong&gt;."&lt;/p&gt;

&lt;p&gt;So far so good. Looks like Android team has done something new  to better UI development for native android applications. &lt;/p&gt;

&lt;p&gt;The docs further go on to say, &lt;strong&gt;"It simplifies and accelerates UI development on Android. Quickly brings your app to life with less code, powerful tools, and intuitive Kotlin APIs.".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the past, UI on native android was expressed using a combination XML layout + Java / Kotlin files. Many would argue that in the world of &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt; it was a boring way of doing UI. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Jetpack Compose enables you to write your UI in Kotlin.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Woaahh, that's big news for people having adapted to writing native android apps in Kotlin. But does this affect you if you are writing native android apps in Java? Perhaps not! &lt;/p&gt;

&lt;p&gt;As many say, &lt;em&gt;the right time to move to Kotlin was a year ago but if you haven't already, the right time is now&lt;/em&gt;. I will write more on what I think about Kotlin in a separate blog. &lt;/p&gt;

&lt;h2&gt;
  
  
  But why Jetpack Compose?
&lt;/h2&gt;

&lt;p&gt;Android Developer Docs answer this question in a very elaborative way &lt;a href="https://developer.android.com/jetpack/compose/why-adopt"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Intuitively, it seems like an upgrade. One might argue on its need in the mobile world but this is much power given in a much needed space.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All Kotlin and no XML makes Jack's app development fast, efficient and wise.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JDfkGx0k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/josharsh/Josharsh/blob/master/powernew.gif%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JDfkGx0k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/josharsh/Josharsh/blob/master/powernew.gif%3Fraw%3Dtrue" alt="powernew.gif" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write less code&lt;/strong&gt; - It's all Kotlin and no XML now. With jetpack compose it is possible to write UI with &lt;a href="https://venturebeat.com/2020/08/26/google-jetpack-compose-alpha-android-developers-less-code/"&gt;'dramatically less code'&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's Declarative -&lt;/strong&gt; If you are coming from the world of react, you might know what a delight declarative UI is. Declarative API simply means all you need to do is describe your UI. Read more &lt;a href="https://increment.com/mobile/the-shift-to-declarative-ui/#:~:text=In%20a%20declarative%20framework%2C%20changes,using%20sensible%20defaults%20and%20context."&gt;here.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Design challenges it Addresses:
&lt;/h2&gt;

&lt;p&gt;Jetpack compose is a well thought of upgrade. It addresses some key design challenges of the native android world. &lt;/p&gt;

&lt;h3&gt;
  
  
  One of which is "&lt;em&gt;Separation of Concerns&lt;/em&gt;".
&lt;/h3&gt;

&lt;p&gt;Here is an example- &lt;/p&gt;

&lt;p&gt;You have a View Model written in Kotlin. This view Model interacts with the XML layout file. The &lt;strong&gt;degree of coupling&lt;/strong&gt; between these two tends to be high. (If you don't already know, you can know about coupling &lt;a href="https://home.adelphi.edu/sbloch/class/adages/coupling_cohesion.html"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tighter the coupling, more the dependency. If these two are so intimately connected, why the separation of Kotlin and XML?  What if you could write the layout in Kotlin rather than XML?&lt;/p&gt;

&lt;p&gt;If you think wisely, this is not violation of "&lt;strong&gt;Separation of Concerns&lt;/strong&gt;" rather it tries to manage the 'separation' for you. And how you ask? Through something called a "&lt;strong&gt;Composable Function&lt;/strong&gt;". We already have used many many functions to separate the concerns in the past. This is not different. &lt;/p&gt;

&lt;p&gt;Here's how it looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Composable&lt;/span&gt;
&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;NameOfFunction&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello Compose"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Say Hello"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;onClick&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// handle a click event here&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;Read &lt;a href="https://medium.com/androiddevelopers/understanding-jetpack-compose-part-1-of-2-ca316fe39050"&gt;this well written piece&lt;/a&gt; to understand Composables in more depth. &lt;/p&gt;

&lt;h3&gt;
  
  
  The other one - Source of Truth.
&lt;/h3&gt;

&lt;p&gt;Imagine having an app that has a dropdown. The dropdown lets you choose between options pizza, burger, and orange slice. You chose pizza and a major network call followed which somehow failed. What is the truth of your selection now? Is it the dropdown which still shows pizza as selected choice but in reality there is no choice. I know it is confusing. &lt;/p&gt;

&lt;p&gt;Jetpack compose solves it by introducing "State". State is the single source of truth now. You do something on UI, the state changes and so does the truth. &lt;br&gt;
You can pass state to composable functions just like &lt;a href="https://reactjs.org/docs/components-and-props.html"&gt;props in react&lt;/a&gt;.  It observes for changes in the state and updates itself accordingly. The onus of updating the state is not on it anymore. &lt;/p&gt;

&lt;p&gt;Read &lt;a href="http://www.hackingwithreact.com/read/1/12/state-and-the-single-source-of-truth"&gt;this great piece&lt;/a&gt; on state and single source of truth to know more about it. Although this blogs takes react into account to explain the concept of SSOT, it will help you get more clarity &lt;/p&gt;

&lt;h2&gt;
  
  
  Who's already using Compose?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2p2bXV8R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tv5e1dqe2wpp35d4z0ww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2p2bXV8R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tv5e1dqe2wpp35d4z0ww.png" alt="Who's using Compose" width="880" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From Twitter to Play Store to Pinterest app, many have chosen Compose. &lt;a href="https://developer.android.com/jetpack/compose/why-adopt#testimonials"&gt;This space&lt;/a&gt; will help you discover more on who's using compose?&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources you can utilise to learn more about Jetpack Compose
&lt;/h2&gt;

&lt;p&gt;I know this blog did not do the best job to explain everything about Jetpack compose but it didn't intend to. I hope it introduced you (If you hadn't already heard) and got you excited about it. &lt;br&gt;
Jetpack Compose looks very promising and would set a new benchmark in the world of native apps. &lt;/p&gt;

&lt;p&gt;You can utilise some great resources on the internet to learn more about Compose. I am mentioning a few good ones that I came across here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.android.com/jetpack/compose/why-adopt"&gt;"Why Adopt Compose"&lt;/a&gt; by Google Developers&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=Q9MtlmmN4Q0"&gt;Understanding Compose&lt;/a&gt; - Android Dev Summit, 2019&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://medium.com/androiddevelopers/understanding-jetpack-compose-part-1-of-2-ca316fe39050"&gt;Understanding Jetpack Compose (II Parts)&lt;/a&gt; - Android team on Medium&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.section.io/engineering-education/getting-started-with-jetpack-compose-in-android/"&gt;Getting started with Jetpack Compose&lt;/a&gt; on Section.io&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your startup &amp; the conspiracy of numbers</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Thu, 09 Sep 2021 16:20:12 +0000</pubDate>
      <link>https://dev.to/josharsh/your-startup-the-conspiracy-of-numbers-1687</link>
      <guid>https://dev.to/josharsh/your-startup-the-conspiracy-of-numbers-1687</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Measuring Success in a startup ecosystem has its own caveats. Ever since I have gotten a little familiar with it, every day brings a new perspective. It's a jargony world of OKRs and KPIs, &lt;br&gt;
This blog aims to establish the role of overlooked principles, factors, and anomalies resulting in deviation and uncertainty in such measurements. It tries to set the perspective of intuitive bias in decision-making, pre-planning, and reinforcement learning. It goes on to talk about Simpson's paradox, North Star Metrics, and much more.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;center&gt;&lt;b&gt; Numbers are weird. This morning I decided to count all numbers till infinity, could not reach one! &lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/center&gt;
&lt;br&gt;
This Saturday, it randomly hits you to pull up the NPS numbers for the startup you are building. You come to realize that one of your competitor’s NPS score has moved up 3 points from 73 to 76 while your NPS has reduced by a point from 75 to 74 for this quarter. The numbers don’t concern you as much as the PR around this news does. You don’t have the highest NPS score in the industry anymore. You pick coffee to tea today and decide to investigate the cause. 

&lt;p&gt;You are building a startup that promises to bring a revolution. You offer work-stress relief services to businesses for their employees. You now want to understand the reason behind this marginal dip in your NPS score. On going through the data, you realize a causal relationship. Out of 600 users who availed of your service, 500 of them reported positive results immediately while the remaining had less/no significant effect on their stress levels. On the contrary, your competitor surprisingly had the same number(600) of users for this quarter too, out of which 520 users reported immediate positive results. &lt;/p&gt;

&lt;p&gt;On a normal day, you would accept these figures as the right metrics and solely work on improving your service but today’s a little different. It’s Elon Musk saying no to cryptocurrencies and Kunal Shah not tweeting anything for more than 3 days. You decide to stay put.&lt;/p&gt;

&lt;p&gt;After a day of long brainstorming discussions with your team, you narrow it down to one conditional variable, “The level of stress”. Out of 600 users who availed of your service, 250 had severe levels of stress. (They acknowledged this information in the service request flow). Out of these 250 users, your product could bring down the stress levels of 155 users. On the other hand, your competitor had 100 cases of highly stressed users and it could successfully settle stress levels of 40 users.&lt;/p&gt;

&lt;p&gt;Quite absurd it may sound, but as it turns out your service was better for low-stressed users too. Out of 350 less stressed users, 345 of them got rid of their stress using your service but out of 500 low stressed users, your competitor could successfully handle the stress of 480 users.&lt;/p&gt;

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

&lt;p&gt;Look closely, while the total numbers are stating something, the individual numbers are telling a different story altogether. Yes, high stressed and low stressed are the only categories of users.&lt;/p&gt;

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

&lt;p&gt;How could this be true? It indeed is, and this is called the Simpson’s paradox. Simpson’s paradox occurs when the same set of data can show opposite trends, depending on how it is aggregated. This often occurs when aggregated data hides a conditional variable, also known as the lurking variable. &lt;/p&gt;

&lt;p&gt;In other words, the relationship observed within a population (i.e. a group of individuals), could be reversed within all subgroups that make up the population. Simpson’s paradox comes in two parts:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;The fallacy of Division&lt;/b&gt;: What is true of the whole is not always true of the parts&lt;br&gt;
&lt;b&gt;The fallacy of Composition&lt;/b&gt;: What is true of the parts is not always true of the whole&lt;br&gt;
What exactly happened in the story above was there was a significant difference between the number of highly stressed users availing both the services. The lurking variable here was &lt;strong&gt;“level of stress at the time of availing the service”&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This story had some insights to take. But this isn’t the only one where numbers can outplay you. Simpson’s paradox is just an example of how important it is to manage numbers that deal with key success attributes for your startup.  Statistics is vital for any business. While most of it can be simply right, fair, and straightforward, there are some anomalies and paradoxes. &lt;/p&gt;

&lt;p&gt;But wait, what did all this have to do with NPS score? NPS score is calculated based on the difference between promoters and detractors, both of which are your own users. So why did the NPS go down if both high and low stressed patients had better servicing rates than your competitor?&lt;/p&gt;

&lt;p&gt;Are these two even related? Looks like I will have to believe in you to solve this one :) &lt;/p&gt;

&lt;p&gt;When you are building a startup, one of the most crucial things is a clear set of objectives. Investor Sean Ellis coined the term North Star metrics to give a singular goal of growth across teams. You might even come across this conspiracy of numbers while evaluating your performance towards north star metrics. For SaaS startups, the north star metrics should be the most important metrics for measuring product success and the very notion of a conspiracy in this measurement is daunting. There should be thoughts to examine how such conspiracies can live in all dimensions of your north star metrics. From a SaaS point of view, If you define the metrics as the number of users signing up every month for a service that renews every month, you might be misdirected by the numbers.  This metric shows the total users who signed up since the very start. Among this aggregated data there might be many clusters. Instead of it, you might want to keep in account the number of returning users every month which gives better objectives and saves subtle misdirection. (or does it?) This dimension is called the breadth in north star metrics. There are more dimensions to it. Frequency specifies the number of monthly purchases/subscriptions/orders per user which might/might not be a good metric instead of total orders placed this month. &lt;/p&gt;

&lt;p&gt;The reason why I am not sure is because of something called the &lt;b&gt;“Pareto Principle"&lt;/b&gt;. You might also know it as the &lt;b&gt;80/20 &lt;/b&gt;rule. It asserts that 80% of outcomes (or outputs) result from 20% of all causes (or inputs) for any given event. This accounts for notions like 20% of health crops make 80% of total grains. Now when you consider the total number of orders placed in a month, this might be a case of one large purchase. You might not agree with me here, but it most certainly is about the objectives you choose.  You understand what you are building better than anyone else and you might want to capture a few things as they come. &lt;/p&gt;

&lt;p&gt;Typically, the right measure of product for a SaaS would be frequency instead of total purchases. To add to it, another dimension called &lt;b&gt;“depth”&lt;/b&gt; which means total items per order comes into the picture. &lt;/p&gt;

&lt;p&gt;While the above three dimensions talk about users’ interaction with the product. The fourth one, called &lt;b&gt;"Efficiency"&lt;/b&gt; talks about your offering. For a SaaS, it might be the percent of orders delivered in time. &lt;/p&gt;

&lt;p&gt;I think we got a little deviated here, but it was important to understand how and when the numbers can conspire. A large attribution of it goes to our own psychological biases, but we are made that way. Most of the large-scale businesses set multiple north star metrics. While it might suit/complement your business needs and goals it also can lead to confusion as to what the real objective is. However, having sub metrics over multiple north star metrics might be helpful. &lt;/p&gt;

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

&lt;p&gt;To be continued...&lt;/p&gt;

&lt;p&gt;Next up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decision Factors in choosing the right metrics&lt;/li&gt;
&lt;li&gt;Simpson’s paradox in NPS and Production Adoption Rate&lt;/li&gt;
&lt;li&gt;Metamathematics and Anomalies&lt;/li&gt;
&lt;li&gt;The startup paradox&lt;/li&gt;
&lt;li&gt;The Game theory challenge to startups.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>startup</category>
      <category>success</category>
      <category>numbers</category>
      <category>paradox</category>
    </item>
    <item>
      <title>Approaches to Serverless Deployment</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Sat, 21 Aug 2021 06:56:02 +0000</pubDate>
      <link>https://dev.to/josharsh/approaches-to-serverless-deployment-kn2</link>
      <guid>https://dev.to/josharsh/approaches-to-serverless-deployment-kn2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Serverless is the go to paradigm for many young startups today. I have been experiencing the quirks, caveats and corners of it ever since I started working on it.&lt;br&gt;
This blog aims to establish "Deployment in Serverless" as a business strategy over a development paradigm. &lt;br&gt;
In this incrementally evolving piece, I will talk about serverless deployment strategies, business influences, decision factors and a lot more.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes, Serverless is cool. It is one less thing to do, but there’s certainly more to it. When you are not occupied with tedious, time consuming server development, operations, and maintenance, you can take some time out to click some heads in your favorite multiplayer first-person shooter game or even learn making Pepperoni Pasta. &lt;/p&gt;

&lt;p&gt;Especially when you are building a startup, you want to be efficient in solving bigger problems at hand. There are many other factors teams consider before moving to the serverless paradigm. Once you have taken the call, you are presented with multiple strategies for deployment.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;This blog helps you explore more about approaches and suggests to you the paradigm that might fit your strategies. This blog will  consider Google cloud platform for most of the examples and explanations but the deployment strategies more  or less remain similar among all the major cloud vendors. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless computing is a method of providing back end services on an as-used basis. A serverless provider allows users to write and deploy code without the hassle of worrying about the underlying infrastructure. Precisely back end as a managed service sums up the essence of serverless paradigm. You write code as functions, ship it to a third party. The third party is responsible for managing the entire infrastructure which hosts your code. You are given a window through which you and the rest of the world can interact with the code. While the management is done by the third party, it must be realized that you are the one in control of your code. &lt;/p&gt;

&lt;p&gt;Serverless computing allows developers to purchase back end services on a flexible ‘pay-as-you-go’ basis, meaning that developers only have to pay for the services they use. This is like switching from a cell phone data plan with a monthly fixed limit, to one that only charges for each byte of data that actually gets used.&lt;/p&gt;

&lt;p&gt;One of the most commonly used  serverless entities are the cloud functions. Google Cloud defines cloud functions as a serverless execution environment for building and connecting with cloud services.  Cloud functions expose you to write simple single purpose functions that are attached to events emitted from Cloud infrastructure and services the code executes in a fully managed environment. &lt;/p&gt;

&lt;p&gt;To put things into perspective once you have the service architecture up and running you will need to package your updated code and give it to a provider. This way the management completely becomes the responsibility of the third-party vendor, this also means that the third-party cloud vendor is responsible for updating the code and making it accessible to all the future requests that come. However you are in charge of having a mechanism to push the updated code from your source repositories to the cloud vendor. Each function is associated with its own environment and the update won't affect any code during execution. The old functions generally die after the completion and the update will seem to be instantaneous . &lt;/p&gt;

&lt;p&gt;GCP Says, &lt;em&gt;“Google Cloud Functions is a serverless execution environment for building and connecting cloud services. With Cloud Functions you write simple, single-purpose functions that are attached to events emitted from your cloud infrastructure and services. Your function is triggered when an event being watched is fired. Your code executes in a fully managed environment”&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That’s comforting right? Or is it alarming. It is a topic for future reveals when we talk about observability in managed services. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lv7Grox5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77n0st2x1eejc9akfzcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lv7Grox5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77n0st2x1eejc9akfzcq.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
It is quite obvious that to use the  serverless architecture you need to handle your deployments in a different way, most likely you might consider having a continuous integration and continuous delivery pipeline. The delivery pipeline usually begins after the development is completed but it is as important.  Most of the cloud vendors today give you access to entities like cloud functions directly from the console, which might not be a good idea. Using serverless architecture you are already dependent on the third party vendors for managing resources, and using the console to create cloud functions without having a copy of the source code might be a bad idea. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment Options&lt;/strong&gt;: Deployments work by shipping your function's source code to a place in cloud storage. There are a number of ways the deployments can be done. Typically cloud Functions run with container orchestration. In simple words, each cloud function has its own environment. Read more &lt;a href="https://www.redhat.com/en/topics/containers/what-is-container-orchestration"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Typically, deployment can be availed using the following techniques:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ship from local machine&lt;/li&gt;
&lt;li&gt;Deploy from source control&lt;/li&gt;
&lt;li&gt;Deploy from Cloud  Console&lt;/li&gt;
&lt;li&gt;Deploy with the Cloud Functions API
Google Cloud comes up with something called Functions Framework to run and debug your functions locally for supported runtime. It makes testing and debugging easier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choosing the right strategy&lt;/strong&gt;: The right strategy can depend on your business, wallet, urgency, design and  a lot of other factors. Generally, deployment from source control is the way to go for many. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cwtRyxiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8chn349e2bqmaagx50xk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cwtRyxiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8chn349e2bqmaagx50xk.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
This is largely because this strategy provides benefits on VCS, feature based development, continuous integration, development coherence and automated deployment. The source code already stored as commits can use tags on each commit and these tags can be used to deploy the code. While most teams prefer to work in coherence, yet prefer independent control over code modules, small scale projects typically do not define a strategic deployment strategy.&lt;/p&gt;

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

&lt;p&gt;These tags act as a trigger to the building engines of cloud providers. Good strategies include a mechanism to only build the difference on code rather than the entire unit. One good example to understand this is a GCP managed python cloud function built entirely only when there are more modules needed by the environment for that function to work. This can be observed using the time taken to deploy in both cases. &lt;/p&gt;

&lt;p&gt;To be continued! Next on this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing Cloud Functions&lt;/li&gt;
&lt;li&gt;Cloud Functions and Security&lt;/li&gt;
&lt;li&gt;Deploying Pipeline&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>serverless</category>
      <category>cloud</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Can you make JS more powerful?</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Wed, 18 Aug 2021 18:44:52 +0000</pubDate>
      <link>https://dev.to/josharsh/can-you-make-js-more-powerful-4lma</link>
      <guid>https://dev.to/josharsh/can-you-make-js-more-powerful-4lma</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“ Do you know the most powerful thing about Javascript? Spoiler Alert, It is not asynchronicity, first-class citizen principles, not even my favorite, closures. While all of these make javascript a delight, what makes javascript powerful is not focusing on attaining power. Javascript is not power-hungry by design.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Javascript in its vanilla form does not intend to provide you with capabilities touching skies and jumping oceans. That is where the amazing dev community along with packages breaks into the scene, bringing in powers from dark dimensions, Human Batteries, Arc Reactor, and who knows where else.&lt;/p&gt;

&lt;p&gt;Yes, I exaggerated. Now that I have your attention, let’s dive deep into the perspective this blog aims to set. &lt;strong&gt;The core parts of javascript, widely popular and used, are not its own&lt;/strong&gt;. That still does not take away the joy of working with it and It is still technically javascript.&lt;/p&gt;

&lt;p&gt;This blog tries to answer its own title with a big Yes. It sets to establish "building for public "patterns while talking about javascript, modules, and publishing to npm. If you are still reading this blog, I assume you are familiar with what npm is. The exciting part of working in javascript (like many other languages) is the ability to share your work with others in a manner that they might use your work in their projects. Let’s begin with going over the basics of publishing your own module to npm, and then how to make use of that in a project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pilot: Getting hands dirty!
&lt;/h2&gt;



&lt;br&gt;
&lt;center&gt;   &lt;strong&gt; &lt;a href="//www.slideshare.net/HarshJoshi107/writing-a-npm-module" title="Writing a npm module"&gt;Writing a npm module&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="https://www.slideshare.net/HarshJoshi107"&gt;Harsh Joshi&lt;/a&gt;&lt;/strong&gt; &lt;br&gt;
&lt;/center&gt;
&lt;br&gt;
&lt;br&gt;

&lt;p&gt;That might have been fairly easy. If you see something not right there, it's only because you figured it out ;)&lt;/p&gt;

&lt;p&gt;A fun way to get started is by thinking small and smart. Before you begin writing your own modules, a good read would be how modules work in javascript, especially post ES6. You can find one &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Episode 2: The Code Isomer Conundrum
&lt;/h2&gt;

&lt;p&gt;Code isomers are two or more pieces of code that do the same work but differ in the way they are written. (Yes, I just made that up but it doesn't make it any less relevant)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0z-xn2AI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media-exp1.licdn.com/dms/image/C4E12AQHOD-NwXYWYHQ/article-inline_image-shrink_1000_1488/0/1627068966615%3Fe%3D1634774400%26v%3Dbeta%26t%3Dda3S7CGLaQvTMfOLD8y6SDXFlVhVd9WXoMKCIUDZTb4" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0z-xn2AI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media-exp1.licdn.com/dms/image/C4E12AQHOD-NwXYWYHQ/article-inline_image-shrink_1000_1488/0/1627068966615%3Fe%3D1634774400%26v%3Dbeta%26t%3Dda3S7CGLaQvTMfOLD8y6SDXFlVhVd9WXoMKCIUDZTb4"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the most fundamental example of it. When writing code that delivers much bigger the style developers use takes the shape of patterns. When writing modules that are intended for public use, a well-defined pattern reduces the headache of the person consuming that module. These patterns are categorically closer to the purpose of being used by anyone, anywhere and anytime than the language hence I call them &lt;strong&gt;"building for public patterns"&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Have you ever come across a cool npm package, the intention of which gave you a tickle, but the implementation could not? When you installed the package you could not really understand what does what, there was no documentation readily available and you ultimately had to drop it? Yes, it does not happen when Facebook releases react.js or any organization releases a big package. But out there are many developers working on pretty cool stuff, some of which unfortunately fails to abide by &lt;strong&gt;the rather misty de facto standards&lt;/strong&gt; of &lt;em&gt;releasing to the public&lt;/em&gt;. These misty de facto standards are what we introduce here as building for public patterns.&lt;br&gt;
There are two schools of thought on how to write code in any language. The first school of thought is that it should be written in a manner that is easily understood by the person who wrote it. The second school of thought is that it should be written in a fashion that is easily understood by the person who reads it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first school of thought is more often linked to the phrase &lt;strong&gt;"write self-documenting code"&lt;/strong&gt; and is often referred to as &lt;strong&gt;"write-what-you-know"&lt;/strong&gt; or &lt;strong&gt;"write-what-you-need"&lt;/strong&gt;. Regardless, it is a very common factor in programming, and it is often a necessity to write code this way when a project is small and the time of writing the code outweighs the time of reading it.&lt;/p&gt;

&lt;p&gt;The second school of thought is a little closer to what we just introduced as "building for public patterns" and is often linked to the phrase &lt;strong&gt;"write clean code"&lt;/strong&gt; and also called &lt;strong&gt;"write-what-you-need-to-know"&lt;/strong&gt;. It is also common to write code to be read by others. A programmer who is writing code that will be read by other programmers will write the code in a manner that is easily understood by the one who reads it. This is especially true when the code is in a highly complex area of the program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Building for public"&lt;/strong&gt; patterns somewhere introduce a new school of thought that is closer to the person consuming the code and not does not care much about how the actual code is written. In javascript, the concept of modules post ES6 pretty much standardizes this notion. However, much is still left on the developer to abide by. This includes naming the handlers, exporting, shaping the module, and much more. It also goes on further to include optimizing the size of the module, adding more weight to the &lt;strong&gt;"consumer-first"&lt;/strong&gt; approach of publishing your work.&lt;/p&gt;

&lt;p&gt;Let's assume you are sick of the native console API and you have promised yourself that you won't use console.log() again. You decide to write your own function which uses an API you build to send logs to your phone.&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;unConsoleLog&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&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;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;API_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;XXXX-XXX-XXX-XXXXX&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="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&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;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&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="nx"&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;Success:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&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="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&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="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&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;The idea becomes so exciting that you now want to make it accessible for public use. You decide to release this as an npm module.&lt;/p&gt;

&lt;p&gt;Can you think of the best possible way to release this to the public using &lt;strong&gt;"Building for Public"&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;to be completed...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next on "Can you make JS more powerful?"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consumer First principles in "Building for public" patterns.&lt;/li&gt;
&lt;li&gt;Encapsulation in JS and life before ES6&lt;/li&gt;
&lt;li&gt;"For and by the public" with open-source&lt;/li&gt;
&lt;li&gt;Making javascript powerful with your first module. (.js)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>node</category>
    </item>
    <item>
      <title>If being inaccessible was a crime, would you be arrested?</title>
      <dc:creator>Harsh Joshi</dc:creator>
      <pubDate>Sat, 14 Aug 2021 17:07:52 +0000</pubDate>
      <link>https://dev.to/josharsh/if-being-inaccessible-was-a-crime-would-you-be-arrested-3jj5</link>
      <guid>https://dev.to/josharsh/if-being-inaccessible-was-a-crime-would-you-be-arrested-3jj5</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SOqqHbSV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zv0qdzje509f33pgdzdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SOqqHbSV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zv0qdzje509f33pgdzdl.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sure, you had the right color scheme, a consistent theme and a UX backed by some thrilling research on where to place a UI element, or even used SSR-like principles for other fronts of user experience but &lt;strong&gt;will your web app be able to befriend a screen reader?&lt;/strong&gt; Being accessible is somehow left out of the comprehension of many designers and developers in the webspace. Although naturally, the concepts this blog sets to address are meant for web-based projects, application development should round the circle even better. A few of these will strike you the tallest if you have, maybe, some experience in app development.&lt;br&gt;
Find out and answer, &lt;strong&gt;"If being inaccessible was a crime, would you be arrested?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Accessible websites are crucial to the health of the internet. The more accessible a site is, the more people can reach it, use it, and enjoy it. The more people can reach, use, and enjoy a site, the more likely it is to be successful. The more successful the site is, the more likely it is to become a successful business.&lt;/p&gt;

&lt;h3&gt;
  
  
  But is that all accessibility means?
&lt;/h3&gt;

&lt;p&gt;The problem is that, if you are not aware of how to design your website in such a way that it becomes accessible for all, you might end up providing an inadequate experience to some users. Today’s world is &lt;strong&gt;“experience first”&lt;/strong&gt;. Many designers, developers, and web admins just are able to capture the essence of the experience for the general public. To add to it, there are many web design and development tools which abstract these for you. But the question is whether this is “captured” to an extent that the application running on the web is equally accessible to all?&lt;/p&gt;

&lt;p&gt;Sure, you had the right color scheme, a consistent theme and a UX backed by some thrilling research on where to place a UI element, or even used SSR-like principles for other fronts of user experience but will your web app be able to befriend a screen reader for a user who has visual challenges?&lt;/p&gt;

&lt;p&gt;The fundamental questions you can ask yourself to begin evaluation of accessibility in your application could be, "Will the app provide a smooth experience using a screen reader?", "Can someone navigate the application using keyboard only?". There are many other amazing ways people use the web.&lt;/p&gt;

&lt;p&gt;Here is an example - Some HTML elements have semantic meaning but no dedicated functionality. These include aside, footer, header, etc. This semantics serves the screen reader.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Did you know that elements can be described using the ARIA spec or a simple tabindex can help a user tab to an element? Another interesting concept is focus management which provides a necessary clue about the currently active item to the user. To learn more about such examples, and the foundation of web accessibility, this resource by Jon Kuperman might be a good starting point.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The matter, in many cases, is that being accessible is somehow left out of the comprehension of many designers and developers in the webspace. Although naturally, the concepts this blog sets to address are meant for web-based projects, application development should round the circle even better. A few of them will strike you the tallest if you have, maybe, some experience in app development.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do you dream of that fancy loader for your website? Yes, it has got animations, colors that flicker in and out. Or do you have the next idea for an animated 404 page?&lt;/p&gt;

&lt;p&gt;MDN says, "Content that flickers, flashes, or blinks can trigger photosensitive epilepsy. Web technologies that use video, animated gifs, animated png, animated SVGs, Canvas, and CSS or JavaScript animations are all capable of content that can induce seizures or other incapacitating physical reactions".&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Accessibility anyway?
&lt;/h3&gt;

&lt;p&gt;Accessibility is the responsibility of everyone involved in the development process. It is the responsibility of the designer, the developer, and the webmaster to make sure that the product is accessible. It is a moral and ethical issue as well as a legal one. Addressing accessibility in your processes and making it inclusive from the beginning serves more than one purpose.&lt;/p&gt;

&lt;p&gt;The Web is for everyone. Why shouldn't it be designed to be accessible to people with disabilities, including blindness and low vision, deafness and hearing loss, learning disabilities, cognitive limitations, limited movement, speech disabilities, photosensitivity, and many others?&lt;/p&gt;

&lt;p&gt;Accessibility is a combination of design, development, and strategy. A well-designed site can be easily made accessible, and an inaccessible site can be made accessible. It is a matter of the right processes and the right attitude. Accessibility is a commitment to a set of standards and guidelines that will ensure your content is visible to users with disabilities.&lt;/p&gt;

&lt;p&gt;To make your site accessible, you need to ensure that all the information you present can be accessed and used by anyone, regardless of any disability. You may need to include alternative text for images, provide text alternatives for audio and video content, and ensure that your site works with assistive technologies such as screen readers. &lt;/p&gt;

&lt;p&gt;Accessibility (Accessible Design) is a set of principles and practices that help make web content accessible to everyone including people with disabilities. It is also known as inclusive design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which Standards?
&lt;/h3&gt;

&lt;p&gt;World Wide Web Consortium (W3C) aims to lead the Web to its full potential by developing standards and guidelines that ensure the long-term growth of the Web. Accessibility is one of the core values of the W3C. The W3C's Web Accessibility Initiative (WAI) is the largest international industry consortium focused on improving the accessibility of the Web for people with disabilities.&lt;/p&gt;

&lt;p&gt;The WAI guides developers of websites and software, information architects, site designers, and others to make the Web accessible to people with disabilities. The WAI also provides education, outreach, testing tools, and resources to help developers make their products and services accessible to a wide range of people with disabilities&lt;/p&gt;

&lt;p&gt;There are several levels of conformance to accessibility guidelines. The most basic level is called "Level A". Level A conformance requires that your site can be used with a keyboard only. Achieving this level of conformance requires that all of the functionality of your site can be accessed with the keyboard and the page is readable. For example, if the user is required to click a link to access a page, the link must be keyboard accessible. The user must be able to navigate to the link and activate it using the keyboard.&lt;/p&gt;

&lt;p&gt;The next level is called "Level AA". Level AA conformance is a significant extension of Level A. Level AA conformance requires that all of the functionality of the site and any of the content can be used with the keyboard. This includes any images or buttons on the page. In addition, the page must be readable when using a screen reader. The page must also provide a way to navigate to any links on the page. This ensures that the page can be easily navigated using a screen reader.&lt;/p&gt;

&lt;p&gt;The third level is called "Level AAA". Level AAA conformance is the most stringent level of conformance. Level AAA requires that all of the functionality of the site can be used with the keyboard. This includes any images or buttons on the page. In addition, the page must be readable when using a screen reader. The page must also provide a way to navigate to any links on the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  But how do I evaluate my app?
&lt;/h3&gt;

&lt;p&gt;There are a lot of free tools available over the internet which run some automated tests on your web app and return an accessibility score. While this can be step zero to get started on evaluation but adherence and compliance to different levels of standardized accessibility levels ensure that your app does well on accessibility.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
