<?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 Anshul Sharma on Medium]]></title>
        <description><![CDATA[Stories by Anshul Sharma on Medium]]></description>
        <link>https://medium.com/@anshoool?source=rss-120fac88b4c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wY4vDD7_Rd9LywjOukHPXA.jpeg</url>
            <title>Stories by Anshul Sharma on Medium</title>
            <link>https://medium.com/@anshoool?source=rss-120fac88b4c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:35:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anshoool/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[Schedule your EC2 Instances to save costs at weekends.]]></title>
            <link>https://medium.com/@anshoool/schedule-your-ec2-instances-to-save-costs-at-weekends-e0a229a68b4f?source=rss-120fac88b4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a229a68b4f</guid>
            <category><![CDATA[saving-money]]></category>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloudwatch-events]]></category>
            <dc:creator><![CDATA[Anshul Sharma]]></dc:creator>
            <pubDate>Sun, 19 Jul 2020 17:28:54 GMT</pubDate>
            <atom:updated>2020-08-21T12:25:15.697Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reduce the costs by scheduling your EC2 instances</h3><p>Your servers are up and running during weekends too? Or, you want to schedule them to turn on and off at a specific time? And, you want to cut some costs to save upon. Well, who doesn’t :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AGHyb1R-0QDSTtqb" /></figure><p>Okay, so I’ll get you a simple solution with a walkthrough.</p><p>Services you will interact with within this solution are IAM, AWS Lambda &amp; AWS CloudWatch.</p><h4>Let’s get started and jump onto the machine…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H-eOjh1RJKbFSsf_" /></figure><h4><strong>Create an IAM policy and role</strong></h4><ol><li><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html#access_policies_create-json-editor">Create an IAM policy using the JSON policy editor</a>. Paste this JSON policy document into the policy editor:</li></ol><pre>{   <br>  &quot;Version&quot;: &quot;2012-10-17&quot;,   <br>  &quot;Statement&quot;: [     <br>    {       <br>      &quot;Effect&quot;: &quot;Allow&quot;,       <br>      &quot;Action&quot;: [         <br>        &quot;logs:CreateLogGroup&quot;,         <br>        &quot;logs:CreateLogStream&quot;,         <br>        &quot;logs:PutLogEvents&quot;       <br>      ],       <br>      &quot;Resource&quot;: &quot;arn:aws:logs:*:*:*&quot;     <br>    },     <br>    {       <br>      &quot;Effect&quot;: &quot;Allow&quot;,       <br>      &quot;Action&quot;: [         <br>        &quot;ec2:Start*&quot;,         <br>        &quot;ec2:Stop*&quot;       <br>      ],       <br>      &quot;Resource&quot;: &quot;*&quot;     <br>    }   <br>  ] <br>}</pre><p>2. <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html#roles-creatingrole-service-console">Create an IAM role</a> for Lambda. When attaching a permissions policy, search for and choose the IAM policy that you created.</p><h4><strong>Create Lambda functions that start and stop your EC2 instances.</strong></h4><ol><li>In the <a href="https://console.aws.amazon.com/lambda/">Lambda console</a>, choose to <strong>Create function</strong>.</li><li>Choose <strong>Author from scratch</strong>.</li><li>Under <strong>Basic information</strong>, add the following:<br>For <strong>Function name</strong>, enter a name that identifies it as the function used to stop your EC2 instances. For example, “StopEC2Instances”.<br>For <strong>Runtime</strong>, choose <strong>Python 3.7</strong>.<br>Under <strong>Permissions</strong>, expand <strong>Choose or create an execution role</strong>.<br>Under <strong>Execution role</strong>, choose <strong>Use an existing role</strong>.<br>Under the <strong>Existing role,</strong> choose the IAM role that you created.</li><li>Choose <strong>Create function</strong>.</li><li>Copy this code, and then under <strong>Function code</strong>, paste it into the <a href="https://docs.aws.amazon.com/lambda/latest/dg/code-editor.html#code-editor-code">editor pane in the code editor</a> (<strong>lambda_function</strong>). This code stops the EC2 instances that you identify.</li></ol><p><strong>Tip: </strong><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connection-prereqs.html#connection-prereqs-get-info-about-instance">Get the IDs of the <strong>EC2 instances</strong></a> that you want to stop and start</p><p><strong>Note:</strong> For <strong>region</strong>, replace “us-west-1” with the AWS Region that your instances are in. For <strong>instances</strong>, replace the example EC2 instance IDs with the IDs of the specific instances that you want to stop and start.</p><pre>import boto3<br>region = &#39;us-west-1&#39; <br>instances = [&#39;i-12345cb6de4f78g9h&#39;, &#39;i-08ce9b2d7eccf6d26&#39;] <br>ec2 = boto3.client(&#39;ec2&#39;, region_name=region)  </pre><pre>def lambda_handler(event, context):<br>    ec2.stop_instances(InstanceIds=instances)<br>    print(&#39;stopped your instances: &#39; + str(instances))</pre><p>6. Under <strong>Basic settings</strong>, set <strong>Timeout</strong> to 10 seconds.</p><p><strong>Note:</strong> <a href="https://docs.aws.amazon.com/lambda/latest/dg/resource-model.html">Configure the Lambda function settings</a> as needed for your use case. For example, if you want to stop and start multiple instances, you might need a different value for <strong>Timeout</strong>, as well as <strong>Memory</strong>.</p><p>7. Choose <strong>Save</strong>.</p><p>8. Repeat steps 1–7 to create another function. Do the following differently so that this function starts your EC2 instances:<br>In step 3, enter a <strong>Function name</strong> it as the function used to start your EC2 instances. For example, “StartEC2Instances”.<br>In step 5, copy and paste this code into the editor pane in the code editor (<strong>lambda_function</strong>):</p><p><strong>Note:</strong> For <strong>region</strong> and <strong>instances</strong>, use the same values that you used for the code to stop your EC2 instances.</p><pre>import boto3<br>region = &#39;us-west-1&#39; <br>instances = [&#39;i-12345cb6de4f78g9h&#39;, &#39;i-08ce9b2d7eccf6d26&#39;] <br>ec2 = boto3.client(&#39;ec2&#39;, region_name=region)</pre><pre>def lambda_handler(event, context):<br>     ec2.start_instances(InstanceIds=instances)<br>     print(&#39;started your instances: &#39; + str(instances))</pre><h4><strong>Test your Lambda functions</strong></h4><p>1. In the <a href="https://console.aws.amazon.com/lambda/home">Lambda console</a>, choose <strong>Functions</strong>.</p><p>2. Select one of the functions that you created.</p><p>3. Choose <strong>Actions</strong>, and then choose <strong>Test</strong>.</p><p>4. In the <strong>Configure test event</strong> dialog, choose <strong>Create new test event</strong>.</p><p>5. Enter an <strong>Event name</strong>, and then choose <strong>Create</strong>.</p><p><strong>Note:</strong> You don’t need to change the JSON code for the test event — the function doesn’t use it.</p><p>6. Choose <strong>Test</strong> to execute the function.</p><p>7. Repeat steps 1–6 for the other function that you created.</p><p><strong>Tip:</strong> You can <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html#viewing_status">check the status of your EC2 instances</a> before and after testing to confirm that your functions work as expected.</p><h4>Create rules that trigger your Lambda functions</h4><p>1. Open the <a href="https://console.aws.amazon.com/cloudwatch/">CloudWatch console</a>.</p><p>2. In the left navigation pane, under <strong>Events</strong>, choose <strong>Rules</strong>.</p><p>3. Choose <strong>Create rule</strong>.</p><p>4. Under <strong>Event Source</strong>, choose <strong>Schedule</strong>.</p><p>5. Do either of the following:<br>For <strong>Fixed rate of</strong>, enter an interval of time in minutes, hours, or days.<br>For <strong>Cron expression</strong>, enter an expression that tells Lambda when to stop your instances. For information on the syntax of expressions, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html">Schedule Expressions for Rules</a>.<br><strong>Note:</strong> Cron expressions are evaluated in UTC. Be sure to adjust the expression for your preferred time zone.</p><p><strong>Example: </strong>If you want to stop your instances every Friday at 10 pm UTC, so the Cron expression will be like —</p><pre>0 22 ? * FRI *</pre><p>6. Under <strong>Targets</strong>, choose <strong>Add target</strong>.</p><p>7. Choose <strong>Lambda function</strong>.</p><p>8. For <strong>Function</strong>, choose the function that stops your EC2 instances.</p><p>9. Choose <strong>Configure details</strong>.</p><p>10. Under <strong>Rule definition</strong>, do the following:<br>For <strong>Name</strong>, enter a name to identify the rule, such as “StopEC2Instances”.<br>(Optional) For <strong>Description</strong>, describe your rule. For example, “Stops EC2 instances every night at 10 PM.”<br>For <strong>State</strong>, select the <strong>Enabled</strong> check box.</p><p>11. Choose <strong>Create rule</strong>.</p><p>12. Repeat steps 1–11 to create a rule to start your EC2 instances. Do the following differently:<br>In step 5, for <strong>Cron expression</strong>, enter an expression that tells Lambda when to start your instances.<br>In step 8, for <strong>Function</strong>, choose the function that starts your EC2 instances.<br>In step 10, under <strong>Rule definition</strong>, enter a <strong>Name</strong> like “StartEC2Instances”, and optionally enter a <strong>Description</strong> like “Starts EC2 instances every morning at 6 AM.”</p><p>So, I hope you found this article interesting and cost saving as it will save you a lot of costs, hope so.</p><p>If you want a more robust solution, <a href="https://aws.amazon.com/premiumsupport/knowledge-center/stop-start-instance-scheduler/">use the <strong>AWS Instance Scheduler</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RrMYhZK5PwjUxvzG" /></figure><p>If you liked this article, clap on it and share it with your friends :D</p><p>In case you want to connect to me, head over to the following links —</p><p><a href="https://www.linkedin.com/in/anshoool/"><strong>LinkedIn</strong></a><strong> </strong>— Because network is networth.</p><p><a href="https://www.instagram.com/notreallytech"><strong>Instagram</strong></a>- Follow for more amazing content.</p><p><a href="https://youtube.com/NotReallyTech"><strong>YouTube</strong></a>-Don’t forget to Subscribe.</p><p><a href="http://www.anshoool.co/"><strong>Personal Website</strong></a>- Open for feedback</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a229a68b4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I took advantage of Udacity’s Free Month offer during Lockdown]]></title>
            <link>https://medium.com/@anshoool/how-i-took-advantage-of-udacitys-free-month-offer-during-lockdown-54918c8a72c4?source=rss-120fac88b4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/54918c8a72c4</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[online-learning]]></category>
            <dc:creator><![CDATA[Anshul Sharma]]></dc:creator>
            <pubDate>Sat, 25 Apr 2020 19:42:19 GMT</pubDate>
            <atom:updated>2020-04-25T19:42:19.031Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xrr04jFf7R0sOWwy" /><figcaption>Photo by <a href="https://unsplash.com/@sickhews?utm_source=medium&amp;utm_medium=referral">Wes Hicks</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hey guys, I hope you and your family are doing well and all your loved ones are safe and sound. Amid this coronavirus pandemic, many online learning platforms offered free courses to make learner’s time at home productive.</p><p>Udacity offered one-month free access to all of the Nanodegrees during the march. So I took two Nanodegrees to fulfill my time and energy productively. Both in the Cloud domain, one was Cloud DevOps, and the other was Cloud Developer Nanodegree.</p><h4><strong>Why?</strong></h4><p>Because my knowledge in Cloud was incomplete. However, I got industrial training in AWS during placements but that just went over my head and I found AWS interesting and my urge to learn more about it. Fortunately, during this pandemic, I got the opportunity to learn.</p><h4><strong>What did you learn?</strong></h4><p>Well, a hell lot of things. let&#39;s start off.</p><ul><li><strong>Fundamentals of AWS i.e. EC2, S3, VPC, EBS, DynamoDB, RDS, EKS, ECR, EBS. </strong><br>I didn&#39;t just learn about them but practically implemented and interacted with each one of these services and deployed a static website on S3.</li><li><strong>Deploy Infrastructure as Code<br></strong>Imagine you don’t have to go to AWS console to manage or deploy your EC2 or S3 Bucket. Well, you can with the help of <strong>CloudFormation Scripts</strong>. Deploying, updating, and managing the Cloud Infrastructure with just a script? No Console, No Mouse Clicking?<br>Yes, You heard that right. On the AWS CloudFormation, you can deploy the infrastructure stack with the help of a Yaml or JSON script also. That sounded magical to me when I first heard that. <br>I deployed infrastructure for a highly available app with the help of CloudFormation Script. <br><a href="https://github.com/anshul1098/cloud-devops-p2">https://github.com/anshul1098/cloud-devops-p2</a></li><li><strong>Developing Code and Deploying that on the Cloud.</strong> <br>I always listened from people that you can deploy your project/code on Cloud but never know how to do it. But due to this course, now I can deploy the code on the cloud with confidently. The most amazing part was how they taught me to handle the secrets on the cloud. :D (security, you know) <br>In this part, I deployed an API on the cloud with the help of Elastic BeanStalk using EB CLI. <br><a href="https://github.com/anshul1098/image-filter-api">https://github.com/anshul1098/image-filter-api</a></li><li><strong>Build CI/CD Pipelines<br></strong>Is it amazing to updating new features in your app faster than ever and do not need to wait for days to integrate it? Well, It can be achieved by CI/CD Pipelines. CI stands for Continuous Integration and CD for Continuous Deployment. In the pipeline, the CI parts integrate the code to the Development Environment and the CD part deploys the code rapidly for the end-users. I learned to set up the pipeline using Jenkins and it was fun honestly. I also learned to setup monitoring and logging in the application with the help of various tools like <strong>Prometheus, ELK Stack (ElasticSearch, LogStash, Kibana), and Grafana.</strong> <strong>Ansible</strong> was also a part of this learning which lets you configure your infrastructure through playbooks written in YAML. I deployed two projects which use CI/CD Pipelines. I also used <strong>CircleCI</strong> as a pipeline tool.<br><a href="https://github.com/anshul1098/ci-cd-pipelines-jenkins">https://github.com/anshul1098/ci-cd-pipelines-jenkins</a><br><a href="https://github.com/anshul1098/operationalize-ml-microservice">https://github.com/anshul1098/operationalize-ml-microservice</a></li><li><strong>Microservices architecture</strong><br>I was amazed to see this pattern. How easily you can break a project into smaller pieces to make them less dependent on each other and to make them failure-prone and highly available.<br>I learned Kubernetes in this section and I must say its an amazing container orchestration technology by Google. AWS provides this service named as <strong>Elastic Kubernetes Service</strong>. Though at first, I was so confused about deploying the project in <strong>EKS</strong> as I troubleshot my project step by step to achieve the end goal, I learned its workarounds under the hood.<br>I deployed a previous project taught in this course named as Udagram by breaking it into from Monolith to Microservices architecture.<br><a href="https://github.com/anshul1098/refactor-udagram-app">https://github.com/anshul1098/refactor-udagram-app</a></li><li><strong>Serverless Architecture<br></strong>Now comes the most beautiful part, <strong>Serverless</strong>. Imagine you need no servers to deploy your app. That&#39;s what Serverless does as the name implies. Serverless architecture in AWS can be achieved with the help of Lambda functions. In GCP, they are named as Cloud functions and in Azure, Azure Functions.<br>This architecture lets you deploy your small codebase with the help of lambda functions and you pay only for every function invocation. Functions can be invoked via events and events can be anything like file uploading to S3 or API gets called, etc.<br>In this section, I learned about API Gateway which is responsible for request routing, composition, and protocol translation. All requests from clients first go through the <strong>API Gateway </strong>and hence serves as a single entry point to the system. I also learned about <strong>REST API </strong>and Authentication in the server. <br>In the project, I implemented the user login via Auth0 and deployed all the code through various lambda functions that were interconnected, hence served as Microservices and Serverless pattern both. All these I managed with so fewer efforts via <strong>Serverless Framework- </strong>a very beautiful framework that lets you manage the Serverless Apps. In the project, I used DynamoDB as the primary database to store the user data.<br><a href="https://github.com/anshul1098/serverless-todo-udacity">https://github.com/anshul1098/serverless-todo-udacity</a></li><li><strong>Capstone Project<br></strong>Building this project was fun actually. I aggregated all the knowledge acquired through both ND in this project. Main features of this project are-<br>- CI/CD Pipelines using Jenkins<br>- Build <strong>Docker</strong> Images in the pipeline<br>- Blue/Green Deployment<br>- Deployed with YAML script<br>- Used <strong>Kubernetes</strong> as Container Orchestration service. <br><a href="https://github.com/anshul1098/capstone-cloud-devops">https://github.com/anshul1098/capstone-cloud-devops</a></li></ul><p>Well, that&#39;s all. :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3vM4t5H0esfjOFTn" /></figure><p>Cloud itself is amazing and magical.</p><h4>How did you managed the time and completed both courses + projects in 30 days?</h4><p>Haha, Its a heck. Fortunately, I can grasp things faster. So I gave my 40% time in watching videos at 1.25x and the rest of the time investing time in projects to get time for more errors and solving them. I enjoyed the latter more though. <br>Both NDs are of the same domain so they could be completed faster because the content was relatable to each other. However, there were some days when I couldn&#39;t figure out issues coming in projects and was just hopeless but I didn&#39;t give up, took a short break, and jumped again to fight with the errors.</p><h4>What’s Next?</h4><p>Next? I will brush up on my knowledge gained in these courses and learn some topics again harder which I feel I am weak at like Ansible, Prometheus, and ELK. <br>I am grateful to everyone around me and to myself that I utilized my time properly. This time is perfect to learn something new.</p><p>Thank you for reading. I would love to connect and interact with the people out there who are reading this.</p><p>LinkedIn — <a href="https://www.linkedin.com/in/ansh-sh/">https://www.linkedin.com/in/ansh-sh/</a></p><p>Github — <a href="https://www.github.com/anshul1098">https://www.github.com/anshul1098</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54918c8a72c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Interview Experience at Unthinkable Softwares (Subsidiary of Daffodil Softwares)]]></title>
            <link>https://medium.com/@anshoool/my-interview-experience-at-unthinkable-softwares-subsidiary-of-daffodil-softwares-399b16d15df8?source=rss-120fac88b4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/399b16d15df8</guid>
            <category><![CDATA[experience-learning]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interviewing]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Anshul Sharma]]></dc:creator>
            <pubDate>Mon, 16 Sep 2019 19:31:09 GMT</pubDate>
            <atom:updated>2020-08-21T11:20:03.519Z</atom:updated>
            <content:encoded><![CDATA[<h3>My Interview Experience at Daffodil Softwares (Unthinkable Softwares)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d4EWUYSRmIROPcAi" /></figure><p>So it all started in the morning 14 Sept 2019 9:00 AM. Unthinkable Softwares i.e. Subsidiary company of Daffodil Softwares came to visit our college. I am pursuing MCA at Acropolis Institute of Technology &amp; Research.</p><p><em>Well, this is a off-topic thing — It would be great if you subscribe to my </em><strong><em>YouTube channel</em></strong><em>. It will definitely help me to grow and I surely will deliver amazing tech content at my channel. So, yeah please subscribe to here — </em><a href="https://youtube.com/NotReallyTech"><strong><em>Not really Tech</em></strong></a></p><h3>Round 1 (Online Test — Hackerearth)</h3><p>The first round was conducted at Hackerearth and the duration was 60 minutes. There was 3 pretty simple Programming question.</p><ol><li><strong>Double the Vowels</strong></li></ol><p>The task was to double the vowel characters in the string</p><pre>Input : Sequoia<br>Output : Seequuooiiaa</pre><pre>#Python3<br>string = input()<br>out = str()<br>vowels = [’a’,’e’,’i’,’o’,’u’,’A’,’E’,’I’,’O’,’U,]<br>for i in range(len(string)):<br>    if(string[i] in vowels):<br>        out += string[i]*2<br>    else:<br>        out += string[i]<br>print(out)</pre><p><strong>2. Find the closest number</strong></p><p>An array of size N and an integer x will be given and the task was to find the closest element to x in the array. In case of a tie, print the greater number.</p><pre>Input : 8 4 1 3 6<br>        5<br>Output : 6</pre><pre>#Python3<br>arr = list(map(int,input().split()))<br>x = int(input())<br>temp = []<br>for i in range(len(arr)):<br>    temp[i] = abs(arr[i] - x)<br>mn = min(temp)<br>rslt = []<br>for i in range(len(temp)):<br>    if(temp[i] == mn):<br>        rslt.append(arr[i])<br>print(max(rslt))</pre><p><strong>3. Calculating the minimum notes</strong></p><p>A currency system consists notes of following denominations — 2000, 500, 200, 100, 50, 20, 10, 5, 2, 1. The task is to find the minimum number of notes required to satisfy the entered amount.</p><pre>Input : 153<br>Output : 4</pre><pre>#Python3<br>n = int(input())<br>c=0<br>while(n&gt;0):<br>    if(n in range(1,2)):<br>        n-=1<br>        c+=1<br>    elif(n in range(2,5)):<br>        n-=2<br>        c+=1<br>    elif(n in range(5,10)):<br>        n-=5<br>        c+=1<br>    elif(n in range(10,20)):<br>        n-=10<br>        c+=1<br>    elif(n in range(20,50)):<br>        n-=20<br>        c+=1<br>    elif(n in range(50,100)):<br>        n-=50<br>        c+=1<br>    elif(n in range(100,200)):<br>        n-=100<br>        c+=1<br>    elif(n in range(200,500)):<br>        n-=200<br>        c+=1<br>    elif(n in range(500,2000)):<br>        n-=500<br>        c+=1<br>    elif(n&gt;=2000):<br>        n-=2000<br>        c+=1<br>print(c)</pre><p>So these were the three programming questions and my approach. Any better approach and/or suggestions are welcome :)</p><h3>Round 2 (Coding on Paper)</h3><p>In this round, two Programming questions were given that were to be solved on paper.</p><ol><li><strong>Pattern-based question</strong></li></ol><p>Given an array of size N, based on that you have to print a specific pattern.</p><pre>Input : -3 4 3 1 -4<br>Output :  ****<br>             *****<br>             ****<br>             **<br>         *****</pre><pre>#Python3</pre><pre>arr = list(map(int,input().split()))<br>mn = min(arr)<br>space = 0<br>if(mn&lt;0):<br>    space = abs(mn)<br>for i in range(len(arr)):<br>    if(arr[i]&lt;0):<br>        print((space - abs(arr[i]))* &quot; &quot; + (abs(arr[i])+1)* &quot;*&quot;)<br>    elif(arr[i]&gt;=0):<br>        print(space * &quot; &quot; + (arr[i]+1)* &quot;*&quot;)</pre><p><strong>2. Balanced String</strong></p><p>The task in these questions was to find that the string consists of brackets is balanced or not.</p><pre>Input : {[()]}<br>Output : True</pre><pre>Input : {[}()]<br>Output : False</pre><pre>#Python3<br>string = input()<br>l = len(string)<br>r = l-1<br>flag = True<br>for i in range(l/2):<br>    if(string[i] == &quot;{&quot;):<br>        if(string[r] == &quot;}&quot;):<br>            r -=1<br>            continue<br>        else:<br>            flag = False<br>            break<br>    if(string[i] == &quot;[&quot;):<br>        if(string[r] == &quot;]&quot;):<br>            r -=1<br>            continue<br>        else:<br>            flag = False<br>            break<br>    if(string[i] == &quot;(&quot;):<br>        if(string[r] == &quot;)&quot;):<br>            r -=1<br>            continue<br>        else:<br>            flag = False<br>            break<br>if(flag):<br>    print(&quot;True&quot;)<br>else:<br>    print(&quot;False&quot;)</pre><p>I know these are not the best approaches to solve the above question so I would be thankful if anyone gives me tips to improve my solution.</p><h3>Round 3 (Technical Interview)</h3><p>Out of 350+ candidates prior to First round, 15 candidates were selected to have in-person Technical Interview (including me 😻).</p><p>Okay, so Interviewer was young, sensible and very cool. He knew how to make a fresher comfortable. So he started asking with “Tell me about yourself?” followed by a series of technical questions.</p><p>So, he saw I have mentioned Git in my resume so he started by asking what is ‘Checkout’ in Git? I didn’t know the answer at that time so I told him I know only basics of Git. He then asked about ‘Clone’ so I told him that we use Clone in Git to clone a repository into our Machine. Amidst this, a girl(another candidate) came into the cabin from nowhere showing her code of the problem to the interviewer which he gave to her previously. The interviewer told me to dry run her code that was in infinite loop consists of ununderstandable logic. He firmly asked her to fix it.</p><p>So coming back to Interview, he then asked me about various scenarios where I could use Linked List and Array and also the Queue and its applications.</p><p>He also asked me about some OOPS concepts like Inheritance, Data Abstraction &amp; Data Hiding.</p><p>Then he looked into my resume and asked me whether I am comfortable about Java (because I had NPTEL certification in it). I firmly said No then he asked about Blockchain(another certification in resume :p). That’s where I feel it started going wrong because <em>one should never mention things in his/her resume which he/she is not comfortable or prepared to answer in the Interview</em>. At last, he asked me about malloc &amp; calloc in C which I answered partially.</p><p>Then he gave me a problem statement and asked me to write code for it on the paper.</p><pre>Input : aaabsbbbeer<br>Output : 3a4b1s2e1r<br>Task was to find no. of characters in a string and output them in the this format : Total no. of characters in the string followed by that character</pre><p>At first, I approached the problem with space inefficient solution (don’t exactly remember the code) for which Interviewer asked me to fix the code.</p><p>Then I came up with this solution.</p><pre>s = input()<br>l = [s[i] <strong>for </strong>i <strong>in </strong>range(len(s))]<br>l = set(l)<br>out = str()<br><strong>for </strong>i <strong>in </strong>l:<br>    t = s.count(i)<br>    out += str(t) + i<br>print(out)</pre><p>I explained the above code to the Interviewer and he partially agreed with the code and said: “Thank you Anshul”. So it was a signal to leave. :p</p><p>So, the final verdict was I got rejected these are the reasons I think that leads me to the rejection :</p><ol><li>I wasn’t fully prepared about the things I mentioned in my resume.</li><li>I was kind of unable to explain my code to the Interviewer.</li><li>I was never prepared to come this far in the recruitment process so I lacked in preparation.</li></ol><p>Btw, that girl got selected :p</p><p>Better Luck Next Time to me.</p><p>Thank you for reading.<br>May it helps somebody.<br>Any suggestions/tips are welcome.</p><p>LinkedIn: https://www.linkedin.com/in/anshoool/<br>Instagram: <a href="http://www.instagram.com/anshoool_">Anshul Sharma</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=399b16d15df8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[And then, Google India Challenge Scholarship brings happiness.]]></title>
            <link>https://medium.com/@anshoool/and-then-google-india-challenge-scholarship-brings-happiness-1c7f9dd25e28?source=rss-120fac88b4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c7f9dd25e28</guid>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anshul Sharma]]></dc:creator>
            <pubDate>Mon, 14 May 2018 15:14:00 GMT</pubDate>
            <atom:updated>2018-05-14T15:14:00.531Z</atom:updated>
            <content:encoded><![CDATA[<p>7th February, 2018</p><p>It was a normal day and i was checking my mails. And suddenly something unusual and surprising popped up. Yes, it was from Udacity.</p><p><strong><em>Congratulations Anshul!</em></strong></p><p><em>Hi Anshul,</em></p><p><em>We are excited to offer you a </em><strong><em>Google India Challenge Scholarship</em></strong><em> for the </em><strong><em>Android Basics track</em></strong><em>. We received applications from many talented and motivated candidates, and yours truly stood out.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*JZKABri71zQyAR9fYWjP1A.jpeg" /><figcaption>The original mail :)</figcaption></figure><p>This mail is the most memorable &amp; one of the best mail i got till now. Before this i never thought i could achieve something big like this.</p><p>Before this, i was a boy with a lot of frustration, not being able to even motivate myself, dealt with heartbreak in the past, had a complex of shorter height, had a regret of 2 backlogs in graduation &amp; biggest regret of getting passed with 2nd division in +2 (I do not fit in the criteria for the campus placements) . So basically, i was a failure.</p><p>But after getting this huge opportunity, my perspective towards life has changed completely. This call from Google has boosted me so much, you know i can’t express it in words. Now i am self motivated and motivate others to do something extraordinary &amp; my regrets turned into learnings. I still do not fit in the criteria for campus placements but now i believe and just concentrate in getting skilled more than enough. There are a lot of ways for achieving something great, something you had dreamt about. So never lose hope, who knows this can happen to you also.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F0eNXb9iOdZcY6qg." /></figure><p>HOW THIS HAPPENED -</p><p>One fine day, when i was searching scholarships for a General student that Govt. of India offer. But as you already know, i found nothing. 😔 But by going through these series, i don’t exactly remember but somehow i landed on the Google’s scholarships page and i saw they are running Developers Skill India Program. So i hesitated for a second and doubted myself that why they will select me. But i thought about the worst case that they will reject me. And then i applied and gave my 125%. And then i got selected. Yayyy !!!</p><p>I was on the seventh sky and ninth cloud because after so many bad things this one good or i should say a great thing happened to me.</p><p>I promised to myself i’ll not ruin this opportunity and i’ll not look back again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GsEGgZSu1wLAg4C8." /></figure><p>THE JOURNEY -</p><p>Google offered me Android Basics Course that i have to complete in 3 months. This course was designed by the world class instructors of Google itself. I learnt the Android and Java with so much ease without having prior knowledge of them. Video lectures was delivered by the instructors in so interactive way. I developed some apps like Happy Birthday Card, Court Counter, IPL Counter, Just Java &amp; Quizz app.</p><p>In these three months i progressed a lot, like having no knowledge of Android and Java, now i can develop some basic apps at my own. I am very much happy with the progress i have made in such a short span. I really want to thank Google &amp; Udacity for giving me such opportunity.</p><p>I loved the pace of course so much that i completed my course in 50 days only. Support from the forums and Slack community was so good. I really discovered great knowledge in the slack community that was beyond the basics. Thank you so much guys for sharing your knowldege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xD1ftakVhvtGBn17." /></figure><p>WHERE I AM -</p><p>So, today is the last day of phase 1 and the deadline for completing the course will end by today 11:59 PM. So, i am just wishing i get selected for phase 2 in which only 350 students will get a chance to pursue NanoDegree for Android.</p><p>Well, if i am not get selected, i’ll not be sad or demotivated because this thing had turned up my destiny and boosted me enough that i can now find my paths at my own. This opportunity has opened up my mind as well as a lot of paths for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C2RWBgwAXUjUUM-L." /></figure><p>WHATS NEXT -</p><p>I am just looking forward to discover more in Android and be skilled more than enough in App Development. My next goal is to learn machine learning and how to implement it in apps, kotlin, firebase, github &amp; version control systems, flutter, react native and a long list of things which i want to learn. I am becoming hungrier everyday for knowledge. I want to pursue career as an Android Developer. So, from failures to this opportunity, i tell myself many more great things are coming. :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M9EGXW3x0Iw_xIVB." /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c7f9dd25e28" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>