<?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 Rhea Rodrigues on Medium]]></title>
        <description><![CDATA[Stories by Rhea Rodrigues on Medium]]></description>
        <link>https://medium.com/@missrhea?source=rss-9dcf65c66c9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*e3tqL3oXxPOf7oeBmro4yw.jpeg</url>
            <title>Stories by Rhea Rodrigues on Medium</title>
            <link>https://medium.com/@missrhea?source=rss-9dcf65c66c9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:53:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@missrhea/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[Keeping The Model Alive]]></title>
            <link>https://medium.com/geekculture/keeping-the-model-alive-a4ef3c26c9ff?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4ef3c26c9ff</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Fri, 18 Jun 2021 16:32:54 GMT</pubDate>
            <atom:updated>2021-06-22T20:40:24.162Z</atom:updated>
            <content:encoded><![CDATA[<h4>MLOps in academia is catching up with the industry and so should you. Find out how ML looks different in research vs in production, and what it means to deploy your model and keep it alive in production.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxA2gtLpW6yTH4yzYewehw.png" /><figcaption>You have to think about ML and DevOps (MLOps) together if you want your models to be sustainable and add value to the business in the long run.</figcaption></figure><p>June 16, 2021</p><blockquote><em>This article discusses why Data Science efforts should include deployment of models, challenges associated with it, and in particular reproducibility- what it means and how we can measure it.</em></blockquote><p>Let’s say that you just pushed a high-performing model to production. You’re done, right?</p><p>No, not really. This is just the beginning.</p><p>Most literature talks about the <strong>offline stage</strong> of a data science project, which includes:</p><ol><li>Problem Definition</li><li>EDA</li><li>Data Cleaning</li><li>Modeling</li><li>Performance Evaluation</li></ol><p>But, the literature rarely mentions the <strong>online</strong> stage of a data science project, which includes:</p><p>A model that proved itself offline will not necessarily work as excepted online. It needs to be battle-tested with real-world data in production. In reality, in a Data Science modeling project, the effort doesn’t stop after the delivery of a model, a continuous effort is required for maintenance and adoption. So, when you plan a modeling project, don’t just plan for the offline stage, but also, online stage of a project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*eEt5qas9RmVilUIh.png" /><figcaption>Taken from <a href="https://www.microsoft.com/en-us/research/uploads/prod/2019/03/amershi-icse-2019_Software_Engineering_for_Machine_Learning.pdf">this</a> paper by Microsoft on ML System Design</figcaption></figure><blockquote><strong><em>A Data Scientist’s mandate is to deliver on their promise to add value to the business.</em></strong></blockquote><p>To add value to the business, Data Science work must go beyond just training and tuning the best possible model. It must include model delivery i.e. deploying in production so the model’s predictions can be consumed. The customer or end-user should be able to consume the model’s outputs in whatever manner is convenient to them- in the form of dashboards, web applications, batch jobs, APIs, or daily reports in their inboxes. When the customer can reliably extract predictions from Machine Learning models then we get maximum value from the models.</p><p>Before diving into more detail, let’s define some terms in the context of Data Science for clarity.</p><ul><li><strong><em>Environment</em></strong><em>: </em>The setting or state of a computer on which a software application/product is developed or put in operation. It includes the hardware, operating system, and software.</li><li><strong><em>Research Environment</em></strong><em>: </em>The setting (tools, programs, libraries) suitable for data analysis, development, and evaluation of ML models. Might include python, pandas, jupyter notebooks, etc.</li><li><strong><em>Production Environment</em></strong><em>: </em>A <em>real-time</em> setting with execting programs and hardware setups that enable an organization’s daily operations. ML models are served to clients to meet a business need.</li></ul><h3>Machine Learning in Research vs Production</h3><p>A quick glance at the different aspects of ML and their different concerns depending on whether we look at the research or production environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjEqcKZVDVq-b4EqCy77Gg.png" /><figcaption>How ML looks different in the research phase and the production phase</figcaption></figure><h3>Challenges in Productionizing a Model</h3><p>A Data Scientist might have perfected modeling in the research environment, but when it comes to deploying the model in a production environment there is a tendency to look the other way. To be fair, ML applications in the industry are relatively new (compared to Software Development). Most people gain ML expertise through academia i.e. reading papers, taking courses, and research work. Which means little to no incentive for them to pay attention to productionizing a model. This is exactly where I was until I began working as a Data Scientist which was a reality check about how different ML in the industry was from my academic training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*P-QriOBt2P44asOm.png" /></figure><p>The knowledge around productionizing models evolved in the industry since there was nowhere else to look for help. The practices involved in the online stage have been tried and tested by professionals in the industry. Today we can take advantage of their efforts, and learn the best practices to think about the ML system design for our projects. We can learn from examples like Uber that developed <a href="https://eng.uber.com/michelangelo-machine-learning-platform/">Michaelangelo</a>- an ML-as-a-service platform to enable building and deploying ML solutions. As additional resources, these two papers by <a href="https://papers.nips.cc/paper/2015/file/86df7dcfd896fcaf2674f757a2463eba-Paper.pdf">Google</a> and by <a href="https://www.microsoft.com/en-us/research/uploads/prod/2019/03/amershi-icse-2019_Software_Engineering_for_Machine_Learning.pdf">Microsoft</a> are worth mentioning. These papers discuss end-to-end ML system design, risks associated with it, and best practices to address them. ( If you decide to read/glance through these examples, take the suggestions with a grain of salt- use it as a checklist and don’t aim to achieve every single item, instead focus on what is most relevant to your problem.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*zsG_fay1kJ_oCych.png" /><figcaption>Taken from <a href="https://papers.nips.cc/paper/2015/file/86df7dcfd896fcaf2674f757a2463eba-Paper.pdf">this</a> Google paper about Hidden Technical Debt in ML</figcaption></figure><p>When it comes to traditional <strong>Software Development in Production</strong> a few common challenges are:</p><ul><li><strong>Reliability</strong>: Tolerating hardware/software/human errors.</li><li><strong>Reusability</strong>: Ability to be used across systems and projects.</li><li><strong>Maintainability</strong>: Operability, simplicity, and evolvability.</li><li><strong>Flexibility</strong>: Ability to adapt to other newer components.</li><li><strong>Scalability</strong>: Measuring load, performance, throughputs, and latency percentiles.</li></ul><p>With deploying a ** ML model in Production** we face the above software development challenges and additional modeling specific challenges like:</p><ul><li><strong>Reproducibility</strong>: The ability to produce consistent results given the same data across systems. In other words, given the same input data, the model is production should be able to perform as well as the model in the research phase.</li><li><strong>Collaboration</strong>: Data Science projects usually require collaboration from cross-functional teams. Data Scientists interact with Subject Matter Experts, Developers, Data Engineers, Business Executives.</li><li><strong>The discrepancy in Programming Language</strong>: When the programming language used in the research environment is not the same as that in the production environment, rewriting the code increases the timeline to deploy. In addition, we also risk losing reproducibility.</li></ul><blockquote><em>For example, Twitter is a Java shop- most of their production codebase is in Java / Scala (JVM languages). So they have to build a lot of production gluing logic, to make Tensorflow (C++ and Python-based) for Machine Learning projects work at Twitter. (Heard on </em><a href="https://open.spotify.com/episode/0s032RWTHT2wVPUdd7cqZM?si=4QWPRX51SEm6eZjhMSQnwA&amp;dl_branch=1"><em>this</em></a><em> podcast with an ML Engineer at Twitter, skip to around the 20-minute mark).</em></blockquote><h3>What I Talk About When I Talk About Deploying a Model</h3><p>When I talk about deploying an ML model I mean deploying the entire <strong>ML pipeline</strong>. That includes all the steps, right from the moment we accept the raw input data, followed by data cleaning, data preprocessing, feature engineering, and feature selection just before the data is passed onto the model. In the research environment, each step that touches the data needs to be applied to the raw input data in production i.e. the ML pipeline must be <strong>“reproduced”</strong> in the production environment.</p><h3>Let’s Talk About Reproducibility For a Moment</h3><p>We want to reach the state such that if we gave the same raw input data to the ML pipeline in the research and production environment then we should receive the same output predictions from both. In that sense, the <strong>ability</strong> to <strong>“reproduce”</strong> the performance of the ML pipeline in production to be similar (or as close as possible) to the performance achieved in the research environment is <strong>“reproducibility”</strong>.</p><p>Obviously, you won’t check individual predictions instead you will compare the overall <strong>ML pipeline’s performance</strong>. In the research phase, the model is optimized for business value- measured according to pre-defined metrics (KPIs) like, ‘increase in revenue’. Other metrics to evaluate performance might be precision, recall, F1 score, AUC ROC, etc depending on the nature of the problem. For <strong>“reproducibility”</strong> ensure that these metrics in production closely resemble those in the research phase.</p><p>When you ensure reproducibility you reduce certain risks- the risk of increased financial cost, delay in delivery, and damage to reputation when your model in production underperforms.</p><p>Once the entire ML pipeline is deployed then raw input data can be used to either (a) extract predictions from the trained model or (b) re-train the model.</p><p>Finally, Data Science efforts don’t end with modeling. Deploying ML systems isn’t just about getting ML systems to the end-users. Just like concerns with software systems in production, it’s about building an infrastructure so the team can be quickly alerted when something goes wrong, figure out what went wrong, test in production, roll-out/rollback updates. It is about ‘Keeping the Model Alive’.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4ef3c26c9ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/keeping-the-model-alive-a4ef3c26c9ff">Keeping The Model Alive</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Your Code Slows As Data Grows]]></title>
            <link>https://medium.com/geekculture/how-your-code-slows-as-data-grows-ad7d17541ebf?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad7d17541ebf</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[big-o-notation]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[time-complexity]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Thu, 10 Jun 2021 01:20:50 GMT</pubDate>
            <atom:updated>2021-06-10T16:12:45.831Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2J7p2it37pzrdm6Rh4d2oA.jpeg" /></figure><p>Knowing how complicated a task is will be an important factor in deciding whether the task is worth doing to achieve some outcome. Similarly, knowing how complicated an algorithm is will be a strong indicator of whether to use it or not to achieve some outcome. In our day-to-day life, we might decide how complex a task is based on how much time it will take, how far do I have to travel, do I have the money and resources for this task, etc. How do we decide how complex an algorithm is? We use the Big O Notation for that.</p><h3>Enter The Big O Notation</h3><p>Firstly, the Big O notation is just a notation. Don’t be confused by the parenthesis that makes it read like a function. The O stands for “order of”. Think of it as a label attached to an algorithm to describe how fast the algorithm grows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8aYzFA9_dOIm2rKl7WtPuw.png" /><figcaption>The Big O Notation</figcaption></figure><p>In the Big O Notation, the function ‘f’ is the algorithm we are analyzing. And the input ‘n’ is the size of the input to the algorithm ‘f’. Now we have a framework to compare different algorithms ‘f’ as a function of the input size ‘n’.</p><p>The Big O Notation gives us an idea of how complex an algorithm is, so we can compare different algorithms. When we say ‘complexity of an algorithm’ it refers to complexity with respect to any finite resource- time, memory, network input/output, etc. If you think about it any finite resource ties back to time- which is the ultimate finite resource.</p><h3>More Formally,</h3><p>Think of f(n) and g(n) as the running times of two algorithms on inputs of size n.</p><p>Suppose f(n) and g(n) are two functions from positive integers to positive reals. We write f(n) = O(g(n)) for n -&gt; ∞ if and only if there exist constants N and C such that, |f(n)| &lt;= C |g(n)| for all n&gt;N.</p><h3>More Intuitively,</h3><p>f = O(g) means that f does not grow faster than g.</p><p>Saying “f=O(g)” is like saying “f &lt;= g”. Similarly, the are analogy for ‘&gt;=’ and ‘=’ are the Big Omega and Big Theta notations respectively.</p><p><strong>Big O</strong>: f=O(g) means f&lt;=C*g(n) for n&gt;N</p><p><strong>Big Omega</strong>: f=Ω(g) means g=O(f)</p><p><strong>Big Theta</strong>: f=Θ(g) means f=O(g) and f=Ω(g)</p><h3>Abstracting away the implementation details</h3><p>When we program an algorithm and actually run it on a computer, it is very difficult to determine the exact number of instructions or machine cycles that will be executed by the processor. Looking at the source code does not help. This is because there are too many external factors like hardware, software, and programming-language specifics that affect the actual time (in seconds) for a program to run.</p><p>We can abstract away from these implementation specifics to simplify how we reason about an algorithm’s complexity. So we express the algorithm’s running time in terms of the <em>basic computer steps</em>.</p><p>Say an algorithm has 5n2+10n+3 basic steps on an input of size n. So the running time can be expressed as a function of the input size i.e. f(n)=5n2+10n+3. As n -&gt; ∞ the highest order term will determine the rate of growth of the algorithm’s run time. So the lower order terms and coefficients become negligible. We can say, that f=O(n^2), said as <em>“f is big oh of n square”</em>.</p><blockquote><em>Let’s solve this problem.</em></blockquote><blockquote><em>Consider, f(n) = O( f(n)2)</em></blockquote><blockquote><em>Decide whether it is always true, never true, or sometimes true for asymptotically nonnegative functions f and g. If it is always true or never true, explain why. If it is sometimes true, give one example for which it is true, and one for which it is false.</em></blockquote><blockquote><em>Answer: Sometimes true. example: f(n)=n and counterexample: f(n) = 1/n.</em></blockquote><h3>Some Perspective</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBzT4Qx6nNmd8AF5S9RB1A.png" /></figure><p>Assume we have a budget of one week and one operation requires 1 millisecond. Now, one week has 604,800,000 milliseconds. That is approximately 604 Million milliseconds. Let’s say we have a bunch of different tasks that require different algorithms.</p><p>For instance, a linear search task with O(n) time complexity and a sorting task with a worst-case complexity of O(n^2). We still have only one week and the same processing power for any algorithmic task. The maximum input size that can be processed by any algorithm in a week is shown in the following table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0Bj5ukd9hBkH5UGkCgRHA.png" /><figcaption>Maximum Input Size Processed with respect to the Algorithm’s Time Complexity</figcaption></figure><p>To elaborate, let’s consider the set cover task. Don’t worry about the details of the set cover problem now, just know that it has a time complexity of O(2^n). In a week we have approximately 604 Million milliseconds of processing power. So we ask, <em>“what is the largest n for which 2^n in within the 604 Million millisecond mark?”</em>. The answer to that question is,</p><p>n = log2(604,800,000) = 29</p><p>In a week we can only solve the set cover problem for an input size of n = 29. Such is the curse of exponential time complexity.</p><p>In conclusion, we reason about an algorithm’s complexity using the Big O notation. And the order of the algorithm’s complexity determines how your task will slow down as your data grows.</p><h3>References</h3><ul><li><a href="https://www.bigocheatsheet.com/">Big O Cheat Sheet</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad7d17541ebf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/how-your-code-slows-as-data-grows-ad7d17541ebf">How Your Code Slows As Data Grows</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment With GitHub Actions]]></title>
            <link>https://missrhea.medium.com/continuous-deployment-with-github-actions-aa41bbbf2607?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa41bbbf2607</guid>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[github-pages]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 06:48:09 GMT</pubDate>
            <atom:updated>2021-03-05T06:48:09.885Z</atom:updated>
            <content:encoded><![CDATA[<p>In this <a href="https://rhearodrigues.me/Hosting-With-GitHub-Pages/">post</a>, I explained how I deployed my website using a simple deploy script.</p><p>There is another method to do this same thing but with continuous delivery. It uses GitHub’s new feature called GitHub Actions. It is obviously not necessary for my personal website. However, I think it’s pretty cool to have a personal website with continuous delivery!</p><h3>Enter GitHub Actions</h3><p>As I was scouring the internet to figure out how to host my Gatsby site on GitHub Pages I came across GitHub Actions as a CI/CD server. I thought figuring out how CI/CD works and what GitHub Actions is by setting it up for my website would be pretty cool.</p><p>From all the reading I’ve done, if I had to describe what GitHub Actions does in one word I’d say <strong>automation</strong>.</p><p>Put simply, a GitHub Action defines a <em>workflow</em> to perform some task. This <em>workflow</em> will be automatically triggered each time a specified <em>event</em> occurs.</p><p>The <a href="https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions#the-components-of-github-actions">docs</a> define the following components that make up a GitHub Action,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*SRuezoQaubd1eBHJ.png" /></figure><ul><li><strong>Actions:</strong> are the smallest building block of a workflow, an action is any standalone command.</li><li><strong>Steps:</strong> performs a single task, a step is made up of a single action.</li><li><strong>Jobs:</strong> are made up of one or more steps that execute on the same runner.</li><li><strong>Runner:</strong> is a server that listens for jobs, runs one job at a time, reports progress, logs results back to GitHub.</li><li><strong>Workflow:</strong> is made up of one or more jobs. A workflow with multiple jobs will run those jobs in parallel (default) or sequentially.</li><li><strong>Event:</strong> a specific activity (for example a new pull request) that triggers a workflow.</li></ul><p>Before I explain the workflow I require, let me give you some context. I’m developing locally on the dev branch and the remote gh-pages branch is the publishing source for my GitHub Pages website.</p><p>So the workflow I need for my website would look like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*TPyXreS51YaWAR_h.png" /></figure><p>Whenever I push to the dev branch, the <strong>&quot;build&quot; job</strong> will be executed. This job has <strong>two steps</strong>.</p><ul><li>The first step will checkout the repository to a <strong>runner</strong> (i.e. a Linux virtual machine server) on which the code can be executed.</li><li>The second step will create the build and push it to the gh-pages branch.</li></ul><p>For the second step, <a href="https://github.com/enriikke/gatsby-gh-pages-action">this</a> community action on GitHub Marketplace does exactly what I need. Think of GitHub Marketplace as a open-source library for GitHub Actions- this means a kind person wrote and open-sourced step two for me.</p><p>I modified the community action to work with my website. In particular, I configured the access token and the source branch. The <strong>workflow</strong> is defined inside the ./github/workflows/main.yml file. This is my workflow definition,</p><p>And we’re done! Now each time I run the git push command the workflow will be triggered and a new version of my website will be deployed automatically!</p><p><em>Originally published at </em><a href="https://rhearodrigues.me/Continuous-Deployment-With-GitHub-Actions/"><em>https://rhearodrigues.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa41bbbf2607" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configure A Custom Domain Name For GitHub Pages]]></title>
            <link>https://missrhea.medium.com/configure-a-custom-domain-name-for-github-pages-e867b846826d?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e867b846826d</guid>
            <category><![CDATA[namecheap]]></category>
            <category><![CDATA[custom-domain]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[github-pages]]></category>
            <category><![CDATA[personal-blog]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 06:45:36 GMT</pubDate>
            <atom:updated>2021-03-05T06:45:36.829Z</atom:updated>
            <content:encoded><![CDATA[<p>I registered for a custom domain name for my website on <a href="http://namecheap.com/">NameCheap.com</a>. Without a custom domain name my GitHub Pages website would have been hosted at missrhea.github.io (i.e. &lt;your-username&gt;.github.io). This did not bother me, I just wanted to try a custom domain name for fun plus it was free.</p><h3>1. Configuring the custom domain name on GitHub</h3><p>Inside the missrhea.github.io repository, click on the Settings tab. Scroll down to the GitHub Pages section. I entered my custom domain name in the “Custom domain” field and saved that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*b_gMmLnANpbUGEcy.png" /></figure><p>The above step created a commit that added a CNAME file to the root of my publishing source i.e. the root directory of the gh-pages branch.</p><h3>2. Configuring the custom domain name on NameCheap.com</h3><p>On <a href="http://namecheap.com/">NameCheap.com</a> I created the following records under the Advanced DNS tab,</p><ul><li>A CNAME record to point <a href="http://rhearodrigues.me/">rhearodrigues.me</a> (i.e. my custom domain) to <a href="http://missrhea.github.io/">missrhea.github.io</a> (i.e. the default domain of my GitHub Pages website).</li><li>Four A Records (with Host as ”@” i.e. root) for the <em>Github A Record IPs</em>:</li><li>185.199.108.153</li><li>185.199.109.153</li><li>185.199.110.153</li><li>185.199.111.153</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*_Ftx_0rgsc4Kh-hC.png" /></figure><p>Now my website hosted using GitHub Pages is available at rhearodrigues.me!</p><h3>References</h3><ul><li>GitHub Docs <a href="https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site">here</a>.</li><li>NameCheap.com support page <a href="https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages/">here</a>.</li></ul><p><em>Originally published at </em><a href="https://rhearodrigues.me/Configure-A-Custom-Domain-Name/"><em>https://rhearodrigues.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e867b846826d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosting With GitHub Pages]]></title>
            <link>https://missrhea.medium.com/hosting-with-github-pages-9062caa6a52a?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9062caa6a52a</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[personal-blog]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[personal-website]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 06:41:18 GMT</pubDate>
            <atom:updated>2021-03-05T06:41:18.949Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last post I mentioned, I’m building this website with Gatsby and explained why. So far I have a working version of my Gatsby site locally. In this post, I’ll go through the steps to host this site using GitHub Pages.</p><p><strong>1. Create a new repository named &lt;your-username&gt;.github.io</strong> GitHub Pages will host my website at missrhea.github.io from the missrhea.github.io (i.e. &lt;your-username&gt;.github.io) repository. That means the files needed to host my website must be inside this repository.</p><p><strong>2. Create a new branch called </strong><strong>gh-pages</strong> Create a new branch and name it gh-pages- don&#39;t change the name since the gh-pages package in step 4 requires this.</p><p><strong>3. Set </strong><strong>gh-pages as the publishing source</strong> In the Setting tab for this repository under the GitHub Pages section, set the Source as this gh-pages branch. So the website will be published from the gh-pages branch, and not from the default &quot;master&quot; branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*TFqm2jt74zRDfrcf.png" /></figure><p>Here is the explanation for not using the master branch as the publishing source for the website.</p><ul><li>When the build for the website is created using the gatsby build command, Gatsby will build everything needed to deploy the static website. This build will include the static HTML pages, JSON files, transformed images, markdown files. These files are placed in the ./public directory and it looks very messy.</li><li>However, the publishing source for my GitHub Pages website must be able to read the contents in the ./public directory. To avoid this clutter on the default master branch I prefer to have these files on another branch.</li></ul><p><strong>4. Build and push to the remote </strong><strong>gh-pages branch</strong> I&#39;m developing the code for my website locally in the dev branch. Right now the gh-pages remote branch is empty. As it is the source branch, gh-pages should ideally contain all the files generated by the gatsby build command.</p><p>This can be achieved with a simple deploy script in the package.json file. The script to do this involves two commands.</p><ul><li>$ gatsby build<strong>This command will create the build.</strong> When the build process is complete all the files necessary to deploy the website will be present in the /public directory.</li><li>$ gh-pages -d public<strong>This command will push the contents of the </strong><strong>./public directory to the remote </strong><strong>gh-pages branch.</strong> Then Github Pages will publish the contents of this branch.</li></ul><p>The Gatsby docs outline the steps using the gh-pages package in detail <a href="https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/how-gatsby-works-with-github-pages/#installing-the-gh-pages-package">here</a>. This is why I named the source branch gh-pages. Because the gh-pages package requires this name.</p><p>Install the gh-pages package with,</p><p>$ npm install gh-pages --save-dev</p><p>Now put these two commands together in a deploy script in the package.json file.</p><pre>{ &quot;scripts&quot;: { &quot;deploy&quot;: &quot;gatsby build &amp;&amp; gh-pages -d public&quot; } }</pre><p>Execute this deploy script with $ npm run deploy. This will build the site and push the contents of the ./public directory to the (remote) gh-pages branch.</p><p>Voilà: each time I want to update my website or publish a new post all I have to do is run the $ npm run deploy command!</p><p><em>Originally published at </em><a href="https://rhearodrigues.me/Hosting-With-GitHub-Pages/"><em>https://rhearodrigues.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9062caa6a52a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello Gatsby!]]></title>
            <link>https://missrhea.medium.com/hello-gatsby-c9b38ba36131?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9b38ba36131</guid>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[personal-blog]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 06:34:55 GMT</pubDate>
            <atom:updated>2021-03-05T06:38:44.982Z</atom:updated>
            <content:encoded><![CDATA[<p>This post is an introduction to Gatsby.js and some of its amazing features.</p><p>A few weeks ago I started building this website with <a href="https://rhearodrigues.me/%20Hello-Gatsby!/%5Bhttps://www.gatsbyjs.com/%5D(https://www.gatsbyjs.com/)">Gatsby</a>. In this post, I will explain what I’ve learned about Gatsby and my reasons for using it to build this website.</p><p>I’m no web development expert, just an amateur hobbyist. If you think something I’ve mentioned here or the code on my GitHub repo could be improved, please feel free to <a href="/service/mailto:rhea49rdgs@gmail.com">email</a> me or open a <a href="https://rhearodrigues.me/%20Hello-Gatsby!/%5Bhttps://github.com/missrhea/missrhea.github.io/tree/dev%5D(https://github.com/missrhea/missrhea.github.io/tree/dev)">PR</a>. Now let’s get started.</p><h3>What is Gatsby?</h3><p>In essence, <em>Gatsby is a React application.</em></p><p>Gatsby serves two broad use cases.</p><ol><li>First, it serves as a <em>static site generator</em>. Think Jekyll, a personal portfolio site, or a blog like this.</li><li>Second, it serves to <em>build dynamic web applications</em>. Think Twitter or e-commerce sites i.e. websites that fetch dynamic data, support client-side JavaScript and authentication for example.</li></ol><p>Gatsby is an excellent tool for both use cases.</p><h3>Three reasons why Gatsby is appealing</h3><ol><li><strong>Gatsby specializes in making websites fast.</strong> Here, ‘fast’ refers to, fast for the developers to build and also fast in terms of performance for the end-user experience.</li><li><strong>Gatsby has a rich plugin ecosystem.</strong> Or in other words, it is possible to add features to your web app in a plug-and-play manner. A plugin is a Node.js package that implements the Gatsby APIs. For example, this website uses the markdown<a href="https://www.gatsbyjs.com/plugins/gatsby-transformer-remark#gatsby-transformer-remark"> plugin</a> to convert posts written in markdown into HTML. (If this doesn’t make sense to you, you are not alone. It took me some digging around to figure out the role of plugins.)</li><li><strong>Gatsby builds are quick to process.</strong> It uses optimizations to speed up the build and deploy process. The Gatsby <a href="https://www.gatsbyjs.com/">website</a> claims the build and deploy process is “2.5x faster than other static frameworks”. This is extremely cool! (Even though a light-weight personal website like this would see microscopic benefits in this regard- if any).</li></ol><h3>Why did I decide to use Gatsby for this website?</h3><p>When I was scouring the internet for static site generators (in mid-2020) it quickly became clear that <a href="https://www.youtube.com/watch?v=L3Un8Zp4r6k">several</a> <a href="https://www.taniarascia.com/migrating-from-wordpress-to-gatsby/">smart</a> <a href="https://www.jerriepelser.com/blog/migrating-blog-hugo-to-gatsby">arguments</a> made the case in favor of Gatsby. I went down the Gatsby rabbit-hole for myself to see if the benefits of Gatsby for a simple static personal website justified the cost. The cost refers to the time/energy to learn- keeping in mind the aim of this website/blog is to write.</p><p>I decided to use Gatsby for three reasons.</p><ul><li><strong>Hit the ground running with starters.</strong> Starters are boilerplate Gatsby sites. So I could pick a bare-bones template site and all I had to do was the styling/customization I wanted. This was important because I could focus on writing- and not get lost in the labyrinth of learning a new web development framework.</li><li><strong>Learn React as I go along.</strong> At several points in time, I have gone through the odd React app tutorial. This would end either in learning something basic I had forgotten or an overly ambitious project that never got close to completion. With Gatsby, I saw the opportunity to tinker with and deconstruct a React component at a time. Brownie points for the clear, easy-to-follow documentation and a hugely supportive community!</li><li><strong>Free personal website + blog</strong> I could have my very own place on this big old internet. I’d no longer need to depend on third-party platforms or be required to follow unnecessary guidelines to have my content published. And anyway the signal to noise ratio on these platforms is poor. Gatsby is an excellent open-source and very much a community-driven tool i.e. it’s free! And who doesn’t love high quality especially when it’s free?</li></ul><p>This cost-benefit analysis suggests that the benefits kinda justify the cost.</p><p><strong>TL;DR</strong> All this was to say two things. One, Gatsby is a great framework that lets you do important things fast. Second, this website of mine is now powered by Gatsby!</p><p><strong>P.S.</strong> Did the thought of setting up your own website cross your mind? Or you don’t like something about your current website? If this is true, I hope my post makes you consider (if it has not convinced you) to change that with <a href="https://www.gatsbyjs.com/">Gatsby</a>.</p><p><em>Originally published at </em><a href="https://rhearodrigues.me/%20Hello-Gatsby!/"><em>https://rhearodrigues.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9b38ba36131" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Easy]]></title>
            <link>https://medium.com/runners-life/running-easy-d8b7796c5a40?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8b7796c5a40</guid>
            <category><![CDATA[coach-bennet]]></category>
            <category><![CDATA[nike]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[running]]></category>
            <category><![CDATA[fitness]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 00:10:40 GMT</pubDate>
            <atom:updated>2020-07-19T18:18:31.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OX9t9Y0S3XqdMKDaNQ3fYw.png" /><figcaption>This long path with the sunshine and shade is fun to run along.</figcaption></figure><p>I completed my first 10 km run a few weeks ago and it felt awesome! I felt so good, I decided to write this while I was running, and I began listing the things I wanted to share with you in my mind. I remember wishing I could record my thoughts for later. I sat down to write, and what I ended up writing did little justice to how I felt. Soon I was asking myself, I’m only an amateur writer/ runner who would want to read this? But here goes an overdue short story.</p><p>Wednesday, June 3rd, 2020. A notification discretely declares today is Global Running Day. Dismiss. It had been a long day at work (working from home for the record), I was mentally exhausted, and I eagerly logged off and made my way to the park. That day I gave no thought about how far I should run or how long I should run — but I knew I had to run. 1 km into the run I decided the weather was perfect for a longer run and I had no urgent tasks that day so why not run a 10 km?</p><p>The longest run I had previously done was an 8k — and that was a long time ago. I ran with a smile that day. Perhaps it was the weather gorgeously overcast and humid, or my playlist, or the freedom that comes with no expectation of a specific pace, time or distance, or the sense of gratitude to be outdoors in a beautiful place, or just the coffee earlier that day — perhaps it was all of these. I was running a new trail. I wanted to know how far my body can go on an easy run. I told myself I will try my best to run easy for as long as I can — because running easy can be hard — I’ll try my best to complete 10 km even if I run slowly and if I find I cannot go on, I will be kind to myself and stop. At the end of that 10 km run, even though I was panting heavily, I felt more energetic than when I started and I was proud of my latest achievement. I let myself entertain the thought of a half marathon — wild, I know!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C0mlMMSBqvC-zvB4" /><figcaption>A 45 min long guided run I completed.</figcaption></figure><p>Sometimes I like running to guided runs on the NRC app because <a href="https://www.instagram.com/coachbennett/">coach Chris Bennet</a> drops some valuable comments to think about while you run. Sometimes his comments have the perfect timing and alignment with what I was telling myself — it seems uncanny — that I have laughed out loud while running.</p><p>I believe running has taught me a couple of lessons. And here is one lesson I think we might need to be reminded of every now and then. You can plan in great detail for a perfect run. You can plan the timing of your pre-run meal, you can check the weather, and spend an obscene length of time curating a playlist. And it might still not be the run you were hoping for. Sometimes you might feel anxious, or begin to feel a cramp, or the weather just won’t cooperate. Try approaching each run like a painter approaches a blank canvas. We come to the run prepared with our gear in the same way a painter comes to the canvas prepared with his tools — and then we give it our best. Let the run unfold. By doing this we avoid projecting our expectations of a previous great run which only serves to distract us from the present run. So instead of getting caught up in your thoughts, it is far better to take a deep breath and find the success in the run you can run.</p><blockquote>Can you find the success in the run you can do?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8b7796c5a40" width="1" height="1" alt=""><hr><p><a href="https://medium.com/runners-life/running-easy-d8b7796c5a40">Running Easy</a> was originally published in <a href="https://medium.com/runners-life">Runner&#39;s Life</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Brief History of Authentication and Authorization]]></title>
            <link>https://missrhea.medium.com/a-brief-history-of-authentication-and-authorization-2034c12f7c0f?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2034c12f7c0f</guid>
            <category><![CDATA[openid]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[openid-connect]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Thu, 14 Nov 2019 23:22:11 GMT</pubDate>
            <atom:updated>2019-11-16T07:30:20.294Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Evolution of <strong>Authentication and Authorization on the Internet</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QQ85bMpO_pYHdZhWl_xhpQ.png" /><figcaption>Perhaps the explosion of the internet circa 2000 is indicative of the surge in the usage of the word ‘authentication’ during that same time as shown in the Google Trends graph.</figcaption></figure><p>For a user to have access to these services they would have to first enter into the web application. And this entrance was facilitated by means of a <strong><em>Simple Login</em></strong>. For example, to login to your account on a website you would have to enter your Username and Password into a Web Form. The Web Server would then check the entered Username and Password against a Database. If the password matches, the Web Browser is given a session ID associated with that user’s account. This is <strong>a<em>uthentication</em></strong>. In other words, it is the process of <em>verifying oneself so that the system can confirm that you are what you say you are</em>.</p><p>A similar sounding and frequently confused term is another security process called <strong><em>authorization</em></strong>. <em>It is the process of giving the user permission to access specific resources or services</em>. Once the user is successfully authenticated (that means the user has entered the web application) the system must decide what parts of the web application the user can access. <em>In secure environments authorization must always follow authentication</em>*.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*rHAicTvzsvsKqIgk.png" /><figcaption>Authentication determines ‘Who you are?’ and Authorization determines ‘What you can do?’</figcaption></figure><h4><strong>The problem</strong></h4><p>Say that some third-party application wanted to send invites to your contacts using the contacts already on your email account. The implementation for this was first attempted by ‘Yelp’. Yelp wanted access to users’ contacts to send out invitation emails to their contacts. For the lack of a better way to do this (at the time), Yelp essentially asked users for the credentials to their Email accounts, then logged into the user’s email account, sent out emails to their contacts and then logged out and threw away the credentials. This implementation gives the third-party application unfettered access to users’ email accounts which most likely hold sensitive personal data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*3tUvB3xH82DsnXzHW2572w.jpeg" /></figure><h4>Delegated Authorization to the rescue</h4><p>With the dawn of Facebook and the iPhone in 2007, a use-case known as <em>‘Delegated Authorization</em>’ became popular. Applications began presenting users with the following prompt: “XYZ application is trying to access your Facebook profile and display picture but it won’t post to Facebook”. This approach is preferred over Yelp’s approach, because authentication and authorization are not violated. Here, the user them self is logged into Facebook and<strong> not </strong>the third-party application, in this . Furthermore authorization i.e. permission to access the user’s contacts still belongs only to the user, and the user may decide to<strong> delegate (or share) the access to a specific resource </strong>(like the profile picture or contacts)<strong> </strong>with the third-party application.</p><p>But how is ‘Delegated Authorization’ implemented you ask?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*KZx4EWa0tzLIf56CT35bTg.gif" /></figure><p>Using the OAuth protocol!</p><p>(Note: OAuth 1.0 is now deprecated and is rarely used. All mentions of OAuth below are references to OAuth2.0)</p><h4>Authorization with OAuth <em>(Open Authorization)</em></h4><p>The OAuth protocol was designed to solve the “Delegated Authorization” use-case. According to OAuth, access to a user’s information doesn’t have to be all or nothing. There is no need to provide an application with access to all resources when it needs only a single resource (like contact information).</p><p>For example, when a user clicks the button on an Application that says, “Connect with your Facebook Account”, the user is put into an <strong>OAuth Flow</strong>. <em>This is a series of steps that results in the application being able to access only the required resources, that the user has explicitly consented access to</em>. OAuth was designed to solve the Authorization problem i.e. it is concerned with <em>scopes and permissions</em>. It is <em>not </em>concerned with user identity or ‘who you are’ i.e. Authentication.</p><h4>A new problem, Authentication with OAuth?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*1rHYFnaO14m-cI7fsrgsYQ.jpeg" /><figcaption>OAuth (Open Authorization) was not built for Authentication.</figcaption></figure><p>OAuth became so widespread that it came to be used for Authentication. Google (and Facebook and the like) began providing the “Sign in with Google” alternative when a user wanted to Sign-Up for a new account on a website. This was a bad idea because OAuth was <strong>not</strong> designed for Authentication. To make up for the missing functionality to perform Authentication, Google and Facebook added their own custom hacks to OAuth. The problem was that these custom implementations of OAuth were not inter-operable, and hence there was no standardization.</p><h4>OpenID Connect to the rescue</h4><p>OpenID extends the functionality of the existing OAuth protocol to include Authentication by adding a layer on top of it. More specifically OpenID Connect performs a <em>Federated Authentication</em>, <em>which is the ability to login to a site using an existing Google (or Facebook) account.</em></p><h4>In Conclusion</h4><p>This brief article was inspired by <a href="https://www.youtube.com/watch?v=996OiexHze0&amp;t=456s">this youtube video</a>. If you made it to this point, I would encourage you to watch that video for a deeper understanding of the working of OAuth flow, SAML, and OpenID connect.</p><p>*An exception use-case would be a blog where anonymous users can comment on a blog post. Here the user is authorized to comment even though the user has not been authenticated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2034c12f7c0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQUASH MULTIPLE COMMITS INTO A SINGLE COMMIT IN GIT.]]></title>
            <link>https://missrhea.medium.com/squash-multiple-commits-into-a-single-commit-in-git-b4b0be326249?source=rss-9dcf65c66c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4b0be326249</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[git-commit]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git-rebase]]></category>
            <category><![CDATA[squash]]></category>
            <dc:creator><![CDATA[Rhea Rodrigues]]></dc:creator>
            <pubDate>Tue, 16 Jul 2019 18:08:04 GMT</pubDate>
            <atom:updated>2020-01-17T23:17:46.859Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQUASHING MULTIPLE COMMITS IN GIT</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yNw4zQR2GU_uDCKaXxukJw.jpeg" /><figcaption>Not the squash we will perform with git.</figcaption></figure><p>I’ve used Git for the past few years now. Albeit only locally for version control. This summer I started working on a remote internship. And, you guessed it, we use Git and GitHub. For me, this opened the door to collaborative aspects of Git and GitHub.</p><p>Sometimes I go on a commit frenzy. Especially on bigger feature branches. When I open a Pull Request on GitHub, all the commits I’ve made are displayed there. I imagine it would be unnecessary and no fun for code reviewers to view all the commits. Too many commits might also mess up the Git history. A neat way to solve this <em>mess</em> is to <em>squash</em> the commits into a single commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*CPPMk9hDd3X4CbhoVV4bRg.gif" /><figcaption>Let’s Git down to business to defeat the bugs</figcaption></figure><p>I have an existing Git repository called <a href="https://github.com/missrhea/quote-world">Quote-World</a> that I’ll use here. In addition to the master branch, I created a new branch called quotes-by-women.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*ZlE_Oa87lvwYO-GqHnzHJw.png" /><figcaption>Repository with the master branch and the quotes-by-women branch</figcaption></figure><p>On the quotes-by-women branch, I added the first quote and committed it, added a second quote and committed it and finally added the third quote and committed it. Essentially, I now have 3 commits on this branch. This can translate to working on a feature branch and committing each time you’re satisfied with the changes in the files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*lfNAMLMfbODFNCrAu5YqRg.png" /></figure><p>Next, I pushed the quotes-by-women branch to GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*3FUVai8d9b3-80VG7O7jEg.png" /><figcaption>Pushed commits to GitHub</figcaption></figure><p>At this point, you can squash all the commits into a single commit, before you Open a Pull Request. On your terminal, you want to run the following commands</p><p>As a good practice, the first thing to do is to go to the master branch and type: <strong>git pull --rebase</strong>. This command pulls all of the remote repository’s work into your local repository, so we have the latest changes (that someone else might have pushed in the time being).</p><p>Next, we switch to the quotes-by-women branch with, <strong>git checkout quotes-by-women</strong>. Then type: <strong>git rebase master</strong>. If you got the same message as I did, “<em>Current branch quotes-by-women is up to date</em>” (see screenshot below) it means that you created your branch from the latest changes that are on the master branch.</p><blockquote>Just a quick note to remember: When you create a new branch, always create it from the master branch.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*saZ4dcJL8KnmuPeFAlWExw.png" /></figure><p>Now you type: <strong>git rebase -i master</strong>. This command with additional “-i” opens the editor that shows your commits, “-i” means “interactive”. We can see the 3 commits as the first 3 lines in the editor. Also, read the <em>Commands </em>(in blue)<em> </em>listed in the editor <strong>very</strong> <strong>carefully</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RU5aETy3kimPXkmLQj-m1Q.png" /><figcaption>The editor in interactive mode displays all the commits and explains the commands.</figcaption></figure><p>The commits are displayed in chronological order from top to bottom. On the first line is the first commit ever made and you can make a decision to use that commit, and squash the others into this first commit. And that is what I will do here. If you read the Commands (in blue), you would know that this means you leave the word “pick” near the first commit, and change the word “pick” near the second and third commits to “fixup”. “Fixup” means the same thing as “squash”, but it will discard the commit’s message, so you will have only one message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9q51a5kFmR5XLLLTVfWBQ.png" /><figcaption>Replaced ”pick” by “fixup” for second and third commit</figcaption></figure><p>Save this file and close the editor. You should see this message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*KdwKLNTR109WTjAEZL7ORw.png" /></figure><p>At this point, the local branch has a single commit while the remote branch (on GitHub) still has 3 commits. If you open the editor in interactive mode once again, you will see a single commit, with the message of the first commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03v0SaeaDd9M4dP09acGuA.png" /></figure><p>To push this to the remote type: <strong>git push -f</strong>, “-f” means force. We use “-f” because Git does not let you push directly if there is different work on the remote and local branches.</p><p>Once we push this local branch (with a single commit) to the remote (on GitHub), then the remote will automatically display 1 commit instead of 3 commits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*IV3pzDxwGIWTsB7J-EyOkQ.png" /><figcaption>GitHub now shows 2 commits.</figcaption></figure><p>To sum up, this single commit was created by <em>squashing</em> 3 commits. This makes it simple for the person reviewing the Pull Request and helps to maintain a neat Git history on huge projects.</p><p>If you found this helpful don’t forget to bookmark it. If you got questions definitely drop it in a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4b0be326249" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>