<?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 Harsha Vardhan Dharmavarapu on Medium]]></title>
        <description><![CDATA[Stories by Harsha Vardhan Dharmavarapu on Medium]]></description>
        <link>https://medium.com/@harshavardhandharmavarapu?source=rss-d534c123683b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*equMQf58ZJQ-AwZ0-i8Lmw.jpeg</url>
            <title>Stories by Harsha Vardhan Dharmavarapu on Medium</title>
            <link>https://medium.com/@harshavardhandharmavarapu?source=rss-d534c123683b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:18:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harshavardhandharmavarapu/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[Effectively deliver negative feedback.]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/effectively-deliver-negative-feedback-a092c4c30b51?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a092c4c30b51</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[feedback]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Sat, 20 Oct 2018 10:40:18 GMT</pubDate>
            <atom:updated>2018-10-20T10:40:18.348Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Negative feedback generally backfires If not put in the right way.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*eu-G0Ri8MxDS1POWnJ21gw.jpeg" /></figure><p>One of the greatest tools almost only humans have feedback. Feedback is the way for greater success, to keep a measure of our effectiveness, to understand our shortcomings and improve ourselves. Feedback gives us a whole new perspective on problems. There are two types which say what we did better and negative feedback, that is our shortcomings and room for improvement.</p><p>Negative feedback is very tricky to deliver, not everyone in all situations can receive them in the right light. We are emotional beings and sometimes our confidence makes us think negative feedback with emotions than logic. It all depends on the way we put feedback at them.</p><p>If put best it can help them improve and reach their expectations otherwise, it might demotivate them and also make them lose their confidence. This defeats the whole purpose of feedback. It’s possible to give honest feedback and not feel stressed with certain methods and tricks.</p><h4>Show them Observations.</h4><p>It’s possible that most people take feedback personally, this makes giving feedback difficult and we cut the feedback, making entire process ineffective. So always tell them what actions and outcomes you observed than giving remark on personal attributes and characteristics. Give them suggestions on what could have been done better in that action, this will make them realize the root cause of this and make changes in their behavior or personality.</p><p>For example, don’t put a label on them like “You are lazy, arrogant or careless” instead, say them “This looks like done by someone who is careless”, “This looks really sloppy, could have done better”.</p><h4>Let them know that you care</h4><p>Of course, feedback is given because you care, tell them what you care about, for example, “I am telling you this because I really want to see our group moving forward and you to show them you are up for this”, Tell them what are effects and how it’s effective the group’s objective. Just complaining is not enough when you care, also provide them with a solution to that and tell them that I am open to help you with any feedback.</p><h4>Confirm the feedback with them</h4><p>You have to consider that all these observations you gave are from your perspective and they may be biased and not hold always. Confirm the reason behind the observations is the same with what’s going in their mind at that time. Say to them that I could be wrong and be open to explain your actions If that’s true.</p><p>Ask them if am I missing any information while interpreting, take suggestions from them by asking “What do you think?”. Asking them feedback in return will make them easy to take our feedback and of course It helps you too.</p><p>Be objective in your review and also always be constructive by providing pieces of evidence for every claim you make in order to build feedback.</p><p>Be curious about what they are saying, this will help them understand that you value hearing their perspective on what happened. You should put your objective before starting the feedback so that the context is as clear as possible.</p><p>Have a great day!</p><p><em>Reach me out at harsha.hd@go-jek.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a092c4c30b51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Machine Learning — 3]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/understanding-machine-learning-3-374e352b85c4?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/374e352b85c4</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[dimensionality-reduction]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Sun, 14 Oct 2018 21:29:40 GMT</pubDate>
            <atom:updated>2018-10-14T21:29:40.165Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Machine Learning — 3</h3><p><em>This article will help you understand Unsupervised learning and some use cases of these models.</em></p><p>In the last article, we discussed types of ML models and type of Supervised learning. Supervised learning has a result to be expected. But, in the Unsupervised learning, there is no output expected, any insights are expected. There are two types in this categories:</p><ol><li><strong>Clustering</strong></li><li><strong>Dimensionality reduction</strong></li></ol><h4><strong>Let’s start with Clustering</strong></h4><p>Here there is no classified data that had labels to each instance. We have to group them based on the behavioral patterns observed in each data point. For example credit card fraud detection, data points are like the transaction amounts, places where the amount is used, the type of transaction etc.. Here the reason we don’t have labels is we have no fixed behavior patterns, each user has a behavior and the increase in observations strengthen the behavior and we can group their behaviors to some common behaviors. When we group them to their observed behavior, we can find anomalies and do a check on that data point. If you always use a card for food and clothes in certain localities and suddenly there comes a transaction in a locality you never did and spent on bitcoins, It might probably be a fraud, you get emails to verify that is you.</p><p>We draw behaviors from the data itself and there is no predefined behavior. Because trends change with time and behaviors will change rapidly. We group them into different scales depending on the requirement of the problem. A fraud detection problem expects more general patterns like each users behaviors than an Amazon search will suggest you products specific to your behavior. Clustering is used in a lot of cases like your google search, youtube suggestion, which will show you common or popular in your genre watching patterns. If you read this blog, probably medium will suggest more blogs form me on similar suggests, they use clustering to do this.</p><p>Read the problem statement of <a href="https://www.kaggle.com/c/landmark-retrieval-challenge">Google’s Landmark Retrieval challenge</a> and take a peek at the data.</p><p>Commonly outcomes look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*gXYdMWDd7VpRogJOj5EoLQ.png" /><figcaption>Grouping behavior patterns into clusters</figcaption></figure><p>Those noises might be anomalies, new patterns in behaviors.</p><h4>Now Dimensionality reduction</h4><p>Suppose your data consists different columns that had a relationship between themselves and some columns suggest the same patterns with outcomes. We have to detect those columns that have a similar relationship to outcome and club them together. This will help us decrease bias. If we have the same data with different column names, relationship to outcomes strength and create more bias towards this particular data.</p><p>This basically maps N-dimensional data to K-dimensional data where K is less than N. This will create concrete columns by clubbing similar implications to outcomes.</p><p>Generally, this method is used to create datasets that will have better performance with models by removing bias, and also this will make the data less complex and help you scale the data properly.</p><p>Outcomes look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*zWzeMGyCc7KvGD9X8lwlnQ.png" /><figcaption>Mapping to lower dimensions for better performance.</figcaption></figure><p>Read the problem statement of <a href="https://www.kaggle.com/c/galaxy-zoo-the-galaxy-challenge">Galaxy Zoo challenge</a> on Kaggle.</p><p>Will discuss various models used in classification, their mathematical details.</p><p>Have a good day!</p><p><em>Reach me out at harsha.hd@go-jek.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=374e352b85c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Machine Learning — 2]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/understanding-machine-learning-2-b56865e161fd?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b56865e161fd</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Sun, 14 Oct 2018 20:34:05 GMT</pubDate>
            <atom:updated>2018-10-14T20:34:05.811Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Machine Learning — 2</h3><p><em>This article will help you understand the types of models in Machine Learning based on purposes it is used. Will give an idea on supervised learning.</em></p><p>In the previous blog, we discussed that machine learning models use mathematical modeling to draw insights from data and make predictions used for decision making. There are different kinds of problems which can be solved using ML models, problems need different types of insights providing different formats of data. For example to predict the weather type expects a category of weather whereas predicting next day’s temperature expects a numerical value of the temperature unit.</p><p>Some problems expect just to find common patterns and group them, like insurance fraud detection and delivery store optimization, because there are no certain known patterns for credit card users behavior, but we can group them and analyze. Some problems need to expect to club some related details and show concrete details. Here models find patterns between details and club them to give a concrete measure.</p><p>These types are classified into four types basing on inputs and outcomes: Which belongs to two categories <strong>Supervised and Unsupervised</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*mBlmU6vSGFn65DwGLvv54Q.jpeg" /><figcaption>Types of ML problems</figcaption></figure><p>We will discuss Supervised learning in this article.</p><h4>Let’s start with Classification</h4><p>Here their outputs of models are categories, they take numerical data as the input of several instances and needs to predict the category that instance belongs. An example is predicting the type of plant with features like leaf size, shape, root length.</p><p>Model is supervised when a discrete or continuous prediction is expected. Here classification means giving a label to every instance and predicting the category based on the patterns learned from past dataset.</p><p>You can understand classification problems from <a href="https://www.kaggle.com/uciml/iris/home">Iris challenge</a> on Kaggle. Read the problem statement and check the type of data and labels.</p><h4>So what’s Regression</h4><p>Models predict continuous outputs. Models find patterns between each column and the continuous output. For example, predicting the stock prices, we need to predict the value of the next day based on past days behavior of stock prices. There is a relationship between the instance output and past instances also. Typically regression is used a lot in the analysis, quality, and most problems expect a continuous outcome.</p><p>Read the problem statement and see the data of <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques">Housing price prediction</a> challenge on Kaggle.</p><p>You might have observed the difference in expectations between Iris challenge and Price prediction challenge. To give a clear idea these are expectations of the problems:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*hZJfIT-OQEYVo8JRqJ0W1g.png" /></figure><p>Here classification says the category, regression says the value. We’ll discuss Unsupervised learning in next article.</p><p>Have a good day!</p><p><em>Reach me out at harsha.hd@go-jek.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b56865e161fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Machine Learning]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/understanding-machine-learning-da0c3efb1673?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/da0c3efb1673</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistical-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Sun, 14 Oct 2018 19:29:13 GMT</pubDate>
            <atom:updated>2018-10-14T20:32:38.045Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Machine Learning — 1</h3><p><em>This article will help you understand machine learning and how is it used for solving problems.</em></p><p>Our species did more innovation in technology from the past 500 years than the rest of human history. One thing we consistently did was automation of things. We spent a million years making tools with rocks and throw them at predators to protect ourselves. Now we have guns which will create the thrust to push the metal objects, we automated the process of throwing off objects at high speeds. Similarly, we have transportation, manufacturing industry which came to rise because of automation and changed the way we live.</p><p>Almost every tool build are dumb, has limited intelligence and needed human interference. We thought why can’t we automate this. Why can’t we develop intelligence for machines? Then came the feild of Artificial intelligence. For example, we use bikes as tools to get from one place to another place. Can’t we teach a bike how to ride itself and we can just sit on it?</p><p>Humans understand complex logic and take decisions by processing the knowledge we gained with logic. We can teach a machine how to understand the knowledge like we do and apply logic on that to make decisions.</p><p>Humans basically watch out for patterns in everything and apply our learnings from past knowledge. So one way to achieve artificial intelligence is by helping the machines to recognize patterns, provide logic. This way is called Machine learning, we feed the data to the machine, make them learn and apply them to make decisions.</p><p>Now how to do we recognize patterns? — Mathematics. Machines can do numbers and math. So we developed mathematical models to gain insights from numbers and apply logic to them. For example every time there is 40-degree temperature and 60–70 humidity in a town, it used to rain. There is a pattern, so the machine can tell you will it rain or not based on current observations. Typically machine finds the relation between data and outcome, represent it mathematically, predict the upcoming event. There you go, you just automated the task of a weatherman.</p><p>Similarly, we can feed the real-time data of drivers and train the models to predict next move and do accordingly. We will discuss in next blog about types of models in machine learning and how models suit the problems.</p><p>Have a good day!</p><p><em>Reach me out at harsha.hd@go-jek.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da0c3efb1673" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happened Before History? — Human Origins]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/what-happened-before-history-human-origins-897bf258751d?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/897bf258751d</guid>
            <category><![CDATA[evolution]]></category>
            <category><![CDATA[mutation]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[human-history]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Tue, 09 Oct 2018 20:06:14 GMT</pubDate>
            <atom:updated>2018-10-09T20:06:14.043Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Happened Before History? — Human Origins</h3><p><em>This world we live in is a tiny part of entire history. Let’s discuss what happened before modern humans arrived.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*v-q6pi917kpJ5f_2_TJ7xg.jpeg" /><figcaption>Human’s history</figcaption></figure><p>Our world feels just ordinary to us and we feel it has always been like this. We take food shelter and security for granted. But never before we lived in a world that is this sophisticated and engineered needs. This gives us the luxury of forgetting about survival. 99.9% of our human history has never experienced this kind of advancement. And there is no such thing a one human history.</p><h4>Origin of humans</h4><p>About 6 million years ago the tribe of Hominini is split, and our relationship with apes ended. About 2.8 million years ago the gene of homo has emerged, the first human. We think we are the only human species, but by the time we, homo sapiens came into existence 200,000 years ago there are at least 6 other species of humans coexisted. This is like living with aliens.</p><p>Some of them are successful like homo erectus, who survived 10 times longer than modern humans for 2 million years. But the last of other humans disappeared around 10,000 years ago. We don’t know what killed them. Modern humans share DNA from Neandertals, but not enough to be a cross-species.</p><h4>Modern humans history</h4><p>Out of 2.8 million years, first 2 million years, we barely achieved any progress until we learned to control fire. Fire meant cooking which meant cooking nutritious food helped brain development. We also started to use it for surviving weather and as a weapon against other animals.</p><p>From 300,000 years, we started to live in groups like hunters and gatherers. We invented tools, wood, and fire, rock weapons, but most importantly they talked in a primitive less sophisticated language.</p><p>200,000 years ago where we originated but 70,000 years is we could date back to a behaviourally modern human. Before that, we have lacked some crucial gene mutations necessary to build a brain for complex language and abstract thinking. 50,000 years technology and innovation explosion happened and we started to speak complex languages and helped to form groups with more understanding. This made us dominant species of our planet.</p><h4>How did we grow?</h4><p>From our ancient ancestors, we have followed certain methods to use knowledge for growth.</p><ul><li>Expand the knowledge quickly.</li><li>Preserve the knowledge over generations</li><li>Build on top of the knowledge received from ancestors</li></ul><p>Before that knowledge has passed from generation to generation via genetics.</p><blockquote>Knowledge is power</blockquote><h4>How we rose to power</h4><p>50,000 years ago humans are survival specialists, we had a detailed mental map of our territory, our senses are fine-tuned to the environment and we knew a great detail about plants and animals. They have great motor skills, complex tools, and careful training. We have more skills than ever and their bodies might be compared to today’s athletes.</p><p>12,000 years ago humans developed agriculture, this changed everything. Before that, hunter-gatherer societies needed great physical and mental abilities in all fields from everybody. As farming got more and more efficient what we called civilizations arrived. This made grains more available than meet and also we started to learn how to store in large amounts.</p><p>This led us to live in tighter spaces and early defense mechanism for groups arrived. The more organized we got faster the things became efficient. Villages became cities, cities became kingdoms and kingdoms became empires.</p><p>We invented transport which led to improvement in connections between civilizations and knowledge spread exponentially.</p><p>About 500 years ago, the scientific revolution began and physics, chemistry, biology, mathematics, Astronomy started. Industrial revolution stated and overall efficiency increased. Which led more people to contribute to progress.</p><p>Then we invented the computer, and the rise of the internet shaped our world. Now we have people walking on the moon and also a plan to escape to Mars. Knowledge explosion led us this.</p><p>Let’s see will we sustain or all die before that believed to be the great filter.</p><p><em>Reach me out at harsha.hd@go-jek.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=897bf258751d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Process and threads — Android]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/process-and-threads-android-912cc92be3d1?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/912cc92be3d1</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Wed, 03 Oct 2018 03:41:06 GMT</pubDate>
            <atom:updated>2018-10-03T03:41:06.581Z</atom:updated>
            <content:encoded><![CDATA[<h3>Process and threads — Android</h3><p><em>Overview of process and how to manage threads in android</em></p><p>When an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution. By default, all components of the same application run in the same process and thread (called the “main” thread). If an application component starts and there already exists a process for that application (because another component from the application exists), then the component is started within that process and uses the same thread of execution. However, you can arrange for different components in your application to run in separate processes, and you can create additional threads for any process.</p><p>By default, all components of the same application run in the same process and most applications should not change this. However, if you find that you need to control which process a certain component belongs to, you can do so in the manifest file.</p><p>The manifest entry for each type of component element — <a href="https://developer.android.com/guide/topics/manifest/activity-element.html">&lt;activity&gt;</a>, <a href="https://developer.android.com/guide/topics/manifest/service-element.html">&lt;service&gt;</a>, <a href="https://developer.android.com/guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a>, and <a href="https://developer.android.com/guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>—supports an android:process attribute that can specify a process in which that component should run. You can set this attribute so that each component runs in its own process or so that some components share a process while others do not. You can also set android:process so that components of different applications run in the same process—provided that the applications share the same Linux user ID and are signed with the same certificates.</p><p>When an application is launched, the system creates a thread of execution for the application, called “main.” This thread is very important because it is in charge of dispatching events to the appropriate user interface widgets, including drawing events. It is also almost always the thread in which your application interacts with components from the Android UI toolkit (components from the <a href="https://developer.android.com/reference/android/widget/package-summary.html">android.widget</a> and <a href="https://developer.android.com/reference/android/view/package-summary.html">android.view</a> packages). As such, the main thread is also sometimes called the UI thread. However, under special circumstances, an app&#39;s main thread might not be its UI thread.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=912cc92be3d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CI/CD with Gitlab — Basics]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/ci-cd-with-gitlab-basics-4c45dba1663f?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c45dba1663f</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[continous-deployment]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Sun, 16 Sep 2018 18:04:05 GMT</pubDate>
            <atom:updated>2018-09-16T18:10:07.826Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Automating Integration and deployment using Gitlab’s CI/CD</em></p><p>In this era of automating the manufacturing process, continuous integration, deployment, and delivery are strategies designed to increase the velocity of product development. We are going to show how you can do this for software development using Gitlab.</p><p>Before these strategies arrived people used to write software along with version control. Run all the unit tests, integration tests and the end to end tests. If all tests pass, then build the master branch or any other branch with all the dependencies for the production environment. Then package the code and bring it to production infra like servers etc, install all the missings dependencies and finally deploy. These every step needs the manual interference. This is so much work and decreases the velocity of development and release rate.</p><p>How easy would it be to just commit and push the code, changes reflect in production. You just need to write the automation instructions once and everything works like magic. Many tools are available to do this, Gitlab’s is one of those.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cDqwuyyeICzKHVSi4t6lrg.png" /></figure><h4>How pipeline works</h4><p>You push your repo to Gitlab’s server with a yaml file in the root directory of the repository. The yaml file should be named .gitlab-ci.yml. In this yaml file, you write instruction to CI/CD of your project.</p><p>Every commit to Gitlab triggers the CI pipeline, which searches for the .gitlab-ci.yml file and executes the instructions. The execution is run either on runner provided by Gitlab or your desired machine. You can configure your machine by installing runner provided by Gitlab and have access to their servers. Or you can just use Gitlab’s own runners.</p><p>Now all you have to do write .gitlab-ci.yml file and push it.</p><h4>Configuring .gitlab-ci.yml</h4><p>It defines a set of stages. Each stage will have a set of jobs. Stages are defined like this:</p><pre>stages:<br>  - build<br>  - test<br>  - package<br>  - deploy</pre><p>The following stages are executed in the order mentioned, by default build, test and deploy are defined.</p><p>Each stage has a set of jobs. All jobs in a stage are run parallelly and stages are run in the order given. If a job fails then pipeline stops at that stage, abandon next stages and shows failure.</p><p>Each job is defined in this way:</p><pre>myjob:<br>  stage: test<br>  script:<br>    - cd myApp<br>    - compile code </pre><p>Each job should at least one attribute script. If you don’t define stage it by default runs under test stage. Will discuss how to define jobs in the next blog in this series.</p><p><em>Happy coding!</em></p><p>Reach me out at harsha.hd@go-jek.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c45dba1663f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containers and Docker 101]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/containers-and-docker-101-a4af293e209c?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4af293e209c</guid>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Thu, 13 Sep 2018 19:28:04 GMT</pubDate>
            <atom:updated>2018-09-13T19:31:53.384Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A beginners guide to containers and how docker works.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y2eQeCrbLKm4JpQZ-yVJ4A.jpeg" /></figure><p>With shifting trends from the Monolith to Microservice architecture, containers and virtual machines became the go-to solution to production deployment. Microservices enable the product to roll out faster.</p><p>Container’s goal is to isolate a Microservice and its dependencies into a self-contained unit that can run anywhere. Let&#39;s start with understanding the Containers concept.</p><h4><strong>What’s in a container?</strong></h4><p>It is really just an abstract concept of isolation trough restricting scopes etc. It used the kernel of the base image and defines its own namespaces and chgroups. Set of features work together to bring the concept of isolation:</p><p><strong>Namespaces</strong></p><p>Namespaces provide containers with their own view of the underlying Linux system, limiting what the container can see and access.</p><ul><li>Provides its own view of network stacks (Network devices, routing tables, IP addresses, port numbers etc)</li><li>Process IDs, every process is ultimately run on the underlying kernel but the parent process of the container is one of the processes run in the kernel.</li><li>Disk mounts on the system have a different file system respective to containers.</li><li>Interprocess communication is restricted to processes within the container namespaces.</li><li>Individual UID and GID ranges.</li><li>Own hostname and NIS domain name which is individual to each container.</li></ul><p><strong>Control groups</strong></p><p>Control groups (also called cgroups) is a Linux kernel feature that isolates, prioritizes, and accounts for the resource usage (CPU, memory, disk I/O, network, etc.) of a set of processes. In this sense, a cgroup ensures that Docker containers only use the resources they need — and, if needed, set up limits to what resources a container *can* use. Cgroups also ensure that a single container doesn’t exhaust one of those resources and bring the entire system down.</p><h4>Containers using Docker</h4><p>Containers concept is not new, it has been in use since the time Linux came up, due to recent trends containers became popular. Creating a container manually for a purpose takes complicated procedures with a good understanding of Linux systems. Docker is a tool to create containers with minimal efforts and ship them really fast.</p><p>Main features of Docker containers are</p><ul><li>Ease of use, with just a few simple commands, we can create containers, quickly build and test portable apps. Build once and run anywhere.</li><li>Docker containers are very lightweight and fast. Since containers are just sandboxed environments running on the kernel, they take up fewer resources.</li><li>DockerHub, App store for images, which can be pulled and used to build your custom image.</li></ul><p><strong>Docker working</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*SSGqmZy95_m1zBEYqVqXzg.png" /><figcaption>Docker architecture</figcaption></figure><p>Docker host is the machine which your container is deployed, It builds the image and deploys the container, Container is the runtime of the image, instruction to build your custom images are communicated by a docker client.</p><p>Docker client gives the commands to docker daemon which is a process that runs on the host kernel, It takes the commands and builds the image and deploys them in the host. The client gives the Dockerfile and commands to the docker daemon via a REST API.</p><p>Now the Docker host looks for the image specified in Dockerfile, If it already has that image in local it uses that, if not then it pulls the image from Docker registry like Docker hub.</p><p>On top of our base image, each instruction in Dockerfile adds a layer making it another image, until all instructions and finally runs the container.</p><p>If the Dockerfile changes it uses the existing image until new or modified instruction comes in, then it starts building from that point.</p><p>No matter what OS you are using, docker gives you the facility to create any container and work in that environment. Build, ship and deploys with ease. Docker will help to build once and run anywhere.</p><p><em>Happy Dockering!</em></p><p>Reach me at harsha.hd@go-jek.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4af293e209c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vagrant VM boxes for Mac]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/vagrant-vm-boxes-for-mac-dae07cc530d1?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/dae07cc530d1</guid>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[vagrant]]></category>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Thu, 13 Sep 2018 16:30:02 GMT</pubDate>
            <atom:updated>2018-09-13T16:30:02.600Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Setting up your Dev environment on Mac using Vagrant for Linux VM boxes.</em></p><p>After finalizing the requirements of your product and converting them into user stories, before starting development, the team decides to use a particular version of the libraries, gems, jars etc for development. You want all of your team to have the same dev environment. This task could consume a lot of time for each individual member.</p><p>Each team member might be coding on different OS, might already have the different versions of dependencies installed which are going to be used for the project. This inconsistency could create a chaos while integration. If your project’s dimension is big as it could take more than 6 months, you are basing on luck for the integration of all the modules.</p><p>You don’t want your team members to spend hours just to set up the dev environment. How easy would it be to get started with dev you just need to execute a single command be it a script etc. There are many ways to achieve this. One of them would be using a VM box with the environment that team agreed on.</p><p>You can code on your local machine, compile and run specs in VM box. This ensures consistency across development. Vagrant is a tool to setup VM boxes with some scripts and commands. Let’s get started</p><p><strong><em>Installing Vagrant</em></strong></p><p>If you are using Mac, please install brew, <a href="http://osxdaily.com/2018/03/07/how-install-homebrew-mac-os/">installation instruction</a> for Brew on OSX. Now installing Virtualbox and Vagrant, open terminal.</p><pre>$ brew cask install virtualbox </pre><pre>$ brew cask install vagrant</pre><p>Now create a folder, keep your project folder in that and create a file named Vagrantfile. File directory should like this</p><pre>├── Vagrantfile<br>├── scripts<br>│   ├── gradle_install.sh<br>│   └── java_install.sh<br>└── ProjectRoot</pre><p>Scripts used to install different stacks are in the scripts folder. Now open the Vagrantfile and type in this</p><pre>Vagrant.configure(2) do |config|<br>    config.vm.box = &quot;ubuntu/xenial64&quot;<br>    config.vm.network &quot;forwarded_port&quot;, guest: 80, host: 9000<br>    config.vm.provider do |vb|<br>        vb.memory = 1024<br>    end<br>    config.vm.provision &quot;shell&quot;, inline: &lt;&lt;-SHELL<br>        echo &quot;ubuntu:ubuntu&quot; | sudo chpasswd<br>    SHELL<br>end</pre><p>Line 1 says that use vagrant version 2 with config variable, config.vm.box defines the base OS, <a href="https://app.vagrantup.com/boxes/search">here</a> is a list of boxes provided by HashiCorp, you can find the box that suits your purpose. The port 80 of the box can be accessed by port 9000 on your local machine. Allocates a memory of 1024 MB for the box and gives superuser accesses of your box.</p><p>Java10 and Gradle5 are my project dependencies, so I had two scripts to install them in my box.</p><pre>#!/usr/bin/env bash<br># installing java10</pre><pre>add-apt-repository -y ppa:linuxuprising/java<br>apt-get -y -qq update<br>yes | apt-get install -y -qq oracle-java10-installer<br>apt-get install -y -qq oracle-java10-set-default</pre><pre>#!/usr/bin/env bash<br># installing gradle5</pre><pre>add-apt-repository ppa:cwchien/gradle<br>apt-get update<br>yes | sudo apt-get install gradle</pre><p>To execute these scripts add the following lines to Vagrantfile in Vagrant.configure loop at the end</p><pre>config.vm.provision &#39;shell&#39;, path: &quot;script/java_install.sh&quot;<br>config.vm.provision &#39;shell&#39;, path: &quot;script/gradle_install.sh&quot;</pre><p>Well, you are ready now to start the box, but you want to have a synced folder so that you don’t need to deal with the getting the source code to box. Add the following line before the end of Vagrant.configure loop.</p><pre>config.vm.synced_folder &quot;/ProjectRoot&quot;, &quot;/user/vagrant/ProjectRoot&quot;</pre><p>Now we are done with setup scripts. To start the VM do in the folder Vagrantfile is created</p><pre>$ vagrant up</pre><p>The box will be booted up and running, to get access to teminal of box do</p><pre>$ vagrant ssh</pre><p>To save the current state and end the VM do</p><pre>$ vagrant suspend</pre><p>To completely destroy the box do</p><pre>$ vagrant destroy</pre><p>This is what it should look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKe8AhvHdnUslWgJd7cb0g.png" /><figcaption>Returning to my saved Ubuntu:16.04 Vagrant VM</figcaption></figure><p>You write this file before the project, everyone can get on board and start developing by just executing a few commands like vagrant up and vagrant ssh. You can run your specs and do whatever you want in that VM terminal.</p><p><em>Happy developing!</em></p><p>Contact me at harsha.hd@go-jek.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dae07cc530d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dependency Inversion Principle]]></title>
            <link>https://medium.com/@harshavardhandharmavarapu/dependency-inversion-principle-49175ebb243a?source=rss-d534c123683b------2</link>
            <guid isPermaLink="false">https://medium.com/p/49175ebb243a</guid>
            <dc:creator><![CDATA[Harsha Vardhan Dharmavarapu]]></dc:creator>
            <pubDate>Fri, 07 Sep 2018 04:27:49 GMT</pubDate>
            <atom:updated>2018-09-07T04:27:49.347Z</atom:updated>
            <content:encoded><![CDATA[<p>The Dependency Inversion Principle (DIP) is one of the SOLID principles. It concerns the relationship between modules or classes. It is summarised by Robert Martin in these two sentences:</p><ul><li>High-level modules should not depend on low-level modules. Both should depend on abstractions.</li><li>Abstractions should not depend on details. Details should depend on abstractions.</li></ul><p>These are pithy and, deceptively simple, statements. But what do they mean and how (and when) should we apply them?</p><h4>High vs Low level modules</h4><p>A Low level module is code which carries out some specific, concrete functionality. For example an HTTP library, a database adapter, or a vector graphics module. All provide specific low-level functionality.</p><p>A High Level module is code which models core application functionality. A high level module in a stock management application, for example, might manage updating stock levels (StockUpdater).</p><h4>High Level depending on low level</h4><p>In the example of a stock management application, a stock management update message in the StockUpdater might be stockUpdater.increaseBy(widget, 10). This will, ultimately lead to a call to a lower-level database adapter to update a table or tables in the database.</p><p>A naive and simplified implementation of this might look like:</p><pre>class StockUpdater {</pre><pre>private final PostgresAdapter adapter;</pre><pre>public StockUpdater(PostgresAdapter adapter) {<br>    this.adapter = adapter;<br>  }</pre><pre>public void update(StockItem item, int quantity){<br>    postgresAdapter.update(item, quantity);<br>  }<br>}</pre><pre>public class PostgresAdapter {</pre><pre>...</pre><pre>public void update(StockItem item, int quantity) {<br>    <em>// Add item to database</em><br>  }<br>}</pre><p>The issue here is that the StockUpdater Class is being dictated to by the interface of the PostgresAdapter. The question to ask is: why should a StockUpdater know about the type of underlying datastore? Should the functionality of the StockUpdater need to change if the database was switched to MySQL or MongoDB? Clearly not. So it follows that the StockUpdater should interface with something (a) that it is in control of, and (b) something more generic than the PostgresAdapter.</p><p>The DIP says the solution is to use an Interface. That way, the StockUpdaterclass can define the interface it wants to use (thus inverting control), and the database adapter can then implement that interface.</p><p>In Java this would look like:</p><pre>class StockUpdater {</pre><pre>private final DataStore datastore;</pre><pre>public StockUpdater(DataStore datastore) {<br>    this.datastore = datastore;<br>  }</pre><pre>public void update(StockItem item, int quantity){<br>    datastore.update(item, quantity);<br>  }<br>}</pre><pre>public interface DataStore {<br>  update(StockItem item, int quanity)<br>}</pre><pre>public class PostgresAdapter implements DataStore {</pre><pre>...</pre><pre>public void update(StockItem item, int quantity) {<br>    <em>// Add item to database</em><br>  }<br>}</pre><p>In this simple example, the code changes are minimal. But the important thing is what it achieves. Now there is an interface that defines the relationship between the StockUpdater and the PostgresStore. The subtle, but key point, is that the DataStore interface is defined by the requirements of theStockUpdater not the PostgresAdapter. The PostgresAdapter doesn’t need any knowledge of StockUpdater, but just needs to implement the DataStore interface.</p><p>Have a good day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49175ebb243a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>