<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Happiness - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Happiness - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 23 Aug 2026 21:54:52 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/happiness/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Use GitHub Copilot to Become a Happier and More Productive Developer ]]>
                </title>
                <description>
                    <![CDATA[ There are a number of AI tools for developers emerging on the market. But in my mind GitHub Copilot stands above the rest because of its usability, seamless IDE integration, and remarkable enhancements to developer productivity. Copilot offers a vari... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/developer-productivity-with-github-copilot/</link>
                <guid isPermaLink="false">66bccb6401b553e3578f98ca</guid>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ GitHub ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Happiness ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tim Kleier ]]>
                </dc:creator>
                <pubDate>Fri, 16 Jun 2023 17:02:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/06/Screenshot-2023-06-14-at-12.42.04-PM.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>There are a number of AI tools for developers emerging on the market. But in my mind GitHub Copilot stands above the rest because of its usability, seamless IDE integration, and remarkable enhancements to developer productivity.</p>
<p>Copilot offers a variety of AI tools that have radically streamlined my experience as a software developer. I've used it to generate code, tests, and even simple applications. It's also great for debugging, refactoring, and documenting existing code. </p>
<p>Weirdly, using Copilot has caused me to develop features faster than business stakeholders can review them.</p>
<p>It's important to note that AI tools, including Copilot, can be blatantly wrong, apologize (or not) when corrected, and then confidently produce the same error. But as long as you're aware of the downsides of AI tools, and have enough coding knowledge to recognize when they're incorrect, you can mitigate them on the path to <a target="_blank" href="https://github.blog/2022-09-07-research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/">substantially improved productivity</a>.</p>
<h2 id="heading-how-to-setup-github-copilot">How to Setup GitHub Copilot</h2>
<p>For setup and basic usage of Copilot, check out the <a target="_blank" href="https://docs.github.com/en/copilot">docs</a>. You can add on Copilot to an individual or business account, and there's a free trial and reasonable <a target="_blank" href="https://github.com/features/copilot#pricing">pricing</a> after the trial. </p>
<p>After adding Copilot to your GitHub account, you'll want to install the <a target="_blank" href="https://docs.github.com/en/copilot/getting-started-with-github-copilot">plugins for your IDE</a> and log into GitHub to access Copilot.</p>
<p>In this article, we'll use these <a target="_blank" href="https://marketplace.visualstudio.com/search?term=copilot&amp;target=VSCode&amp;category=All%20categories&amp;sortBy=Relevance">Visual Studio Code extensions</a>:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>GitHub Extension</td><td>Description</td><td>Preview</td></tr>
</thead>
<tbody>
<tr>
<td><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot">Copilot</a></td><td>AI pair programmer with in-IDE code suggestions</td><td>No</td></tr>
<tr>
<td><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-nightly">Copilot Nightly</a></td><td>Nightly build of Copilot, includes latest changes</td><td>No</td></tr>
<tr>
<td><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-labs">Copilot Labs</a></td><td>Experimental features in sidebar</td><td><a target="_blank" href="https://githubnext.com/projects/copilot-labs/">Yes</a></td></tr>
<tr>
<td><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat">Copilot Chat</a></td><td>Interactive chat in sidebar, part of Copilot X</td><td><a target="_blank" href="https://github.com/features/preview/copilot-x">Yes</a></td></tr>
<tr>
<td><a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=GitHub.heygithub">Copilot Voice</a></td><td>Voice assistant</td><td><a target="_blank" href="https://githubnext.com/projects/copilot-voice/">Yes</a></td></tr>
</tbody>
</table>
</div><p>Notes:</p>
<ol>
<li>This info is up-to-date as the writing of this article, but will likely change as GitHub evolves these products.</li>
<li>I haven't yet received access to Copilot Voice or Copilot (X) for Pull Requests, so my perspective on these are limited and based on GitHub's preview docs.</li>
</ol>
<h3 id="heading-privacy">Privacy</h3>
<p>Before jumping into some key use cases for Copilot, a quick note on privacy: Basically, if you trust GitHub to host your source code, you can likely trust what they do with your Copilot prompts and code snippets. [See their <a target="_blank" href="https://github.com/features/copilot#faq">FAQ docs</a> and <a target="_blank" href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement">Privacy Statement</a>.]</p>
<h2 id="heading-use-cases-for-github-copilot">Use Cases for GitHub Copilot</h2>
<p>The uses cases for GitHub Copilot are numerous, especially when you add in <a target="_blank" href="https://github.com/features/preview/copilot-x">t</a>he preview features of Labs, Chat, and Voice. Using Copilot's features can really streamline the development process. </p>
<p>Here are some great ways to leverage Copilot extensions:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Category</td><td>Extension(s)</td></tr>
</thead>
<tbody>
<tr>
<td>Code Generation</td><td>Copilot, Copilot Nightly, Copilot Voice</td></tr>
<tr>
<td>Explaining Code</td><td>Copilot Labs, Copilot Chat, Copilot Voice</td></tr>
<tr>
<td>Language Translation</td><td>Copilot Labs, Copilot Chat</td></tr>
<tr>
<td>Debugging</td><td>Copilot Labs, Copilot Chat</td></tr>
<tr>
<td>Refactoring</td><td>Copilot Labs, Copilot Chat</td></tr>
<tr>
<td>Test Generation</td><td>Copilot, Copilot Nightly, Copilot Labs, Copilot Chat</td></tr>
<tr>
<td>Code Reviews</td><td>Copilot Chat</td></tr>
<tr>
<td>Voice-Driven Development</td><td>Copilot Voice</td></tr>
</tbody>
</table>
</div><h3 id="heading-code-generation">Code Generation</h3>
<p>Copilot is known for its code completion features. If it's given a comment in the code or you type the beginnings of a line of code, Copilot will suggest a solution that you can accept, ignore, or explore alternatives. It's referred to as "ghost text".</p>
<p>Once you have the Copilot extension installed and you're logged in, code completion is as simple as typing instructions and hitting the Tab key once the suggestion comes up.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/Screen-Recording-2023-06-09-at-8--1-.gif" alt="Image" width="600" height="400" loading="lazy">
<em>A comment prompt in Ruby that Copilot uses to create a method and invocation</em></p>
<p>Taking code completion one step further, Copilot Chat can take a single prompt and generate instructions for building an entire application. </p>
<p>I asked it to create a REST API in Node with CRUD functions for "products", and it generated functional code. Impressive overall. Given the same prompt, ChatGPT also gave me instructions for how to run the code, which was nice.</p>
<p>Copilot Voice can also write or edit code based on voice commands. Most of the time, using the keyboard with Copilot code completion is faster than dictating lines of code with Voice. But it's compelling to think about using Copilot Voice to create and run code without having to type or stare at a screen.</p>
<h3 id="heading-explaining-code">Explaining Code</h3>
<p>I often have to stare at a screen to figure out what a block of code is doing. Sometimes it's legacy code where I don't understand the business context. Sometimes it's using a particular library I'm not used to. Sometimes I curse the person who wrote it, even if it's me.</p>
<p>Below is some code generated by Copilot Chat from my "REST API in Node..." prompt from above:</p>
<pre><code class="lang-javascript">app.get(<span class="hljs-string">'/products/:id'</span>, <span class="hljs-function">(<span class="hljs-params">req, res</span>) =&gt;</span> {
  <span class="hljs-keyword">const</span> id = req.params.id;
  <span class="hljs-keyword">const</span> product = products.find(<span class="hljs-function">(<span class="hljs-params">p</span>) =&gt;</span> p.id === id);
  <span class="hljs-keyword">if</span> (product) {
    res.json(product);
  } <span class="hljs-keyword">else</span> {
    res.status(<span class="hljs-number">404</span>).json({ <span class="hljs-attr">error</span>: <span class="hljs-string">'Product not found'</span> });
  }
});
</code></pre>
<p>I took this code and fed it into the "Explain" feature in Copilot Labs. Here's the response...</p>
<p><em>Here is the explanation for the code above:</em>  </p>
<ol>
<li><em>We define a route with the route path /products/:id. The colon : in the path indicates that it is a route parameter. The value of the route parameter will be available in req.params. For example, if the route path is /products/:id and we make a request to /products/5, then the value of req.params will be { id: 5 }.</em></li>
<li><em>We get the id from req.params and find the product with the given id from the products array. If a product with the given id exists, we return it. Otherwise, we send a 404 error response with the error message Product not found.</em></li>
</ol>
<p>This is a pretty straightforward segment of code, and the response is clear and straightforward as well. It would be easy to add this as documentation in a code comment above the function.</p>
<p>Another good example is regular expressions. I understand how regular expressions work but I don't often have the patience to figure out what a particular regex is doing. I fed Copilot Chat this giant regex statement for email validation:</p>
<pre><code>(?:[a-z0<span class="hljs-number">-9</span>!#$%&amp;<span class="hljs-string">'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'</span>*+/=?^_<span class="hljs-string">`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])</span>
</code></pre><p>It explained the regex at a high level, indicating it was broken into the local and domain parts, representing before and after the "@" sign in an email address. Then it described allowable characters in each part. Quite helpful.  </p>
<h3 id="heading-language-translation">Language Translation</h3>
<p>Developers are often required to quickly learn new languages and frameworks. Copilot Labs and Chat make this pretty easy. Here's an array of products in JavaScript and Ruby that was converted by Copilot:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> products = [
  { <span class="hljs-attr">id</span>: <span class="hljs-string">'1'</span>, <span class="hljs-attr">name</span>: <span class="hljs-string">'Product 1'</span>, <span class="hljs-attr">price</span>: <span class="hljs-number">10.99</span> },
  { <span class="hljs-attr">id</span>: <span class="hljs-string">'2'</span>, <span class="hljs-attr">name</span>: <span class="hljs-string">'Product 2'</span>, <span class="hljs-attr">price</span>: <span class="hljs-number">19.99</span> },
  { <span class="hljs-attr">id</span>: <span class="hljs-string">'3'</span>, <span class="hljs-attr">name</span>: <span class="hljs-string">'Product 3'</span>, <span class="hljs-attr">price</span>: <span class="hljs-number">7.99</span> }
];
</code></pre>
<pre><code class="lang-ruby">products = [
  { <span class="hljs-symbol">id:</span> <span class="hljs-string">'1'</span>, <span class="hljs-symbol">name:</span> <span class="hljs-string">'Product 1'</span>, <span class="hljs-symbol">price:</span> <span class="hljs-number">10.99</span> },
  { <span class="hljs-symbol">id:</span> <span class="hljs-string">'2'</span>, <span class="hljs-symbol">name:</span> <span class="hljs-string">'Product 2'</span>, <span class="hljs-symbol">price:</span> <span class="hljs-number">19.99</span> },
  { <span class="hljs-symbol">id:</span> <span class="hljs-string">'3'</span>, <span class="hljs-symbol">name:</span> <span class="hljs-string">'Product 3'</span>, <span class="hljs-symbol">price:</span> <span class="hljs-number">7.99</span> }
]
</code></pre>
<p>This is a very simple example, so let's try making this into a class and going the other way (from Ruby to JavaScript):</p>
<pre><code class="lang-ruby"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Product</span></span>
  <span class="hljs-keyword">attr_reader</span> <span class="hljs-symbol">:name</span>, <span class="hljs-symbol">:price</span>

  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">initialize</span><span class="hljs-params">(name, price)</span></span>
    @name = name
    @price = price
  <span class="hljs-keyword">end</span>
<span class="hljs-keyword">end</span>
</code></pre>
<pre><code class="lang-javascript"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Product</span> </span>{
  <span class="hljs-keyword">constructor</span>(name, price) {
    <span class="hljs-built_in">this</span>.name = name;
    <span class="hljs-built_in">this</span>.price = price;
  }
}
</code></pre>
<p>This checks out. For good measure, I tested TypeScript as well, and it worked perfectly, too.</p>
<h3 id="heading-debugging">Debugging</h3>
<p>This is a very handy feature. You can give Copilot Chat or Labs problematic code or error messages and it will indicate what it thinks the issue is. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/Screen-Recording-2023-06-14-at-1.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Copilot Labs "Fix Bug" Brush Feature</em></p>
<p>I can't tell you how many hairs I've pulled out because I couldn't find what amounted to a syntax error. Copilot's ability to fix bugs just makes me happier and hairier. </p>
<p>You can also give Copilot Chat an error message with no other prompt and it can tell you the issue. I arbitrarily removed a dot from the Node REST API code:</p>
<pre><code class="lang-javascript">products[productIndex] = { id, ..req.body };
</code></pre>
<p>I copied/pasted the error message in Chat, and it responded with...</p>
<blockquote>
<p>Looking at the code excerpt you provided, it seems that the issue is on line 49 where there is a syntax error in the object literal. The ".." before <code>req.body</code> is causing the error. It should be just one dot instead of two.</p>
</blockquote>
<p>This is both correct (the line and source of the error) and incorrect (that it should be only one dot). It then gave me a code snippet with three dots, which is also correct. </p>
<p>As I mentioned at the outset, you've gotta double-check AI's work. Still, I'm impressed by Copilot's ability to parse an error message, describe what it thinks is wrong, and suggest a fix.</p>
<h3 id="heading-refactoring">Refactoring</h3>
<p>Another great use case is refactoring. Consider the code below:</p>
<pre><code class="lang-ruby"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">price_with_discount</span></span>
  price - (price * discount_rate)
<span class="hljs-keyword">end</span>
</code></pre>
<p>This simple price calculation doesn't factor in <code>nil</code> values, strings that should be numbers, or reasonable values for <code>price</code> or <code>discount_rate</code>. We need the code to do this:</p>
<ol>
<li>Ensure <code>price</code> is an integer or float (not nil)</li>
<li>Ensure <code>price</code> is not negative</li>
<li>Ensure <code>discount_rate</code> is a float (not nil)</li>
<li>Ensure <code>discount_rate</code> is not negative and less than or equal to 1</li>
</ol>
<p>Copilot Chat handles this with ease...</p>
<pre><code class="lang-ruby"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">price_with_discount</span><span class="hljs-params">(price, discount_rate)</span></span>
  raise ArgumentError, <span class="hljs-string">"Price must be a positive number"</span> <span class="hljs-keyword">unless</span> price.is_a?(Numeric) &amp;&amp; price &gt;= <span class="hljs-number">0</span>
  raise ArgumentError, <span class="hljs-string">"Discount rate must be a float between 0 and 1"</span> <span class="hljs-keyword">unless</span> discount_rate.is_a?(Float) &amp;&amp; discount_rate &gt;= <span class="hljs-number">0</span> &amp;&amp; discount_rate &lt;= <span class="hljs-number">1</span>

  price - (price * discount_rate)
<span class="hljs-keyword">end</span>
</code></pre>
<h3 id="heading-test-generation">Test Generation</h3>
<p>Using Copilot to generate tests is technically a subset of "Code Generation" above, but I felt it was so useful it warranted its own mention.</p>
<p>Generating unit tests for code can be tedious if you're trying to cover happy and sad paths, primary use cases and edge cases. Our <code>price_with_discount</code> code above needs test cases to ensure an error is raised if <code>price</code> or <code>discount_rate</code> don't meet the requirements. In addition, we might want to test the following:</p>
<ol>
<li>A <code>price</code> without a <code>discount_rate</code></li>
<li>A <code>price</code> with a reasonable <code>discount_rate</code> (for example, a 10% discount)</li>
<li>A <code>price</code> with a 100% <code>discount_rate</code> (for example, if we want to give the product away)</li>
</ol>
<p>With these and our previous error cases, here's what Copilot Chat generated, after a little fine-tuning (re-prompting) and switching from Minitest to Rspec.</p>
<pre><code class="lang-ruby">RSpec.describe Product <span class="hljs-keyword">do</span>
  describe <span class="hljs-string">"#price_with_discount"</span> <span class="hljs-keyword">do</span>
    context <span class="hljs-string">"when given a valid price and discount rate"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"returns the price with the discount applied"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, <span class="hljs-number">100</span>, <span class="hljs-number">0</span>.<span class="hljs-number">2</span>)
        expect(product.price_with_discount(product.price, product.discount_rate)).to eq(<span class="hljs-number">80</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>

    context <span class="hljs-string">"when given a nil price"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"raises an ArgumentError with an appropriate message"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, <span class="hljs-literal">nil</span>, <span class="hljs-number">0</span>.<span class="hljs-number">2</span>)
        expect { product.price_with_discount(product.price, product.discount_rate) }.to raise_error(ArgumentError, <span class="hljs-string">"Price must be a positive number"</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>

    context <span class="hljs-string">"when given a price less than 0"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"raises an ArgumentError with an appropriate message"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, -<span class="hljs-number">100</span>, <span class="hljs-number">0</span>.<span class="hljs-number">2</span>)
        expect { product.price_with_discount(product.price, product.discount_rate) }.to raise_error(ArgumentError, <span class="hljs-string">"Price must be a positive number"</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>

    context <span class="hljs-string">"when given a nil discount rate"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"raises an ArgumentError with an appropriate message"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, <span class="hljs-number">100</span>, <span class="hljs-literal">nil</span>)
        expect { product.price_with_discount(product.price, product.discount_rate) }.to raise_error(ArgumentError, <span class="hljs-string">"Discount rate must be a float between 0 and 1"</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>

    context <span class="hljs-string">"when given a discount rate less than 0"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"raises an ArgumentError with an appropriate message"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, <span class="hljs-number">100</span>, -<span class="hljs-number">0</span>.<span class="hljs-number">2</span>)
        expect { product.price_with_discount(product.price, product.discount_rate) }.to raise_error(ArgumentError, <span class="hljs-string">"Discount rate must be a float between 0 and 1"</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>

    context <span class="hljs-string">"when given a discount rate greater than 1"</span> <span class="hljs-keyword">do</span>
      it <span class="hljs-string">"raises an ArgumentError with an appropriate message"</span> <span class="hljs-keyword">do</span>
        product = Product.new(<span class="hljs-string">"Test Product"</span>, <span class="hljs-number">100</span>, <span class="hljs-number">1.5</span>)
        expect { product.price_with_discount(product.price, product.discount_rate) }.to raise_error(ArgumentError, <span class="hljs-string">"Discount rate must be a float between 0 and 1"</span>)
      <span class="hljs-keyword">end</span>
    <span class="hljs-keyword">end</span>
  <span class="hljs-keyword">end</span>
<span class="hljs-keyword">end</span>
</code></pre>
<p>One test for valid input, five for invalid input. All six work, and I didn't have to write them!</p>
<h3 id="heading-code-reviews">Code Reviews</h3>
<p>One feature of Copilot X is <a target="_blank" href="https://githubnext.com/projects/copilot-for-pull-requests#technical-preview-available-now">Copilot for Pull Requests</a>. Here are some of the key features:</p>
<ul>
<li><strong>Template Expansion</strong> – Leverage Copilot to fill in your PR template and explain code</li>
<li><strong>Gentest</strong> – Generate tests for your code based on Copilot's analysis</li>
<li><strong>Ghost Text</strong> – Receive suggestions while you're typing in the PR</li>
</ul>
<h3 id="heading-voice-driven-development">Voice-Driven Development</h3>
<p>Formerly known as "Hey, Github!", Copilot Voice allows you to use natural language prompts to interact with your code. It looks impressive, boasting these capabilities:</p>
<ul>
<li><strong>Write/Edit Code</strong> – Use voice controls to trigger Copilot code suggestions</li>
<li><strong>Code Navigation</strong> – Navigate a file without a keyboard or mouse</li>
<li><strong>Control the IDE</strong> – Trigger any VS Code command</li>
<li><strong>Code Summarization</strong> – Get summaries of blocks of code</li>
</ul>
<h2 id="heading-summary">Summary</h2>
<p>GitHub is rapidly producing revolutionary developer productivity tools with its suite of Copilot extensions. It's increasing my joy in programming and decreasing my time spent on mind-numbing tasks. I would encourage you to keep track of enhancements to Copilot as they're happening quickly.</p>
<p>Ignore click-bait promises of a "10x productivity gain", but don't ignore the research of <a target="_blank" href="https://github.blog/2022-09-07-research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/">Copilot's impact on developer productivity and happiness</a>. </p>
<p>Spend some time with Copilot tools trying out the use cases above, and I think you'll be surprised by its effect on your productivity and happiness.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A Data Scientist’s Guide to Happiness: Findings From the Happy Experiences of 10,000+ Humans ]]>
                </title>
                <description>
                    <![CDATA[ By Jordan Rohrlich Modern life throws a lot at us. We often find ourself struggling to manage anxiety, wrangle responsibilities, adapt to new conditions, and maintain a happy state of mind. But happiness is a noisy space these days. Self help books, ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-data-scientists-guide-to-happiness-findings-from-the-happy-experiences-of-10-000-humans-fc02b5c8cbc1/</link>
                <guid isPermaLink="false">66c3425e4f1fc448a3678f74</guid>
                
                    <category>
                        <![CDATA[ Data Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Happiness ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ topic modeling ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 23 Apr 2018 22:53:44 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*EsFDmp-QfBLa0vBf.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jordan Rohrlich</p>
<p>Modern life throws a lot at us. We often find ourself struggling to manage anxiety, wrangle responsibilities, adapt to new conditions, and maintain a happy state of mind.</p>
<p>But happiness is a noisy space these days. Self help books, articles, blogs, and meditation apps can’t help everyone, and often increase the mental burden needed to stay content. That’s a serious problem. So, as mental health becomes increasingly vulnerable and solutions become increasingly complex, it’s important to anchor oneself to the fundamentals. <strong>That is, we need to refocus our daily lives on the everyday things that make people happy.</strong></p>
<h3 id="heading-data">Data</h3>
<p>This research dives into a handy dataset that can help shed some light on the fundamentals of happiness. <a target="_blank" href="https://github.com/rit-public/HappyDB">HappyDB</a> is a set of 100,000+ happy experiences gathered through Amazon Mechanical Turk from March to June of 2017. It contains the experiences and demographics from tens of thousands of contributors around the world. Interestingly, some basic text analysis methods can help us learn a lot from this data.</p>
<p>By understanding the emotional intensity and keyword patterns drawn from these happy experiences, HappyDB teaches us two valuable lessons.</p>
<p>You can check out the code for yourself on <a target="_blank" href="https://github.com/jrohrlich/DSGuideToHappy">GitHub</a>.</p>
<h3 id="heading-1-happiness-is-not-conditional-on-demographics">1. Happiness is not conditional on demographics.</h3>
<p>This one is counterintuitive.</p>
<p>Most of us experience a “grass is always greener” effect with respect to happiness. Young people anticipate a happy career and family later on in life. Older folks reminisce about a time when they were young and adventurous. Bachelors yearn for companionship. Couples hope for children.</p>
<p>And, despite knowing this, we all think someone else is happier, or some other stage of our life will bring us more joy. Let’s take a look at the data.</p>
<p><a target="_blank" href="https://web.stanford.edu/class/cs124/lec/sentiment.pdf">Sentiment analysis</a> weighs the emotional intensity of text. Using an R package called “Syuzhet,” I measured the sentiment of these happy experiences to determine how their intensities vary. This created a spectrum of happy experiences that could be broken down by specific demographic groups:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/vtSR9KdR4zPHMmWcHn7v1MPvZ640dX8VRe6M" alt="Image" width="800" height="460" loading="lazy">
<em>Sentiment of Happy Experiences (by gender, family status)</em></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/dBKgVGpc2rWvemRIUZryNLznFVUVlxWVRHuK" alt="Image" width="800" height="460" loading="lazy">
<em>Sentiment of Happy Experiences (by age group)</em></p>
<p>Somewhat surprisingly, there’s little change in the spread of happy experiences across these gender, family, and age demographic groups. Here are the highlights:</p>
<ul>
<li>Overall, the experiences are definitely positive. But the bottom quartile does have negative sentiment (some happy things poetically arise from discomfort and tragedy)</li>
<li>The distributions have high-end tails and fairly limited lower bounds — some experiences are extremely positive, and few are strikingly negative</li>
<li>Self-identifying females have slightly higher sentiment scores than men for most of their experiences (a 0.05–0.1 point difference)</li>
<li>Married parents have slightly higher sentiment scores than bachelors and childless couples for most of their experiences (a 0.05–0.1 point difference)</li>
<li>The quartiles of happy experiences (25th, 50th, and 75th percentiles) across age groups are virtually identical</li>
</ul>
<p><strong>In sum,</strong> <strong>there is no significant difference in the range of happy experiences reported by different demographics.</strong> Although women and parents tend to have marginally more happy experiences to record, the differences on the sentiment scale can’t be taken seriously — they correspond to a fraction of a fraction of a single happy word per experience recorded. That’s a minuscule difference.</p>
<p>This dataset, however, does not include any data fields for race, socioeconomic status, or other identity positions that may materially influence daily experiences. Future happiness research should inspect these relationships closely.</p>
<h3 id="heading-2-happiness-is-determined-by-specific-types-of-experiences">2. Happiness is determined by specific types of experiences.</h3>
<p>It’s easy to think of happiness as a mysterious, ethereal substance that penetrates our experiences in uninterpretable ways. This view espouses a metaphysical understanding of happiness as something beyond human comprehension.</p>
<p>But that’s not very helpful, especially for people who rely on happy and meaningful experiences as the lifeline of their mental health.</p>
<p>Enter Topic Modeling. This method of text analysis (explained <a target="_blank" href="http://blog.echen.me/2011/08/22/introduction-to-latent-dirichlet-allocation/">here</a>; I use R’s “Mallet” package) provides a constructive approach to explaining what HappyDB’s 10,000+ participants find to be happy experiences.</p>
<p>By segmenting the dataset into documents of each respondent’s experiences, then running an LDA topic model to identify groups of commonly occurring keywords, we can begin to isolate distinct types of experiences that bring us happiness. The topics and related keywords can be seen below, in no particular order:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/bSlgdQrleybiwhVeNzAzevuLqtRXteuIFEpQ" alt="Image" width="800" height="619" loading="lazy">
<em>Topic Model Output from 100,922 Happy Experiences</em></p>
<h4 id="heading-time-with-family"><strong>Time with Family</strong></h4>
<p>Seems like a no-brainer. Words like “daughter,” “son,” “husband,” “baby,” “wife,” and “time” seem to show that lots of people reflect very positively on experiences that involve their loved ones. These experiences often involve the most commonplace of settings and derive happiness simply from company and affection.</p>
<p>Try spending more time with loved ones: call your mom, go to your kid’s soccer game. It may pay off more than you think.</p>
<h4 id="heading-getting-paid"><strong>Getting Paid</strong></h4>
<p>Although people don’t like thinking that money relates to happiness, their experiences sure say the opposite. Getting a paycheck, clearing a credit card balance, or giving money to a friend can make people really happy. And the sense of accomplishment and economic security that comes with would definitely explain why.</p>
<h4 id="heading-food"><strong>Food</strong></h4>
<p>People love eating. Cooking a favorite meal, eating out with friends, or gorging on a pint of iced cream in front of the TV can all make someone happy. Good food with friends should definitely play a part in any happy lifestyle.</p>
<h4 id="heading-sleep-time"><strong>Sleep Time</strong></h4>
<p>Surprisingly, people document lots of happy experiences around sleep: cuddling up in bed, going to sleep with a furry friend, waking up to a promising new day, and so on. There’s lots to be happy about, if one takes a moment to reflect at night after a productive day, or in the motivated morning before something exciting.</p>
<h4 id="heading-games-and-competition"><strong>Games and Competition</strong></h4>
<p>Humans are competitive. They love playing video games, watching sports, and doing other things that stoke their biological instinct to dominate. Play a board game with some friends or get excited about your home sports team. Chances are you’ll be happy you did.</p>
<h4 id="heading-achievement-and-education"><strong>Achievement and Education</strong></h4>
<p>After weeks of work, it feels great to finish big enterprises. Finishing a class, graduating from school, or launching a project can all seriously lift a person’s mood. But finishing big undertakings requires a few to start, so go out and start something new! Learning and doing are rewarded handsomely.</p>
<h4 id="heading-celebrating-and-birthdays"><strong>Celebrating and Birthdays</strong></h4>
<p>Obviously, celebrations make people happy (think birthdays, anniversaries, and friendsgivings). People enjoy finding a reason — however important or silly — to meet up with loved ones, get happy about an occasion, and do something to break up a dull weekly routine.</p>
<h4 id="heading-mental-balance-and-introspection"><strong>Mental Balance and Introspection</strong></h4>
<p>The act of tuning into one’s mental state seems to provide a lot of happiness in and of itself. Thinking introspectively about one’s wellbeing, head space, and happiness seem to have positive effects on those very things! Try meditating, reflecting on happy experiences, or just being aware of your mental state — it may be the very thing to help boost it.</p>
<h4 id="heading-spending"><strong>Spending</strong></h4>
<p>Satisfying our material desires, of course, brings lots of people happiness. Finding good deals, finally buying that car or home, and getting something nice for oneself or a loved one all create some sort of happiness. Enjoy responsibly.</p>
<h4 id="heading-weekend-trips"><strong>Weekend Trips</strong></h4>
<p>People like being off work, but enjoy it dramatically more if enjoyed in good company, while doing something different. Go on a trip somewhere, have an outing nearby, or find another novel excuse for spending time with others in new scenery. The data says you certainly won’t regret it.</p>
<h4 id="heading-reading-and-music"><strong>Reading and Music</strong></h4>
<p>Whether bundling up at home with a new book or discovering a song on the bus ride home, lots of people get happy through the simple act of reading or listening. Taking an hour before bed to read something new or skim through Discover Weekly is probably worth the time investment.</p>
<h4 id="heading-decisions"><strong>Decisions</strong></h4>
<p>Decisions also clock in as a big happiness generating activity. It’s exciting to spend time thinking about a big change, decide to do something new, and tell people about it. It leaves a lingering mood boost for lots of folks, too. So make a change you’ve been meaning to for a while; and commit to it!</p>
<h3 id="heading-wrapping-up">Wrapping up</h3>
<p>These twelve categories of experience represent the foundations of daily happiness for tens of thousands of people. Given that humans are more alike than we often give them credit for, the same can likely be said about you.</p>
<p>This method, like any, is imperfect. Some demographics contribute more heavily than others, which may throw curious words into some topics, or may bias the topics that are represented in the model. Textual data is messy and people also don’t think about happiness in crisply defined categories of experience.</p>
<p>But, using these two lessons as a basic structure for understanding positivity in our everyday lives, I think it can help remind us that happiness is never so far off as we may think.</p>
<p>We already know many of these happy topics to be true on some level. But we rarely recognize the power that they have on our mood, and so don’t structure them into our everyday lives as readily as we should.</p>
<p>These categories are empirically-certified mood boosters. They’re happiness slam dunks.</p>
<p>So we should take what we can get. Throw out the self-help handbooks and focus on real happy experiences. You may like what you find.</p>
<p><em>If you found this article helpful, share it with a friend or give some claps ?.</em></p>
<p>See the code for yourself on <a target="_blank" href="https://github.com/jrohrlich/DSGuideToHappy">GitHub</a>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ I analyzed my happiness over 736 days. Here’s what I learned. ]]>
                </title>
                <description>
                    <![CDATA[ By Manas Kulkarni “And it only takes a minute, dude. Sometimes I do it when I’m using the bathroom.” It was December 2014, and I was at dinner in Santa Cruz with one of my best friends. I can’t remember why, but somehow we were on the topic of “rou... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-i-learned-after-documenting-736-days-of-happiness-e23e406bde04/</link>
                <guid isPermaLink="false">66c3654d8e244e167873861e</guid>
                
                    <category>
                        <![CDATA[ data ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Happiness ]]>
                    </category>
                
                    <category>
                        <![CDATA[ life ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Life lessons ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 15 Jan 2017 20:37:55 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*732cs-VZreOaRXLyd1Mj0w.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Manas Kulkarni</p>
<blockquote>
<p>“And it only takes a minute, dude. Sometimes I do it when I’m using the bathroom.”</p>
</blockquote>
<p>It was December 2014, and I was at dinner in Santa Cruz with one of my best friends. I can’t remember why, but somehow we were on the topic of “routines” and he was telling me about a daily journal he’d been keeping.</p>
<blockquote>
<p><strong>“It’s simple — I just write down at least one dope thing that happens every day.”</strong></p>
</blockquote>
<p>When he suggested I try it, I was immediately skeptical. I’d always categorized journaling as one of those “it’s-probably-good-for-me-but-realistically-I’m-not-going-to-keep-it-up” ideas (<em>See “flossing”, “meditation”, and “watching only <strong>one</strong> episode of The Office at a time”</em>).</p>
<p>But after hearing how much he’d genuinely enjoyed doing it — and more importantly, how easy it was to do — I thought I’d give it a shot. I can now proudly say that, after a little more than two years, I haven’t missed a single day.</p>
<p>What I’m <em>more</em> excited to share, however, is what I’ve found by digging into all of the entries. (<em>Note</em> I’m a former statistics teacher who had way too much free time in India last month.)</p>
<p>Below are three things I learned from the process and my analysis.</p>
<h3 id="heading-takeaway-1-its-actually-pretty-easy-to-do">Takeaway #1: It’s actually pretty easy to do</h3>
<p>I was initially worried about staying consistent, since my track record for maintaining habits is laughably poor. But taking my friend’s advice, I used free moments in the day to make my daily entries: during my commute, on my way back from the gym, or on the porcelain think tank.</p>
<p>Originally, I kept my entries in an Evernote doc, but eventually the file got too large and slowed my phone down. I switched to <a target="_blank" href="http://dayoneapp.com/"><strong>Day One</strong></a>, which is a beautiful app for daily journaling that allows you to tag entries, add photos, and even set daily reminders so you don’t forget.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/qCjBjwebFWGSwC3xepUPFHa2oxtGGSR8feV9" alt="Image" width="680" height="510" loading="lazy">
<em>(Left): Original two-column table in Evernote. (Right): Example entry in DayOne</em></p>
<p>I won’t lie, I’d often miss an entire week’s worth of entries and would have to go back later to make it up, which was a pain. But when I’d forget what had happened on a particular day, I’d just look through texts or emails from that day to jog my memory. Even if the post was something as simple as “that amazing pasta with the spicy meatballs,” I didn’t mind — I just wanted to make sure I was making an entry.</p>
<h3 id="heading-takeaway-2-you-have-more-good-days-than-you-think">Takeaway #2: You have more good days than you think</h3>
<p>Not only was it great to scroll through all of these positive entries on a bad day and think “cool, life is not as terrible as it seems today,” but I also used a feature in Day One to “star” days that I thought were especially fantastic. This allowed me to do two things:</p>
<h4 id="heading-1-i-calculated-how-often-i-had-a-kick-ass-day-aka-starred-entry">1. I calculated how often I had a “kick-ass” day (a.k.a “starred” entry)</h4>
<p>I had <strong>211 “kick-ass” days out of 736 total entries…</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/UFzNcpoaFJoAk-iOpBtEeij5PulIx76p8lav" alt="Image" width="800" height="311" loading="lazy"></p>
<p>So basically I now have two years’ worth of evidence to confidently say “at least two days this week will be pretty dope.” Of course, it’s subjective in that it depends on my definition of a “kick-ass” day (see below), but since I’m predicting for my own life anyways, that bias is less relevant.</p>
<h4 id="heading-b-i-could-understand-why-these-days-were-indeed-kick-ass">b) I could understand why these days were indeed “kick-ass”</h4>
<p>I exported all of the entries into a spreadsheet and manually tagged each day — yeah, it was totally exhausting — with the specific reasons why that day was “kick-ass.”</p>
<p>Below are the 10 most common reasons:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1lzGXF692YKl7EIFHSBr-8tKFV9lwjRCarA0" alt="Image" width="798" height="766" loading="lazy"></p>
<p>And for those of you wondering what counts as a “special activity,” here are a few examples:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/12lgpaavxlsHtGudkOZIAQ0ZtcCyq3WqwEX6" alt="Image" width="788" height="502" loading="lazy"></p>
<h3 id="heading-takeaway-3-journaling-is-more-than-just-a-good-habit">Takeaway #3: Journaling is more than just “a good habit”</h3>
<p>I mentioned earlier that it’s great to “scroll through happiness” on a rainy day, but I’d already expected that benefit when I started.</p>
<p>What I didn’t expect was an <strong>improvement in my memory</strong>. By virtue of writing down and rereading details, I could easily answer questions like “hey, what was that restaurant we went to over the summer?” or “There was someone I met recently who knows a lot about X,Y,Z. Who was that again?”</p>
<p>I also didn’t expect my journal to give me <strong>prescriptive</strong> information. I already knew that “meaningful conversations” and “laughter” make for pretty good days, but it’s great to have concrete data to remind me what I should be doing more of (like calling the family in India or planning more weekend trips).</p>
<p>Many of us already spend hours in spreadsheets for our employers, and some of us meticulously track data on our physical health. <strong>Why don’t we do the same for our happiness?</strong></p>
<p>I think that’s the kind of “data driven decision-making” that doesn’t get enough attention.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>In retrospect, I think the main reasons why I’ve been able to maintain this habit more sustainably than any other is that it had <strong>immediate and visible benefits</strong> in a very short period of time and gave me a <strong>tangible record of my progress</strong> to analyze.</p>
<p>That said, I do want to be clear that the point of journaling was NOT the analysis; it took me 10 hours to dissect all of this data, and had <em>that</em> been the end goal when I started, I never would have done it in the first place. (Though it was <a target="_blank" href="https://infogr.am/6c5387d4-9e1e-4b31-a0cf-97b42be938db">definitely fun to make this infographic</a> — thanks, <a target="_blank" href="https://www.freecodecamp.org/news/what-i-learned-after-documenting-736-days-of-happiness-e23e406bde04/undefined">Infogram</a>).</p>
<p>The real motivation was way simpler: just chronicle as many great memories as possible because, frankly, it’ll be great to read them every now and then. And that was true :)</p>
<p>I want to thank you for reading this and would love to hear your feedback, your ideas, and your own findings if you’re doing / will do something similar.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
