<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prasanna Koirala on Medium]]></title>
        <description><![CDATA[Stories by Prasanna Koirala on Medium]]></description>
        <link>https://medium.com/@prasannakoirala?source=rss-4cae76226465------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NyFSJndM_yDSvI03.</url>
            <title>Stories by Prasanna Koirala on Medium</title>
            <link>https://medium.com/@prasannakoirala?source=rss-4cae76226465------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:23:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prasannakoirala/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What you need to know about WEI (Web Environment Integrity)]]></title>
            <link>https://medium.com/@prasannakoirala/what-you-need-to-know-about-wei-web-environment-integrity-19736b8e4e00?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/19736b8e4e00</guid>
            <category><![CDATA[evil]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[wei]]></category>
            <category><![CDATA[firefox]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 22:24:56 GMT</pubDate>
            <atom:updated>2023-07-26T22:24:56.838Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TLDR</strong>:</p><p>Google has pushed WEI (Web Environment Integrity) in their chromium base. This is pure evil and it will change the way we are using the internet. It should be stopped immediately. If you use any chromium based browser (see below for more details) stop using them immediately and switch to Mozilla Firefox. Visit the links at the end of the post to know more.</p><p><strong>Full Story:</strong></p><p>Google pushed WEI (Web Environment Integrity) into the chromium base last week. So you might think, what is WEI (Web Environment Integrity)? What is a chromium? What are you even talking about?</p><p>Let’s start with chromium. Chromium is like an operating system in the world of browsers. There are lots of products that are created on top of an operating system. Examples would be google chrome, brave browser, Edge, Safari and so on… A cool fact to keep in mind during this read is that Chromium as a browser engine is responsible for more than 70% of browser users on the internet. So a chromium feature affects basically everyone.</p><p>WEI or Web Environment Integrity is a method by which the provider (normally a server, a website such as a bank’s website, or as a matter of fact any website) can identify that there is indeed a human behind the keyboard that’s using their website. This is done by sending your session information to an attester (middle-man), that will verify, based on your actions on that browser, if or not you are a human.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uV4-7Pyf11ZMtDYx" /></figure><p>According to the proponents of WEI, it is necessary to know that a web environment (your browser session) is indeed being used by a human for the following reasons:</p><ul><li>Users like visiting websites that are expensive to create and maintain, but they often want or need to do it without paying directly. These websites fund themselves with ads, but the advertisers can only afford to pay for humans to see the ads, rather than robots. This creates a need for human users to prove to websites that they’re human, sometimes through tasks like challenges or logins.</li><li>Users want to know they are interacting with real people on social websites but bad actors often want to promote posts with fake engagement (for example, to promote products, or make a news story seem more important). Websites can only show users what content is popular with real people if websites are able to know the difference between a trusted and untrusted environment.</li><li>Users playing a game on a website want to know whether other players are using software that enforces the game’s rules.</li><li>Users sometimes get tricked into installing malicious software that imitates software like their banking apps, to steal from those users. The bank’s internet interface could protect those users if it could establish that the requests it’s getting actually come from the bank’s or other trustworthy software.</li></ul><p>However, this is a big pretense to fulfill their own needs rather than having anything to do with user benefits. Rather it is beneficial to the providers (Netflix, Youtube, Google … ). Now they can figure out what sort of personality you have and can personalize your ads even more. As a user, you don’t need to give any more information to the provider than what you already are giving them. It is in their favor that they know you are a human that looks at a certain part of the screen so that they can show you an advertisement on that part of the screen.</p><p>[Side Story — you can avoid it: When news of Elon Musk’s Neural link was just making an entry in the market, we would joke about how after installing it, you would out of nowhere want to eat a Kitkat. That would be a hell of an advertisement. Welp, we are reaching there.]</p><p>Another way to look at it is to think of providers as something we invite into our system. We give them our laptops and CPUs to run their scripts on. It is not the other way around. Now they want our data and information for a service we are providing them? Yup, they live in your house and you pay the rent as well. Bullshit.</p><p>So have no second thoughts here. If such a thing comes into existence, it will be able to do the followings:</p><ul><li>Read your session and identify your personal preferences, your mouse movement patterns, your keystrokes, where you are looking on the screen or basically whatever they think needs to be tracked to identify if you are a human behind the keyboard. (Think being the keyword. They can think that they need to track what password you type to see if it is indeed a password created by humans. Obviously, this is a hyperbole, but you get the idea) This is an invasion of your privacy and you should be really worried about it.</li><li>Then comes the question of attestation. Who will do it? Is our data safe with this entity? Is it as simple as take data input, spit back yes human, no human or maybe human? How do you guarantee the data is safe with that entity and it would not sell it?</li><li>Worst of them all is long before you know it, the providers will start to take this as the new normal. If a browser doesn’t have the WEI implemented, the provider would not accept the connection. Imagine you having to access your bank only through the chrome browser. As soon as you open the browser, you are fed with ads that you can’t stop anymore.</li></ul><p>You might say something like: “What is wrong with this? They already were stealing our data. Nothing new here”. However, imagine the influence and manipulation you go through right now with limited data. If they are successful in making this the new normal, heed my words, we are all (sorry for my bad french here) fucked.</p><p>What can you do? Spread the word. Quit using chromium based browsers and start using Firefox.</p><p>List of a few chromium based browsers:</p><p>Opera, Microsoft Edge, Google Chrome, Vivaldi, Brave, Epic, SlimBrowser, Sleipnir, SRWare Iron, Torch, Comodo Dragon, Yandex Browser, Ungoogled-chromium, Falkon, Rockmelt, Blisk, Kiwi Browser — Fast &amp; Quiet, Samsung Internet, Opera GX, Avast Secure Browser, CoolNovo, Cent Browser, Cốc Cốc, Yandex Search</p><p>If you want to know more about WEI. visit here: <br><a href="https://github.com/RupertBenWiser/Web-Environment-Integrity/blob/main/explainer.md">https://github.com/RupertBenWiser/Web-Environment-Integrity/blob/main/explainer.md</a></p><p>A good start on WEI:<br><a href="https://vivaldi.com/blog/googles-new-dangerous-web-environment-integrity-spec/">https://vivaldi.com/blog/googles-new-dangerous-web-environment-integrity-spec/</a></p><p>The hackernews chats discussion:<br><a href="https://news.ycombinator.com/item?id=36876301">https://news.ycombinator.com/item?id=36876301</a></p><p>The actual change that everyone is pissed about (hint: scroll down to the comments):<br><a href="https://github.com/chromium/chromium/commit/6f47a22906b2899412e79a2727355efa9cc8f5bd">https://github.com/chromium/chromium/commit/6f47a22906b2899412e79a2727355efa9cc8f5bd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19736b8e4e00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find duplicate in 1..n+1 array in O(n) time and O(1) space complexity]]></title>
            <link>https://medium.com/@prasannakoirala/find-duplicate-in-1-n-1-array-in-o-n-time-and-o-1-space-complexity-bad517cfc198?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/bad517cfc198</guid>
            <category><![CDATA[duplicate]]></category>
            <category><![CDATA[continuous-number]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Sat, 29 Sep 2018 15:59:38 GMT</pubDate>
            <atom:updated>2018-09-29T17:21:59.888Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The problem:</strong><br>You have 1..n numbers in a n+1 length array. With exactly one duplicate in it. You need to find this duplicate value in O(n) time complexity (i.e with only one iteration) and O(1) space complexity (you can make variables but can not duplicate the array or make an object/dictonary that holds track of numbers already seen)</p><p><strong>The solution:<br> </strong>Before you jump to the solution. Try to figure it out by yourself.</p><pre>const a = [2,4,1,3,6,7,5,8,9,12,14,13,11,10,15,17,16,18,19,20,11];<br>let nextIndex;<br>for (let i=0; i&lt;a.length; i += 1) {<br>  nextIndex = Math.abs(a[i]) - 1;<br>  if (a[nextIndex] &lt; 0) {<br>    console.log(&#39;the duplicate value is&#39;, Math.abs(a[i]));<br>  }<br>  a[nextIndex] *= -1;<br>}</pre><p><strong>The explanation:<br></strong>What it basically does is: it sets the index of the number it sees into negative. i.e in the first iteration we see 2 so we set the 2nd number negative. Now the 2nd number is -4 .</p><p>Before actually setting the number negative, we check if it was negative in the first place. I have a duplicate 11 in the list; so the first encounter with 11 will set the 11th item in the list i.e 14 as -14 . The 2nd encounter is at the last of the array. When it sees that 11th position is already negative . It now knows that 11 was the duplicate value .</p><p><strong>Extras</strong>: nextIndex is Math.abs(a[i]) -1 because a[i] could be negative due to others elements. -1 because we are going with 0 indexed list.</p><p><strong>Note: </strong>This doesn’t work if negative numbers are involved in the list as well. If you want to make that work, you would need to shift your origin from the lowest negative number available. Say if we are to find duplicate in a -n..+n array . We would shift the origin by +n so the array is converted to 0..2n . And if our duplicate is say m we unshift our origin and our result is m-n .</p><p><strong>Example :</strong></p><pre>Array = [-4,0,1,2,3,4,-1,-2,-3,-4];<br>--------------------------------^------<br>                      I am the duplicate value</pre><pre>shiftedArray = [0,4,5,6,7,8,3,2,1,0] // add +4 to every element<br>duplicate = findDuplicateFromPrevMethod(shiftedArray)<br>duplicate = <strong>0 (present sir)</strong></pre><pre>actualDuplicate = 0 - 4 <strong>= -4</strong> (unshifting the origin)</pre><p><strong>What you might be thinking</strong></p><p>“Wait! you just made a new array! O(1) you say, bullshit! ”. Hold your horses dear readers. While you may need to add in another O(n) iteration before you actually start the actual algorithm, you certainly do not have to make another array. You can mutate the existing array itself. And the solution will still be called O(n) even if there are 2 O(n) iterations present in the code.</p><p><strong>Lastly</strong></p><p>This is it, the moment of reveletion is here. If you have anything in contrast with the provided solution feel free to comment in the comments section below. There are typos here and there; I would like you to act as a grammer nazi and point them out so that I can fix them.</p><p>Good Day dear readers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bad517cfc198" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Collapsible forced rendering in d3 with nodes and links data]]></title>
            <link>https://medium.com/@prasannakoirala/collapsible-forced-rendering-in-d3-with-nodes-and-links-data-b31e8c0a33de?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/b31e8c0a33de</guid>
            <category><![CDATA[collapsible-nodes]]></category>
            <category><![CDATA[d3]]></category>
            <category><![CDATA[forced-layout]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Fri, 11 May 2018 19:48:56 GMT</pubDate>
            <atom:updated>2018-05-11T20:44:36.225Z</atom:updated>
            <content:encoded><![CDATA[<p>This was a personal challenge I encountered. If the title is not explanatory enough, this article will run you through collapsible rendering in d3. Now that is something we have already seen . But most of us have seen it in tree structure data. That is, when the data looks something like this</p><pre>graphData = {<br>  name: &#39;parent&#39;,<br>  children: [<br>   {name: &#39;child1&#39;, size: 10},<br>   {name: &#39;child2&#39;, size: 16},<br>   {name: &#39;child3&#39;, size: 20},<br>  ]<br>}</pre><p>In this case , we just make a dummy _children variable that temporarily holds the children and then switches between children and _children .</p><p>A more challenging aspect of this collapsible forced rendering is , doing it when the data looks something like this:</p><pre>graphData = {<br>  nodes: [<br>    {id: &#39;node1&#39;, group: 1, show: true},<br>    {id: &#39;node2&#39;, group: 2, show: true},<br>    {id: &#39;node3&#39;, group: 2, show: true},<br>    {id: &#39;node4&#39;, group: 2, show: true },<br>    {id: &#39;node5&#39;, group: 3, show: true},<br>  ],<br>  links: [<br>    {source: &#39;node1&#39;, target: &#39;node2&#39;, value: 5, show: true},<br>    {source: &#39;node1&#39;, target: &#39;node3&#39;, value: 10, show: true},<br>    {source: &#39;node1&#39;, target: &#39;node4&#39;, value: 15, show: true},<br>    {source: &#39;node2&#39;, target: &#39;node5&#39;, value: 2, show: true},<br>  ]<br>}</pre><p>This is more challenging because:</p><ul><li>We do not have children attribute for nodes.</li><li>The depth of the path (links) is not known for sure. For example if node1 is collapsed, we will have to collapse the immediate children: node2, node3 and node4 as well as other children of the children we just collapsed, in this case node5 (which is a children of node2)<br>[<strong>NOTE: </strong>the show: true part will be used later in the code ]</li></ul><p>Our code would look something like this:</p><pre>drawGraph = () =&gt; {</pre><pre>/* ... PLEASE FILL IN THE REMAINING CODE BY YOURSELF ... */</pre><pre>// making nodes and link part, functions below<br>  const nodes = drawNodes(graphData);<br>  const links = drawLinks(graphData);</pre><pre>// the simulation part<br>  const simulation = forceSimulation()<br>    .force(&#39;link&#39;, forceLink()<br>      .id(d =&gt; d.id)<br>      .strength(0.07)<br>    )<br>    .force(&#39;center&#39;, forceCenter(width / 2, height / 2));<br>  // please set width and height by yourself as well</pre><pre>simulation<br>   .nodes(graph.nodes)<br>   .on(&#39;tick&#39;, () =&gt; this.ticked(links, nodes));</pre><pre>/* <br>    PLEASE MAKE THE TICK FUNCTION YOURSELF AS WELL<br>  */</pre><pre>simulation.force(&#39;link&#39;).links(graph.links);<br>}</pre><p>Now come interesting parts:</p><pre>drawNode = (graphData) =&gt;<br>  svg.append(&#39;g&#39;)<br>  .attr(&#39;class&#39;,&#39;nodes&#39;)<br>  .selectAll(&#39;circle&#39;)<br>  .data(graphData.nodes.filter(n =&gt; n.show)) // note here<br>  .enter()<br>  .append(&#39;circle&#39;)<br>  .style(&#39;cursor&#39;, &#39;pointer&#39;)<br>  .on(&#39;click&#39;, d =&gt; {<br>    if (d.showChildren) { // it is false for all the nodes by default<br>      toggleVisibilityOfNodesAndLinks(graphData, d, true);<br>      d.showChildren = false;<br>    } else {<br>      toggleVisibilityOfNodesAndLinks(graphData, d, false);<br>      d.showChildren = true;<br>    }<br>    reRenderGraph();<br>  }<br>});</pre><p>And the drawLinkspart</p><pre>drawLink = (graphData) =&gt;<br>  svg<br>    .append(&#39;g&#39;)<br>    .attr(&#39;class&#39;, &#39;links&#39;)<br>    .selectAll(&#39;line&#39;)<br>    .data(graphData.links.filter(n =&gt; n.show)) // note here as well<br>    .enter()<br>    .append(&#39;line&#39;)<br>    .attr(&#39;stroke-width&#39;, d =&gt; d.value)</pre><p>Now all that remains is toggleVisibilityOfNodesAndLinks and reRenderGraph functions. Before that let me explain what we are doing.</p><p>We are only using those links or nodes that have a show: true parameter included on them. From the toggleVisibilityOfNodesAndLinks we will alternate the show variable and from the reRenderGraph we will just re render the graph itself;</p><pre>toggleVisibilityOfNodesAndLinks = (graph, d, visibility) =&gt; {<br>  const parents = [d.id];<br>  let loopCount = 0;<br>  while (parents.length &gt; 0) {<br>    const parent = parents.shift();<br>    graph.links.forEach(link =&gt; {<br>      if (link.source.id === parent) {<br>        link.show = visibility;<br>        parents.push(link.target.id);<br>      }<br>    });</pre><pre>    graph.nodes.forEach(node =&gt; {<br>      if (node.id === parent &amp;&amp; loopCount !== 0) {<br>        node.show = visibility;<br>      }<br>    });<br>    loopCount += 1;<br>  }<br>};</pre><p>We are using link.source.id instead of link.source because d3 will have associated the source with an object that will have the exact data of the source node that we have defined under our nodes parameter in the graphData</p><p>Let me explain the code in points (it would be easier that way)</p><ul><li>We hide/show the link originated from the parent itself.</li><li>We add the nodes that the link points to as a parent</li><li>We hide/show the nodes that are parent (except for the first one)</li><li>We repeat until we have no parent</li></ul><p>Finally the reRenderGraph part</p><pre>reRenderGraph = () =&gt; {<br>  svg.selectAll(&#39;.nodes&#39;).remove();<br>  svg.selectAll(&#39;.links&#39;).remove();<br>  this.drawGraph();<br>};</pre><p>And this concludes everything. Let me know if there is trouble anywhere. But remember that this article doesn’t provide a full copy paster. You can copy and paste the toggleVisibilityOfNodesAndLinks function and the show/hide logic but not the whole setup.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b31e8c0a33de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up a react/redux project from scratch with api calls]]></title>
            <link>https://medium.com/@prasannakoirala/setting-up-a-react-redux-project-from-scratch-with-api-calls-f6ff2b37f783?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6ff2b37f783</guid>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[ajax]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Sun, 25 Mar 2018 04:01:53 GMT</pubDate>
            <atom:updated>2018-03-25T05:08:47.589Z</atom:updated>
            <content:encoded><![CDATA[<p>It is really a very tedious thing to set your project up from the start, especially if it is a JavaScript project. JavaScript has evolved so massively in these small years, that even a veteran developer would be lost in a battle of keeping himself updated with everything.</p><p>React falls into the category of such technologies. Not even a decade has passed since Facebook first implemented react in their timeline feature and it has grown even since with no sight of declining as of now. This walkthrough will guide you through the initial setup of React and assumes that you know basics of it.</p><p>Redux on the other hand is a state-cum-flow management container for JavaScript applications. I am assuming you know about redux as well. <br>So without further ado, let us start our walkthrough of setting up a react/redux project from scratch.</p><ul><li><strong>Setting up an NPM project<br></strong>NPM stands for Node Package Manager. If you are familiar with python, NPM is sorta like PIP, but for JS. It lets us make projects, easily install dependencies (packages) and run various scripts within our project.<br>Since NPM runs on top of Node, you will need Node in your system. <br>You can get both Node and NPM from <a href="https://docs.npmjs.com/getting-started/installing-node#1-install-nodejs--npm">here</a>.</li></ul><p>Once you have Node and NPM installed, go to your project folder and simply type npm init in your terminal. You will now be guided through a series of questions regarding your project. Once you are all done, you should have something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nBua7pOmYWKUFe_XDEGUuA.png" /></figure><ul><li><strong>Installing react, webpack, redux and babel</strong></li></ul><pre><em>npm i -s react react-dom<br>npm i -sD webpack-dev-server webpack webpack-cli<br>npm i -s redux react-redux<br>npm i -sD babel-core babel-loader babel-preset-env babel-preset-react</em></pre><p>What we just did is we installed react, react-dom, webpack and webpack-dev-server into our setup. Next we installed redux and react-redux. We will see the difference between those in a while. <br>And finally we installed babel-core and its presets. Recently babel introduced a new preset called <em>babel-preset-env</em>, that will <strong>compile every es15+ code down to es15</strong> without the need of adding <em>preset-2015, preset-2016</em> as we did in the past. <br>Note that babel and webpack dependencies were added with <em>-sD</em> option while others just <em>-s. <br>-s</em> says <em>save in package.json</em> while <em>-sD</em> says <em>save in package.json but as dev dependencies. </em>Dev dependencies are not used in production and only used during development.</p><p><strong>EXTRA (CSS, Style loader)<br></strong>This is not needed for the minimal setup, but is recommended. If you have no quarrels with css loaders, you should do this as well. To install css loaders simply type</p><pre><em>npm i -sD </em>css-loader style-loader</pre><p>Once you are done with everything, your package.json will look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*4U7Xtzt8tw2D0NvcAKTF-Q.png" /></figure><p>Of course if you did not install css-loader and style-loader , you will not see those two in the devDependencies section.</p><p><strong>The whole point of saving dependencies into package.json ( with the -s flag ) is that if someone other than you try to use your setup, he/she will simply have to type in </strong><strong><em>npm install</em> and all the dependencies will be loaded to his system.</strong></p><p>Now that we have installed all the dependencies, we will start with the configurations.</p><p><strong>NOTE: [<br><em>If you have any confusion relating the folder structure, just scroll down a little I have provided an image that says how the folder structure look like. I have tried to make it as flat as possible for beginners to understand. Hence those who have a relatively better knowledge about it , please bear with me.</em><br></strong>]</p><ul><li><strong>Webpacks configuration<br></strong>The webpack by default looks into a <em>webpack.config.js </em>file; which will reside along with your package.json i.e. in your root folder. The file will look like this</li></ul><pre>var path = require(&#39;path&#39;); // to use path.join<br>module.exports = {<br>  entry: &#39;./index.js&#39;,<br>  output: {<br>    filename: &#39;bundle.js&#39;,<br>    path: path.join(__dirname, &#39;production&#39;)<br>  }<br>}</pre><p>Here we tell the webpack to make a <em>bundle.js</em> file inside a <em>deployment </em>folder that we will be using in deployment setup.</p><p>Now we specify the webpack about our loaders so that , when we import files in our project , webpack knows which loader to use to load those files.</p><pre>var path = require(&#39;path&#39;); // to use path.join<br>module.exports = {<br>  entry: &#39;./index.js&#39;,<br>  output: {<br>    filename: &#39;bundle.js&#39;,<br>    path: path.join(__dirname, &#39;production&#39;)<br>  },<br>  module:{<br>    rules:[<br>      {test: /<strong>\.</strong>js?$/, loader: &#39;babel-loader&#39;, exclude: /node_modules/},<br>      {test: /<strong>\.</strong>css$/, use: [&#39;style-loader&#39;, &#39;css-loader&#39;]}<br>    ]<br>  }<br>}</pre><p>The exclude part is where we are telling the webpack that we don’t want to use babel loader with our node_modules. This is strongly recommended as the dependencies may or may not be compatible with babel. Since we are <em>npm installing </em>everything, they are tested and are supposed to work. We don’t need to know what actually happens inside node_modules as long as our code works outside of it.</p><ul><li><strong>Babel configuration<br></strong>Just like webpack looks for webpack.config.js file , babel looks for <em>.babelrc </em>file. Make a <em>.babelrc </em>file along with your webpack.config.js file</li></ul><pre>{&quot;presets&quot;: [&quot;env&quot;, &quot;react&quot;]}</pre><p>Now let us make our <em>index.html </em>file which we will be loading into our browser. Let us put this index.html in our root director along with our <em>webpack.config.js</em> and <em>.babelrc</em></p><pre>&lt;html&gt;<br>  &lt;head&gt;<br>   &lt;title&gt;Hello World&lt;/title&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>   &lt;div id=&quot;reactDiv&quot;&gt;&lt;/div&gt;<br>   &lt;script src=&quot;bundle.js&quot;&gt;&lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>Now let us make our <em>index.js </em>file. That would look something like this. Note that we have webpack to use the index.js file that is in the root folder i.e. just along the webpack.config.js file.</p><pre>import {render} from &#39;react-dom&#39;;<br>import React from &#39;react&#39;;<br>import &#39;./styles/style.css&#39;;</pre><pre>class HelloWorld extends React.Component {<br>  render() {<br>    return (<br>      &lt;div className=&quot;mainDiv&quot;&gt;<br>        &lt;h1&gt;Hello World&lt;/h1&gt;<br>        &lt;p&gt; This is a simple hello world example &lt;/p&gt;<br>      &lt;/div&gt;<br>    );<br>  }<br>}</pre><pre>render(&lt;HelloWorld/&gt;, document.getElementById(&#39;reactDiv&#39;));</pre><p>So as you noticed we are using a <em>import ‘./styles/style.css’ </em>statement, now we make a style folder inside which we make a style.css file</p><pre>.mainDiv {<br>  background-color:pink;<br>  text-align: center;<br>}</pre><pre>.mainDiv h1 {<br>  color: blue;<br>}</pre><pre>.mainDiv p {<br>  color: yellow;<br>}</pre><p>If you are confused about the folder structure, it will look something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*qHgfLCqIcjkCczUhRtDwlQ.png" /><figcaption>The folder structure till now</figcaption></figure><p>Once we are done with everything, one final step is to add a run script in our package.json file.</p><pre>&quot;scripts&quot;: {<br>  &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,<br>  &quot;start&quot;: &quot;webpack-dev-server --mode development&quot;<br>}</pre><p>Now all we have to do is npm start and open <em>localhost:8080</em> in our browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9R45MedI1Kpo0A3UemMaJg.png" /><figcaption>How it looks in the browser</figcaption></figure><p>You can so have webpack build you something and separately load your html. This is generally done for production. You just have to make your package.json scripts as</p><pre>&quot;scripts&quot;: {<br>  &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,<br>  &quot;start&quot;: &quot;webpack-dev-server --mode development&quot;,<br>  &quot;build&quot;: &quot;webpack --mode production&quot;<br>}</pre><p>Then you have to run <em>npm run build </em>in your terminal. And then copy paste your index.html to your production folder. Just like that.</p><p>We have now setup a simple react app. Now what we need to do is add in the <em>redux </em>part into our code</p><p>We will start with the code itself, we will be adding an <em>action dispatch </em>in our code. So now our index.js looks like this:</p><pre>import {render} from &#39;react-dom&#39;;<br>import React from &#39;react&#39;;<br>import {connect} from &#39;react-redux&#39;;<br>import {bindActionCreators} from &#39;redux&#39;;<br>import &#39;./styles/style.css&#39;;</pre><pre>const clickHandlerActionCreator = () =&gt; {<br>  return {<br>    type: &#39;CLICK_ME&#39;,<br>  }<br>};</pre><pre>class HelloWorld extends React.Component {<br>  handleButtonClick = () =&gt; {<br>    this.props.clickHandlerActionCreator();<br>  }</pre><pre>  render() {<br>    return (<br>      &lt;div className=&quot;mainDiv&quot;&gt;<br>        &lt;h1&gt;Hello World&lt;/h1&gt;<br>        &lt;p&gt; This is a simple hello world example &lt;/p&gt;<br>        &lt;button onClick={this.handleButtonClick}&gt; Click Me &lt;/button<br>        {<br>          this.props.message &amp;&amp; <br>          &lt;p&gt; The message is {this.props.message} &lt;/p&gt;<br>        }      <br>      &lt;/div&gt;<br>    );<br>  }<br>}</pre><pre>const mapStateToProps = (state) =&gt; {<br>  return {<br>    message: state.message,<br>  }<br>}</pre><pre>const mapDispachToProps = (dispatch) =&gt; {<br>  return bindActionCreators({<br>    clickHandlerActionCreator<br>  }, dispatch);<br>};</pre><pre>const RenderWithConnect = connect(<br>  mapStateToProps, mapDispachToProps,<br>)(HelloWorld);</pre><pre>render(RenderWithConnect, document.getElementById(&#39;reactDiv&#39;));</pre><p>There are a few new things we can see.</p><ol><li><em>connect</em> and <em>bindActionCreator</em></li><li><em>mapStateToProps</em> and <em>mapDispatchToProps</em></li><li><em>button </em>and its <em>onClick </em>event</li></ol><p>Let us move onto the explanation:<br>The <em>connect</em> given by <em>react-redux</em> is a <em>higher order component (HOC)</em>. It will wrap our <em>HelloWorld</em> component such that our component will be able to access the<br>1.) <em>Global Redux State </em>as <em>props</em> to our component (the conditional rendering in our render method is using <em>this.props.message </em>that is obtained after we have mapped the <em>Global Redux State</em> to props via our <em>mapStateToProps </em>function)<br>2.) Will allow us to <em>dispatch action creators </em>via the props as well. We are mapping functions as dispatch-able props from our <em>mapDispatchToProps function. </em>Which in turn uses the <em>bindActionCreator </em>functionality provided by the redux library.</p><p>Apart from these two things we have introduced a <em>button , </em>which will on click dispatch a function <em>clickHandlerActionCreator. </em>The type that our action creator has returned is now searched in our <strong>reducer</strong>.</p><p>Now we make a folder called reducers in our root folder and have a index.js file there, which will look like this.</p><pre>export const initialState = {<br>  message: &#39;&#39;,<br>}</pre><pre>export default function (state=initialState, action) {<br>  if (action.type === &#39;CLICK_ME&#39; ) {<br>    return {<br>      ...state,<br>      message: &#39;I am a new message&#39;,<br>    };<br>  }<br>  return state;<br>}</pre><p>Our Reducer will always have an initialState. And we will be checking for the type of actions that we dispatch all along our project and change our global redux state accordingly. <br><strong><em>Note that the reducers must be pure functions. It must not mutate the state. The three dots your see (… state) is called the spread operator. It ensures that we don’t mutate our state and just return the state with a modified message field.</em></strong></p><p>The spread operator is not recognized by babel by default. So we will change our <em>.babelrc </em>file to:</p><pre>{&quot;presets&quot;: [&quot;env&quot;, &quot;react&quot;, &quot;stage-1&quot;]}</pre><p>The stage-1 preset is what lets babel know about spread operators being used.</p><p>Now that we have our reducer we have to register this reducer to our store so that we can actually catch the dispatched actions. So let us create our store. Let us make a folder called store and inside that we shall have an index.js file which will look like this:</p><pre>// npm package<br>import { createStore } from &#39;redux&#39;;</pre><pre>// our Reducers<br>import Reducers, {initialState} from &#39;../reducers/index&#39;;</pre><pre>const store = createStore(Reducers, initialState);</pre><pre>export default store;</pre><p>The folder structure will look something like this till now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*nLInXRDiXzW0apytc7WvUQ.png" /><figcaption>folder structure till now</figcaption></figure><p>Now that we have our store, we need to use it.</p><p>Here is a confusing part now, what we will do is we will copy and paste the whole <em>index.js </em>into a <em>src/index.js</em> file. So let us make a src folder. And inside the src folder we will have an index.js file which will look like this:</p><pre>import React from &#39;react&#39;;<br>import {connect} from &#39;react-redux&#39;;<br>import {bindActionCreators} from &#39;redux&#39;;<br>import &#39;../styles/style.css&#39;;</pre><pre>const clickHandlerActionCreator = () =&gt; {<br>  return {<br>    type: &#39;CLICK_ME&#39;,<br>  }<br>};</pre><pre>class HelloWorld extends React.Component {<br>  handleButtonClick = () =&gt; {<br>    this.props.clickHandlerActionCreator();<br>  }</pre><pre>render() {<br>    return (<br>      &lt;div className=&quot;mainDiv&quot;&gt;<br>        &lt;h1&gt;Hello World&lt;/h1&gt;<br>        &lt;p&gt; This is a simple hello world example &lt;/p&gt;<br>        &lt;button onClick={this.handleButtonClick}&gt; Click Me &lt;/button&gt;<br>        {<br>          this.props.message &amp;&amp; <br>          &lt;p&gt; The message is {this.props.message} &lt;/p&gt;<br>        }      <br>      &lt;/div&gt;<br>    );<br>  }<br>}</pre><pre>const mapStateToProps = (state) =&gt; {<br>  return {<br>    message: state.message,<br>  }<br>}</pre><pre>const mapDispachToProps = (dispatch) =&gt; {<br>  return bindActionCreators({<br>    clickHandlerActionCreator<br>  }, dispatch);<br>};</pre><pre>export default connect(<br>  mapStateToProps, mapDispachToProps,<br>)(HelloWorld);</pre><p>Everything else is the same except for:<br>1) removed <em>render import statement . <br></em>2) changed ‘./styles/style.css’ to &#39;../styles/style.css&#39;since we have moved inside the <em>src </em>folder <br>3) changed const RenderWithConnect = connect(... to export default connect(... <br> 4)render(RenderWithConnect, document.getElementById(‘reactDiv’)) statement removed</p><p>The <em>index.js</em> in our root directory will now be changed to</p><pre>import React from &#39;react&#39;;<br>import {render} from &#39;react-dom&#39;;<br>import {Provider} from &#39;react-redux&#39;;<br>import HelloWorld from &#39;./src/index&#39;;<br>import Store from &#39;./store/index&#39;;</pre><pre>render(<br>  &lt;Provider store={Store}&gt;<br>    &lt;HelloWorld /&gt;<br>  &lt;/Provider&gt;,<br>  document.getElementById(&#39;reactDiv&#39;)<br>);</pre><p><strong><em>Provider</em></strong> is a react class that is using the store and detecting any action dispatches from its children (for our case our <em>HelloWorld</em> component). It will be using the store and will be updating it using the reducers.</p><p>You can notice that we are still importing React even though we are not using it. This is because the jsx we just rendered is converted to a method React.createElement by babel. And so we need to have a react import in our files where we are using jsx.</p><p>Let us look at our folder structure once more</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*8dMuMLfq1WK17vQ9oFq86Q.png" /><figcaption>folder structure after copying the index.js file</figcaption></figure><p>Now that we have setup our <em>redux flow </em>let us run our app. We type npm start in our terminal and open localhost:8080.</p><p>What we have now is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*BpGJYjOHgIckJ-urHN_5dg.png" /><figcaption>Before Click Me</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*4UwSb-XKtHRmyMXT1AzHLQ.png" /><figcaption>After Click Me</figcaption></figure><p>Now we are done with our react-redux setup, what we need now is the <em>api call integration.</em></p><p>Let us use <em>Ajax </em>for our api calls npm i -s ajax .</p><p>And import that right away in our <em>src/index.js.</em></p><pre>import Ajax from &#39;ajax&#39;;</pre><p>Now define a prop called <em>fetchApiData</em> in our mapDispachToProps method</p><pre>const mapDispachToProps = (dispatch) =&gt; {<br>  return bindActionCreators({<br>    clickHandlerActionCreator,<br>    fetchApiData: () =&gt; fetchApiData(dispatch),<br>  }, dispatch);<br>};</pre><p>Since we have defined a <em>fetchApiData </em>function let us write that in our src/index.js file. Just below the <em>clickHandlerActionCreator</em> function;</p><pre>const fetchApiData = (dispatch) =&gt; {<br>  return dispatch =&gt; Ajax.get(<br>    &#39;https://jsonplaceholder.typicode.com/posts/1&#39;,<br>    undefined,<br>    (response) =&gt; {<br>      return dispatch({<br>        type: &#39;FETCH_FINISH&#39;,<br>        payload: response,<br>      })<br>    }<br>  )<br>}</pre><p>Note that I have used ‘<a href="https://jsonplaceholder.typicode.com/posts/1">https://jsonplaceholder.typicode.com/posts/1</a>’ to get my response from. If in future this url changes to something else, please google for free get apis. And replace the endpoint with that url.</p><p>Let us use this <em>apiMessage </em>in our <em>HelloWorld </em>module. In the render method of src/index.js add a button and onClick handler with it</p><pre>render() {<br>  return (<br>    &lt;div className=&quot;mainDiv&quot;&gt;<br>      &lt;h1&gt;Hello World&lt;/h1&gt;<br>      &lt;p&gt; This is a simple hello world example &lt;/p&gt;<br>      &lt;button onClick={this.handleButtonClick}&gt; Click Me &lt;/button&gt;<br>      &lt;button onClick={this.fetchApiData}&gt; Fetch Api Data &lt;/button&gt;<br>      {this.props.message &amp;&amp; &lt;p&gt; The message is {this.props.message} &lt;/p&gt;}<br>      {this.props.apiMessage &amp;&amp; &lt;p&gt; The api response is<br>      {this.props.apiMessage} &lt;/p&gt;}<br>    &lt;/div&gt;<br>  );<br>}</pre><p>And the <em>fetchApiData</em> method just below the <em>handleButtonClick</em> method</p><pre>fetchApiData = () =&gt; {<br>   this.props.fetchApiData();<br>}</pre><p>Noticed the this.props.apiMessage text ?? We have to map that to our props as well. Hence our <em>mapStateToProps</em> method would go like this</p><pre>const mapStateToProps = (state) =&gt; {<br>  return {<br>    message: state.message,<br>    apiMessage: state.apiMessage,<br>  }<br>}</pre><p>Now we have to write the subsequent reducer for our action ‘FETCH_FINISH’, so the reducer will go like this (reducers/index.js file)</p><pre>export const initialState = {<br>  message: &#39;&#39;,<br>  apiMessage: &#39;&#39;,<br>}</pre><pre>export default function (state=initialState, action) {<br>  if (action.type === &#39;CLICK_ME&#39; ) {<br>    return {<br>      ...state,<br>      message: &#39;I am a new message&#39;,<br>    };<br>  } else if (action.type === &#39;FETCH_FINISH&#39;) {<br>    return {<br>      ...state,<br>      apiMessage: JSON.stringify(action.payload),<br>    }<br>  }<br>  return state;<br>}</pre><p>Now the thing with redux is that, it doesn’t support async dispatches by default. And if you are familiar with api calls , you know that they are async operations i.e. it takes some time before we get the response after we have called the api. So, we tweak our <em>store/index.js</em> a bit.</p><p>Before that run npm i -s redux-thunk . <em>Redux-thunk</em> lets us dispatch our actions asynchronously. We then change our <em>store/index.js</em> to something like this.</p><pre>// npm packages<br>import {createStore, compose, applyMiddleware} from &#39;redux&#39;;<br>import thunk from &#39;redux-thunk&#39;;</pre><pre>// our Reducers<br>import Reducers, {initialState} from &#39;../reducers&#39;;</pre><pre>const store = createStore(<br>  Reducers, <br>  initialState,<br>  compose(applyMiddleware(thunk))<br>);</pre><pre>export default store;</pre><p>Once we have done everything, we can now npm start . And open <em>localhost:8080</em> in our browser.</p><p>Final look at our app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fkqsVIMoVWnmVKOGW4O-Gw.png" /><figcaption>New look with fetch api data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*YFf16FNFZo-iRne-2qP-Sg.png" /><figcaption>New look with click me clicked</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtk46PIQdt_TIfdNgGjZzQ.png" /><figcaption>New look with fetch api data clicked</figcaption></figure><p>I guess that sums the entire walthrough. If you want the complete source code you can find it <a href="https://github.com/Pkoiralap/React-Redux-Api-Setup">here</a>.</p><p>There may exist faults in this whole tutorial/setup. Point my faults in the comments below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6ff2b37f783" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Outdated Education System]]></title>
            <link>https://medium.com/@prasannakoirala/outdated-education-system-aff1f06b114f?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/aff1f06b114f</guid>
            <category><![CDATA[system]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Mon, 27 Nov 2017 17:26:08 GMT</pubDate>
            <atom:updated>2017-11-27T17:26:08.764Z</atom:updated>
            <content:encoded><![CDATA[<p>“Why do I need to study this ?” is one of the most common question a student asks him. If you ask yourself the same question, do not worry; for you are one among the billions that ask themselves the same question. But why do we even ask ourselves the question ? Isn’t our education system built over thousand years of solid foundation and proven resultful until now ?</p><p>Well here is the catch. We have advanced so rapidly in the past century that the education that we learnt a hundred years ago, has become <strong>trivial</strong>. On one hand where we do need to learn about our education history, basing the whole system on history alone is rudimentary.</p><p>If we think about this issue a little more, the old time schooling was more useful to the us-of-now.<br>In old Hindu civilization there existed ‘Gurukuls’(schools if you may). You were sent there, you lived(hostel) with your ‘Guru’ (teacher) with other pupils and you served your ‘Guru’. In return you would get ‘Sikhshya’ (education) that helped you be a better man. The ‘Gurus’ taught you combat, reading, writing, literature, arts, music and in addition to all these things, they taught you how to survive in the real world. For example: Say your village had a big pond where lived lots of fishes, the ‘Guru’ would teach you how to fish. All in all, it was not where they mass produced students who were capable of solving a complex algebraic simplification. The students would learn real life lessons from their ‘Gurus’. The ‘Gurus’ would impart you with lessons that they felt their student needed. So in a sense , the education system was <strong>very flexible</strong> and the students learning from a certain ‘Guru’ could have had a totally different set of knowledge from a student learning from another ‘Guru’. Simply because there was no need of knowing the same set of knowledge. So we can assume that the education was need based and not <strong>something not of need was not taught.</strong></p><p>The modern world Education System however, is very fixed. You go to a class of 20–80 students. You have a teacher for every subject you take. You learn the same thing that your seniors had learned. You have a standardized set of questions prepared for you; a lot of which, you already know. If you are sure about the questions that are going to be asked, how are you learning and exploring ? It is solely based on <strong>rote learning, </strong>and <strong>memorization power</strong>. But in an age where information is accessible in a moments of time with some words typed, why are we so focused on making our children memorize all those shitty facts and dates of historians that died millenniums ago ? We should be teaching our children how to search for those facts instead of making them memorize all those facts.<br>I am not saying the old ‘Gurukuls’ are an example of a better education system than the modern schools we go to, but may be it was/is more practical than the modern system.</p><p>The education system we follow today, was introduced in the <strong>industrial era</strong>. We had the need of mass producing manpower that would know how to operate a machine, or how to fix it if it broke. Hence, we taught everyone the same thing. How are we supporting our children then to be different ? We want them to be same to every other children that go to the same class. But you see, humans are different to one another. We complement each other in ways that make our lives easier. Some are engineers, some great doctors , some are lawyers and even pilots. But they all eat things cooked by a cook, listen to a musicians and watch actors in the theater owned by a businessman. We do have institutes that teach us to be engineers, doctors and chefs and musicians, but they come after we have wasted more than 15–16 years of our peak learning time(when we are small, we learn fast). So instead why don’t we work hard on determining what our children want to be in the future and groom them from an early age ? After all they learn faster than a grown man.</p><p>Continuing about problems with our current education system, home works make the top of the list. They are the most annoying thing a children can have. Our children are loaded with tons of homework; like a huge load of it. They go to school for most of their day and spend multiple hours in home doing their homework. They should be given home works, but not in a humongous amount. Children should be fooling around, playing with other children. They should be given time to socialize with others of similar age. But we want grades out of them, and we end up making them do their homework. We want them to study hard and bring pride to us. Well, they simply are not made for that purpose. They should be proud of their deeds and not their grades. They should be proud that they helped an old lady cross the road. They should be proud of making a sand castle in the beach or a big house of cards. They should be proud of their parents that want them to be happy, that would support them no matter what the field they chose to spend their life in.</p><p>There are many points that have been missed on this article written in minutes with just thoughts on mind. But one thing is clear as it can get. We have an <strong>outdated education system. </strong>And we need to change this. The sooner , the better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aff1f06b114f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Come, come lay in my laps.]]></title>
            <link>https://medium.com/@prasannakoirala/come-come-lay-in-my-laps-b96d767b387d?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/b96d767b387d</guid>
            <category><![CDATA[poetry]]></category>
            <category><![CDATA[darkness]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Fri, 03 Nov 2017 08:05:46 GMT</pubDate>
            <atom:updated>2017-11-03T08:05:46.000Z</atom:updated>
            <content:encoded><![CDATA[<p>Come, come lay in my laps.<br>Darkness, my dear.<br>Let me caress you<br>your dense dark hair.<br>Let me love you<br>your eyes, twinkling stars, pearl pair.<br>Let me hold you tight<br>your skin, smooth jade, rarer than rare</p><p>Let us hold hands and walk<br>for the night is lonely</p><p>Tell me about your day mundane<br>Darkness, my dear<br>Did they bully you again ?<br>Did they hurt you anywhere,<br>or show you disdain ?<br>Tell me, share,<br>are you in any pain ?</p><p>Sob it all out my Darkness<br>for the night is lonely</p><p>You are the light to my darkness<br>darkness that has rooted deep within me.<br>look into my consciousness<br>your image Darkness, darkness you shall see.</p><p>I am in haste my love<br>let me wait no more now<br>for the night is lonely</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b96d767b387d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transition]]></title>
            <link>https://medium.com/zerone-magazine/transition-15091453a085?source=rss-4cae76226465------2</link>
            <guid isPermaLink="false">https://medium.com/p/15091453a085</guid>
            <category><![CDATA[prose]]></category>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[transitions]]></category>
            <category><![CDATA[old-days]]></category>
            <dc:creator><![CDATA[Prasanna Koirala]]></dc:creator>
            <pubDate>Thu, 19 Jan 2017 14:56:54 GMT</pubDate>
            <atom:updated>2017-01-25T14:42:07.239Z</atom:updated>
            <content:encoded><![CDATA[<p>I remember the day when we first had a digital camera with us. It was the occasion of ‘BhaiTika’ (A day in Hindu culture when the sisters bless their brothers with prosperous and awesome future). If you remember well, before all this digital era we used to have simple reels, a pair of battery and a black camera. The clicks were limited; 30 generally and if you were extremely lucky you would get max. of 35 clicks to click. You would actually get a hard print of the image after it was processed with whatever liquid in a dark room. Ah! those days were golden.</p><p>So this day when we first had a digital camera with us, most of us did not know how to use it. I mean, it did not have any reels in it. We the next generation however (me, my brother and my sister) knew the concept that it contained a memory and the reels would not run out. But our mother however, she would not let us grab the camera. She was afraid that we would break it or would end up using the reels for our ‘selfies’. (Those days we did not have the word selfie, but still did take selfies; that too on a grandfather camera.) So back to my mother, she was very careful about not breaking the camera and only taking limited shots. It is amazing now if you think she actually had a counter in her mind. I mean who thinks about how many picture they have got on their gallery ? All we think about is how much Mb or Gb of space is used and how much is left. Hence even after having a digital camera and a memory of 256 mb we ended up taking exactly 33 pictures of that day. Each of them very precious and beautiful. I still remember the joy of the new camera and all those good memory of that day.</p><p>But the years to follow were not so enthusiastic. Partly because we were all growing up and partly because we had more pictures than the memory of that particular day. We were too focused on taking the pictures rather than enjoying the moment.</p><p>Not that I am against the digital revolution, but now whenever I look through my phone’s gallery and see multiple pictures of the same group of people or the same object, I tell myself, why do I even need to keep the best among all these repeated images ? It would have done, even if I had a single picture, even if it were blurred because of my shaky hands. If the memory is worth recalling, even a ruined picture would make you time travel to the good old day.</p><p>Afterall pictures are to capture the moments you have already lived before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15091453a085" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zerone-magazine/transition-15091453a085">Transition</a> was originally published in <a href="https://medium.com/zerone-magazine">The Zerone</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>