<?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 Vipul Bhardwaj on Medium]]></title>
        <description><![CDATA[Stories by Vipul Bhardwaj on Medium]]></description>
        <link>https://medium.com/@vipulbhj?source=rss-c6eb7379a056------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j6YZx225MuQn7s225YaxTQ.jpeg</url>
            <title>Stories by Vipul Bhardwaj on Medium</title>
            <link>https://medium.com/@vipulbhj?source=rss-c6eb7379a056------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:21:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vipulbhj/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[A JavaScript Quiz]]></title>
            <link>https://medium.com/@vipulbhj/a-javascript-quiz-f165bf58ca41?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/f165bf58ca41</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[arrays]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Wed, 04 Dec 2019 08:10:34 GMT</pubDate>
            <atom:updated>2019-12-04T08:10:34.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*afl5iF76qzCnEN8U" /><figcaption>Photo by <a href="https://unsplash.com/@nickdepartee?utm_source=medium&amp;utm_medium=referral">Nick de Partee</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>JavaScript is considered “wired” if I may say so myself in the dark channels of the web called Twitter and the general developer community sentiment 😆 😆</p><p>I personally think, this is not true and every time you find something that you think feels weird, what you have encountered is a learning turn and I felt this question falls on those lines, so I thought to put it out there.</p><h4><strong>Here are two code snippets</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23bf36273dd67385f6814d838cd0d19e/href">https://medium.com/media/23bf36273dd67385f6814d838cd0d19e/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3a9a57ddde21e0bf3297004739e8f43/href">https://medium.com/media/b3a9a57ddde21e0bf3297004739e8f43/href</a></iframe><p>Now if I have you thinking, Can you share some sentiment by <strong><em>clicking </em></strong>the option link you align with <strong><em>below</em></strong>.</p><ul><li><a href="https://medium.com/@vipulbhj/explaining-the-javascript-quiz-6803139bceb9"><strong>huh, wait what ? I don’t understand</strong></a></li><li><a href="https://about.me/vipulbhj"><strong><em>Am I a joke to you, I know everything</em></strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f165bf58ca41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explaining the JavaScript Quiz]]></title>
            <link>https://medium.com/@vipulbhj/explaining-the-javascript-quiz-6803139bceb9?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/6803139bceb9</guid>
            <category><![CDATA[arrays]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Wed, 04 Dec 2019 08:02:24 GMT</pubDate>
            <atom:updated>2019-12-04T08:02:24.229Z</atom:updated>
            <content:encoded><![CDATA[<p>According to the official <em>JavaScript Specification, </em>Arrays are reference type which if you are not into jargon&#39;s basically means that when you assign some variable an array value, the address of that array is stored in the variable instead of the value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9lohx1m2DZrDQTWA" /><figcaption>Photo by <a href="https://unsplash.com/@jontyson?utm_source=medium&amp;utm_medium=referral">Jon Tyson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For example</p><pre>let a = [1, 2, 4];</pre><pre>let b = a;</pre><p>What’s happening here is that JavaScript creates an array in the computer memory, then remembers the address where it created the array by storing that address in a, line two takes that same address and makes another copy of that in stores in b.</p><pre>let arr1 = [1, 2, 4, 5];<br>let arr2 = arr1;</pre><pre>// Code Line Number 3.<br>arr1 = [];</pre><pre>console.log(arr1); // -&gt; []<br>console.log(arr2); // -&gt; [1, 2, 4, 5]</pre><p>Now, the interesting bit is when code line number 3 is executed, again JavaScript goes ahead and creates an array in memory and stores that address in arr1 , and indeed arr1 now points to a new array but arr2 still remembers the address of the original array address and thus reassignment doesn’t effect the value :)</p><h3>But, wait I have something even better</h3><pre>let arr1 = [1, 2, 4, 5];<br>let arr2 = arr1; </pre><pre>arr1.length = 0;</pre><pre>console.log(arr1); // Output :- []<br>console.log(arr2); // Output :- []</pre><p>lets talk about arr1.length = 0 , for me personally this is <em>the</em> hidden gem which need to be explained and this one is harder to explain.</p><p>Lets do it with the help of a fact table.<br><strong>Fact Table</strong></p><ul><li>Arrays in JavaScript have a length property which is not read only, meaning you can assign its value like arr1.length = 0. Do checkout the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length"><strong><em>docs</em></strong></a> for some clever use cases.</li><li>Printing / logging things by functions like alert, console.log etc works by call toString which return the string representation of the data, which then is directly printed / logged on the screen. This flow will look something like,</li></ul><pre>let a = [1, 2, 4, 5];</pre><pre>step_by_step_printing(a);</pre><pre>function step_by_step_printing(a) {<br>  let variable_string_representation = a.toString();<br>  alert(variable_string_representation);<br>}</pre><p>In case of Arrays toString works by looping over elements in regards with the length property. Thus it becomes such that the length property controls what will you see on logging / printing in case of arrays. Isn’t that kinda interesting.</p><p>That’s it folks, you now know all the secrets of working with arrays.</p><p>Thank you for reading, hope you found it useful.</p><p>You can find more of me at <a href="https://medium.com/u/c6eb7379a056">Vipul Bhardwaj</a> , DMs via Twitter at <a href="https://twitter.com/vipulbhj"><strong><em>vipulbhj</em></strong></a> are open for further discussions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6803139bceb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Removing duplicate objects from an Array]]></title>
            <link>https://medium.com/@vipulbhj/removing-duplicate-objects-from-an-array-b7aff48be2d2?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7aff48be2d2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[objects]]></category>
            <category><![CDATA[arrays]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[javascript-symbols]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Tue, 26 Mar 2019 12:10:58 GMT</pubDate>
            <atom:updated>2019-03-26T12:10:58.447Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vKHWR1WyI5pMTvwa-2rCzw.png" /><figcaption>Made using carbon.now.sh</figcaption></figure><p>I am firm believer of the fact that programing languages are tools and to be good at solving problems, knowing you tool will make your life so much easier. Which holds true in the case of this problem as well.</p><p>So, today I came across this article <a href="https://bitsofco.de/removing-duplicate-objects-from-an-array-is-hard/">https://bitsofco.de/removing-duplicate-objects-from-an-array-is-hard/</a> which talks about how it is difficult (as of computationally) to remove duplicate elements from an array in case of non-primitive types such as objects.</p><p>Now the solution proposed by the author is not a great one, I agree but he shows of a great trick I just learned for primitive data and I am so gone use this from now. But the point is that this indeed is a problem to thing about. You can get this idea if you google for this problem, you will find so much content with all kinds of approaches and all complexity solutions. So, its a well know problem people encounter on day to day basic.</p><p>Now how can we solve this problem in a way which takes advantage of your tool.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29d0e103422d7a14c2c1b0e1ff3f2582/href">https://medium.com/media/29d0e103422d7a14c2c1b0e1ff3f2582/href</a></iframe><p>This is my implementation to solve the same problem using JavaScript Symbols(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol</a>). Basically Symbols are a way to generate values which are internally represented as different values upon each function call. But Symbol.for(‘cat’) allows you to make a global symbol and upon each construction will give you the same value.</p><p>Now, using that approach, we first convert the array into an array of symbols and then we can use the same idea of having primitives and removing duplicates and that’s it basically.</p><p>Afterwards I did some tests just for fun and turns out this solution is pretty scale able too. Here are some results:-</p><ul><li>For 100 elements or so, it takes about 5.5ms where as the approach used in the original article takes 2.2ms.</li><li>For 500 elements or so, it takes 5.7ms whereas the other algorithm takes 11.7ms.</li><li>For 1500 elements or so, it takes 3.886ms whereas the other algorithm takes 32.82ms.</li><li>For 8000 elements or so, it takes 5.57ms whereas the other algorithm takes 60.71ms.</li></ul><p>And after that I was obviously bored, so If someone finds this useful and does some testing on a bigger and may be more real world data, I would love to know stats.</p><p>If you want to talk more about the implementation or anything else, you can find me on Instagram or Twitter as @vipulbhj.</p><p>Thank you so much for reading, don’t forget to share If you find the information useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7aff48be2d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Not-Really-a-Framework (No one suggested a better name)]]></title>
            <link>https://medium.com/@vipulbhj/not-really-a-framework-no-one-suggested-a-better-name-c6db63d78dc6?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6db63d78dc6</guid>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 15:22:19 GMT</pubDate>
            <atom:updated>2018-12-18T15:22:19.647Z</atom:updated>
            <content:encoded><![CDATA[<p>First things first, I am really hurt that nobody suggested a name, thus by the means of “My project, my rules”. This name stays 😂😂😂😂😂😂😂. But seriously people, come up with a good name.</p><p><strong>So, on to the sensible stuff now, shall we</strong></p><p>In the previous blog <a href="https://medium.com/@vipulsworkmail/lets-build-a-node-framework-dd48307ce115">https://medium.com/@vipulsworkmail/lets-build-a-node-framework-dd48307ce115,</a> I talked about the potential of NODE as being powerful and ascetically pleasant to write Web Servers and API’s without the need to all the bulky frameworks out there.</p><p><strong>Its been like 2 weeks or so since then and in the process of learning more about NODE and what it is at its core, the after math of that has also changed the project a lot.</strong></p><p><a href="https://github.com/vipulbhj/not-really-a-framework">vipulbhj/not-really-a-framework</a></p><p>Go, ahead and take a look at what it look like now. If you been following along, you might see some new things popping up here.</p><ul><li>It actually look more like a framework now.</li><li>POST support nice 🤩🤩.</li><li>And a few more things here and there in the internals.</li></ul><p>So, where I am heading with this. So, here is my take on the situation people are using NODE, they are either “know it all and are using frameworks in the sense that they know what they are doing” or “using some framework for the past year or so and are know mostly in the habit that they both have become one”. In my opinion this is bad, as there is a huge gap in leaning and understanding.</p><p><strong>One reason I can think of is, lack of good material out there. </strong>Most of the courses out there, either tell you a bit or not even that much of NODE(the real node) and start with express, you get the idea of the state of it.</p><p>Try looking into how to do any basic day to day task that you do with express in NODE without any framework and you are sure to get a headache.</p><h4>Let’s make a good learning resource:-</h4><p>Now my goals for NRAF(Not-really-a-framework) is to implement most of the common features that a Backend developer users on a regular basis, so that this can be used a teaching material for internals of those high level abstraction. So, I would like to share with you a list of features in the decreasing order of priority which will be implemented in the near future (most probably).</p><ul><li>Middleware Support (Express has these are they are just awesome).</li><li>Better Response API.</li><li>Cleaner Documentation (HELP WANTED FLAG HERE).</li><li>Better demo App / Well thought out examples.</li></ul><h3>GraphQL is awesome</h3><p><strong>WOW</strong>, <strong>w</strong>hat just happened. I thought we were talking about node and suddenly WTF!!. Calm down, calm down. See we all know (if you have heard about graphQL, congrats! you are a part of the “<strong>A</strong>LL” I am talking about) that graphQL is the new Web Developer buzz work, this is in a sense our “<strong>M</strong>L”.</p><p>And I personally like the idea, hate the intuition. I mean its supposed to integrate smoothly with express API’s but that a <strong>LIE. </strong>Its just a headache if you go out today and try and just quick convert preexisting API to GraphQL one’s. <strong>So, may be we can also write a cleaner GraphQL wrapper,</strong> and ship it as a default. I mean at least we can try folks.</p><h4>It won’t also hurt If you use this in your side projects as a super LIGHTWEIGHT server framework. Your experience won’t be terrible I promise, tho remember to update to something more secure if you go viral. Else I might hack you and talk all your money!! LOL.</h4><p>So, go ahead give the project some LOVE. If you like it share the damn thing and let’s get it some traction. Would love to hear your views <a href="https://twitter.com/vipulbhj/">Twitter,</a> <a href="https://www.instagram.com/vipulbhj/">Instagram,</a> <a href="https://github.com/vipulbhj">GitHub,</a> <a href="https://www.facebook.com/vipulbhard">Facebook</a> and <a href="https://www.linkedin.com/in/vipul-bhardwaj-172a50145/">LinkedIn</a> and geek out on other stuff.</p><p>Thank you for reading, if someone has made this far, tho I doubt anyone would.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6db63d78dc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Build a Node Framework]]></title>
            <link>https://medium.com/@vipulbhj/lets-build-a-node-framework-dd48307ce115?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd48307ce115</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[only-nodejs]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[without-express]]></category>
            <category><![CDATA[routing-without-express]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Tue, 27 Nov 2018 20:37:34 GMT</pubDate>
            <atom:updated>2018-11-27T20:37:34.308Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is one of the few articles that I am going to write and explaining the various aspects of using Node JS without any framework like Express, Sails, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rVCZmkSfN_jfKlZU" /><figcaption>Photo by <a href="https://unsplash.com/@dlanor_s?utm_source=medium&amp;utm_medium=referral">Dlanor S</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The motivation for this came from the fact that NODE_MODULES on some of these things can be really nasty plus there are tones of things to be leaned during the process to trying to Build something like this. So, let’s jump in.</p><h4>I wanna confess something:-</h4><p>Remember when I said we are going to build a framework, I kinda lied a little bit. See a complete framework is a combination of an immense amount of work and collection of tools. So, to build something like that on my own is kinda <strong>extremely hard. </strong>So, instead of build a framework, <em>we are going to build parts of a framework such as Routing, etc.</em></p><p>Some key things I wanna mention upfront, so that readers can have a clear idea of what they are getting themselves into.</p><ul><li>This is going to include a lot of Reading and Writing Files, Serialization, Conversion of form, etc.</li><li>A lot of things are implemented as a personal preference and I am sure there are much better ways to do these. So, if you find something like that, please comment below and I would love to talk more.</li><li><strong>Please don’t use this code anywhere important. This is a warning, this is not going to be one of those posts where you can directly copy paste code, so I really wanna put this out there, don’t use this code anywhere important. Its just for fun and experiment.</strong></li></ul><h4>Description</h4><p>Now then let’s start with the real business. In this article I want to setup a basic node “HTTP” server and construct a mechanism to do routing. Ohhh so I just remembered, there is a prerequisite to this and you must have a bit of Node knowledge going forward.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f3fbdd7fcd6daa8dc4f7bf68db66946/href">https://medium.com/media/5f3fbdd7fcd6daa8dc4f7bf68db66946/href</a></iframe><p>As you can see that first we import the “http” module and then we call the createServer function which return a refernce to the server we are creating. This takes a function as argument with two parameters which are request and response. The request argument(Object) has all the information about the request some client did to our server and response(Object) is a set of tool by which we respond to those requests.</p><p>So, lets leave that for a second and jump to the last few lines of the code. Here we see app.listen function being called. What this function does is that it binds our above created server to a PORT which in lame terms gives us an address on which others can communicate with us. This other parameter is just a callback function which is called when the binding is done. This is often used a visual indicator to tell us when can we talk to our server.</p><p>Now back to createServer, whenever a client makes a request to our server this method is called. This can be thought of the main of your node app. So, in our most basic version, what we are doing is we are setting the Header of the response object as 200 with contentType as text/html. Which combined means that the data is OK and in the form of either text or html. And we are sending Hello World to each client as a response. The data here is in text format but you could also send html data (for example res.write(&lt;p&gt;Hello World&lt;/p&gt;). You can also use multiple write calls and all before res.end() gets sent to the user. Now if you save the above code in a file called index.js and run node index.js. You should see a console message in your terminal window saying your server is running on PORT 5000(in most case, for the rest whatever it says is right).</p><h4>Let’s Test</h4><p>Go to your browser and type localhost:5000(locahost:PORT) there you should see hello world on the screen. Hurray!!, you made your own server. That wasn’t hard was it ???.</p><p>Now that the excitement is gone, you might start to see some odd things here. If you go to localhost:5000/a, you will see the same thing as on localhost:5000/b. This is because whenever the user does a request we send them the same data, no matter what the requests looks like, but that’s not really how servers work. What requests are, in simple sense is a mechanism for clients to ask for certain things from the server and thus we need to somehow to modify our response based on the request made by the client. Well the Solution comes up next.</p><h4>Routing (First Component of our Framework)</h4><p>Let’s assume that we have 3 end points (/,/about,/contact)as three pages in our small app. Now, we want to send 3 different html pages to the user when they visit a specific end point. For that we will build our own routing mechanism as Node doesn’t come with one.</p><p>So, somethings which we will need to do are:-</p><ul><li>What resource are being requested.</li><li>Corresponding response for that request.</li><li>Also, we wanna make this so that we have a mechanism to adding new routes(endpoints) in future if we want to.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa04d54ec15377bd349ecf32d49964a1/href">https://medium.com/media/fa04d54ec15377bd349ecf32d49964a1/href</a></iframe><p>Let’s take a look at the above code and analyze what’ happening. So, we start up top and we see the “http” module, then lets just jump to the bottom to our “createServer” function which is the starting point of our app. There we see it different from the previous version. So, now what we are doing is, we are extracting the url from the request. This URL is used by the user to request different response. Add a console.log(url) and hide the two lines under that. Now start the server using node index.js and again try to visit various endpoint, you will see that you get things like “/” when you visitlocalhost:500or “/about” when requesting localhost:5000/about. Now, once we know that, lets take a look at the other line. Now we call a strange function called match, which takes two parameters router, url.</p><p>Now router is supposed to have routing information or various endpoints and match is used to match the right endpoint for a specific request and then send that data. So, the idea here which I am using is to create an array of objects called router. Now each object in the array represents an routing object, which as two properties, url and fn. The value of property url is the url which this routing object is for and fn is a function that will be executed when that endpoint is called. Now, if you take a look at match function under the router array, what this match function is doing is it looks over all routing objects in the router array and tries to see if the url property of the routing obj matches the url requested by the user, if so then it returns the corresponding function. If there is no match found then it returns a default response for all other routes. Now that return value is stored inside a variable called m, which is passed the request and response object so that the function can communicate with the client.</p><p>Now if you uncomment all the code and run it again using node index.js , then you can go into your browser and try visiting various urls and see what happens. Now what if I want to add a new endpoint for say products, then you already know what you need to do if you have made it this far. And that it, we officially have routing in our app. Hurray !!!!!!!</p><p>This is it for this article. In the next one, I will talk about using .html files and also other formats like images, etc. We will also talk about various types of resources (static and dynamic) and start to structure things in some formal order.</p><p>Your each 👏 would motivate me to write more helpful articles and make open source contribution. You can further connect with me on <a href="https://twitter.com/vipulbhj/">Twitter,</a> <a href="https://www.instagram.com/vipulbhj/">Instagram,</a> <a href="https://github.com/vipulbhj">GitHub,</a> <a href="https://www.facebook.com/vipulbhard">Facebook</a> and <a href="https://www.linkedin.com/in/vipul-bhardwaj-172a50145/">LinkedIn</a>. I would love to talk more about this or some other topic. And most importantly, if you find any issue or have a better approaches please let me know so that we can improve this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd48307ce115" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How not to stay a beginner forever]]></title>
            <link>https://medium.com/stemoto/how-not-to-stay-a-beginner-forever-1ae2ac2da61d?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ae2ac2da61d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[learn]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Wed, 04 Jul 2018 12:16:28 GMT</pubDate>
            <atom:updated>2018-07-04T12:16:28.223Z</atom:updated>
            <content:encoded><![CDATA[<p>So, we all know programming is all about solving problems and programming languages are the tools that help us do that, but have you ever thought what differentiates between an beginner, intermediate and master of a certain tool. If you have or haven’t, I will dive into this whole mess with you together and help you understand all the details involved in it. I am going to use JavaScript as a medium example, but the ideas will apply to all the major languages out there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qNiADSplaACaa1xN" /><figcaption>Photo by <a href="https://unsplash.com/@rawpixel?utm_source=medium&amp;utm_medium=referral">rawpixel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So, you heard there is this new buzz word “JavaScript” out there, you feel you should learn it and then you either pick up a book or use some kind of step by step guide, good perfect first step, then you will probably spend a week or two diving into the content, the loops, the conditionals and functions. I like to call this phase the syntax chunking and the time it takes varies from person to person. So, once that’s done, you will want to get your hands dirty and here I recommend picking up some kind of project that’s been implemented by other folks and with moderate complexity( Trying to mimic Google calculator is a really good idea in case of JavaScript and there are stuff like this for every language).</p><p>So, congrats on completing your first project, I am pretty sure you learned at least 10 new things that your resource didn’t teach you. And congrats, you are a beginner at JavaScript now and its time to put it in the resume and forget it forever, or let’s do that and also play around with the tool you just learned to hold properly and do another project, this can be anything you want to make, just make sure going into it, you know there is going to be leaning opportunity for you.</p><p>Congrats on the second project and you are at a stage now, which I like to call “Overly experienced beginner” don’t get me wrong but most of the people stop there learning at this level and they will either just to some framework or use only what they have till now in making everything they can.</p><p>Remember the book you were reading, remember that chapter you just couldn’t seem to be getting your head to and decided to skip or those words that seemed stressfully alien at that point of time, its time to revisit them and try to associate meaning to those things( Some of those things for JavaScript would be learning about IIFEs, Event Loop, Namespace creation, scope and this bindings and its work around).</p><p>If you have reached this far, its a big, sorry huge achievement and you should be proud of yourself, one last thing at this level will be to get your hands dirty by doing an project and applying the new cool tricks you learned for which you previously banged you head into the wall. One super amazing thing, you can do now is to debug other people’s code and teach them as you go.</p><p>So, you are a intermediate user of your tool now and that’s amazing for real, now the world is your oyster and you can try all the weird stuff out there and understand, apply and even fix stuff. But, what you need to do to become a master(a true master), actually nothing :P , sorry to disappoint but you know everything that you are supposed to know and from here its just about how much time you spent with your tool. I am serious, the more you play with it the better you get and there is no limit to learning.</p><p>But that being said, I would still try to highlight some key things</p><ul><li>Read more, and by more I mean more books(like You don’t know JS) and code(Open source projects from good teams).</li><li>Learn and Implement best practices and analyze what fits you</li><li>Talk to people, get involved in community, go to Conferences and other such events (If you can’t go, then go on youtube and search for something like JSConf, you will find some pretty neat stuff there)</li><li>Try to broaden your spectrum, try new stuff</li><li>Keep updated with your tools ‘Hot News’</li><li>Programming basic concepts like Data structure and algorithms are always backbone of your code — you can’t skip that.</li><li>one should learn principle of good software development like Design Patterns, Solid principle, Removing Code Smells etc, because ones you know basic coding you must understand what pattern of software you are making — As mentioned by Gang Of Four.</li><li>And last, just make sure to have fun.</li></ul><p>Congrats, now you are a “Power user” of your tool and If you have come this far, as I said earlier, there is no stopping you and you can do whatever you feel like doing..</p><p>Thank you for reading this article and I hope you enjoyed it. If you want to talk please drop down a comment and I will definitely talk about food, leaning, spreading and everything in between.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ae2ac2da61d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stemoto/how-not-to-stay-a-beginner-forever-1ae2ac2da61d">How not to stay a beginner forever</a> was originally published in <a href="https://medium.com/stemoto">Stemoto</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Indian Student’s do wrong in Tech]]></title>
            <link>https://medium.com/stemoto/what-indian-students-do-wrong-in-tech-f29d94f6dbad?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/f29d94f6dbad</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[indian-education]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 16:42:51 GMT</pubDate>
            <atom:updated>2018-06-17T16:42:51.910Z</atom:updated>
            <content:encoded><![CDATA[<p>Disclaimer:- This is coming from my personal experience of working as a developer in various roles, talking to people(students, teachers, thinkers, startup founders, etc) and If you feel like I am wrong here and you have an argument for it, you are probably right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*ZkpuItpBQjkDu1mXDbR35A.gif" /><figcaption>Feels like this every single time</figcaption></figure><p>So, I will try not to make it another cry for better all over the ecosystem of education and will try to be on point and help a little maybe.</p><ul><li>The fact is that when you are in school, you are dealing with stuff that was first discovered/invented 100’s of years ago and that’s plenty of time to be well tested and applied. But tech is not like that, it is messy, full of manholes and traps, it is fundamentally glued at times to meet deadlines and this is really off-putting for Indian students at least initially in tech and they be like this is supposed to work, why doesn’t it work. The notion of something you are using is ‘broken for real’ doesn’t come naturally to us. All you and I are used to doing is prove concurrency of triangles or find integrals or something else, applying a soul universal approach like ancient Egyptians with cats every single time (“They are there to be prayed”).</li><li>Trying to cover the whole syllabus is a virus that spread all over the nation like I talk to people and they go like I wanna do this and make that and they are pretty excited about it and I recommend them a book or resource and they immediately dive into it, enjoying and what now. And a week later, when I ask so what are you making and believe me 99 times out of 100, the response I get is “I am still in the middle of it and I will do it when I finish with the book”, I go nuts when that happens and I feel like just walking to a wall or something and bang my head to it. This is not your NCERT textbook, it has a page called how to use this book/resource, please read it. Serious though it makes me super mad and I just never talk to that person again…</li><li>Why can’t Indians ask questions, when it’s most meaningful to ask. I mean its a thing here, there is nothing like a talk, discussion, session and everything is a lecture and the audience are zombies. That’s what it feels like folks every single time. Getting your hands dirty is not a thing here.</li><li>They stuck at googling information because of all the spoon feeding.</li><li>They are not comfortable with the process of trying out stuff, making errors and learning by resolving them.</li></ul><p>Those are some problems that I think exist and I want to present just a passing thought</p><ul><li>Please don’t try to run for knowing everything its a mirage, knowing less in tech is a blessing make errors, resolve them, make that error again and resolve it again and repeat.</li><li>Learn how to process and filter information before consuming, not even 20% which is available out there is useful and you need to learn to filter that, coding and everything else will come.</li><li>Dive deep to code after chapter 3 and throw the book away, at this point of time you know enough skeleton code and now you need to find parts that are useful to you and use them and forget them until they come to muscle memory.</li><li>Get in a group, where people have been doing it for a while and they are successful at some level with it. This is an art that comes with time, you can’t just can’t get to it super quickly.</li><li>Think, find, discuss and apply and I bet you will never have a problem again.</li></ul><p>Thank you for reading and I be really glad if it even helps you a tiny bit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f29d94f6dbad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stemoto/what-indian-students-do-wrong-in-tech-f29d94f6dbad">What Indian Student’s do wrong in Tech</a> was originally published in <a href="https://medium.com/stemoto">Stemoto</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chrome Extensions — Tweaking your browser professionally.]]></title>
            <link>https://medium.com/stemoto/chrome-extensions-tweaking-your-browser-professionally-a26053ed22e6?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/a26053ed22e6</guid>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[jaipur]]></category>
            <category><![CDATA[youstart]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Fri, 25 May 2018 11:28:05 GMT</pubDate>
            <atom:updated>2018-05-25T11:28:05.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZTb2LHi5uFO0KSpM6_kN8Q.png" /><figcaption>- Chrome Extension modified new tab</figcaption></figure><p>So in this article, I will walk you through the steps of making an extension to ease your browser experience and personalize it.</p><h3>Let’s get started</h3><blockquote>Extensions are small software programs that customize the browsing experience. They enable users to tailor Chrome functionality and behavior to individual needs or preferences. — <a href="https://developer.chrome.com/extensions">https://developer.chrome.com/extensions</a></blockquote><p>So its pretty clear that all you need are your preexisting skills from the “good old messed up the web”.<br>So in this article, I will guide you through a step by step process of making a chrome extension that modifies your new tab and replaces it with a custom page(‘in my case, I choose to show quotes and I will explain that’).<br>So, first of all, you need a method to take to the browser somehow and get all the desired configuration done. This is done by a JSON file called manifest.js. Take a note that the name is specified and no other name is allowed.</p><pre>{<br> // manifest_version , name and extension version are mandatory<br> // description in the description of extension (optional)<br> &quot;manifest_version&quot;: 2,<br> &quot;name&quot;: &quot;Colorful Crap&quot;,<br> &quot;version&quot;: &quot;2.0&quot;,<br> &quot;description&quot;: &quot;This extension modifies your new tab to let you get inspired&quot;,<br> // It is going to an object that has three images of size 128,48,16<br> &quot;icons&quot;: {<br>  &quot;128&quot;: &quot;icon128.png&quot;,<br>   &quot;48&quot;: &quot;icon48.png&quot;,<br>   &quot;16&quot;: &quot;icon16.png&quot;<br> },<br> &quot;browser_action&quot; : {<br>  &quot;default_popup&quot; : &quot;popup.html&quot;<br> },<br> &quot;chrome_url_overrides&quot; : {<br>  &quot;newtab&quot; : &quot;newtab.html&quot;<br> },<br> &quot;permissions&quot;: [<br>  &quot;storage&quot;<br> ]<br>}</pre><ol><li>icons are the icons that will appear inside your browser as your extensions icon and Google has provides some standard sizes for this. It is an optional field but a good idea to apply. Remember these need to be put in the root of your project or else you should provide a complete path.</li><li>browser_action — defines what happens when the extension icon is clicked inside the browser.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrj5BoOhqKnIgABcVNDxXQ.png" /></figure><p>3. chrome_url_overrides — This lets you override the default new tab provided by chrome. newtab.html is a page we will create later which will be a replacement for the current new tabs page.</p><p>4. Chrome has a lot of permission options and we are using storage which lets us store data inside the browser’s storage.</p><p>Now the newtab.html looks something like</p><pre>&lt;!DOCTYPE html&gt;</pre><pre>&lt;html lang=&quot;en-US&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;meta charset=&quot;utf-8&quot; /&gt;</pre><pre>&lt;title&gt;NewTab - Crafted by MindArt&lt;/title&gt;</pre><pre>&lt;style&gt;</pre><pre>* {</pre><pre>margin: 0px;</pre><pre>padding: 0px;</pre><pre>}</pre><pre>body {</pre><pre>background-color: #2a3338;</pre><pre>}</pre><pre>.container {</pre><pre>width: 960px;</pre><pre>margin: 30px auto;</pre><pre>text-align:center;</pre><pre>color: white;</pre><pre>}</pre><pre>#quote {</pre><pre>letter-spacing: 1.5px;</pre><pre>font-size: 56px;</pre><pre>}</pre><pre>#author {</pre><pre>position: absolute;</pre><pre>top:560px;</pre><pre>left:980px;</pre><pre>font-size: 28px;</pre><pre>}</pre><pre>&lt;/style&gt;</pre><pre>&lt;script type=&quot;text/javascript&quot; src=&quot;init.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script type=&quot;text/javascript&quot; src=&quot;newtab.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;div class=&quot;container&quot;&gt;</pre><pre>&lt;p id=&quot;quote&quot;&gt;&lt;/p&gt;</pre><pre>&lt;p id=&quot;author&quot;&gt;&lt;/p&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><p>Just some plain HTML there nothing special, but the import part’s to note are the init.js and newtab.js scripts.<br>Let’s analyze them one by one.<br>init.js — This is just a data initializing script that is used to load the data in the local storage when the user loads the extension for the first time.</p><pre>/**</pre><pre>* Dummy data to be used for testing.</pre><pre>*/</pre><pre>let quotes = {</pre><pre>&quot;Unknown&quot;:[&quot;The future depends on what you do today.&quot;</pre><pre>],</pre><pre>&quot;Steve Jobs&quot;:[&quot;Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.&quot;,</pre><pre>&quot;That&#39;s been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it&#39;s worth it in the end because once you get there, you can move mountains.&quot;</pre><pre>],</pre><pre>&quot;Bill Gates&quot; : [&quot;If you are born poor its not your mistake, But if you die poor its your mistake.&quot;,</pre><pre>&quot;I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.&quot;,</pre><pre>&quot;Success is a lousy teacher. It seduces smart people into thinking they can&#39;t lose.&quot;,</pre><pre>&quot;Be nice to nerds. Chances are you&#39;ll end up working for one.&quot;</pre><pre>]</pre><pre>};</pre><p>newtab.js — This file contains all the logic for the various color aspects and cycling through the code every 60 seconds.</p><pre>// Generate random number between 0 to num</pre><pre>const getRandomInt = (num) =&gt; {</pre><pre>return Math.floor(Math.random() * (num + 1));</pre><pre>}</pre><pre>// This function contains the execution login of the application.</pre><pre>const logic = (quotesFetched) =&gt; {</pre><pre>// Get all the keys(Authors) from quotesFetched</pre><pre>let keys = Object.keys(quotesFetched);</pre><pre>// Randomly picking  one author.</pre><pre>let author = keys[getRandomInt(keys.length-1)];</pre><pre>// Loading all the quotes by selected author.</pre><pre>let quotesArray = quotesFetched[author];</pre><pre>console.log(`${author},${quotesArray}`);</pre><pre>// Randomly picking a quote from quotes.</pre><pre>let quote = quotesArray[getRandomInt(quotesArray.length-1)];</pre><pre>// Adding content to html page.</pre><pre>document.getElementById(&#39;quote&#39;).innerHTML = quote;</pre><pre>document.getElementById(&#39;author&#39;).innerHTML = author;</pre><pre>};</pre><pre>// Starting point of the application.</pre><pre>const start = () =&gt; {</pre><pre>// Retriving stored data from chrome storage.</pre><pre>chrome.storage.sync.get(null,function(items) {</pre><pre>// Calling the logic function to start the application logic.</pre><pre>if(Object.keys(items).length === 0 &amp;&amp; items.constructor === Object) start();</pre><pre>else {</pre><pre>logic(items);</pre><pre>// One min wait and repeat the process.</pre><pre>setInterval(logic,60000);</pre><pre>}</pre><pre>});</pre><pre>};</pre><pre>// Function used to load data in the browser storage.</pre><pre>(() =&gt; {</pre><pre>// Checks if quote is available in storage, if so the extension is already loaded and nothing needs to be done.</pre><pre>// if not then we load the quotes.</pre><pre>chrome.storage.sync.get(&quot;Unknown&quot;,(items) =&gt; {</pre><pre>if(typeof items[&quot;Unknown&quot;] === &#39;undefined&#39;) {</pre><pre>chrome.storage.sync.set(quotes,() =&gt; {</pre><pre>console.log(&quot;Quotes have been initialized&quot;);</pre><pre>});</pre><pre>}</pre><pre>});</pre><pre>// Start the application.</pre><pre>start();</pre><pre>})();</pre><p>Due to the random nature of the application, you will get new quotes each time. And there you have it, a fully functioning chrome extension.<br>For a further read, you should try</p><p><a href="https://developer.chrome.com/extensions">What are extensions?</a></p><p>You can find the whole project at</p><p><a href="https://github.com/vipulbhj/chrome-extension-blog">vipulbhj/chrome-extension-blog</a></p><p>Now to try the extension yourself, clone the repo.</p><p>Then go to chrome and type</p><pre>chrome://extensions</pre><p>Then you will be redirected to the extensions tab in chrome, you will see on the top right a developer toggle(or somewhere else for you), activate that and then go to LOAD UNPACKED. Then navigate to the location where you cloned the repo and select that directory. Now it&#39;s all done and you will see the extension loaded successfully in the extensions list. You will also see the icon in the top right bar. Click the icon and then try the new tab.</p><p>Hope this will be a helpful boost to your chrome extension journey.</p><p>Thank you for reading and happy learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a26053ed22e6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stemoto/chrome-extensions-tweaking-your-browser-professionally-a26053ed22e6">Chrome Extensions — Tweaking your browser professionally.</a> was originally published in <a href="https://medium.com/stemoto">Stemoto</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jargon — A road blocker in learning.]]></title>
            <link>https://medium.com/@vipulbhj/jargon-a-road-blocker-in-learning-e33b3f6e8011?source=rss-c6eb7379a056------2</link>
            <guid isPermaLink="false">https://medium.com/p/e33b3f6e8011</guid>
            <category><![CDATA[sharing]]></category>
            <category><![CDATA[jargon]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Vipul Bhardwaj]]></dc:creator>
            <pubDate>Thu, 17 May 2018 21:24:28 GMT</pubDate>
            <atom:updated>2018-05-17T21:24:28.796Z</atom:updated>
            <content:encoded><![CDATA[<p>So, the first time I fell to the trap of Jargon was really early in my programming days, and it was about some styling terms as per as I can remember. But I was lucky enough that I didn’t have that a hard time with it as the visual effect of it was explanatory enough to bring me out of the pothole. Things changed so did languages/frameworks/domains but Jargons remained with me. After doing this for a while(about a year) I subconsciously developed my goggling mechanism and ignored the problem solely but sometime back I being a struggling Machine Learning Enthusiast stumbled upon this youtube video talking about who Jargon’s makes your life hell and them I started remembering all those times when I was stuck banging my head on the wall, later just to realize the hoax Jargon had made and what unnecessary level of complexity it added. It applies to all part’s of learning I think and most people have faced it sometime or the other in there life.</p><p>So, I want to share some things that I feel are helpful while dealing with such a situation.Here goes some Naive tips that might end up saving you someday.</p><ol><li>Let’s take the example of Machine Learning, so when I was dealing with all the fuss thus created and getting absolutely nothing. I ended up telling myself “So many people do it, so many resources available — This has to be easy”. And thus I laid back unlearned all the prior knowledge and started the track again but this time in terms I understood for sure and the pain reduced.</li><li>Don’t go with the flow, break it, analyze it and convert it to something you understand for sure, now 99%’s allowed, they always always lead to decrements. This seems like a lot but sure works.</li><li>And that’s it I guess, all you need to do, is learn the way you like learning and you will be good to go. There will be “BigWordAlerts” all along. Don’t worry it gets simple and easy at some level down trust me, just keep the conversion until you reach there.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e33b3f6e8011" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>