<?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[Youstart Labs - Medium]]></title>
        <description><![CDATA[Youstart Labs enables organizations and students to learn emerging technologies in which they can make a career. - Medium]]></description>
        <link>https://medium.com/youstart-labs?source=rss----f342194a48e6---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Youstart Labs - Medium</title>
            <link>https://medium.com/youstart-labs?source=rss----f342194a48e6---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 31 May 2026 22:34:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/youstart-labs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with animations in react native]]></title>
            <link>https://medium.com/youstart-labs/getting-started-with-animations-in-react-native-4ce95f04bf92?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/4ce95f04bf92</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Prateek Surana]]></dc:creator>
            <pubDate>Wed, 22 Aug 2018 04:37:03 GMT</pubDate>
            <atom:updated>2018-08-22T04:37:02.946Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zj-tmy3-AFrgk1MC.png" /></figure><p>If you are even a little bit into the mobile app development world then chances are you might be well aware of this hottest app framework in the market by facebook, <a href="https://facebook.github.io/react-native/">React Native</a>. And this framework is well known for its native performance with awesome animations.</p><p>Now if you are willing to learn animations in react native I assume that you have at least prior some knowledge of the framework, if not then you can go <a href="https://facebook.github.io/react-native/docs/getting-started.html">here</a> learn the basics create an app or two and then come back.</p><p>In this post I will show you how you can implement animations in react native using <a href="https://github.com/oblador/react-native-animatable">react-native-animatable</a> library by oblador which simplifies the complex react native animations by providing a wide variety of predefined animations and simplified custom animations.</p><h3>Preface</h3><p>I will be using examples from a card that I created for a <a href="https://solve.care/contest?l=en">React Native UX contest</a> and won second prize for the same among 290 individual and organizations from over 30 countries.</p><p>I would be showing you GIF’s of the animations I used in the card and the code I used to create those animations.</p><h3>So let’s begin animating things…</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FMMnDgPw0yB6ms%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fanimations-electronics-vintage-stuff-MMnDgPw0yB6ms&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FMMnDgPw0yB6ms%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/a08a69d5d16e14b2aa498c32311d0b63/href">https://medium.com/media/a08a69d5d16e14b2aa498c32311d0b63/href</a></iframe><p>The very first step you need to do is install <a href="https://github.com/oblador/react-native-animatable">react-native-animatable</a> in your react native project using</p><pre>npm install react-native-animatable --save</pre><p>To add animation to any View , Image and Text just adding Animatable. before them but for other components you can create a new animated custom component like this -</p><pre>MyCustomComponent = Animatable.createAnimatableComponent(MyCustomComponent);</pre><p>Once you have created an animated component you can add animation to it just by using the animation prop and providing any of the <a href="https://github.com/oblador/react-native-animatable#animations-2">predefined</a> or <a href="https://github.com/oblador/react-native-animatable#custom-animations">custom animations</a>.</p><p>I will start with some easy examples and then gradually move on towards a little bit complex ones</p><h4>1. A simple Sliding up and down animation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*gK752PIZe1qu-ONB2wrpMg.gif" /></figure><p>The code I used to produce the above affect is as follows -</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1ad48285dc2743782a1544b29d8e1a3/href">https://medium.com/media/f1ad48285dc2743782a1544b29d8e1a3/href</a></iframe><p>In the above piece of code we have two state variables namely show and anim .</p><ul><li>The show state is used to show the manage the visibility of the emojis.</li><li>The anim state is used to decide the animation that we should perform on the press of the button, i.e., the sliding up or the sliding down animation.</li></ul><p>Both the tasks are performed on the press of the icon, the anim state is changed immediately, while the show state is turned to true immediately but is turned false after a delay of 500 ms just to show the sliding down animation before hiding it.</p><h4>2. Background color transition animation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Ub-Ab-iCapZFCEUd7q84rw.gif" /></figure><p><em>I have increased the speed of the animation so that it looks a bit more fluent.</em></p><p>In the above animation as you can see the background color transition happens with some delay rather than happening immediately.</p><p>To produce this effect you just need to create a simple custom animation for this transition and provide this to your parent &lt;Animatable.View&gt; using the animation prop.</p><pre>const backgroundAnimation = {<br>   from:{<br>      backgroundColor:&#39;rgb(255,255,255)&#39;<br>   },<br>   to:{<br>      backgroundColor:&#39;rgb(76, 255, 191)&#39;<br>   }<br>}</pre><p>And add it to the view as follows -</p><pre>&lt;Animatable.View animation={backgrooundAnimation}&gt;</pre><pre>{// Your content goes here you can add any other animation to the inside content also like I have added zoomIn in my case}</pre><pre>&lt;/Animatable.View&gt;</pre><h4>3. Rotating animations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ePcIU9RmHLjuWl2h_tAkcg.gif" /></figure><p>To produce the flipping animation as shown above you need to add a custom animation as we did in the previous section.</p><pre>const flippingAnimation = {<br>   0:{<br>      rotateY: &#39;0deg&#39;<br>   },<br>   1:{<br>      rotateY: &#39;360deg&#39;<br>   }<br>}</pre><pre>const reverseFlippingAnimation = {<br>   0:{<br>      rotateY: &#39;0deg&#39;<br>   },<br>   1:{<br>      rotateY: &#39;360deg&#39;<br>   }<br>}</pre><p>This would rotate the card by storing the animation in the state and a state to monitor which side we are currently on.</p><p>Initially we will set the animation to an empty string and current side as front side</p><pre>this.state={<br>   front: true,<br>   anim: &#39;&#39;<br>}</pre><p>This animation state will be applied to the animatable view</p><pre>&lt;Animatable.View animation={this.state.animation}&gt;<br>   {<br>    this.state.front?<br>       //Place your front side stuff here<br>    :<br>       //Place your backside stuff here<br>   }<br>&lt;/Animatable.View&gt;</pre><p>Then we will create a flip button which will be called on a click event, lets call this function flip</p><pre>flip=()=&gt;{<br>   if (this.state.front){<br>      this.setState({<br>         anim:flippingAnimation<br>      })<br>      setTimeout(()=&gt;{<br>         this.setState({<br>            front:false<br>         })<br>      },500)<br>   }</pre><pre>else{<br>      this.setState({<br>         anim:reverseFlippingAnimation<br>      })<br>      setTimeout(()=&gt;{<br>         this.setState({<br>            front:true<br>         })<br>      },500)<br>   }<br>}</pre><p>Now whenever this function is called it would flip the card,+ switching sides.</p><h4>4. Expanding and collapsing animations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*QRO8g3CAeT5_l2w73trmFA.gif" /></figure><p>All the three collapsing and expanding corners in the card are TouchableHighlights, to begin, first of all you will need to create a custom component out of the TouchableHighlight using the piece of code I mentioned in the very beginning</p><pre>MyTouchableHighlight = Animatable.createAnimatableComponent(TouchableHighlight);</pre><p>And now you just need to toggle the animation on the click of our new MyTouchableHighlight component.</p><p>You can create a toggle function similar to what we created in the previous section.</p><p>The custom animation for collapsing and expanding the TouchableHighlight would be as follows.</p><pre>const expandInfoBtn={<br>   from:{<br>     width:25,<br>     height:25,<br>     zIndex:0,<br>     borderTopLeftRadius:0,<br>     borderBottomRightRadius:0,<br>     borderTopRightRadius:10,<br>     borderBottomLeftRadius:40</pre><pre>},<br>  to:{<br>     width:deviceWidth-40,<br>     height:expandHeight,<br>     zIndex:5,<br>     borderTopLeftRadius:10,<br>     borderBottomRightRadius:10,<br>     borderTopRightRadius:10,<br>     borderBottomLeftRadius:10<br>  }<br>}</pre><pre>const shrinkInfoBtn={<br>   from:{<br>      width:400,<br>      height:800,<br>      zIndex:5,<br>      borderTopLeftRadius:10,<br>      borderBottomRightRadius:10,<br>      borderTopRightRadius:10,<br>      borderBottomLeftRadius:10<br>  },<br>  to:{<br>     width:45,<br>     height:45,<br>     zIndex:0,<br>     borderTopLeftRadius:0,<br>     borderBottomRightRadius:0,<br>     borderTopRightRadius:10,<br>     borderBottomLeftRadius:40<br>  }<br>}</pre><p>Our new component will work something like this -</p><pre>&lt;MyTouchableHighlight animation={this.state.animation} onPress={this.toggle} style={style.topRight}&gt;<br>   &lt;View&gt;<br>      &lt;Icon name=&quot;iconName&quot;/&gt;<br>      {// Put the other stuff here which you want to show when the    TouchableHighlight is expanded}<br>   &lt;/View&gt;<br>&lt;/MyTouchableHighlight&gt;</pre><p>The toggle function will work similar to the flip function in the previous section by switching the animation between expandInfoButton and shrinkInfoButton .</p><p>I hope by now you have understood the basics of animations in react native using react-native-animatable and how easily you can perform many kinds of complex animation using the same.</p><p>There are many more options available in this library, for more information you can see their <a href="https://github.com/oblador/react-native-animatable">docs</a>.</p><p>You the card I created for the contest here on <a href="https://expo.io/@prateek3255/care-base">expo</a>.</p><p><em>Thanks for reading ;)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ce95f04bf92" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/getting-started-with-animations-in-react-native-4ce95f04bf92">Getting Started with animations in react native</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript Object methods every developer should know]]></title>
            <link>https://medium.com/youstart-labs/javascript-object-methods-every-developer-should-know-c68c132a658?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/c68c132a658</guid>
            <category><![CDATA[constructor]]></category>
            <category><![CDATA[shallow-copy]]></category>
            <category><![CDATA[objects]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[deep-copy]]></category>
            <dc:creator><![CDATA[Abhishek Rathore]]></dc:creator>
            <pubDate>Thu, 26 Jul 2018 05:09:43 GMT</pubDate>
            <atom:updated>2018-07-26T05:09:31.098Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMtGnYGs_1rEPHeOzUiZJw.jpeg" /></figure><p>Javascript Object is quite special and it doesn’t follow the classical object-oriented concepts used by other languages like Java. JS objects have the prototypical inheritance which is quite different from normal class-based inheritance. We will not explain inheritance as part of this article and will focus on some common methods which are available in JavaScript’s global <strong>Object </strong>constructor. Even though there are many other methods available in <strong>Object constructor, </strong>we will restrict our discussion to very frequently used ones.<br> <br> Here is the list of topics we will discuss in this article :</p><ul><li><strong>Shallow copy — Object.assign()</strong></li><li><strong>Deep copy — JSON.parse() &amp; JSON.stringify()</strong></li><li><strong>Object.create()</strong></li><li><strong>Object.entries()</strong></li><li><strong>Object.keys()</strong></li><li><strong>Object.values()</strong></li><li><strong>Object.freeze()</strong></li></ul><p>Before we start, lets check out a typical object initialization in JS. We have some more ways to initialize a JS object - but this is the most common way developers use :</p><pre>let obj = {};<br>obj.name = “messi”;<br>obj.year= 2018;<br>obj.speak = function(){<br> return “My Name is “+this.name+” and this is year “+this.year;<br>}</pre><p>Here you can see the <strong><em>name</em></strong>, <strong><em>year</em></strong> and <strong><em>speak</em></strong> properties. In JS methods are also properties with type function.</p><p>In the next section, we will discuss copying an object properly in JS.</p><h3>Copying an Object</h3><p>You can’t use the typical assignment operation to copy an object in JS as that will only lead to creating a reference to the same object.</p><pre>let newObj = obj;<br>obj.year = 2019;<br>console.log(newObj.year) </pre><pre>// 2019</pre><pre>console.log(newObj.speak()) </pre><pre>// My Name is messi and this is year 2019</pre><p>Above example shows that <strong><em>newObj</em></strong> is just a reference to <strong><em>obj</em></strong> and whenever any property changes in either of them — both objects are affected.</p><h4>Shallow Copy</h4><p>You can create a shallow copy i.e. a top level properties copy, using <strong>Objects.assign()</strong> method</p><pre>let copyObject = Object.assign({},newObj);<br>copyObject.name = &quot;ronaldo&quot;;<br>console.log(copyObject.speak());</pre><pre>// My Name is ronaldo and this is year 2019</pre><pre>console.log(newObj.speak());</pre><pre>// My Name is messi and this is year 2019</pre><p>This example is copying <strong><em>newObj</em></strong> and all its properties to <strong><em>copyObject</em></strong>. You can check out that speak method will only print the new name on <strong><em>copyObject</em></strong><br>However, this methods fails when we have nested objects in property values. Those objects are still not copied and work as shared reference in both objects.<br>Look at this example</p><pre>let sourceObject = {name:&quot;neymar&quot;,country:{name:&quot;brazil&quot;}}<br>let shallowCopyObj = Object.assign({},sourceObject);<br>shallowCopyObj.country.name = &quot;India&quot;;<br>console.log(sourceObject); </pre><pre>//{ name: &#39;neymar&#39;, country: { name: &#39;India&#39; } }</pre><p>You can check that <strong><em>sourceObject</em></strong> has <strong><em>country</em></strong> property as value object with <strong><em>name</em></strong> property that remains shared between the new <strong><em>shallowCopyObj</em></strong> and <strong><em>sourceObj</em></strong>. So how can we create a deep copy - the answer is not that simple if you are looking for true deep copy. We will give a small workaround in next section but that is only applicable for certain conditions(just search on google as we can have a complete article describing on how to have a deep copy)</p><h4>Deep Copy</h4><p>If you just need to copy only properties which are not functions — there is an efficient method. We are moving away from <strong>Object</strong> constructor here and using another global Object in JS — <strong>JSON</strong></p><pre>let deepCopyObj = JSON.parse(JSON.stringify(obj));<br>console.log(deepCopyObj);</pre><pre>//{ name: &#39;messi&#39;, year: 2019 }</pre><p>You can check in output that we have lost our function property while copying — but this will be true deep copy. Let’s end our discussion on copying values and move to some more useful functions in <strong>Object </strong>constructor.</p><h3>Object.create()</h3><p>You can also create object with <strong>Object.create(</strong>) function this has additional flexibility that you can choose what will be prototype of your new object.</p><pre>let createObj = Object.create(obj);<br>console.log(createObj);  //{}<br>createObj.name = “Pk”;<br>console.log(createObj.speak());</pre><pre>// My Name is Pk and this is year 2019</pre><p>In this example <strong><em>obj</em></strong> is the prototype from which <strong><em>createdObj</em></strong> is created. Which means it can use properties of prototype due to inheritance. That’s why we can use <strong><em>speak()</em></strong> method without declaring that in <strong><em>createdObj</em></strong>.</p><h3>Object.entries()</h3><p>This is a simple function which converts JS objects to an array of arrays. With inner array is pair of key and value of the object. Let’s checkout a self-explanatory example</p><pre>let person = {name:”Roger”,age:30}<br>let entries = Object.entries(person);<br>console.log(entries);</pre><pre>//[ [ &#39;name&#39;, &#39;Roger&#39; ], [ &#39;age&#39;, 30 ] ]</pre><h3>Object.keys()</h3><p>This function picks only keys (or property labels) of objects and returns an array</p><pre>let keys = Object.keys(person);<br>console.log(keys);</pre><pre>// [ &#39;name&#39;, &#39;age&#39; ]</pre><h3>Object.values()</h3><p>This function picks only values of objects and returns an array</p><pre>let values = Object.values(person);<br>console.log(values);</pre><pre>// [ &#39;Roger&#39;, 30 ]</pre><h3><strong>Object.freeze()</strong></h3><p>This function freezes the object for any further changes (key or values). It may not throw any error (unless you are in <strong><em>strict mode</em></strong>) but there will be no effect of value change on your object.</p><pre>let frozenObject = Object.freeze(person);<br>frozenObject.name = “Nadal”;<br>console.log(frozenObject);</pre><pre>//{ name: &#39;Roger&#39;, age: 30 }</pre><p>That’s it for this small article — these are quite simple but important part of a beginner’s journey to Javascript. Properly using copying and creation methods can avoid many potential bugs in Javascript applications.</p><p>If you want to deep dive into all methods available in JS <strong>Object constructor </strong>check out <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">MDN Docs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c68c132a658" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/javascript-object-methods-every-developer-should-know-c68c132a658">Javascript Object methods every developer should know</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implement graphs in python like a pro]]></title>
            <link>https://medium.com/youstart-labs/implement-graphs-in-python-like-a-pro-63bc220b45a0?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/63bc220b45a0</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Prateek Surana]]></dc:creator>
            <pubDate>Sun, 22 Jul 2018 17:09:35 GMT</pubDate>
            <atom:updated>2018-06-18T18:36:34.465Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post I will tell you how you can what are graphs, what is the best method to implement them in python, their application and few other algorithms.</p><h3>So what are graphs anyways..?</h3><blockquote>A graph is a pictorial representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by points termed as <strong>vertices</strong>, and the links that connect the vertices are called <strong>edges</strong>.</blockquote><blockquote><strong>Source</strong>: <strong>Google</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Upj0sxloPpXV5AxCowZ3nQ.png" /><figcaption>A simple undirected graph</figcaption></figure><p>From the above definition it is clear that graphs are a set of vertices that are connected using edges and can be directed or undirected.</p><p>So what are the best data structures that we can use to implement graphs in python.</p><p><strong>They are none other than dictionaries and lists.</strong></p><p>We would be using a combination of both to show a node and their neighbouring vertices.</p><p>For eg the representation of above graph would look something just like this -</p><pre>{<br>    1:[2,3],<br>    2:[1,3],<br>    3:[1,2,4],<br>    4:[3]<br>}</pre><p><em>As simple as that.</em></p><p>Now coming on how to write a program to implement the same.</p><p>Well that’s also very easy the program below implements the above graph using two functions namely add_edge to add edges to the graph and show_graph to show all the edges in the graph.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88b50e676bdb7b98c9963b66736d0a89/href">https://medium.com/media/88b50e676bdb7b98c9963b66736d0a89/href</a></iframe><p>What the above program does is, it simply implements a class Graph which stores the graphs in a dictionary and displays all the edges in the end.</p><p>The output of the graph will be the same as the input we provided it -</p><pre>( 1 ,  2 )<br>( 1 ,  3 )<br>( 2 ,  3 )<br>( 2 ,  1 )<br>( 3 ,  1 )<br>( 3 ,  2 )<br>( 3 ,  4 )<br>( 4 ,  3 )</pre><p>That’s because we have just printed out the information that we stored in the graph. Now let’s play with it a little bit more….</p><h3>Let’s find the path between two nodes</h3><p>Just add this function to your existing class to find a path between any two nodes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d959ee830e8141835cdc4a16414130e/href">https://medium.com/media/2d959ee830e8141835cdc4a16414130e/href</a></iframe><p>And at the end of your file remove the last line and add this line -</p><pre>print(g.find_path(‘4’, ‘1’))</pre><p>Finally after running the program you should get the following result -</p><pre>[‘4’, ‘3’, ‘1’]</pre><p><strong>So what’s happening here,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*mvvH3077cyVpcF3L.jpg" /></figure><p>Let’s break the code into smaller pieces to understand it more properly.</p><p>So first things first, our function takes 3 arguments namely start, end and path. The first two variables, as the name suggests, store the start and end nodes. The third variable stores the current path while the function recursively calls itself to update that path.</p><p>Initially the path is set to an empty list and then we append the start node to it, after that we check if start==end , if yes then we return the path i.e. only the start node.</p><p>Then comes this -</p><pre>for node in self.graph_dict[start]:<br>    if node not in path:<br>        newPath=self.find_path(node,end,path)<br>        if newPath:<br>            return newPath<br>        return None</pre><p>This loop traverses all the neighbouring nodes of the start node and then recursively calls itself again until it finds a path from one of the neighbouring nodes to end node, if it finds a path it returns the path.</p><p>And remember that it does not return the shortest, it just returns the first path it finds. So as your homework try to find all possible paths and the shortest path. The process would be the same with just a little bit of changes, at the end of this post I will provide a link to my github repository that implements both of them.</p><h3>Breadth First Search (BFS)</h3><blockquote><strong>Breadth-first search</strong> (<strong>BFS</strong>) is an <a href="https://en.wikipedia.org/wiki/Algorithm">algorithm</a> for traversing or searching <a href="https://en.wikipedia.org/wiki/Tree_data_structure">tree</a> or <a href="https://en.wikipedia.org/wiki/Graph_(data_structure)">graph</a> data structures. It starts at the <a href="https://en.wikipedia.org/wiki/Tree_(data_structure)#Terminology">tree root</a> (or some arbitrary node of a graph, sometimes referred to as a ‘search key’<a href="https://en.wikipedia.org/wiki/Breadth-first_search#cite_note-1">[1]</a>), and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.</blockquote><blockquote>Source : <a href="https://en.wikipedia.org/wiki/Breadth-first_search">wikipedia</a></blockquote><p>BFS is an important graph algorithm and has many important applications including solving Rubik’s cube, Computing shortest path (Dijkstra’s algorithm) and Ford-Fulkerson’s algorithm computing maximum flow in a flow network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*on5z7UjsKdnc7Ujn4aqRHQ.gif" /><figcaption>A simple BFS implementation</figcaption></figure><p>The way this algorithm works is that it starts from any node and traverses all nodes at each level. We use queue to implement BFS, by poping nodes from queue, adding the neighbours of that node in the queue and labeling them as visited so that we don’t add the already traversed nodes in the queue again.</p><p>So let’s implement a program for the same -</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d565a0716462c1a803bc745e2f261617/href">https://medium.com/media/d565a0716462c1a803bc745e2f261617/href</a></iframe><p>Add this function to your class and replace the last line with g.BFS(&#39;1&#39;) and you will get the following output-</p><pre>1 2 3 4</pre><p>The way this function works is that it creates an empty dictionary visited and mark value of each node as false indicating that they are not visited yet.</p><p>Then we create a queue and append the starting node to it and mark it as visited.</p><p>The while loop runs until the queue is empty and it-</p><ol><li>Pops the first node from the queue.</li><li>Traverses all the neighbouring nodes of of the popped node and if they are not already visited it marks them as visited and pushes them at the end of the queue.</li><li>Prints the popped node.</li></ol><p>That way we find the connected components in the graph using BFS.</p><h3>Now try practicing these -</h3><ul><li><a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm"><strong>Dijkstra’s shortest path algorithm</strong></a></li><li><a href="https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/tutorial/"><strong>Depth First search</strong></a></li><li><a href="https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm"><strong>Floyd Warshall</strong> Shortest Path from every vertex to every other vertex</a></li><li><a href="https://pdfs.semanticscholar.org/presentation/2ff7/16f21ee77df2b4f963c57017487e80834810.pdf"><strong>Prim’s and Kruskal’s</strong> minimum spanning tree algorithms</a></li></ul><p>You can find the solution to these problems <a href="https://github.com/prateek3255/Python-graphs">here</a> on github.</p><p>Thanks for reading ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63bc220b45a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/implement-graphs-in-python-like-a-pro-63bc220b45a0">Implement graphs in python like a pro</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create your own react native npm package]]></title>
            <link>https://medium.com/youstart-labs/how-to-create-your-own-react-native-npm-package-f185aba5468a?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/f185aba5468a</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[npm]]></category>
            <dc:creator><![CDATA[Prateek Surana]]></dc:creator>
            <pubDate>Sun, 22 Jul 2018 14:52:21 GMT</pubDate>
            <atom:updated>2018-07-22T14:52:20.516Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post I will discuss how I created my first react native npm package and how can anyone build their own package. The package I created is <a href="https://www.npmjs.com/package/react-native-infinite-looping-scroll">react-native-infinite-looping-scroll</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qj1OTPHk-djj2C1Nnkn4VQ.png" /></figure><h3>Inception</h3><p>The problem was that I wanted a component in which I can pass a limited data and the render function of each item and it produces an infinite scrolling sensation in both directions by repeating the same data again and again.</p><p>So I searched a lot for this component and couldn’t find any, hence I decided to create one from scratch and published it on npm so that others who required this type of component wouldn’t need to implement it from scratch.</p><p>I implemented it using FlatList and by appending the data again and again whenever the user reached a particular threshold in any direction and removing the redundant data after a particular limit was reached, so the final result looked something just like this -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*DGtfVnwIWP8s7xiHRsCxvg.gif" /><figcaption>The final InfiniteScroll component implemented with data items numbered from 1–7</figcaption></figure><h3>Procedure</h3><p>This is the overview of the procedure I followed to create this package, if you want a more detailed procedure then you can visit the <a href="https://docs.npmjs.com/getting-started/creating-node-modules">official npm docs</a>.</p><h4>Initial Setup</h4><p>First you need to create a directory with the name of directory as the name of your package(that’s optional).</p><p>After that run command npm init in that directory, then it would ask you the details of your project like the name, version etc to create the package.json Don’t worry if you don’t know what to fill in a particular field, just keep pressing enter and you can change it later on.</p><p>After the package.json is created then created a src folder and place your component file into it and rename it as index.js. In package.json replace the value of main with &quot;src/index.js&quot;.</p><h4>Dependencies</h4><p>Now add the dependencies to your project, it is usually divided into 3 parts -</p><ul><li><strong>peerDependencies </strong>These are the dependencies that are required by the component and would already have been satisfied by the project. For eg -For any react native project react and react-native are necessary dependencies, so if anyone is installing your component they must have already installed these dependencies and we wouldn’t want it to install them again.</li><li><strong>dependencies </strong>These are the dependencies that are required by the project that might be or might not be satisfied by the project, so the component should install it. For eg — lodash or prop-types might be a good example for them if they are required by your component, because these may be or may not be present in the project, so we should better install them.</li><li><strong>devDependencies </strong>These are the dependencies that will be required by someone who wants to contribute to your project and will include all the libraries like jest , babel and es-lint that are required to perform the tests. These aren’t necessary if you haven’t setup the tests for your project.</li></ul><h4>Versioning</h4><p>Proper Semantic Versioning of your project is very necessary and it shouldn’t be ignored. I would refer you to go through <a href="https://docs.npmjs.com/getting-started/semantic-versioning">this</a> guide on semantic versioning for proper versioning of your project.</p><h4>Tests</h4><p>The tests are necessary for anyone who is looking to contribute to your project for proper and maintainable code. This is a vast topic and I won’t be able to cover it up in this post so let’s keep it for another time( <em>I too have also not set them up yet ;)</em> ).</p><p>If you still have your doubts you can view the <a href="https://github.com/prateek3255/react-native-infinite-looping-scroll/blob/master/package.json">package.json</a> of my project for more info.</p><h3>Publishing and Testing</h3><p>Once you’re done with the above steps, then it’s time to get you rolling.</p><p>First of all you need to create an account don npm for that, just run npm adduser and fill in all the necessary details.</p><p>Once done you can check if your user is created successfully by visiting npmjs.org/~yourusername.</p><p>Now just run npm publish in your project directory to publish the package.</p><p>Once published you can test the package in any react native project by running</p><pre>npm install your-package-name</pre><p>Once installed successfully you can test it by importing it in the following way</p><pre>import YourComponent from &#39;your-package-name&#39;</pre><p>And test it. If it works then congratulations you have successfully created your first npm package.</p><h3>Updating</h3><p>Once published you can update your package anytime by making the required the changes in the component and then updating the version in the package.json accordingly using semantic versioning and run npm publish to update the package.</p><p>If its just a patch update then you can also update it by running npm version patch in your project directory to automatically increment the patch version by one and then run npm publish to update.</p><p>I guess by now you might have a clear idea on how you can create your own npm package, if not then you can jot down your queries down below and I will try to help you the best I can.</p><p><em>Thanks for reading ;)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f185aba5468a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/how-to-create-your-own-react-native-npm-package-f185aba5468a">How to create your own react native npm package</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Node.js Backend without any server — Just Code using Webtask.io]]></title>
            <link>https://medium.com/youstart-labs/a-node-js-backend-without-any-server-just-code-using-webtask-io-555c7919b51f?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/555c7919b51f</guid>
            <category><![CDATA[webtask]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Abhishek Rathore]]></dc:creator>
            <pubDate>Sun, 22 Jul 2018 06:36:30 GMT</pubDate>
            <atom:updated>2018-07-22T06:35:57.849Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXhg6hsyx38c5LEN8Was8w.png" /><figcaption>webtask.io is a simple platform for low scale backend service</figcaption></figure><blockquote>Whenever, we talk about backend it is scary dark world — with no colors and things are terminal.</blockquote><p>However, with platforms like firebase, it has become easier to make a backend. But, every backend comes with their SDK and style of coding/querying/APIs — which means there is a learning curve involved. It would be great if we can have an online IDE where we can run any of our NodeJS files and immediately get the backend working through APIs. We are trying the same thing on <a href="http://webtask.io">Webtask.io</a> — it is an online IDE cum platform which will instantly deploy your code and give REST API over their domains. If you have a quick task of Node based backend and don’t want to dig into Linux cloud deployments — continue reading.</p><h3>Initial Setup</h3><p>After initial signup to <a href="http://WebTask.io">WebTask.io</a> you will get into their IDE — you can start via creating a new Web Task from a template. I chose ‘express with mongodb’. Check out the screens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*ul1P4tBZtHXRs3azSy5A0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*huWKBOb6CLA63E5GiLwuyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4JXVG6kyHZX_OWey8ZyiQ.png" /></figure><p>You will also have to find an online hosted MongoDB service — MLab is a perfect source for that. Sign up on MLab and get you hosted MongoDB URL.</p><p>If you don’t know about MLab, it is an online MongoDB which you can access via mongoldb URL like</p><pre>mongodb://&lt;dbuser&gt;:&lt;dbpassword&gt;@ds147451.mlab.com:47451/youstart</pre><p>Database user and password given in above URL will be made after making a new database on MLab. You can checkout MLab documentation for all this. You must choose sandbox free tier for having a free account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67-3p23e4nGSPnaMamN7xg.png" /><figcaption>A MLab Deployed Database</figcaption></figure><h4><strong>Word of Caution</strong></h4><p>Now comes the funny part — templates are outdated. Yes, I was using MongoDB 3 native driver (which you can check out in their NPM module section) but default connection code was given for MongoDB 2. This led to many errors while I was connecting to <a href="https://mlab.com/">MLab</a> Cloud MongoDB Database. This problem is solved in the next section.</p><h3>Updating Environment Variables/ Secrets</h3><p>You might be familiar with how node use environment variables (process.env) to keep secrets. However, WebTask has a section to keep secrets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFpyFH-hv-RMlzxjrjIONQ.png" /><figcaption>Secrets option is under the Wrench Icon Toolbar</figcaption></figure><p>You have to update in secrets — MONGO_URL. There can be many things which can go wrong with this URL config — Be Careful !! You will have to create a database and then a user for that database in MLab before jumping to this stage.<br> <br> As of MongoDB native driver 3+ you can’t have MONGO_URL as :</p><pre>mongodb://&lt;dbuser&gt;:&lt;dbpassword&gt;@ds147451.mlab.com:47451/youstart</pre><p>Instead use the one given below ( checkout that we removed database name ‘youstart’ and added a section after ? )</p><pre>mongodb://&lt;dbuser&gt;:&lt;dbpassword&gt;@ds147451.mlab.com:47451/?authSource=yourDB&amp;w=1</pre><p>`yourDB` should be replaced by your database name in MLab — else authentication will fail.<br> <br> Also if you look at later URL you will see database name is removed — database name is now given in javascript code.</p><pre>var db = client.db(‘youstart’); // Here youstart is the name of my database in MLab</pre><p>I have edited the code of template to make it work, you can use the following code here — only one change needed is name of your database.</p><h3>Complete Code (edited version of template)</h3><pre>‘use latest’;<br>import bodyParser from ‘body-parser’;<br>import express from ‘express’;<br>import Webtask from ‘webtask-tools’;<br>import { MongoClient } from ‘mongodb’;<br>import { ObjectID } from ‘mongodb’;</pre><pre>const collection = ‘my-collection’;<br>const server = express();</pre><pre>server.use(bodyParser.json());<br>server.get(‘/:_id’, (req, res, next) =&gt; {<br> const { MONGO_URL } = req.webtaskContext.secrets;<br> MongoClient.connect(MONGO_URL, (err, client) =&gt; {<br> const { _id } = req.params ;<br> if (err) return next(err);<br> var db = client.db(‘youstart’); //CHANGE THIS</pre><pre>db.collection(collection).findOne({ _id: new ObjectID(_id) }, (err, result) =&gt; {<br> if (err) return next(err);<br> res.status(200).send(result);<br> });<br> });<br>});<br>server.post(‘/’, (req, res, next) =&gt; {<br> const { MONGO_URL } = req.webtaskContext.secrets;<br> // Do data sanitation here.<br> const model = req.body;<br> console.log(MONGO_URL);<br> MongoClient.connect(MONGO_URL, (err, client) =&gt; {<br> if (err) return next(err);<br> var db = client.db(‘youstart’);  //CHANGE THIS</pre><pre>db.collection(collection).insertOne(model, (err, result) =&gt; {<br> if (err) return next(err);<br> res.status(201).send(result);<br> });<br> });<br>});<br>module.exports = Webtask.fromExpress(server);</pre><h3>Use Runner to Test API</h3><p>Click on the run button which will open an API test panel.</p><p>There are already 1 POST and 1 GET API endpoints implemented in the above code. You can first test the POST API to create some data on MLab database</p><pre>POST /                  (with the body containing JSON data)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*7xoggwgUwEyseTMki7IiZg.png" /></figure><p>Check out result in MLab — you can check that some document will be created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F2X2hXp0MRutnwBP4cYAew.png" /><figcaption>Document created by POST API</figcaption></figure><p>Now you can test GET API</p><pre>GET /:id  (where you can replace :id which Mongod Document ID) </pre><pre>GET /5b532801161da900067f68a1</pre><p>You will get the expected result in the Runner section.</p><p>Now we will check out our deployed backend server. Server URL is at bottom of IDE and you can start using it instantly.</p><pre> <a href="https://wt-06fb0e1f9b5c229c733b079d74404815-0.sandbox.auth0-extend.com/express-with-mongo-db/5b532801161da900067f68a1">https://wt-06fb0e1f9b5c229c733b079d74404815-0.sandbox.auth0-extend.com/express-with-mongo-db/5b532801161da900067f68a1</a><br> </pre><p>Tada !! Server-less Backend is ready !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555c7919b51f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/a-node-js-backend-without-any-server-just-code-using-webtask-io-555c7919b51f">A Node.js Backend without any server — Just Code using Webtask.io</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How not to stay a beginner forever]]></title>
            <link>https://medium.com/youstart-labs/how-not-to-stay-a-beginner-forever-1ae2ac2da61d?source=rss----f342194a48e6---4</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/youstart-labs/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/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Play GIF In Your Terminal]]></title>
            <link>https://medium.com/youstart-labs/how-to-play-gif-in-your-terminal-d7657578e717?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/d7657578e717</guid>
            <category><![CDATA[gif]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 17:44:42 GMT</pubDate>
            <atom:updated>2018-06-27T17:44:42.396Z</atom:updated>
            <content:encoded><![CDATA[<h4>A tutorial on playing GIF in your terminal using gif-for-cli in Linux or Mac OS. ¯\_(ツ)_/¯</h4><figure><a href="https://www.canva.com/design/DAC7uCyQNTo/kCUqKAqTaeS3Nk8VmLMcKQ/view?utm_content=DAC7uCyQNTo&amp;utm_campaign=designshare&amp;utm_medium=link&amp;utm_source=sharebutton"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBxUCOjk6pWzSWQKsS9D2g.png" /></a><figcaption>Make your terminal lit 🔥.</figcaption></figure><p>You might have seen ASCII arts on your terminal like the ones below when installing a new module/library in your system. Some developers (or even you might have) configure a static ASCII art which appear when they open their terminal. But have you ever seen a GIF running in your Swiss Army knife like terminal? 👀 That would give life and a personality to your terminal!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUykKYeR3_g8xHG9qXbE9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*tCqqCVvjVBjCgjqwFtX9QA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*gEte_yivrQPbkn-XzaOSMA.jpeg" /><figcaption>ASCII Arts in terminal</figcaption></figure><p>Nothing is impossible. Now even playing a GIF on your terminal is possible. GIF has been around us for long 31 years (<a href="https://en.wikipedia.org/wiki/GIF">seriously</a>? 😲) and what better time it is to see GIF in your terminal.</p><h3>Getting Started</h3><p>Requires Python 3 (with setuptools and pip), zlib, libjpeg, and ffmpeg, other dependencies are installed by setup.py.</p><h4>Install dependencies</h4><pre># Debian based distros<br>sudo apt-get install ffmpeg zlib* libjpeg* python3-setuptools<br># Mac<br>brew install ffmpeg zlib libjpeg python</pre><p>Your Python environment may need these installation tools -</p><pre>sudo easy_install3 pip<br># This should enable a pre-built Pillow wheel to be installed, otherwise<br># you may need to install Python, zlib, and libjpeg development libraries<br># so Pillow can compile from source.<br>pip3 install --user wheel</pre><h4>Install gif-for-cli</h4><p>Install from PyPI:</p><pre>pip3 install --user gif-for-cli</pre><p>Or download this <a href="https://github.com/google/gif-for-cli">repo</a> and run:</p><pre>python3 setup.py install --user</pre><p>The gif-for-cli command will likely be installed into ~/.local/bin or similar, you may need to put that directory in your $PATH by adding this to your .profile:</p><pre># Linux<br>if [ -d &quot;$HOME/.local/bin&quot; ] ; then<br>    PATH=&quot;$HOME/.local/bin:$PATH&quot;<br>fi<br># Mac, adjust for Python version<br>if [ -d &quot;$HOME/Library/Python/3.6/bin/&quot; ] ; then<br>    PATH=&quot;$HOME/Library/Python/3.6/bin/:$PATH&quot;<br>fi</pre><h3>GIF in action</h3><p>I’ll be using my favorite <a href="https://slackmojis.com/">Slackmoji </a>— <a href="http://cultofthepartyparrot.com/">Party Parrot</a> for playing in the terminal.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl3q2zVr6cu95nF6O4%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl3q2zVr6cu95nF6O4%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl3q2zVr6cu95nF6O4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="213" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a338718d090c1759739e4cc6916ba8a/href">https://medium.com/media/2a338718d090c1759739e4cc6916ba8a/href</a></iframe><p>Don’t know about Party Parrot? It’s quite an interesting story. Read it out here.</p><p><a href="https://mashable.com/2017/07/13/cult-of-the-party-parrot-slack-reddit-meme/">Cult of the party parrot: How a ridiculous bird became an emoji hero</a></p><p>After the installation, run the following command in your terminal and enjoy the party 😉. The following command queries the <a href="https://tenor.com/gifapi">Tenor’s GIF API</a> and returns the top GIF.</p><pre>gif-for-cli &quot;party parrot&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3bsPmG3CR2r8X_XWCsJ2w.gif" /><figcaption>Party Parrot in terminal. (Recorded with <a href="https://github.com/phw/peek">Peek</a>)</figcaption></figure><p>For exploring more gif-for-cli usage options, check the link below.</p><p><a href="https://github.com/google/gif-for-cli/blob/master/README.md#usage">google/gif-for-cli</a></p><h3>What about Windows users? 😕</h3><p>Currently, this is not supported on Windows platform. Though, there is an <a href="https://github.com/google/gif-for-cli/issues/5">open issue</a> on GitHub’s repo for Windows Command Prompt and PowerShell support. You can subscribe to that issue or keep a watch on the <a href="https://github.com/google/gif-for-cli">repository</a>. Or a much better initiative, switch to Linux 😎 as soon as possible or just wait forever.</p><p>Let’s see what GIF you have put up on your terminal. Comment down below your terminal images with GIF in action 📷.</p><p>Thank you for reading! 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://www.linkedin.com/in/guptaji6/">LinkedIn</a>, <a href="https://www.instagram.com/_.guptaji._/">Instagram</a>, <a href="https://github.com/gupta-ji6">GitHub</a>, <a href="https://twitter.com/_guptaji_">Twitter</a> and <a href="https://www.facebook.com/guptaji.6">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7657578e717" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/how-to-play-gif-in-your-terminal-d7657578e717">How To Play GIF In Your Terminal</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I made my first open source contribution]]></title>
            <link>https://medium.com/youstart-labs/how-i-made-my-first-open-source-contribution-8df679fad1b2?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/8df679fad1b2</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[vc]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Prateek Surana]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 09:31:20 GMT</pubDate>
            <atom:updated>2020-07-31T13:31:34.870Z</atom:updated>
            <content:encoded><![CDATA[<p>So you are starting to think about contributing to open source, but you don’t know where to start, well you are at right place. In this post, I will discuss the benefits of contributing to open source and how I started as a beginner and made my first contribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fTRZ6RFIZX2M-xLugfgIjw.png" /></figure><h3>So why should you contribute to open source?</h3><p>I know that’s why you’re but still, if you have your doubts, like why should you waste your valuable time for writing code for someone else and that too for free? Well there are many reasons you should, no matter what is your goal, here are some of them.</p><ul><li>Whether it’s coding, user interface design, graphic design, writing, or organizing, if you’re looking for practice, there’s a task for you on an open source project.</li><li>You get to meet people who have similar interests and sometimes form life long friendships through their participation in open source.</li><li>Working on shared projects teaches you many things like you get to explain how you do things and ask others for help.</li><li>But most importantly, if you are looking for good opportunities for your career then contributing to open source helps you build a resume that stands out of the crowd and it also helps in building your online presence.</li></ul><h3>Ok, so now you have a good reason to contribute, but where to start?</h3><p>Before start looking for projects you should know the workflow of a pull request, for that, I would recommend you to go complete the steps given in <a href="https://github.com/Roshanjossey/first-contributions">Roshan Jossey’s first-contribution</a>s and make your first open source contribution.</p><p>After you are done with the above steps, then you are ready to go out in the open source jungle and try to hunt some of the easy bugs. Here are some resources for the same -</p><ul><li><a href="https://up-for-grabs.net/#/">up-for-grabs</a> is a place where you can find beginner level bugs in almost any language/framework you are interested in.</li><li>If you want some more sources, see <a href="https://www.firsttimersonly.com/">firsttimersonly</a></li><li><a href="https://www.joshmatthews.net/bugsahoy/?">Bugs Ahoy</a> is another place where you can find beginner level bugs in many technologies in mozilla open source projects.</li><li>Many open source projects have labels on their issues marked as first-timers-only , beginner-friendly or something like that for beginners and first time contributors like us, you can take a look at those issues.</li><li>If you still have any concerns related to any project or you are still unable to find a project to contribute to you can join the slack channel of <a href="https://join.slack.com/t/firstcontributors/shared_invite/enQtMzE1MTYwNzI3ODQ0LTZiMDA2OGI2NTYyNjM1MTFiNTc4YTRhZTg4OWZjMzA0ZWZmY2UxYzVkMzI1ZmVmOWI4ODdkZWQwNTM2NDVmNjY">first contributions team</a> mentioned above, and discuss it there.</li></ul><h3>Found your project!, let’s start contributing…</h3><p>Once you have found an issue you would like to contribute to,go through their readme and first get know what the project is all about.</p><p>Then before you start working on the issue, just find their contributing guide and read it to know how to setup the development environment for that project.</p><p>Join any IRC or slack channel or any mailing lists in that project, introduce yourself there and tell others you would like to work on that particular issue, also don’t forget to comment on the issue that you want to work on it.</p><p>Once you have discussed the issue with the maintainers, you can follow the steps you did in first contributions project in the previous section to fix the issue and create a pull request.</p><p>Now wait for the pull request to be reviewed by the maintainers and if they suggest any changes complete those changes and commit them.</p><h3>Celebrate!</h3><p>If your pull request gets merged, then break out a celebratory beverage of your choice! You’re now an open source contributor!</p><h3>My first contribution</h3><p>I also followed the above steps to make my first contribution and I made it in <a href="https://github.com/freeCodeCamp/freeCodeCamp">freeCodeCamp</a>, and at the time of writing this post my <a href="https://github.com/freeCodeCamp/curriculum/pull/57">pull request is ready to be merged</a>. I too wandered around many github issues of many projects till finally found this <a href="https://github.com/freeCodeCamp/freeCodeCamp/issues/15012">issue</a>.</p><p>The issue was that a freeCodeCamp test was very tricky to pass because even if there is a space before/after a ; , you won’t be able to pass it. It was using javascript regex to check if the code was correct or not.</p><p>At first when I saw the code for this issue I had no idea how javascript regex worked and I wasn’t able to understand even a single piece of that code, then I viewed the documentation for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">javascript regex</a>, practiced on some <a href="https://regex101.com/">online regex editor</a>, understood where the problem actually was and finally made a pull request.</p><h3>Some tips from my personal experience</h3><ul><li>If you find an interesting issue don’t just jump and start working on it, first read the comments on that issue to check that whether it is already assigned to someone or not and check if it’s not too old. After that comment on that issue that you want to work on it and <strong>wait for someone to respond, </strong>because I too ended up on a couple interesting issues, started working on them and later realized that those issues are not active anymore, i.e., their maintainers just forgot to close them.</li><li><strong>Don’t get disappointed if your pull request doesn’t get merged</strong>, ask the reviewer what mistakes you made and what changes you should make in your PR get it mergable.</li><li>Most importantly <strong>don’t lose hope, </strong>you will find many repositories that will be in your favorite framework/language but still you might not be able to understand what’s happening in the code, that’s ok, just stick a little bit longer and try to understand the code even if you have to google every function, eventually you will understand it.</li></ul><p>I hope this helps you or motivates you in getting started with open source.</p><p><em>Thanks for reading ;)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8df679fad1b2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/how-i-made-my-first-open-source-contribution-8df679fad1b2">How I made my first open source contribution</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</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/youstart-labs/what-indian-students-do-wrong-in-tech-f29d94f6dbad?source=rss----f342194a48e6---4</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:52 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/youstart-labs/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/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Interactive session with Harsh Bhardwaj at Youstart : How to land great Jobs.]]></title>
            <link>https://medium.com/youstart-labs/https-medium-com-rathore-session-by-harsh-bhardwaj-youstart-summer-internship-jaipur-fullstack-1f7ae4ef9c48?source=rss----f342194a48e6---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f7ae4ef9c48</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Abhishek Rathore]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 10:25:54 GMT</pubDate>
            <atom:updated>2018-06-17T10:25:41.434Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V4hNvwg2I2IQ7nM_N0x8Nw.jpeg" /><figcaption>Harsh Bhardwaj, Interacting with Students at Youstart — Fullstack Summer Bootcamp 2018</figcaption></figure><p>As a part of on-going tradition of interactions with past Alumni and Industry mentors, we organized a session with Harsh Bhardwaj on 5th June 2018, as part of Summer Training and Internship Program. Harsh works at PTC, which is known for its Internet of things (IoT) and augmented reality (AR) platform for partners and developers. <a href="https://www.ptc.com/">PTC</a> has six core product families: Creo, Windchill, Mathcad, Integrity, Servigistics, and ThingWorx.</p><p>Harsh has taken out some time from his busy schedule during his visit to Jaipur. Harsh has been a part of the Youstart family and always helped young coders to learn and work on new technologies by being an active volunteer at college club. He is continuing the same role via these activities — even after joining the Industry. Most of the session was Q &amp; A, which went over an hour to discuss various topics related to students life and career. Here are the key elements :</p><p><strong>How was your interview experience at PTC and other companies?</strong></p><p>Most of the interviewers asked about some problem to check your problem-solving attitude and not syntax and semantics. If they have given a problem then you have to provide an efficient approach to solve it — and keep optimizing it over the discussion. They want to see how you think about a problem in a real-life situation. They want to analyze your thought process, as you will be working with them on day-to-day work. I am talking about interviews of good companies; a mass recruiter might not be interested in providing so much time to each candidate.<br>Most of my interviews went for more than 1 or 2 hours in which we discussed a single problem at hand. Most good companies allow you to think on pen &amp; paper or a whiteboard. They don’t want your code — as the code is an obvious thing which anyone can write.</p><p><strong>How was life after college?</strong></p><p>Life in college was a bit of struggle for me — it was enjoyable but hard. You have to go through many courses and exams. In between, you want to work on good internships too. But, it is hard to get a good internship, especially in a non-IT city like Jaipur.<br>I remember a boy with an injured leg and traveling almost 20KM to complete internship works. It was me!<br>But I wanted to do that, it was not a burden for me. I worked on many internships in which I was not paid any stipend — but all was the experience.<br>Life after joining PTC has been fun. I work on real-life problems with like-minded people. I get some extra money to spend than in my college days. I can work on exciting new things.</p><blockquote>I remember a boy with an injured leg and traveling almost 20KM to complete internship works. It was me!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SySG-We_LcfZ1NQtIP_Enw.jpeg" /></figure><p><strong>What is the role of training/internship in engineering?</strong></p><p>You need not do any training if you can learn these things on your own — the internet is a big resource for learning new things. If you need guidance approach a good mentor — who has industry skills and has worked in the relevant industry. There are a lot of coachings but most of them are focused on certificates, not on learning real industry practices. I think training or internship should be done where you are actually working in an industry environment under the guidance of people who know how the industry works.<br>I didn’t have many certificates when I was sitting for placements. Even though I had completed many training and internships but I was not interested in collecting those certificates. I was rather interested in working and get some new skills.<br>I remember a guy sitting beside me during placement time having a lot of certificates but did not have any knowledge of current technologies. I was selected after that interview, based on my knowledge and skills — he wasn’t.</p><blockquote>Certificates with no knowledge are of no value.</blockquote><p><strong>How did you start with coding and other things?</strong></p><p>I worked on many internships — as I said many of them did not pay anything. I was not working for certificates or stipend but for the experience.<br>I think all of it was used somewhere in my journey — you can’t say exactly where it will be useful but somewhere it will be.<br>I attended node.js Summer Bootcamp at <a href="https://youstartlabs.in/">Youstart</a> and that came to use in one of the rounds in PTC interview. Also, my current profile and work of full stack developer started recently — there we had to learn these frameworks quickly and I am finding it familiar as I have already learned Nodejs here. So you never know when it will be useful — but real knowledge never goes away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DlakFP4UarnQIJW909Qw5Q.jpeg" /></figure><p><strong>Is it worth going to software development field, nowadays?</strong></p><p>Yes, it is a quite exciting field. You can create new products. You can work on new ideas. You can create things which people use. You get to work with people who are helpful, friendly and have similar visions as you. Finding such an environment is difficult in any practical sector. The software industry is still the top choice of making a career. Also, it is flexible — you can work from anywhere — you get work from home. you don’t need big machinery. Everything you need is your system and will to work on given problem.</p><p><strong>One should do master’s or go to software development company? Which is better?</strong></p><p>It completely depends on your interest If you are interested in academics or research then go for further studies i.e. Master’s degree.<br>If you want a big job master’s degree may be helpful for that too but it is not worth to spend 2 years to join master’s degree and then work in software development after that. <br>Now you can apply to any country across the globe if you have the required skill set. It is better to have 2 years of working experience in the software field.<br>But if you are focused on government jobs, teaching jobs or some similar options, master’s degree can be helpful. But in software development, it is not so.<br>You can always go to a better company in 2 years or less than that by improving your skills and good coding practices.</p><p><strong>Is it worth learning MEAN Stack?</strong></p><p>MEAN Stack is a framework in which you can create applications. There are many such frameworks.<br>Initially, companies are not worried about the platform you use to solve a particular problem.<br>If you can solve a problem, no one worries about the platform. However, MEAN stack is a good platform. Many companies are adopting it. It is quite popular in the current industry. I am also working as a Full Stack Developer. But you have to always think that technologies will come and go — you have to be an engineer first who can solve any problem given to you. Technology and frameworks will change but you have to prove yourself in any given task. That’s why I have learned in my college days — whatever task is given to you, complete it with full dedication.</p><p><strong>How to prepare for placements?</strong></p><p>If you are thinking about campus placements — you don’t have to prepare a lot just read some traditional books to prepare aptitude and tech questions. If you are thinking of a good company — prepare data structures well, read about object-oriented programming concepts — not syntax. Know about SOLID principle and practice programming question on some online forum.</p><blockquote>You should have a good profile on GitHub, and other code platforms.</blockquote><p><strong>How important is percentage or marks for placements?</strong></p><p>I had a backlog — I was not able to sit in many companies during my campus placements. Ultimately I had got a better job than others. Do I need to say any more about marks and percentage? If you want to go to masters and higher studies — might be useful to have higher grades but otherwise — no one will ask.</p><p><strong>How you faced tech interviews with basic knowledge of JAVA and other things?</strong></p><p>Companies are not checking in-depth knowledge of Java or any framework. You can survive with basic knowledge if you have the problem-solving attitude with you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*stEWKnTBKJpzd_M4KvQ0MQ.jpeg" /></figure><p><strong>What do you think about future of mobile application software development?</strong></p><p>Future is bright for mobile and all smart devices which will come. You can already see that people are using mobile as complete computing systems. There are lots of work going on in this field.</p><p><strong>What is a product company and how it is different from a service company?<br></strong> <br>Product company has there own product -like windows by Microsoft — they work on the product, maintain it and improve it. Service companies — generally work on products of other companies and make them possible using their developers — Like Infosys. They create products for other companies who are their clients. Generally, people want to work in product company as they can have a ownership of some product — but at times you can be bored on working on the same project. But you can switch if your company provide flexibility to switch teams and products.</p><p><em>These were excerpts from talk of Harsh, if you want to be a part of growing community of coders and hackers at Youstart, you can join our facebook group </em><a href="https://www.facebook.com/groups/youstartlabs">https://www.facebook.com/groups/youstartlabs</a> .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f7ae4ef9c48" width="1" height="1" alt=""><hr><p><a href="https://medium.com/youstart-labs/https-medium-com-rathore-session-by-harsh-bhardwaj-youstart-summer-internship-jaipur-fullstack-1f7ae4ef9c48">An Interactive session with Harsh Bhardwaj at Youstart : How to land great Jobs.</a> was originally published in <a href="https://medium.com/youstart-labs">Youstart Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>