<?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[ efficiency - 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[ efficiency - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 22:25:11 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/efficiency/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ SQL Tips to Help You Save Time and Write Simpler Queries ]]>
                </title>
                <description>
                    <![CDATA[ As a data analyst, you'll want to be as efficient and and effective as possible when working with databases. SQL is one of the most widely used languages for managing and manipulating data stored in a relational database. In this article, we'll cover... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/sql-tips-save-time-write-simpler-queries/</link>
                <guid isPermaLink="false">66d460aba326133d12440a59</guid>
                
                    <category>
                        <![CDATA[ efficiency ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SQL ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jeremiah Oluseye ]]>
                </dc:creator>
                <pubDate>Fri, 03 Mar 2023 14:28:39 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/03/SQL-TIPS.JPG" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As a data analyst, you'll want to be as efficient and and effective as possible when working with databases.</p>
<p>SQL is one of the most widely used languages for managing and manipulating data stored in a relational database.</p>
<p>In this article, we'll cover some SQL cheat codes that can help you save time and simplify complex queries.</p>
<h2 id="heading-use-aliases-for-table-and-column-names">Use Aliases for Table and Column Names</h2>
<p>You can use aliases to make your SQL code more readable and reduce the amount of typing required when working with long tables and column names.</p>
<p>You can also use aliases to differentiate between multiple instances of the same table in a query. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Without aliases</span>
<span class="hljs-keyword">SELECT</span> employees.employee_name, departments.department_name
<span class="hljs-keyword">FROM</span> employees
<span class="hljs-keyword">JOIN</span> departments <span class="hljs-keyword">ON</span> employees.department_id = departments.department_id

<span class="hljs-comment">-- With aliases</span>
<span class="hljs-keyword">SELECT</span> emp.employee_name, dept.department_name
<span class="hljs-keyword">FROM</span> employees <span class="hljs-keyword">AS</span> emp
<span class="hljs-keyword">JOIN</span> departments <span class="hljs-keyword">AS</span> dept <span class="hljs-keyword">ON</span> emp.department_id = dept.department_id
</code></pre>
<p>In the example above, we used the aliases "emp" and "dept" for the "employees" and "departments" tables, respectively. This makes the code more readable and reduces the amount of typing required.</p>
<h2 id="heading-use-the-in-operator-with-subqueries">Use the IN Operator with Subqueries</h2>
<p>You can use the IN operator to quickly filter data based on a list of values. This is especially useful when working with subqueries. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all customers who have placed an order</span>
<span class="hljs-keyword">SELECT</span> *
<span class="hljs-keyword">FROM</span> customers
<span class="hljs-keyword">WHERE</span> customer_id <span class="hljs-keyword">IN</span> (
    <span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">DISTINCT</span> customer_id
    <span class="hljs-keyword">FROM</span> orders
)
</code></pre>
<p>In the example above, the subquery returns a list of distinct customer IDs from the "orders" table. The outer query uses the IN operator to retrieve all customers whose IDs are in the list returned by the subquery.</p>
<h2 id="heading-use-wildcards-for-pattern-matching">Use Wildcards for Pattern Matching</h2>
<p>You can use wildcards such as <code>%</code> and <code>_</code> with the LIKE operator to quickly search for patterns in string data. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all products that contain the word "widget" in their name</span>
<span class="hljs-keyword">SELECT</span> *
<span class="hljs-keyword">FROM</span> products
<span class="hljs-keyword">WHERE</span> product_name <span class="hljs-keyword">LIKE</span> <span class="hljs-string">'%widget%'</span>
</code></pre>
<p>In the example above, we used the % wildcard to match any number of characters before or after the word "widget". This retrieves all products that contain the word "widget" in their name.</p>
<h2 id="heading-use-the-having-clause-with-group-by">Use the HAVING Clause with GROUP BY</h2>
<p>You can use the HAVING clause to filter data based on aggregate functions such as COUNT, SUM, AVG, and so on. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all customers who have placed more than 10 orders</span>
<span class="hljs-keyword">SELECT</span> customer_id, <span class="hljs-keyword">COUNT</span>(*) <span class="hljs-keyword">AS</span> order_count
<span class="hljs-keyword">FROM</span> orders
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> customer_id
<span class="hljs-keyword">HAVING</span> <span class="hljs-keyword">COUNT</span>(*) &gt; <span class="hljs-number">10</span>
</code></pre>
<p>In the example above, the GROUP BY clause groups orders by customer ID. The COUNT(*) function counts the number of orders for each customer. The HAVING clause is then used to filter the results to only include customers who have placed more than 10 orders.</p>
<h2 id="heading-use-the-exists-operator-for-existence-checks">Use the EXISTS Operator for Existence Checks</h2>
<p>You can use the EXISTS operator to quickly check if a subquery returns any rows. This is useful for existence checks. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all customers who have placed an order</span>
<span class="hljs-keyword">SELECT</span> *
<span class="hljs-keyword">FROM</span> customers <span class="hljs-keyword">AS</span> c
<span class="hljs-keyword">WHERE</span> <span class="hljs-keyword">EXISTS</span> (
    <span class="hljs-keyword">SELECT</span> *
    <span class="hljs-keyword">FROM</span> orders <span class="hljs-keyword">AS</span> o
    <span class="hljs-keyword">WHERE</span> o.customer_id = c.customer_id
)
</code></pre>
<p>In the example above, the EXISTS operator checks if the subquery returns any rows for each customer in the "customers" table. If the subquery returns at least one row, the customer is included in the result set.</p>
<h2 id="heading-use-the-case-statement-for-conditional-logic">Use the CASE Statement for Conditional Logic</h2>
<p>You can use the CASE statement for conditional logic in SQL queries. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Assign a customer tier based on order count</span>
<span class="hljs-keyword">SELECT</span> customer_id, <span class="hljs-keyword">COUNT</span>(*) <span class="hljs-keyword">AS</span> order_count,
    <span class="hljs-keyword">CASE</span>
        <span class="hljs-keyword">WHEN</span> <span class="hljs-keyword">COUNT</span>(*) &lt; <span class="hljs-number">5</span> <span class="hljs-keyword">THEN</span> <span class="hljs-string">'Bronze'</span>
        <span class="hljs-keyword">WHEN</span> <span class="hljs-keyword">COUNT</span>(*) &gt;= <span class="hljs-number">5</span> <span class="hljs-keyword">AND</span> <span class="hljs-keyword">COUNT</span>(*) &lt; <span class="hljs-number">10</span> <span class="hljs-keyword">THEN</span> <span class="hljs-string">'Silver'</span>
        <span class="hljs-keyword">WHEN</span> <span class="hljs-keyword">COUNT</span>(*) &gt;= <span class="hljs-number">10</span> <span class="hljs-keyword">THEN</span> <span class="hljs-string">'Gold'</span>
    <span class="hljs-keyword">END</span> <span class="hljs-keyword">AS</span> customer_tier
<span class="hljs-keyword">FROM</span> orders
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> customer_id
</code></pre>
<h2 id="heading-use-the-union-operator-to-combine-results">Use the UNION Operator to Combine Results</h2>
<p>You can use the UNION operator to combine the results of two or more SELECT statements. This is useful when you need to combine data from multiple tables or sources. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all customers and employees</span>
<span class="hljs-keyword">SELECT</span> <span class="hljs-string">'customer'</span> <span class="hljs-keyword">AS</span> record_type, customer_name <span class="hljs-keyword">AS</span> <span class="hljs-keyword">name</span>, email
<span class="hljs-keyword">FROM</span> customers
<span class="hljs-keyword">UNION</span>
<span class="hljs-keyword">SELECT</span> <span class="hljs-string">'employee'</span> <span class="hljs-keyword">AS</span> record_type, employee_name <span class="hljs-keyword">AS</span> <span class="hljs-keyword">name</span>, email
<span class="hljs-keyword">FROM</span> employees
</code></pre>
<p>In the example above, two SELECT statements are combined using the UNION operator. The result set includes a "record_type" column to differentiate between customers and employees.</p>
<h2 id="heading-use-the-inner-join-operator-to-combine-tables">Use the INNER JOIN Operator to Combine Tables</h2>
<p>You can use the INNER JOIN operator to combine data from two or more tables based on a common column or set of columns. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all orders with customer and product details</span>
<span class="hljs-keyword">SELECT</span> o.order_id, c.customer_name, p.product_name, o.order_date
<span class="hljs-keyword">FROM</span> orders <span class="hljs-keyword">AS</span> o
<span class="hljs-keyword">JOIN</span> customers <span class="hljs-keyword">AS</span> c <span class="hljs-keyword">ON</span> o.customer_id = c.customer_id
<span class="hljs-keyword">JOIN</span> products <span class="hljs-keyword">AS</span> p <span class="hljs-keyword">ON</span> o.product_id = p.product_id
</code></pre>
<p>In the example above, the INNER JOIN operator combines data from the "orders", "customers", and "products" tables based on their common IDs. The result set includes the order ID, customer name, product name, and order date.</p>
<h2 id="heading-use-the-left-join-operator-for-missing-data">Use the LEFT JOIN Operator for Missing Data</h2>
<p>You can use the LEFT JOIN operator to include data from one table even if there is no corresponding data in another table.</p>
<p>This is useful when you need to include all data from one table, even if there are missing values in another table. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all customers and their orders (even if they haven't placed an order)</span>
<span class="hljs-keyword">SELECT</span> c.customer_id, c.customer_name, o.order_id
<span class="hljs-keyword">FROM</span> customers <span class="hljs-keyword">AS</span> c
<span class="hljs-keyword">LEFT</span> <span class="hljs-keyword">JOIN</span> orders <span class="hljs-keyword">AS</span> o <span class="hljs-keyword">ON</span> c.customer_id = o.customer_id
</code></pre>
<p>In the example above, the LEFT JOIN operator includes all customers from the "customers" table, even if they haven't placed an order. The result set includes the customer ID, customer name, and order ID.</p>
<h2 id="heading-use-the-groupconcat-function-to-concatenate-strings">Use the GROUP_CONCAT Function to Concatenate Strings</h2>
<p>You can use the GROUP_CONCAT function to concatenate strings from multiple rows into a single row. This is useful when you need to combine multiple values into a single string. Here's an example:</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Retrieve all products and their categories</span>
<span class="hljs-keyword">SELECT</span> p.product_id, p.product_name, <span class="hljs-keyword">GROUP_CONCAT</span>(c.category_name SEPARATOR <span class="hljs-string">', '</span>) <span class="hljs-keyword">AS</span> categories
<span class="hljs-keyword">FROM</span> products <span class="hljs-keyword">AS</span> p
<span class="hljs-keyword">JOIN</span> product_categories <span class="hljs-keyword">AS</span> pc <span class="hljs-keyword">ON</span> p.product_id = pc.product_id
<span class="hljs-keyword">JOIN</span> categories <span class="hljs-keyword">AS</span> c <span class="hljs-keyword">ON</span> pc.category_id = c.category_id
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> p.product_id
</code></pre>
<p>In the example above, the GROUP_CONCAT function concatenates the category names for each product into a single string, separated by commas.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>SQL is an essential language for both data analysts and data scientists. By mastering some of the fundamental SQL commands and cheats, you can perform complex data analysis with ease, and extract valuable insights from your data.</p>
<p>From selecting and filtering data to grouping and joining tables, these commands are designed to help you manipulate your data in various ways, and ultimately make informed decisions.</p>
<p>Whether you're new to SQL or a seasoned user, these tips can help you save time, streamline your workflow, and take your data analysis skills to the next level.</p>
<p>Let’s connect on <a target="_blank" href="https://twitter.com/Olujerry19">Twitter</a> and <a target="_blank" href="https://www.linkedin.com/in/jeremiah-oluseye-58457719a/">Linkedin</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Write HTML/CSS Faster with Emmet Cheat-Codes ]]>
                </title>
                <description>
                    <![CDATA[ Emmet is one of my favorite built-in features of VS Code. It is also available as an extension in other code editors. Think of Emmet as shorthand. With it, you can easily write a lot of code quickly. It dramatically speeds up your HTML & CSS workflow... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/write-html-css-faster-with-emmet-cheat-codes/</link>
                <guid isPermaLink="false">66d45f68246e57ac83a2c783</guid>
                
                    <category>
                        <![CDATA[ efficiency ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Visual Studio Code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jesse Hall ]]>
                </dc:creator>
                <pubDate>Tue, 22 Sep 2020 17:16:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/09/fCC_-Emmet.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Emmet is one of my favorite built-in features of VS Code. It is also available as an extension in other code editors.</p>
<p>Think of Emmet as shorthand. With it, you can easily write a lot of code quickly. It dramatically speeds up your HTML &amp; CSS workflow.</p>
<p>Understanding how to use Emmet is literally a superpower. Some have even called it a coding cheat-code. ?</p>
<p>And it's just one of many amazing built-in features of VS Code.</p>
<p>Recently, I launched a comprehensive and detailed course called <a target="_blank" href="https://courses.codestackr.com/vs-code-superhero?coupon=LAUNCH"><strong>Become A VS Code SuperHero</strong></a>.**** It covers all aspects of VS Code in great depth.</p>
<p>This article is based on one of the 11 sections of the course: <strong>Writing &amp; Formatting Code</strong>.</p>
<h2 id="heading-html">HTML</h2>
<p>With Emmet you can quickly create an HTML boilerplate in the blink of an eye. In an HTML file, simply type <code>!</code> and you’ll see that Emmet has popped up as a suggestion. Now hit <code>Enter</code>. There you have it, a basic, blank HTML web page ready to go.</p>
<p>If you’ve never seen HTML before and have no clue what all of this is, don’t worry. I’m just demonstrating the capabilities of VS Code and Emmet. You don’t have to know what any of this means right now.</p>
<h3 id="heading-basic-tags">Basic Tags</h3>
<p>To create basic HTML tags, just type the tag's name and hit <code>Enter</code>. Notice how Emmet puts your cursor inside the tag. You are now set up to continue typing inside the tag.</p>
<ul>
<li><p>Try typing: <code>div</code> then <code>Enter</code>, or <code>h1 Enter</code>, or <code>p Enter</code>.</p>
</li>
<li><p>These work as well: <code>bq</code> for a <code>&lt;blockquote&gt;</code>, <code>hdr</code> for a <code>&lt;header&gt;</code>, <code>ftr</code> for a <code>&lt;footer&gt;</code>, <code>btn</code> for a <code>&lt;button&gt;</code>, and <code>sect</code> for a section.</p>
</li>
</ul>
<h3 id="heading-classes">Classes</h3>
<p>If you are familiar with CSS, Emmet uses the same way to refer to classes using a <code>.</code>. To define a class along with the tag simply add it like this:</p>
<ul>
<li><p><code>div.wrapper</code> —&gt; <code>&lt;div class="wrapper"&gt;&lt;/div&gt;</code></p>
</li>
<li><p><code>h1.header.center</code> —&gt; <code>&lt;h1 class="header center"&gt;&lt;/h1&gt;</code></p>
</li>
</ul>
<h3 id="heading-ids">ID’s</h3>
<p>Id's work very much the same:</p>
<ul>
<li><code>div#hero</code> —&gt; <code>&lt;div id="hero"&gt;&lt;/div&gt;</code></li>
</ul>
<h3 id="heading-combining">Combining</h3>
<p>You can string these together:</p>
<ul>
<li><code>div#hero.wrapper</code> —&gt; <code>&lt;div id="hero" class="wrapper"&gt;&lt;/div&gt;</code></li>
</ul>
<h3 id="heading-attributes">Attributes</h3>
<p>We can also specify attributes for tags:</p>
<ul>
<li><code>img[src="cat.jpg"][alt="Cute cat pic"]</code> —&gt; <code>&lt;img src="cat.jpg" alt="Cute cat pic" /&gt;</code></li>
</ul>
<h3 id="heading-content">Content</h3>
<p>To include content within the tag, we simply wrap the content in curly braces, <code>{ }</code>.</p>
<ul>
<li><code>p{This is a paragraph}</code> —&gt; <code>&lt;p&gt;This is a paragraph&lt;/p&gt;</code></li>
</ul>
<h3 id="heading-siblings-amp-children">Siblings &amp; Children</h3>
<p>It just keeps getting better. We can also specify siblings and children using the <code>+</code> and <code>&gt;</code> characters.</p>
<ul>
<li><p><code>section+section</code> —&gt; <code>&lt;section&gt;&lt;/section&gt;&lt;section&gt;&lt;/section&gt;</code></p>
</li>
<li><p><code>ul&gt;li</code> —&gt; <code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;</code></p>
</li>
</ul>
<h3 id="heading-climbing-up">Climbing Up</h3>
<p>You have to try to picture what you are building in your head as you type the Emmet shorthand. In this example we'll "climb up" the tree by using <code>^</code>.</p>
<p><code>div+div&gt;p&gt;span+em^bq</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">em</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">em</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">blockquote</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">blockquote</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Here, we wanted the blockquote to be on the same level as the paragraph. Because of that, we needed to "climb up". Otherwise, it would be inside of the paragraph.</p>
<h3 id="heading-grouping">Grouping</h3>
<p>If your structure is very complex, you may want to group tags instead of traversing by climbing.</p>
<p>In this example, we'll create a header and footer without climbing using parenthesis <code>( )</code>.</p>
<p><code>div&gt;(header&gt;ul&gt;li&gt;a)+footer&gt;p</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">header</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">""</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">header</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">footer</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<h3 id="heading-multiplication-and">Multiplication and $</h3>
<p>We can generate multiple tags by multiplying (<code>*</code>) and number items in sequence using a dollar sign (<code>$</code>).</p>
<ul>
<li><p><code>ul&gt;li*5</code> —&gt; <code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;</code></p>
</li>
<li><p><code>ul&gt;li{Item $}*3</code> —&gt; <code>&lt;ul&gt;&lt;li&gt;Item 1&lt;/li&gt;&lt;li&gt;Item 2&lt;/li&gt;&lt;li&gt;Item 3&lt;/li&gt;&lt;/ul&gt;</code></p>
</li>
</ul>
<p>You can even customize the numbering sequence by padding with zeros, starting with a specific number, and even reverse direction.</p>
<p>Pad with zeros: <code>ul&gt;li.item$$$*5</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item001"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item002"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item003"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item004"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item005"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<p>Start with a specific number: <code>ul&gt;li.item$@3*5</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item3"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item4"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item5"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item6"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item7"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<p>Reverse direction: <code>ul&gt;li.item$@-*5</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item5"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item4"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item3"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item1"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<p>Reverse direction from a specific number: <code>ul&gt;li.item$@-3*5</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item7"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item6"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item5"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item4"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item3"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<h3 id="heading-implicit-tag-names">Implicit Tag Names</h3>
<p>There are certain tags that do not need to be typed and can be implied.</p>
<ul>
<li><p>A class defined initially with no tag will be implied as a <code>&lt;div&gt;</code>.<br>  <code>.wrapper</code> —&gt; <code>&lt;div class="wrapper"&gt;&lt;/div&gt;</code></p>
</li>
<li><p>A class defined within an emphasis tag will be implied as a <code>&lt;span&gt;</code>.<br>  <code>em&gt;.emphasis</code> —&gt; <code>&lt;em&gt;&lt;span class="emphasis"&gt;&lt;/span&gt;&lt;/em&gt;</code></p>
</li>
<li><p>A class defined within a list will be implied as a list item.<br>  <code>ul&gt;.item</code> —&gt; <code>&lt;ul&gt;&lt;li class="item"&gt;&lt;/li&gt;&lt;/ul&gt;</code></p>
</li>
<li><p>A class defined within a table will be implied as a <code>&lt;tr&gt;</code> and within a row would be a <code>&lt;td&gt;</code>.<br>  <code>table&gt;.row&gt;.col</code> —&gt; <code>&lt;table&gt;&lt;tr class="row"&gt;&lt;td class="col"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code></p>
</li>
</ul>
<h3 id="heading-wrap-with-tags">Wrap with Tags</h3>
<p>There will be times when you have existing code that you want to wrap with a tag. We can do with easily with Emmet.</p>
<p>Just highlight the code that you want to wrap and open the command pallet (<code>F1</code>). Then search for <code>Emmet: Wrap with Abbreviation</code>. You'll then be presented with a dialog box where you can type in the element.</p>
<p><code>test</code> —&gt; <code>&lt;div&gt;test&lt;/div&gt;</code></p>
<p>You can also use standard Emmet syntax in this dialog. Try wrapping some text with <code>span.wrapper</code>.</p>
<p>By default, this functionality is not assigned to a keyboard shortcut. So if you find yourself using it often, you may want to add a custom shortcut for it.</p>
<h3 id="heading-lorem-ipsum">Lorem Ipsum</h3>
<p>"Lorem Ipsum" is dummy text used by developers to represent data on a page. Just type <code>lorem</code> and hit <code>Enter</code>. Emmet will generate 30 words of fake text that you can use as a filler in your project.</p>
<p>The amount of words generated can be defined as well.</p>
<ul>
<li><code>lorem10</code> will give you 10 words of random text.</li>
</ul>
<h3 id="heading-putting-it-all-together">Putting It All Together</h3>
<p>Let's use several things that we've learned so far. Give this a try:</p>
<p><code>ul.my-list&gt;lorem10.item-$*5</code></p>
<p>Result:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"my-list"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item-1"</span>&gt;</span>Lorem ipsum dolor sit amet.<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item-2"</span>&gt;</span>Numquam repudiandae fuga porro consequatur?<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item-3"</span>&gt;</span>Culpa, est. Tenetur, deleniti nihil?<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item-4"</span>&gt;</span>Numquam architecto corrupti quam repudiandae.<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
</code></pre>
<h2 id="heading-css">CSS</h2>
<p>In CSS, Emmet has an abbreviation for every property. I'm not going to list all of them, but I will point out my most used ones. To see the full list, refer to the Emmet <a target="_blank" href="https://docs.emmet.io/cheat-sheet/">cheat-sheet</a>.</p>
<h3 id="heading-position">Position</h3>
<ul>
<li><p><code>pos</code> —&gt; <code>position:relative;</code> (defaults to relative)</p>
</li>
<li><p><code>pos:s</code> —&gt; <code>position:static;</code></p>
</li>
<li><p><code>pos:a</code> —&gt; <code>position:absolute;</code></p>
</li>
<li><p><code>pos:r</code> —&gt; <code>position:relative;</code></p>
</li>
<li><p><code>pos:f</code> —&gt; <code>position:fixed;</code></p>
</li>
</ul>
<h3 id="heading-display">Display</h3>
<ul>
<li><p><code>d</code> —&gt; <code>display:block;</code> (defaults to block)</p>
</li>
<li><p><code>d:n</code> —&gt; <code>display:none;</code></p>
</li>
<li><p><code>d:b</code> —&gt; <code>display:block;</code></p>
</li>
<li><p><code>d:f</code> —&gt; <code>display:flex;</code></p>
</li>
<li><p><code>d:if</code> —&gt; <code>display:inline-flex;</code></p>
</li>
<li><p><code>d:i</code> —&gt; <code>display:inline;</code></p>
</li>
<li><p><code>d:ib</code> —&gt; <code>display:inline-block;</code></p>
</li>
</ul>
<h3 id="heading-cursor">Cursor</h3>
<ul>
<li><code>cur</code> —&gt; <code>cursor:pointer;</code></li>
</ul>
<h3 id="heading-color">Color</h3>
<ul>
<li><p><code>c</code> —&gt; <code>color:#000;</code></p>
</li>
<li><p><code>c:r</code> —&gt; <code>color:rgb(0, 0, 0);</code></p>
</li>
<li><p><code>c:ra</code> —&gt; <code>color:rgba(0, 0, 0, .5);</code></p>
</li>
<li><p><code>op</code> —&gt; <code>opacity: ;</code></p>
</li>
</ul>
<h3 id="heading-margin-amp-padding">Margin &amp; Padding</h3>
<ul>
<li><p><code>m</code> —&gt; <code>margin: ;</code></p>
</li>
<li><p><code>m:a</code> —&gt; <code>margin:auto;</code></p>
</li>
<li><p><code>mt</code> —&gt; <code>margin-top: ;</code></p>
</li>
<li><p><code>mr</code> —&gt; <code>margin-right: ;</code></p>
</li>
<li><p><code>mb</code> —&gt; <code>margin-bottom: ;</code></p>
</li>
<li><p><code>ml</code> —&gt; <code>margin-left: ;</code></p>
</li>
<li><p><code>p</code> —&gt; <code>padding: ;</code></p>
</li>
<li><p><code>pt</code> —&gt; <code>padding-top: ;</code></p>
</li>
<li><p><code>pr</code> —&gt; <code>padding-right: ;</code></p>
</li>
<li><p><code>pb</code> —&gt; <code>padding-bottom: ;</code></p>
</li>
<li><p><code>pl</code> —&gt; <code>padding-left: ;</code></p>
</li>
</ul>
<h3 id="heading-box-sizing">Box Sizing</h3>
<ul>
<li><code>bxz</code> —&gt; <code>box-sizing:border-box;</code></li>
</ul>
<h3 id="heading-width">Width</h3>
<ul>
<li><p><code>w</code> —&gt; <code>width: ;</code></p>
</li>
<li><p><code>h</code> —&gt; <code>height: ;</code></p>
</li>
<li><p><code>maw</code> —&gt; <code>max-width: ;</code></p>
</li>
<li><p><code>mah</code> —&gt; <code>max-height: ;</code></p>
</li>
<li><p><code>miw</code> —&gt; <code>min-width: ;</code></p>
</li>
<li><p><code>mih</code> —&gt; <code>min-height: ;</code></p>
</li>
</ul>
<h3 id="heading-border">Border</h3>
<ul>
<li><p><code>bd</code> —&gt; <code>border: ;</code></p>
</li>
<li><p><code>bd+</code> —&gt; <code>border:1px solid #000;</code></p>
</li>
<li><p><code>bd:n</code> —&gt; <code>border:none;</code></p>
</li>
</ul>
<h3 id="heading-emmet-is-awesome">Emmet Is Awesome!</h3>
<p>With Emmet, you can create a really complex HTML structure with one line. It’s really awesome. And, it also works with CSS.</p>
<p>You can see how Emmet can drastically increase your efficiency and speed when writing HTML and CSS.</p>
<p>If you want to further increase your efficiency and speed while using VS Code, check out my course <a target="_blank" href="https://courses.codestackr.com/vs-code-superhero?coupon=LAUNCH"><strong>Become A VS Code SuperHero</strong></a><strong>.</strong></p>
<p>The course dives much deeper into these concepts and helps you to become a fast, efficient superhero developer :)</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/footer-banner-1.png" alt="Jesse Hall (codeSTACKr)" width="600" height="400" loading="lazy"></p>
<p>I'm Jesse from Texas. Check out my other content and let me know how I can help you on your journey to becoming a web developer.</p>
<ul>
<li><p><a target="_blank" href="https://youtube.com/codeSTACKr">Subscribe To My YouTube</a></p>
</li>
<li><p>Say Hello! <a target="_blank" href="https://instagram.com/codeSTACKr">Instagram</a> | <a target="_blank" href="https://twitter.com/codeSTACKr">Twitter</a></p>
</li>
<li><p><a target="_blank" href="https://codestackr.com/">Sign Up For My Newsletter</a></p>
</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Remove Duplicates in Excel – Delete Duplicate Rows with a Few Clicks ]]>
                </title>
                <description>
                    <![CDATA[ By James Murphy Excel has many applications, like keeping track of inventory, maintaining a mailing list, making sales reports, and many others.  As the database grows, one main issue many users encounter is getting duplicate values and rows. This ca... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-remove-duplicates-in-excel-delete-duplicate-rows-with-a-few-clicks/</link>
                <guid isPermaLink="false">66d45f3147a8245f78752a46</guid>
                
                    <category>
                        <![CDATA[ efficiency ]]>
                    </category>
                
                    <category>
                        <![CDATA[ excel ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 28 May 2020 20:47:41 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/excel-1-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By James Murphy</p>
<p><a target="_blank" href="https://www.freecodecamp.org/news/how-to-create-read-update-and-search-through-excel-files-using-python-c70680d811d4/">Excel</a> has many applications, like keeping track of inventory, maintaining a mailing list, making sales reports, and many others. </p>
<p>As the database grows, one main issue many users encounter is getting duplicate values and rows. This can make your calculations inaccurate and will make people question your competency.</p>
<p>You could end up giving a summary report with duplicate values or even mailing a letter to the same person twice. So you'll need to find and remove the duplicates to avoid these small mistakes that could have serious implications.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/excel-1-1-1.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Remove Duplicates</em></p>
<h2 id="heading-option-1-using-the-remove-duplicate-tool">Option 1: Using the remove duplicate tool</h2>
<p>Since this problem happens a lot, there is a dedicated command on a ribbon that makes it easy to deal with duplicates. This is the case with recent versions of Microsoft Office suite, such as excel 2007 up to 2016.</p>
<h3 id="heading-select-the-table-youll-work-on">Select the table you'll work on</h3>
<p>First, you need to select the cells that are targeted, as the tool can be used to remove duplicates in entire rows or partially matching records. </p>
<p>You can do this by selecting the table and then pressing Ctrl + A. You should make sure the original file is saved as the process deletes the dupes permanently.</p>
<h3 id="heading-click-on-the-data-tab-at-the-top-of-the-screen">Click on the data tab at the top of the screen</h3>
<p>Once you have selected the range, check the top of the screen and click the data tab. The different commands will be shown, and you should then check for ‘remove duplicates’ and click on it.</p>
<p>A small dialogue box will pop up on the screen. The first row is automatically selected as the ‘my data has header’ is ticked. If there is no header and the data starts at the 1<sup>st</sup> row, deselect that option.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-165.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-press-the-ok-button-to-remove-duplicates">Press the OK button to remove duplicates</h3>
<p>The entire table is now selected, and thus you should go ahead and press the OK button. This will delete all duplicates. The deletion details appear on the screen with unique values remaining and the number of duplicate entries removed shown.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-166.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>However, if you want to remove <strong>partial duplicates</strong> based on specific columns, you should select them, leaving the rest. If the table contains many columns, it is best to unselect all and then just select those that need dupes removal.</p>
<p>Once done, you should click OK. Then the duplicated information will be removed, and the details will be shown on the screen.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/EXCEL-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-option-2-using-advanced-filters-in-excel">Option 2: Using advanced filters in Excel</h2>
<p>The advanced filter icon helps you to identify and delete duplicates in Excel. This can be used in the latest Microsoft Office suite and the 2003 version. You need to open your Excel spreadsheet and select all by clicking Ctrl + A.</p>
<h3 id="heading-click-the-data-tab-then-advanced-button-under-the-sort-and-filter-section">Click the data tab then advanced button under the sort and filter section</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-167.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You should then click on the Data tab at the top of the screen where different sections appear beneath it. Look for the sort &amp; filter section and click on the advanced button.</p>
<p>A dialogue box will pop up on the screen where you can either select ‘copy to another location’ or ‘filter the list in-place.’ The latter hides all rows with duplicates while the former generates a copy of the records.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-168.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-adjust-the-range-of-data-under-the-list-range">Adjust the range of data under the "list range"</h3>
<p>In the dialogue box, there is a list range field with data populated by Excel. If you want to change the range, you can do it by adjusting it under the ‘list range.’ </p>
<p>Leaving the criteria range blank and copying to the field is only useful if you had chosen to copy to another place. Otherwise, leave it blank for the ‘filter the list in-place’ option.</p>
<h3 id="heading-tick-the-unique-records-only-box">Tick the "unique records only" box</h3>
<p>Under the same dialogue box, there is a field labeled "unique records only" - tick that box. This tells Excel to filter out duplicates while retaining unique entries.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-169.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-click-ok-to-remove-duplicates">Click OK to remove duplicates</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-170.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>After you've followed this process, you can click the OK button to get rid of the duplicates. The document then contains duplicate data except for the ones which have been removed.</p>
<p>As the process assumes there are headers in the document, if the 1<sup>st</sup> row contains a duplicate, it will not be removed. Delete it manually if it is not a header.</p>
<p>When you're using the advanced filter process, you can only remove duplicates in the entire table as there is no choice of doing it partially. However, you can remove duplicates and, at the same time, create a copy of the data.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/excel-2.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-option-3-using-a-duplicate-remover-tool-with-2-mouse-clicks">Option 3: Using a duplicate remover tool with 2 mouse clicks</h2>
<p>Apart from the in-built duplicate removers, you can use add-ons such as <a target="_blank" href="https://www.ablebits.com/excel-remove-duplicates/index.php">Ablebits duplicate</a> remover to get rid of dupes. The tool is multi-purpose and can perform other functions as well. It works on all operating systems, and all Excel versions. Here we will focus on one way of using the tool that takes just 2 mouse clicks.</p>
<h3 id="heading-select-the-cell-in-the-table-of-interest">Select the cell in the table of interest</h3>
<p>Check the table where you need to dedupe records, and on the Ablebits data click "dedupe table". This selects the the entire table, and the dialogue box will open with all columns chosen automatically.</p>
<h3 id="heading-select-delete-duplicates-from-the-drop-down-list-under-select-the-action-field">Select delete duplicates from the drop-down list under "select the action" field</h3>
<p>On the lower-right, there is a drop-down list under the select action field. Choose the delete duplicate option and press OK. The duplicate values will be deleted except for 1<sup>st</sup> occurrences.</p>
<h3 id="heading-removing-duplicates-in-key-columns">Removing duplicates in key columns</h3>
<p>The 2 mouse click process can be used to remove duplicates on specific rows under crucial columns. To do this, uncheck the other columns leaving the ones you want to dedupe checked. Follow two points above, and the duplicates will be removed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-171.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The select action can be used for other operations such as copying duplicates to another location without deleting them. Use the drop-down menu to select accordingly so your Excel sheet is neat and without errors.</p>
<h2 id="heading-final-word">Final Word</h2>
<p>Wiping duplicates on Excel is simple using the three options highlighted above. The process is easy, and with this guide you can do it with a few clicks to get the ultimate <a target="_blank" href="https://my-assignment.help/">assignment help</a> and work assistance from Excel.</p>
<p>When you're working in Excel you should always clean your data set, eliminating any unprofessional errors. If you come across any challenges, check that the data being processed is not subtotaled or outlined. </p>
<p>In such cases, you need to remove the subtotals and outline then use any of the methods above. The data will then be cleaned, making it much easier to work on them.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ An Introduction to the Time Complexity of Algorithms ]]>
                </title>
                <description>
                    <![CDATA[ By Aditya In computer science, analysis of algorithms is a very crucial part. It is important to find the most efficient algorithm for solving a problem. It is possible to have many algorithms to solve a problem, but the challenge here is to choose t... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/time-complexity-of-algorithms/</link>
                <guid isPermaLink="false">66d45dde4a7504b7409c3343</guid>
                
                    <category>
                        <![CDATA[ algorithms ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Computer Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ data structures ]]>
                    </category>
                
                    <category>
                        <![CDATA[ efficiency ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 10 Jun 2019 10:32:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/aron-visuals-322314-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Aditya</p>
<p>In computer science, analysis of algorithms is a very crucial part. It is important to find the most efficient algorithm for solving a problem. It is possible to have many algorithms to solve a problem, but the challenge here is to choose the most efficient one. </p>
<p>Now the point is, how can we recognize the most efficient algorithm if we have a set of different algorithms? Here, the concept of space and time complexity of algorithms comes into existence. Space and time complexity acts as a measurement scale for algorithms. We compare the algorithms on the basis of their space (amount of memory) and time complexity (number of operations).</p>
<p>The total amount of the computer's memory used by an algorithm when it is executed is the space complexity of that algorithm. We’ll not discuss space complexity in this article (to make this article a bit smaller). </p>
<h2 id="heading-time-complexity">Time Complexity</h2>
<p>So, the time complexity is the number of operations an algorithm performs to complete its task (considering that each operation takes the same amount of time). The algorithm that performs the task in the smallest number of operations is considered the most efficient one in terms of the time complexity. However, the space and time complexity are also affected by  factors such as your operating system and hardware, but we are not including them in this discussion.</p>
<p>Now to understand the time complexity, we will take an example in which we’ll compare two different algorithms which are used to solve a particular problem.</p>
<p>The problem is searching. We have to search for an element in an array (in this problem, we are going to assume that the array is sorted in  ascending order). To solve this problem we have two algorithms:</p>
<ol>
<li><p><a target="_blank" href="https://www.hackerearth.com/practice/algorithms/searching/linear-search/tutorial/">Linear Search.</a></p>
</li>
<li><p><a target="_blank" href="https://www.hackerearth.com/practice/algorithms/searching/binary-search/tutorial/">Binary Search.</a></p>
</li>
</ol>
<p>Let’s say the array contains ten elements, and we have to find the number ten in the array.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> array = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>, <span class="hljs-number">6</span>, <span class="hljs-number">7</span>, <span class="hljs-number">8</span>, <span class="hljs-number">9</span>, <span class="hljs-number">10</span>];
<span class="hljs-keyword">const</span> search_digit = <span class="hljs-number">10</span>;
</code></pre>
<p><strong>Linear search</strong> algorithm will compare each element of the array to the <strong>search_digit</strong>. When it finds the <strong>search_digit</strong> in the array, it will return <strong>true</strong>. </p>
<p>Now let’s count the number of operations it performs. Here, the answer is 10 (since it compares every element of the array). So,  Linear search uses ten operations to find the given element (these are the maximum number of operations for this array; in the case of Linear search, this is also known as the <a target="_blank" href="https://www.geeksforgeeks.org/analysis-of-algorithms-set-2-asymptotic-analysis/">worst case</a> of an algorithm). </p>
<p>In general, Linear search will take <strong>n</strong> number of operations in its worst case (where <strong>n</strong> is the size of the array).</p>
<p>Let’s examine the <strong>Binary search</strong> algorithm for this case.</p>
<p>Binary search can be easily understood by this example:</p>

    
        <img src="https://s3.amazonaws.com/learneroo-images/main/binarySearch.png" width="816" height="283" alt="binarySearch" loading="lazy">
        <p>Source: <a href="https://www.learneroo.com/modules/71/nodes/399">Learneroo</a></p>
    <br>

<p>If we try to apply this logic on our problem then, first we’ll compare <strong>search_digit</strong> with the middle element of the array, that is 5. Now since 5 is less than 10, then we will start looking for the <strong>search_digit</strong> in the array elements greater than 5, in the same way until we get the desired element 10.</p>
<p>Now, try to count the number of operations binary search took to find the desired element. It took approximately four operations. Now, this was the worst case for binary search. This shows that there is a <a target="_blank" href="https://www.khanacademy.org/math/algebra2/exponential-and-logarithmic-functions/introduction-to-logarithms/a/intro-to-logarithms">logarithmic</a> relation between the number of operations performed and the total size of the array.</p>
<p>number of operations = log(10) = 4(approx)
<em>for base 2</em></p>
<p>We can generalize this result for Binary search as:</p>
<p>For an array of size <strong>n</strong>, the number of operations performed by the Binary Search is: <strong>log(n)</strong></p>
<h2 id="heading-the-big-o-notation">The Big O Notation</h2>
<p>In the above statements, we saw that for an array of size <strong>n</strong>, linear search will perform <strong>n</strong> operations to complete the search. On the other hand, Binary search performed <strong>log(n)</strong> number of operations (both for their worst cases). We can represent this as a graph (<strong>x-axis</strong>: number of elements, <strong>y-axis</strong>: number of operations).</p>

    
        <img src="https://www.techtud.com/sites/default/files/public/user_files/tud39880/linearSearch%20vs%20binary%20search%20diagram_0.jpg" width="600" height="400" alt="linearSearch%20vs%20binary%20search%20diagram_0" loading="lazy">
        <p>Source: <a href="https://www.techtud.com/computer-science-and-information-technology/algorithms/searching/binary-search" target="_blank">Techtud</a></p>
    


<p>It is quite clear from the figure that the rate by which the complexity increases for Linear search is much faster than that for binary search.</p>
<p>When we analyse an algorithm, we use a notation to represent its time complexity and that notation is Big O notation.</p>
<p>For Example: time complexity for Linear search can be represented as <strong>O(n)</strong> and <strong>O(log n)</strong> for Binary search (where, <strong>n</strong> and <strong>log(n)</strong> are the number of operations).</p>
<p>The Time complexity or Big O notations for some popular algorithms are listed below:</p>
<ol>
<li>Binary Search: O(log n)</li>
<li>Linear Search: O(n)</li>
<li>Quick Sort: O(n * log n)</li>
<li>Selection Sort: O(n * n)</li>
<li>Travelling salesperson : O(n!)</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I really appreciate your efforts if you are still reading this article. Now, you must be thinking - why is time complexity so important to understand? </p>
<p>We know that for a small number of elements (say 10), the difference between the number of operations performed by binary search and linear search is not so big. But in the real world, most of the time, we deal with  problems that have big chunks of data. </p>
<p>For example, if we have 4 billion elements to search for, then, in its worst case, linear search will take 4 billion operations to complete its task. Binary search will complete this task in just 32 operations. That’s a big difference. Now let’s assume that if one operation takes 1 ms for completion, then binary search will take only 32 ms whereas linear search will take 4 billion ms (that is approx. 46 days). That’s a significant difference. </p>
<p>This is the reason why studying time complexity becomes important when it comes to such a big amount of data.</p>
<h2 id="heading-resources">Resources</h2>
<p><a target="_blank" href="https://www.manning.com/books/grokking-algorithms">Grokking Algorithms- by Aditya Y Bhargava</a></p>
<p><a target="_blank" href="https://youtu.be/D6xkbGLQesk">Introduction to Big O notation and Time Complexity- by CS Dojo</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A major 5 line efficiency hack for your GraphQL API Type resolvers ]]>
                </title>
                <description>
                    <![CDATA[ By Vampiire Using Apollo Server and Postgres — Sequelize, we’ll create a proof of concept exploiting the info parameter of the resolver function for a 94% reduction in database load on Type queries*. If you are already familiar with the Apollo Server... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-5-line-major-efficiency-hack-for-your-graphql-api-type-resolvers-b58438b62864/</link>
                <guid isPermaLink="false">66c341b5a1d481faeda49ace</guid>
                
                    <category>
                        <![CDATA[ Apollo GraphQL ]]>
                    </category>
                
                    <category>
                        <![CDATA[ efficiency ]]>
                    </category>
                
                    <category>
                        <![CDATA[ GraphQL ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 08 Aug 2018 14:16:56 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*_5uB_PojUyPvVW0UkpMDUw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Vampiire</p>
<p>Using Apollo Server and Postgres — Sequelize, we’ll create a proof of concept exploiting the info parameter of the resolver function for a 94% reduction in database load on Type queries*.</p>
<p>If you are already familiar with the Apollo Server resolver signature and its <code>info</code> parameter and want to <a target="_blank" href="https://medium.com/@vampiire/a-5-line-major-efficiency-hack-for-your-graphql-api-type-resolvers-b58438b62864#a693"><strong>skip to the hack, click here</strong></a>. Thanks to my inquisitive friend <a target="_blank" href="https://www.freecodecamp.org/news/a-5-line-major-efficiency-hack-for-your-graphql-api-type-resolvers-b58438b62864/undefined">Sloan Brantley Gwaltney</a> for tipping me off to the <code>info</code> parameter’s potential.</p>
<h3 id="heading-background-the-resolver-function-signature">Background — The resolver function signature</h3>
<p>Apollo Server provides the following resolver function signature <a target="_blank" href="https://www.apollographql.com/docs/graphql-tools/resolvers#Resolver-function-signature">from their docs</a>:</p>
<pre><code>fieldName(obj, args, context, info) { result }
</code></pre><p>Back in April, I wrote some notes on the signature to teach to some teammates who were new to GraphQL / Apollo Server. Below is my (slightly) modified version of the signature:</p>
<pre><code>(instance, <span class="hljs-built_in">arguments</span>, context, info) { ...returning data... }
</code></pre><h4 id="heading-instance"><code>**instance**</code></h4>
<blockquote>
<p><em>obj / root / instance</em><br> <em>— GraphQL Type associated with the resolver</em><br> <em>— only used in Type custom field resolvers (for other Types / renamed fields)</em><br> <em>— exists as an <strong>instance</strong> of the Type’s corresponding <strong>database Model</strong></em></p>
<p><code>ex:</code><br> <code>Type: User</code><br> <code>Model: User, instance is ‘user’</code><br> <code>Type custom field resolver:</code><br> <code>user =&gt; user.property/.relationshipGette</code>r()</p>
</blockquote>
<h4 id="heading-arguments"><code>**arguments**</code></h4>
<blockquote>
<p><em>arguments / Input object</em><br> <em>— arguments to the Query or Mutation</em><br> <em>— typically in the form of an Input Type object [defined in the Schema]</em><br> <em>— Inputs are reusable objects that may contain many fields, a subset of which are appropriate for each resolver</em><br> <em>— flexible inputs that can be used for both Query and Mutation resolvers</em><br> <em>— destructuring in the resolver allows selectivity of the Input object fields</em></p>
<p><code>ex:</code><br> <code>UserInput: { id, username, avatar, githubID }</code><br> <code>resolver: (root, { id }) =&gt; User.findById(id);</code><br> <code>// destructures 1 of 4 UserInput fie</code>lds</p>
</blockquote>
<h4 id="heading-context"><code>**context**</code></h4>
<blockquote>
<p><em>context / ctx</em><br> <em>— the context object is injected at runtime in the Apollo middleware declaration of app.js</em><br> <em>— it is the most versatile of the resolver parameters</em><br> <em>— allows you to pass in things like utility functions, database models, authenticated User, and so on</em><br> <em>— by passing these in the context, you no longer need ‘require’ statements for models and helpers. They are accessible directly from the resolver.</em><br> <em>— typically defined as a nesting object with each subcontext having its own object</em></p>
</blockquote>
<h4 id="heading-info"><code>**info**</code></h4>
<blockquote>
<p><em>no idea?</em></p>
</blockquote>
<p>…That was until a serendipitous conversation with Sloan led to discussing this <strong>useless</strong> parameter. Sloan mentioned that it contained information about the incoming Query. This got my gears turning on improving resolver efficiency.</p>
<h3 id="heading-the-info-parameter">The info parameter</h3>
<p>The <code>info</code> object holds details about your entire API Schema and other bits that I assume Apollo Server uses for processing. In particular, it holds information about the Query itself — specifically the set of Type fields requested.</p>
<h4 id="heading-sequelize-and-the-tale-of-gross-inefficiency">Sequelize and the Tale of Gross Inefficiency</h4>
<p>As it turns out, when Sequelize (and I believe every other OR/DM*) resolves rows or documents, it does so in their entirety. On the front / receiving end the data is indeed trimmed to specifications. But on the back end, the process appears to be:</p>
<p><code>DB query for **entire** row/doc</code> → <code>map / custom resolver requested fields</code> → <code>filter data and resolve requested fields</code></p>
<p>This was proven with a Postgres echo I ran from Sequelize on a User query:</p>
<pre><code>SELECT <span class="hljs-string">"id"</span>, <span class="hljs-string">"role"</span>, <span class="hljs-string">"email"</span>, ...wtf Sequelize..., <span class="hljs-string">"timezone"</span>, <span class="hljs-string">"country_id"</span>, <span class="hljs-string">"city_id"</span>, <span class="hljs-string">"created_at"</span>, <span class="hljs-string">"updated_at"</span> FROM <span class="hljs-string">"users"</span> AS <span class="hljs-string">"User"</span> WHERE <span class="hljs-string">"User"</span>.<span class="hljs-string">"github_username"</span> = <span class="hljs-string">'the-vampiire'</span> LIMIT <span class="hljs-number">1</span>;
</code></pre><p>The Postgres query <strong>selects</strong> <strong>all 17 fields</strong> while the API Query itself only requests 1:</p>
<p><code>user(username:”the-vampiire”) { id }</code></p>
<h4 id="heading-digging-into-the-info-object">Digging Into the info Object</h4>
<p>With a bit of digging into the <code>info</code> object, I was able to get to my target: the requested fields. My theory was that if I knew the fields, I could pass them in as the <code>attributes</code> property of the Sequelize query object to reduce the load on the Postgres server.</p>
<p><code>info.fieldNodes[].selectionSet.selections[].name.value</code></p>
<h4 id="heading-notes">notes</h4>
<ul>
<li><code>fieldNodes</code> is an array with the <code>0th</code> element is the first query. My guess is that it’s an array to support batch queries.</li>
<li><code>selections</code> is an array with objects for each requested field of the Type</li>
<li>the field name itself is buried under <code>selections.name.value</code></li>
</ul>
<h3 id="heading-the-hack">The Hack</h3>
<p>So what does all of this mean? Well with a couple of lines of code, a Model (from the context of course!), and the <code>info</code> argument, I wrote the following utility and proof of concept. It uses the Sequelize <code>attributes</code> property of the query object to get data only from the requested columns.</p>
<p>Using this utility resulted in a <strong>94% decrease in the size of the query</strong>. This, of course, scales with the number of fields requested.</p>
<p>One of the major known benefits of using a GraphQL API is that it allows the front end to request a payload of the exact shape and size needed.</p>
<p>Using my utility allows the back end to reflect the same benefits by similarly reducing the load on the database server.</p>
<p>The first and last lines of the <code>mapAttributes</code> function ensure only directly mapped Model fields are passed as <code>attributes</code> to the query object.</p>
<p>This prevents errors that arise from requesting fields that do not exist as columns on the Model.</p>
<p>These would arise from fields that require custom Type field resolvers (like Type relationships or custom Type field names).</p>
<h4 id="heading-proof-of-concept">Proof of Concept</h4>
<p><code>User Type query: user(username:”the-vampiire”) { id }</code></p>
<p><code>before</code> → all 17 fields of the User table are queried</p>
<pre><code>SELECT <span class="hljs-string">"id"</span>, <span class="hljs-string">"role"</span>, <span class="hljs-string">"email"</span>, ...wtf Sequelize..., <span class="hljs-string">"timezone"</span>, <span class="hljs-string">"country_id"</span>, <span class="hljs-string">"city_id"</span>, <span class="hljs-string">"created_at"</span>, <span class="hljs-string">"updated_at"</span> FROM <span class="hljs-string">"users"</span> AS <span class="hljs-string">"User"</span> WHERE <span class="hljs-string">"User"</span>.<span class="hljs-string">"github_username"</span> = <span class="hljs-string">'the-vampiire'</span> LIMIT <span class="hljs-number">1</span>;
</code></pre><p><code>after</code> → only the single requested field is queried</p>
<pre><code>Executing (<span class="hljs-keyword">default</span>): SELECT <span class="hljs-string">"status"</span>, <span class="hljs-string">"id"</span> FROM <span class="hljs-string">"users"</span> AS <span class="hljs-string">"User"</span> WHERE <span class="hljs-string">"User"</span>.<span class="hljs-string">"github_username"</span> = <span class="hljs-string">'the-vampiire'</span> LIMIT <span class="hljs-number">1</span>;
</code></pre><p><img src="https://cdn-media-1.freecodecamp.org/images/1*uY5yPukkf28oxZUtcQVXFw.jpeg" alt="Image" width="670" height="852" loading="lazy">
<em>This hack is officially abided by The Dude</em></p>
<h3 id="heading-caveats">Caveats*</h3>
<ul>
<li>I have not tested this with Mongoose or other popular OR/DMs, but in principle, the effect should be the same. The <code>mapAttributes</code> function and query object would just need a few customizations.</li>
<li>I have not tested this with batch queries with different fields being requested (it may affect the <code>fieldNodes</code> property of <code>info</code>).</li>
<li>Does not work with custom Type field resolvers for renamed fields</li>
<li>The benefits will scale by the ratio of requested Type fields to total fields on the corresponding Model.</li>
</ul>
<p>— Vamp</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
