<?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 Chinmay Patil on Medium]]></title>
        <description><![CDATA[Stories by Chinmay Patil on Medium]]></description>
        <link>https://medium.com/@chinmaypatil?source=rss-a9af2015d48f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d9gyVJa_9S4HWcghHKqVJA.jpeg</url>
            <title>Stories by Chinmay Patil on Medium</title>
            <link>https://medium.com/@chinmaypatil?source=rss-a9af2015d48f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:37:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chinmaypatil/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[Why and How of ‘Taking’ a Technical Interview]]></title>
            <link>https://chinmaypatil.medium.com/why-and-how-of-taking-a-technical-interview-3d3e5f1c48e4?source=rss-a9af2015d48f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d3e5f1c48e4</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[why]]></category>
            <category><![CDATA[recruiting]]></category>
            <dc:creator><![CDATA[Chinmay Patil]]></dc:creator>
            <pubDate>Mon, 05 Jul 2021 10:55:52 GMT</pubDate>
            <atom:updated>2021-07-05T10:55:52.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/684/0*wanLnE2brvbWwm47.png" /><figcaption>Image Credit: biginterview.com</figcaption></figure><h3>‘Why’ of an Interview</h3><blockquote>You don’t hire for skills, you hire for attitude. You can always teach skills.</blockquote><blockquote>-Simon Sinek</blockquote><p>We come across different candidates in the hiring process. They have different set of skills, depth of knowledge and domain of expertise. <strong>No two candidates are the same.</strong></p><p>Similarly, <strong>no two interviewers are the same as well</strong>. They also come with their own set of skills, knowledge, and expertise. Therefore, evaluating candidates fairly to decide whether they are the best match for our organizational needs becomes a tricky task.</p><p>The best way to judge a candidate in any domain is to focus on the fundamentals. <strong>When a candidate has solid fundamental knowledge, it is very easy for him/her to rapidly learn any advanced skill of the same domain.</strong></p><h3>‘How’ of an Interview</h3><blockquote>An interview does not have to be a zero-sum game, where you either win or lose. It can be an experience of understanding, empathy and learning for the interviewer and the interviewee.</blockquote><p>Here are some ways to optimize the fairness of the interview while still keeping it a win-win and positive-sum game for the candidates and the organization:</p><ul><li>Ask questions that prioritize the candidate’s problem-solving skills, logic, and demonstration of fundamental knowledge.</li><li>Avoid questions that require a candidate to memorize a certain pattern, quirk, behaviour, or syntax of a particular language or technology.</li><li>Give hints to candidates to point them in the expected direction. This is important as it acts as a guiding direction to keep the interview on track and get the best out of the allotted time.</li></ul><p><strong>Books are important. To an engineer, technical books are even more so.</strong></p><p>Ask a candidate about their favourite technical books that they read in recent times (the ones from university time and curriculum do not count in this). If a candidate takes out time from their schedule to read technical books and keep themselves updated, this shows attitude. It shows that the candidate actually cares about sharpening their skills and their relevance.</p><p>However, books are not the only source for this. A recently completed course on Udemy/Pluralsight or a learning project, for a relevant skill, says just the same.</p><blockquote>We are interviweing a candidate because our organization might benefit from their skills. We should give them all the opportunities to optimize and succed at the interview. Our primary goal is not to accept or reject a candidate, but to judge how much value can a person bring with his/her current skills and attitude.</blockquote><p>This document is a work in progress. It will be updated as per the relevance and requirement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d3e5f1c48e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Takeaways for real life!]]></title>
            <link>https://medium.com/series/takeaways-for-real-life-c6f287a291e6?source=rss-a9af2015d48f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6f287a291e6</guid>
            <dc:creator><![CDATA[Chinmay Patil]]></dc:creator>
            <pubDate>Wed, 04 Sep 2019 14:01:57 GMT</pubDate>
            <atom:updated>2019-09-04T14:01:57.877Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Deep Work: Cal Newport</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*QmJxJZMJ1QCjNs68DV1D0w.jpeg" /></figure><p>This book has been a fascinating read. It highlights the results one can achieve with focussed efforts.</p><p>The author starts with proposing the idea of the ‘deep work’, a concept where you focus on your work for a significant stretch at a time while keeping away from distractions.</p><p>With the advent of technology, there is no scarcity of distractions in 21st century. These add up to reduce one’s ability to perform meaningful work. They tend to make us busy rather than productive. Most of these are designed in order to ‘hook’ a user to form a habit for repeated and prolonged usage.</p><p>In order to get meaningful and ‘deep’ work done in your personal or professional capacity, following might be of use:</p><ol><li>Figure out the periods where you are able to focus/concentrate. Some might be able to concentrate early in the morning, some late in the night.</li><li>Use this time to perform the tasks which require focus and concentration e.g. learning a new skill, writing a thesis, writing a new article etc.</li><li>You have a limited amount of focus per day. Use it wisely. This duration ranges between 1–4 hours depending upon the level of practice.</li><li>Notifications on your laptop and mobile phones are the biggest threat to your focus and ability to be productive. Keep them on silent/DND mode whenever you are engaging in the deep work.</li><li>Avoid using social media/infotainment while performing shallow tasks such as having meals, sending email, on bio breaks etc. It hampers the ability of brain to recharge the ability needed to work deeply.</li><li>Instead use the time while performing such shallow tasks to observe, think and plan.</li><li>Quit social media. This doesn’t mean that you quit facebook, but started using quora and reddit instead.</li><li>Plan your 9–5 day religiously. Decide the intervals for deep focussed work. Allot the intervals for shallow work. Add a structure to your day. To-do lists are lifesavers.</li><li>Do not overwork yourself. 9–5 is enough time to get things done. With practice, you will learn to decrease the time allotted for shallow work and increase the same for deep work. This increases your productivity and in turn, reduces the time you take to complete your work.</li><li>The work done in the evening is not a great productivity enhancer.</li><li>Become hard to reach. It is not necessary to immediately reply to every email, text or WhatsApp message. In fact, most of the times it is not necessary to reply at all.</li></ol><p>These were the takeaways for life from this book.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6f287a291e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying NodeJS, Express, MongoDB application on AWS EC2]]></title>
            <link>https://chinmaypatil.medium.com/deploying-nodejs-express-mongodb-application-on-aws-ec2-e32a8e3ea8a1?source=rss-a9af2015d48f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e32a8e3ea8a1</guid>
            <category><![CDATA[pm2]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[google-domains]]></category>
            <dc:creator><![CDATA[Chinmay Patil]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 08:54:42 GMT</pubDate>
            <atom:updated>2019-07-31T08:54:42.574Z</atom:updated>
            <content:encoded><![CDATA[<h4>with Google Domain, Let’s Encrypt, NGINX and PM2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*eo05IC3jZOxb9bp6dXMkZw.png" /><figcaption>Image from WordArt.com</figcaption></figure><h4>Introduction</h4><p>Express, NodeJS and MongoDB are one of the most popular choices to quickly build and deploy applications these days. While we find abundant resources on how to build an application with these platforms and deploy them, there are not a lot of resources which collate all the steps together.</p><p>In this article, we will try to collate the different steps one needs to take in order to successfully deploy an application.</p><h4>Prerequisites:</h4><ol><li>An application built on NodeJS, Express and MongoDB which is completely functional in your local environment.</li><li>Basic understanding of AWS (Amazon Web Services) and EC2 instance creation.</li></ol><h4>Agenda:</h4><ol><li>Registering a domain. We will use Google Domains (<a href="https://domains.google.com/">https://domains.google.com</a>) as it is simple and convenient to use and cheaper than most other alternatives.</li><li>Creating a EC2 instance (Ubuntu 18.04) and preparing it for deployment.</li><li>Binding domain and Elastic IP of EC2 instance.</li><li>Installing Node, NPM in AWS EC2 instance.</li><li>Installing MongoDB, enabling access control.</li><li>Installing and configuring NGINX to run with Node server.</li><li>Setting SSH as per your requirement.</li><li>Installing and configuring PM2 to use different environments with respective environment variables.</li><li>Setting up ssl certificate using Let’s Encrypt.</li></ol><h4>1. Domain</h4><p>Head over to <a href="https://domains.google.com/">https://domains.google.com</a> and search for the domain that you want. If you need help in generating a domain name with combination of a few words, you can take help of one of the following domain generators:</p><ol><li><a href="https://instantdomainsearch.com/domain/generator/">https://instantdomainsearch.com/domain/generator/</a></li><li><a href="https://www.namemesh.com/">https://www.namemesh.com/</a></li><li><a href="https://www.nameboy.com/">https://www.nameboy.com/</a></li><li><a href="https://domainwheel.com/">https://domainwheel.com/</a></li><li><a href="https://leandomainsearch.com/">https://leandomainsearch.com</a></li></ol><p>Once you have finalised a domain, buy it from Google Domains. After the purchase, you will see the dashboard for your domain which should look similar to this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldFcf_vhHeSXJH3Yi3gPmQ.png" /><figcaption>Google Domains Dashboard</figcaption></figure><h4>2. AWS EC2</h4><p>There are a lot of good resources available on the internet to understand the process of creating an EC2 instance e.g. you can refer to the article <a href="https://docs.aws.amazon.com/efs/latest/ug/gs-step-one-create-ec2-resources.html">here</a> and <a href="https://www.javatpoint.com/aws-ec2-creating-an-instance">here</a>.</p><p>Create an account with AWS (<a href="https://aws.amazon.com/">https://aws.amazon.com/</a>). To complete the verification process, you will need an email, a mobile number and a working credit card (don’t worry, you will not be charged!).</p><p>After completing the registration, head over to EC2 section and create a free tier instance of Ubuntu. In the scope of this article, we’ll be using Ubuntu 18.04 with 30 GB (maximum allowed under free tier) storage.</p><h4>3. DOMAIN to IP Binding</h4><p>Head over to “Elastic IP” section in AWS console. Allocate a new Elastic IP and associate it with the instance created in the step above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6-G8CrUAJXGTglBfEUPrw.png" /></figure><p>Once the association is done, you should be able to see that IP in ‘Instances section’ in the places highlighted in red in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uzFsWWWmraMSJpYvr_lRDQ.png" /></figure><p>Now it is time to associate this IP with your domain name. Head over to Google Domains dashboard and select the DNS option for your domain from the menu on the left side of the screen.</p><p>Here we will add a ‘Custom resource records’ of Type ‘A’ (Address Mapping Record) It associates an IP with a domain/sub-domain.</p><p>In the below example you can see that I have mapped ‘@’ with the elastic IP address from AWS (cut out from the image for privacy) in the type ‘A’ record. The ‘@’ represents that all the traffic to the top level domain. You can add ‘www’ in a second A type record and associate it with the same IP as above.</p><p>It will make sure that all the requests made to your domain (example.com) and ‘www’ subdomain (www.example.com) are routed to the IP associated with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lf0uAs-2uxMcd8mNsfrQJg.png" /></figure><h4>4. NODE and NPM</h4><p>The official website of NodeJS redirects to <a href="https://github.com/nodesource/distributions/blob/master/README.md">this</a> documentation for installation instructions on Ubuntu.</p><p>We will install NodeJS version 12.x on our Ubuntu 18.04 EC2 instance.</p><pre># Using Ubuntu<br>$ sudo apt-get update<br>$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -<br>$ sudo apt-get install -y nodejs<br><br># Check the installation<br>$ node --version<br>$ npm --version</pre><h4>5. MongoDB</h4><p>Installation instructions for Mongodb on Ubuntu can be found in the <a href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/">documentation</a>. Make sure you select the right version from the menu in the top left. In this article, we will be using MongoDB version 4.0.</p><p>Make sure you add MongoDB to startup after installation using:</p><pre>$ sudo systemctl enable mongod</pre><p>By default, MongoDB allows anonymous access which means that user can access mongo shell by simply entering mongo in the terminal.</p><p>To take care of basic security, we can take following steps:</p><ol><li>Add an admin user with all privileges on all databases. (Point 1 through 5 in this <a href="https://docs.mongodb.com/manual/tutorial/enable-authentication/">documentation</a>)</li><li>Create our database.</li><li>Add a database level user for it. (Point 6 though 8 in this <a href="https://docs.mongodb.com/manual/tutorial/enable-authentication/">documentation</a>)</li><li>Disable anonymous access in <a href="https://docs.mongodb.com/manual/reference/configuration-options/#conf-file">config file</a>. MongoDB config file is located in /etc/mongod.conf <em>.</em></li><li>Change ‘authorization’ to ‘enabled’ under ‘security’ in config file. It will disable anonymous access.</li></ol><pre>security:<br>    authorization: enabled</pre><p>If your web-server and database hosts are different, (and they should be as per good design practise!) block all requests to database host in firewall (security group in aws) except those coming from web-server and on port 27017 (default mongodb operation port).</p><h4>6. NGINX</h4><p>We will use NGINX as a reverse proxy server. This is essential if we have our application running on not a well-known port (e.g. 3000) and want the traffic to be proxied to it from a well-known port (e.g. 80 for HTTP, 443 for HTTPS). Following are the steps for installing it on Ubuntu.</p><ol><li>Update the Ubuntu repository information:</li></ol><pre>$ sudo apt-get update</pre><p>2. Install the package:</p><pre>$ sudo apt-get install nginx</pre><p>3. Verify the installation:</p><pre>$ sudo nginx -v<br>nginx version: nginx/1.4.6 (Ubuntu)</pre><p>Next step is to configure NGINX to accept the requests on port 80 and redirect them to the port where our NodeJS application is listening.</p><p>We will remove the default file in the /etc/nginx/sites-available folder and add a new file with our configuration in it.</p><pre>$ cd /etc/nginx/sites-available<br>$ sudo mv default default.backup //Removing the file by renaming it<br>$ sudo vi default    // Adding a new file</pre><p>Add the following configuration lines in it to enable proxying the traffic received on port 80 to the port 3000 where our application is running.</p><pre>server {<br>    listen 80;<br>    server_name <strong>YOUR_DOMAIN_NAME</strong>;<br>    location / {<br>        proxy_pass <a href="http://127.0.0.1:3000/"><strong>http://127.0.0.1:3000</strong></a>;//Enter your IP and port.<br>        proxy_http_version 1.1;<br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection &#39;upgrade&#39;;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>     }<br>}</pre><p>Test the configuration of NGINX using the command:</p><pre>$ sudo nginx -t</pre><p>Enable NGINX to run on System Startup:</p><pre>$ sudo systemctl enable nginx</pre><p>Restart NGINX for the configuration to take effect.</p><pre>$ sudo systemctl stop nginx<br>$ sudo systemctl start nginx</pre><p>That’s it, now our NGINX server is all set to receive the requests on port 80 and proxy them.</p><h4>7. SSH</h4><p>By default, SSH password authentication is disabled for Ubuntu machine created in AWS EC2.</p><p>You have to SSH using key-pair generated/used while creating the instance.</p><p>While it is a good security practise to keep password authentication disabled, sometimes, you get in a situation where you need to authenticate using password.</p><p>Password authentication for SSH can be enabled by following steps.</p><ol><li>SSH into the EC2 instance.</li><li>Set a password for user. For ubuntu, user is ‘ubuntu’.</li></ol><pre>$ sudo passwd ubuntu<br>Changing password for user ubuntu.<br>New password:<br>Retype new password:</pre><p>3. Update the PasswordAuthentication parameter in the /etc/ssh/sshd_config file.</p><pre>PasswordAuthentication yes</pre><p>4. Restart the SSH service.</p><pre>sudo service ssh restart</pre><h4>8. PM2</h4><p>We will use PM2 to deploy our application. PM2 empowers your process management workflow. It allows you to fine-tune the behaviour, options, environment variables, logs files of each application via a process file. It’s particularly useful for micro-service based applications.</p><p>We will create an ecosystem file for PM2 and run our application through it. You can define your app and different environments along with their</p><p>The benefit of using an ecosystem file is that you can define all the different parameters in one place along with the ability to define more than one apps (especially in a microservices architecture).</p><p>The ecosystem file looks similar to this.</p><pre>{<br>    &quot;apps&quot;: [<br>        {<br>            &quot;name&quot;           : &quot;Hello&quot;,</pre><pre>            &quot;script&quot;         : &quot;./index.js&quot;,</pre><pre>            &quot;time&quot;           : true,<br>            &quot;log-date-format&quot;: &quot;YYYY-MM-DDTHH:MM:SSZ&quot;,<br>            <br>            &quot;env&quot;: {<br>                &quot;JWT_KEY&quot;: &quot;XXXXXXXXXXXXX&quot;<br>            },</pre><pre>            &quot;env_develop&quot;: {<br>                &quot;NODE_ENV&quot;     : &quot;develop&quot;,<br>                &quot;PORT&quot;         : 4000<br>            },</pre><pre>            &quot;env_production&quot;  : {<br>                &quot;NODE_ENV&quot;          :   &quot;production&quot;,<br>                &quot;PORT&quot;              :   3000<br>            },</pre><pre>            &quot;env_test&quot;       : {<br>                &quot;NODE_ENV&quot;     : &quot;test&quot;,<br>                &quot;PORT&quot;         : 5000<br>            }</pre><pre>        }<br>    ]<br>}</pre><p>Once you have defined the ecosystem file, you can start the app as:</p><pre>pm2 start app.json --env production --update-env</pre><p>Here ‘app.json’ is the name of the ecosystem file. ‘production’ is the name of the environment that we are launching. ‘ — update-env’ tells PM2 to update the environment variables for the mentioned environment. Make sure that you have ‘env_production’ defined in the ecosystem file.</p><p>The way PM2 launches environments is that it will accept the parameter XYZ mentioned after ‘ — env’ and then look for the environment ‘env_XYZ’ in the ecosystem file.</p><p>Further tips: PM2 startup, PM2 save, PM2 cluster</p><h4>9. Let’s Encrypt</h4><p>We will achieve 3 things in this section.</p><ol><li>Generating and installing the (default/non-wildcard) ssl certificate.</li><li>Configuring NGINX to use the ssl certificate.</li><li>Redirecting an request received as HTTP to HTTPS.</li></ol><p>To generate a free ssl certificate using Let’s Encrypt, we will use the certbot client.</p><p>Go to <a href="https://certbot.eff.org/">https://certbot.eff.org/</a> and select the software and system. I’ll select NGINX and Ubuntu 18.04. It will redirect me to the <a href="https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx">documentation</a>.</p><ol><li>SSH into the server.</li></ol><p>2. Add certbot PPA</p><pre>$ sudo apt-get update<br>$ sudo apt-get install software-properties-common<br>$ sudo add-apt-repository universe<br>$ sudo add-apt-repository ppa:certbot/certbot<br>$ sudo apt-get update</pre><p>3. Install certbot</p><pre>$ sudo apt-get install certbot python-certbot-nginx</pre><p>4. Generate and install certificate</p><pre>sudo certbot --nginx -d YOUR-DOMAIN-NAME</pre><p>Complete instruction after giving above command. Once finished, you will get the path of the certificate. Keep it handy. We will need it shortly. It will look similar to this:</p><pre><strong>ssl_certificate</strong></pre><pre>/etc/letsencrypt/live/&lt;YOUR-DOMAIN-NAME&gt;/fullchain.pem;</pre><pre><strong>ssl_certificate_key</strong></pre><pre>/etc/letsencrypt/live/&lt;YOUR-DOMAIN-NAME&gt;/privkey.pem;</pre><p>Now we need to change the settings of NGINX to use the generated ssl certificate.</p><pre>$ cd /etc/nginx/conf</pre><p>Remove any configuration file available in this folder by renaming it.</p><p>Add a new configuration file i.e. server.conf</p><pre>$ sudo nano server.conf</pre><p>Enter the following contents in the file:</p><pre>server {<br>        listen 80;<br>        listen [::]:80;<br>        server_name YOUR-DOMAIN-NAME www.YOUR-DOMAIN-NAME;<br>        return 301 <a href="https://$server_name$request_uri/">https://$server_name$request_uri</a>;<br>}</pre><pre>server {<br>        listen 443 ssl http2 default_server;<br>        listen [::]:443 ssl http2 default_server;<br>        server_name YOUR-DOMAIN-NAME www.YOUR-DOMAIN-NAME;</pre><pre>location / {<br>        proxy_pass <a href="http://localhost:3001/">http://localhost:300</a>0;<br>        proxy_http_version 1.1;<br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection &#39;upgrade&#39;;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>}</pre><pre>ssl_certificate /etc/letsencrypt/live/cardsthatmove.com/fullchain.pem;</pre><pre>ssl_certificate_key /etc/letsencrypt/live/cardsthatmove.com/privkey.pem;</pre><pre>ssl_protocols TLSv1 TLSv1.1 TLSv1.2;</pre><pre>ssl_prefer_server_ciphers on;</pre><pre>ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;</pre><pre>ssl_session_cache shared:SSL:5m;</pre><pre>ssl_session_timeout 1h;</pre><pre>add_header Strict-Transport-Security &quot;max-age=15768000&quot; always;<br>}</pre><p>Now reload NGINX for new settings to take effect.</p><pre>$ sudo nginx -s reload</pre><p>At this point you can remove the ‘default’ file in ‘/etc/nginx/sites-available’ that we created in the NGINX step above.</p><p>Run the following command from the directory where application resides. It uses the same ecosystem file(app.json) that we created in the PM2 step. It restarts the application.</p><pre>pm2 restart app.json --env production --update-env</pre><p>Congratulations! Now your application is ready to be served over HTTPS. Enter your domain name/IP address in the browser and you should see your application being served over HTTPS.</p><p>If you like this article, please feel free to share it with your friends and colleagues. Any constructive feedback and criticism is welcome. There is always a scope for improvement.</p><p>If you face any issues, feel free to reach out to me. I’m available at patilchinmay01@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e32a8e3ea8a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a cryptocurrency in less than 10 minutes!]]></title>
            <link>https://chinmaypatil.medium.com/how-to-create-a-cryptocurrency-in-less-than-10-minutes-4854cddc11ff?source=rss-a9af2015d48f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4854cddc11ff</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[erc20]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[solidity]]></category>
            <dc:creator><![CDATA[Chinmay Patil]]></dc:creator>
            <pubDate>Tue, 25 Sep 2018 18:07:33 GMT</pubDate>
            <atom:updated>2018-09-26T11:44:08.072Z</atom:updated>
            <content:encoded><![CDATA[<p>With Ethereum ERC20 standard, Metamask and Remix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*yXW7pm47IBknCf_JHItVLg.png" /><figcaption>Word cloud via wordart.com</figcaption></figure><p>The world of Blockchain is moving rapidly. There are more than 1990 cryptocurrencies in the world as of now as per <a href="https://coinmarketcap.com/">CoinMarketCap’s</a> data. While the technology is a decade old, the continuous development has opened up many new frontiers. One of such is the booming cryptocurrency industry. In this article, we will see how easy it is to create a new cryptocurrency.</p><p>We need 3 things to create a cryptocurrency, which are:</p><ol><li>Web browser (preferably Firefox or Chrome)</li><li>Metamask browser extension</li><li>Active internet connection.</li></ol><p>Now it’s time to create our own cryptocurrency. Don’t worry, it’s easy and we will do it step by step!</p><h4>1) Get Metamask</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUuVfwwqJPB13U2c17oimw.png" /></figure><p>Metamask is a browser extension that allows us to run Ethereum dApps right in the browser without running a full Ethereum node.</p><p>Go to <a href="https://metamask.io/">https://metamask.io/</a> and install the browser extension for your browser.</p><p>In this article we will use Google Chrome browser. Metamask website redirects us to the chrome web store, where we install the Metamask extension.</p><h4>2) Create Password</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RkYIi349r2XiENld2kpQpQ.png" /></figure><p>Enter the password and confirm it. Remember, it is critical to have a secure and non-trivial password so that our account remains safe.</p><h4>3) Backup Seed Phrases</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K3FwNF3MV18zGXp6dXJiBg.png" /></figure><p>Metamask will display 12 English words. These are known as ‘Seed Phrases’. They will be useful to restore an account in case we lose the password or importing our account in an another wallet.</p><p>It is extremely critical from security standpoint to write them down on a piece of paper rather than storing them in a file on computer.</p><p>Metamask will ask us to verify the ‘Seed Phrases’ once we write them down.</p><h4>4) Default Account View</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTFXjKIDLsEOJXlYdqod4w.png" /></figure><p>After successful completion of the verification of ‘Seed Phrases’, we will be greeted with a view of our account. Notice that our Balance is 0 ETH. Please select the active network to “<strong>Ropsten Test Network</strong>” from the drop-down menu at the upper right corner.</p><p>In next step, we will get some <a href="https://www.quora.com/What-is-a-Testnet-ether">Testnet Ether</a> to use for creating our cryptocurrency.</p><h4>5) Getting Testnet Ether</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1ZGjBnsGFvxzohwd9hCeQ.png" /></figure><p>For the purpose of this article, we will be using Ropsten Test Network. Thus, we will need some Ropsten Testnet Ether. We can get it from <a href="https://faucet.ropsten.be/">https://faucet.ropsten.be/</a> . In case it doesn’t work, simply google Ethereum faucet and you will find many alternatives.</p><p>Copy your account address(present below ‘Account 1’ tag in Metamask) into the faucet and click on ‘Send me test Ether’.</p><p>Wait for a few seconds for the transaction to confirm. You can check the status of the transaction by clicking on the Transaction Hash as seen in the picture above.</p><h4>6) Verify Ether Balance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzTjogfh64NCCWrvsNULrg.png" /></figure><p>Once the transaction is successful, Metamask will reflect the balance. Make sure that you have selected ‘Ropsten Test Network’ from the drop-down menu at the upper right corner.</p><h4>7) Getting the code</h4><p>Now that we have Metamask set up, we will need code to create our cryptocurrency. The code is available at <a href="https://github.com/patilchinmay/Create-Your-Own-Cryptocurrency">https://github.com/patilchinmay/Create-Your-Own-Cryptocurrency</a></p><p>For more experienced users with solidity(the programming language of Ethereum) knowledge, <a href="https://github.com/OpenZeppelin/openzeppelin-solidity">openzeppelin</a> has extensive library of solidity code for the wider purpose of creating cryptocurrency and smart contracts.</p><h4>8) Introduction to Remix</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XzqESD32aj4fC7jfgOhisw.png" /></figure><p>Remix is an IDE for solidity. It helps you write, compile, test, debug and deploy solidity code at one place. Go to <a href="https://remix.ethereum.org/">https://remix.ethereum.org</a></p><p>Delete all the existing files under the browser tab in left pane and create a new file named ‘Contract.sol’.</p><h4>9) Writing and compiling the code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TuAlzuDaWIx4BkQZ_M8j5Q.png" /></figure><p>Paste the code that you obtained in step 7 into the ‘Contract.sol’ file. Select the ‘Run’ tab from the right pane. Make sure you select the Contract name to be deployed as ‘MyCoin’ from the drop-down menu.</p><h4>10) Using Metamask to authorise the transaction</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PW1SrZZtZHuB-ui5F-W_dA.png" /></figure><p>Select the Environment as ‘Injected Web3’. Make sure that ‘MyCoin’(or the name of your contract class) is selected in the dropdown. Now click deploy.</p><p>We should see a pop-up as seen above. Check the details of the transaction and click on ‘confirm’ to authorise it.</p><h4>11) Confirmation of contract deployment</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkRsUgQSzPgCD7w9QSHhQw.png" /></figure><p>After 60 to 90 seconds(depending on the fee) of authorising the transaction, we should see a confirmation in the terminal as seen above.</p><p>Voila! Your cryptocurrency has been successfully created!</p><h4>12) Getting the contract address</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmiuz3-DR6bsfA8og8_Fnw.png" /></figure><p>Clicking on the link present in the terminal(step 11) will redirect us to above page. This is a blockchain explorer. Copy the contract address to a file.</p><h4>13) Back to Metamask</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IZbcYmx7m4Oc66xSrUBTg.png" /></figure><p>Once our contract is deployed we can head back to Metamask. Here we can observe 2 things.</p><ol><li>Our balance has reduced because of fees paid for contract execution.</li><li>Contract deployment transaction in the ‘Transactions’ section.</li></ol><p><strong>14) Adding our cryptocurrency to Metamask</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UYwRhT4yaFvWvgRNA-HGPQ.png" /></figure><p>Clicking on ‘Add Token’ will lead us to the page seen above. Paste the contract address(copied in step 12) in Token Address field. Remaining fields will be filled automatically. Click Next.</p><h4>15) Finishing up</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*18aeAqPSlVDSU3z2Q7wVFQ.png" /></figure><p>Click on ‘Add Token’ and Metamask should now reflect our token in main account.</p><p>And in this way, we have successfully created our own cryptocurrency. But it doesn’t end here. As a next exercise you can try creating multiple accounts in Metamask and send your newly created cryptocurrency between them.</p><p>This version of cryptocurrency is very basic. It is only meant for learning purpose. An actual in-production cryptocurrency has many more aspects to it such as ERC20 standard, admin control, role based access control, supply control, account blacklisting, receiving Ether as a part of ICO (Initial Coin Offering) etc to name a few, but those are point of discussion for some other time.</p><p>If you liked reading this article, click on the clap icon to let me know and share it with your friends and colleagues so that they can benefit out of it. Please feel free to comment, share and follow me on Medium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4854cddc11ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>