<?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 Gaurav Tiwari on Medium]]></title>
        <description><![CDATA[Stories by Gaurav Tiwari on Medium]]></description>
        <link>https://medium.com/@gauravtiwari_28979?source=rss-639b37892a00------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3NT_O_osFROQUJEk.</url>
            <title>Stories by Gaurav Tiwari on Medium</title>
            <link>https://medium.com/@gauravtiwari_28979?source=rss-639b37892a00------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:43:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gauravtiwari_28979/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[Kharagpur Winter Of Code — My start to open source world]]></title>
            <link>https://medium.com/@gauravtiwari_28979/kharagpur-winter-of-code-my-start-to-open-source-world-805e840f07ec?source=rss-639b37892a00------2</link>
            <guid isPermaLink="false">https://medium.com/p/805e840f07ec</guid>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[kwoc]]></category>
            <category><![CDATA[electronjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Gaurav Tiwari]]></dc:creator>
            <pubDate>Wed, 03 Jan 2018 19:54:11 GMT</pubDate>
            <atom:updated>2018-01-16T17:14:27.843Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://kwoc.kossiitkgp.in/">Kharagpur Winter of Code(KWOC)</a> is a 5 week online program organised annually by IIT Kharagpur’s Open Source Society.</p><p>I came to know about it from one of my seniors who recommended everyone to contribute to open source projects and learn how it all works. Thanks to him for recommending to participate in KWOC.</p><p>The first step was to choose a project to work upon amongst a number of projects implemented using different languages and frameworks. This task was a challenging one. My domain was Web Development. So I was well equipped with JavaScript. There were a number of projects coded in JS. I explored each of them and tried to find the one in which I could work without much problem + I could learn something knew. So, finally I chose ‘Breakout’ project which actually is a game which I guess everyone has played. My mentor for this project was <a href="https://www.facebook.com/jajodia.raghav"><strong>Raghav Jajodia</strong></a> who is Google Summer of Code’17 intern at National Resource for network biology. I sent him a message on gitter channel regarding the process for contributing and he replied to the message providing the instructions.</p><p><strong>Game screenshot initially:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*p-lM3LKUB407seayNJA0Ow.png" /></figure><p>The game was all about about hitting the bricks and destroying all of them by hitting with ball by controlling the paddle. The paddle could be controlled by both keyboard and mouse.</p><p>My contributions:</p><h3>Pull request 1:</h3><p>One of the contributors in the project had written the code for saving high score as long as the user remains in the same session. I found a loophole that the high score sets back to 0 once the user wins the game. I requested the mentor to open back the issue. But my pull request was closed because of two mistakes:</p><ol><li>The title was not appropriate.</li><li>package-lock.json file wasn’t in .gitignore to remove it from commit.</li></ol><h3>Pull request 2:</h3><p>I put package-lock.json in the .gitignore but the pull request still wasn’t merged because:</p><ol><li>Again, title wasn’t appropriate.</li><li>Commit was made from master branch.</li></ol><p>At that time, I got somewhat confused so I closed my pull request. I received message from mentor for why I closed the PR. This shows how serious he was regarding the learning process of contributors. I told him I was facing issues with git as I had been using basic git commands as I was new to open source. He helped me a lot by providing him link to his own blog on contributing to open source and some other important links.</p><h3>Pull Request 3:</h3><p>After going through the links provided by Raghav sir. I made a PR and it was finally merged. It was a great feeling when I made the first PR to an open source project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*YmpHzh4wd-CBnCMI1R2dGg.png" /></figure><h3>Pull Request 4:</h3><p>Next issue I targeted was to add sound in the game for these situations:</p><ol><li>When ball hits the brick</li><li>When ball falls on either side of the paddle</li><li>Victory</li><li>Loss</li></ol><p>My PR was merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XbryTyRdT2x28awaBHI3eg.png" /></figure><p>But wait… I did a mistake..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*S9HokKmBZHVJSQjMutka-g.png" /></figure><p>My PR was mistakenly merged even when I didn’t claim the issue. I apologised to the contributor who claimed the issue. So, I got to know that an issue needs to claimed before working on it.</p><h3>Pull Request 5:</h3><p>Next issue I solved was to prevent the board to go out of frame which I did by making a small change , adding resizable property to false in the object which is argument to BrowserWindow constructor in main.js file. The PR was merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3t6Bou9H76szfEw4Ag097A.png" /></figure><h3>Pull Request 6:</h3><p>Next issue I targeted was to replace screenshot of game by GIF in readme.md . I did it but made mistake that I used imageflip website feature to get link to GIF. I could’ve done it by storing gif in assets folder. The PR was closed.</p><h3>Pull Request 7:</h3><p>I solved the issue of replacing screenshot by GIF by placing it in assets folder and then writing the code in readme.md to use it there. The PR was then merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*TlHjncCNyt6ZM4kivkaV0w.png" /></figure><h3>Pull request 8:</h3><p>Next issue I targeted aimed at letting user to set preference for keyboard or mouse to play. Here I was caught in an issue that JQuery wasn’t working. The application was throwing error that $ isn’t defined even though I wrote scripts in proper order. Here, my mentor came to the rescue. I pinged him regarding this and he told me that in desktop apps made using electron.js , JQuery doesn’t work only by including it in html file. He provided me a way to get over it. Finally, with his help the issue got resolved and I made a dialog box which asks for controls from the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*rbOxq6iPPgJUid1UCd88BQ.png" /></figure><p>After clickling one of the options, user can move the handle using the controls he chose. The PR got merged finally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*_hxhNpzPv9AaePUirUYkpQ.png" /></figure><h3><strong>Pull Request 9:</strong></h3><p>Next issue I solved was to add bonus bricks hitting which +5 gets added to the score. The PR was merged and this is how the game looked then:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*H6pFiB2Rlc5WR3Dq4Ppt0Q.png" /></figure><p>The orange bricks are the bonus ones.</p><h3>Pull Request 10:</h3><p>Next issue I targeted was to add settings panel to set difficulty level. So I added a dialog box which asks difficulty level of the game. Three levels were added: easy, medium, hard, in which there was variation of paddle length and ball speed. This is how dialog box looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*zo34LVFsM1wZTdrzOn7dTQ.png" /></figure><p>After choosing the difficulty level, the game goes on normally, asking the controls and then, game on ! The PR got merged.</p><p>Because of this project, I learnt how to use Electron.js for making desktop apps using JavaScript. Also, I learnt git commands(like stashing, rebase,reset to previous commit etc .) which I never used before contributing to KWOC.</p><p>The issues aren’t over yet. Although KWOC has come to end, I will contribute to the game further and make it more enjoyable to play.</p><p>The game is available here: <a href="https://github.com/jajodiaraghav/Breakout">https://github.com/jajodiaraghav/Breakout</a> . Read the instructions given to install the game.</p><p>I finally thank <a href="https://www.facebook.com/jajodia.raghav">Raghav Jajodia</a> sir for helping me and answering silly questions. I really got inquisitive at times during the chat as I wanted to learn a lot from him. Thanks to Kharagpur Open Source Society for organising such a great open source contest which was a mock Google Summer of Code for all contributors. Now, I’ve really got to know how contributions are made in GSoc. Hoping for more events like these in future.</p><p>Thank you !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=805e840f07ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>