<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pradeep</title>
    <description>The latest articles on DEV Community by Pradeep (@pradeepovig).</description>
    <link>https://dev.to/pradeepovig</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F213656%2Fe78b574e-ce30-46ed-a8af-06f7cf591d0e.jpg</url>
      <title>DEV Community: Pradeep</title>
      <link>https://dev.to/pradeepovig</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pradeepovig"/>
    <language>en</language>
    <item>
      <title>VS Code: Good Enough Light Themes</title>
      <dc:creator>Pradeep</dc:creator>
      <pubDate>Sun, 09 May 2021 10:28:06 +0000</pubDate>
      <link>https://dev.to/pradeepovig/vs-code-good-enough-light-themes-16le</link>
      <guid>https://dev.to/pradeepovig/vs-code-good-enough-light-themes-16le</guid>
      <description>&lt;h2&gt;
  
  
  No theme out there is best, so what makes them good enough?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Good contrast ratio between background and foreground colors.&lt;/li&gt;
&lt;li&gt;Adequate set of colors to identify keywords of a particular language.&lt;/li&gt;
&lt;li&gt;A light color to highlight the current line. &lt;/li&gt;
&lt;li&gt;High text legibility on every component of the application.&lt;/li&gt;
&lt;li&gt;Good contrast ratio between Title Bar, Side Bar, Files Menu, Tabs and Footer to separate them out.&lt;/li&gt;
&lt;li&gt;Overall package should be easy on the eyes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Presenting to you my collection of hand-picked light color themes for VS Code. All of them have been tested against the parameters above. I hope you like them.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. &lt;a href="https://marketplace.visualstudio.com/items?itemName=JohnyGeorges.jetjet-theme"&gt;JetJet - Light&lt;/a&gt;
&lt;/h1&gt;




&lt;p&gt;Authored by &lt;a href="https://marketplace.visualstudio.com/publishers/JohnyGeorges"&gt;Johny Georges&lt;/a&gt;, it comes within a set of 5 themes. Built on top of default VS Code Light theme, it offers a pleasing background color with good text legibility. However, sometimes I find it hard to highlight current tab which is permissible considering it fares well on other parameters.&lt;/p&gt;

&lt;p&gt;Javascript&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TL_vONni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuk0ow1wxotrzkzx1jof.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TL_vONni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuk0ow1wxotrzkzx1jof.PNG" alt="Alt Text" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--05KZMlkX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ncsuag7mw4s5dfc23yt1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--05KZMlkX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ncsuag7mw4s5dfc23yt1.PNG" alt="Alt Text" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J_ypx8z4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi7f3j2l1v3kt3kge7e1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J_ypx8z4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi7f3j2l1v3kt3kge7e1.PNG" alt="Alt Text" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. &lt;a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.winteriscoming"&gt;Winter is Coming - Light&lt;/a&gt;
&lt;/h1&gt;




&lt;p&gt;Authored by &lt;a href="https://marketplace.visualstudio.com/publishers/johnpapa"&gt;John Papa&lt;/a&gt;, it comes within a set of 6 themes. It offers a duotone outlook and distinguishes well the various parts of the editor, text legibility is also good, fares well on the parameters. However, the borders around highlighted tabs and icons in the navigation panel look annoying to me.&lt;/p&gt;

&lt;p&gt;Javascript&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--avkH8lWL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9k8vgucvav2rv040mepz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--avkH8lWL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9k8vgucvav2rv040mepz.PNG" alt="Alt Text" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o9M-kRvL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egxo6urafxpj4dmp1kkh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o9M-kRvL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egxo6urafxpj4dmp1kkh.PNG" alt="Alt Text" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EW9nd_6j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmr36k2kjr3v3z4u5oiu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EW9nd_6j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmr36k2kjr3v3z4u5oiu.PNG" alt="Alt Text" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. &lt;a href="https://marketplace.visualstudio.com/items?itemName=akamud.vscode-theme-onelight"&gt;Atom One - Light&lt;/a&gt;
&lt;/h1&gt;




&lt;p&gt;Extracted from the &lt;a href="https://github.com/atom"&gt;Atom&lt;/a&gt; editor, it comes as a standalone theme. It has a flattish outlook and manages to highlight well the various parts of the editor, fares equally well on the parameters as other themes.&lt;/p&gt;

&lt;p&gt;Javascript&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hKyJmf56--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ng2ergolkhlrygn3u0vx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hKyJmf56--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ng2ergolkhlrygn3u0vx.PNG" alt="Alt Text" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YhKRskh6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdiz1j0bsjy74cklgwlh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YhKRskh6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdiz1j0bsjy74cklgwlh.PNG" alt="Alt Text" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KoiK2_tm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnde03uapi15qryqy7jz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KoiK2_tm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnde03uapi15qryqy7jz.PNG" alt="Alt Text" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. &lt;a href="https://marketplace.visualstudio.com/items?itemName=joaomoreno.github-sharp-theme"&gt;GitHub Sharp&lt;/a&gt;
&lt;/h1&gt;




&lt;p&gt;Authored by &lt;a href="https://marketplace.visualstudio.com/publishers/joaomoreno"&gt;Joao Moreno&lt;/a&gt;, it is a fork of the &lt;a href="https://marketplace.visualstudio.com/items?itemName=thenikso.github-plus-theme"&gt;GitHub Plus&lt;/a&gt; theme. The duotone look distinguishes well the exteriors and interiors of the editor. It offers a pleasing color scheme. No complaints so far from it.&lt;/p&gt;

&lt;p&gt;Javascript&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rlNfIVpm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tesviet5mlgf6pnxqfcl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rlNfIVpm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tesviet5mlgf6pnxqfcl.PNG" alt="Alt Text" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a1gU5dUA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spvr4lp8zotxawojp0bg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a1gU5dUA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spvr4lp8zotxawojp0bg.PNG" alt="Alt Text" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rj4t9kOX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5308gjx9ow9ynhtm04np.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rj4t9kOX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5308gjx9ow9ynhtm04np.PNG" alt="Alt Text" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover Photo by &lt;a href="https://unsplash.com/@sapegin?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Artem Sapegin&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/code?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>themes</category>
    </item>
    <item>
      <title>Javascript: Remove a specific element from an array</title>
      <dc:creator>Pradeep</dc:creator>
      <pubDate>Sun, 09 May 2021 10:26:17 +0000</pubDate>
      <link>https://dev.to/pradeepovig/javascript-remove-a-specific-element-from-an-array-3k1b</link>
      <guid>https://dev.to/pradeepovig/javascript-remove-a-specific-element-from-an-array-3k1b</guid>
      <description>&lt;p&gt;In this blog post, we are going to take a look at some of the widely used, battle tested methods to remove a specific element from an array in Javascript.&lt;/p&gt;

&lt;h1&gt;
  
  
  01. The splice() method
&lt;/h1&gt;

&lt;p&gt;The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice"&gt;From MDN Docs.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array.splice(begin_removal_at_this_index, number_of_elements_to_remove)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Return Value
&lt;/h2&gt;

&lt;p&gt;An array containing the deleted elements.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Remove by Index
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var testArr = [1, 2, 3, 4, 5];
const output = testArr.splice(2, 1);
console.log(output); // Outputs [3]
console.log(testArr); // Outputs [1, 2, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  2. Remove by Value
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var testArr = [1, 2, 3, 4, 5];
const val = 3; // Value to remove

for (let i = 0; i &amp;lt; testArr.length; i++) {
    if (testArr[i] === val) {
        const removedElements = testArr.splice(i, 1);
        console.log(removedElements); // Outputs [3]
        i--; // Since the indexes of elements following this index get updated after removal
    }
}

console.log(testArr); // Outputs [1, 2, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h1&gt;
  
  
  02. The filter() method
&lt;/h1&gt;

&lt;p&gt;The filter() method creates a new array with all elements that pass the test implemented by the provided function. It does not mutate the existing array in place. &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter"&gt;From MDN Docs.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array.filter(callback(value, index, array) { // Boolean expression });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Return Value
&lt;/h2&gt;

&lt;p&gt;A new array with the elements that pass the test. If no elements pass the test, an empty array will be returned.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var testArr = [1, 2, 3, 4, 5];
const filterVal = 3; // Value to remove

const filteredElements = testArr.filter(val =&amp;gt; (val != filterVal));
console.log(testArr); // Outputs [1, 2, 3, 4, 5]
console.log(filteredElements); // Outputs [1, 2, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h1&gt;
  
  
  03. Using Lodash ._remove() method
&lt;/h1&gt;

&lt;p&gt;&lt;a href=""&gt;Lodash&lt;/a&gt; is a popular Javascript utility library. You need to install and import it to use this solution.&lt;/p&gt;

&lt;p&gt;The _.remove() method removes all elements from array that predicate returns truthy for by manipulating the original array in place. &lt;a href="https://lodash.com/docs/4.17.15#remove"&gt;From Lodash Docs.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_.remove(array, function(n) {
    return // A boolean expression;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Return Value
&lt;/h2&gt;

&lt;p&gt;It returns an array of the removed elements.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var testArr = [1, 2, 3, 4, 5];
const filterVal = 3; // Value to remove

const filteredElements = _.remove(testArr, function(elem) {
    return elem === filterVal;
});
console.log(filteredElements); // Outputs [3]
console.log(testArr); // Outputs [1, 2, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h1&gt;
  
  
  04. Adding a native remove() method to Array.prototype using the splice() method
&lt;/h1&gt;

&lt;p&gt;To better understand this approach. There should be some familiarity with &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes"&gt;Javascript Object Prototypes&lt;/a&gt;. However, you may simply proceed with the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array.prototype.remove = function (index) {
    this.splice(index, 1);
};

var testArr = [1, 2, 3, 4, 5];
testArr.remove(2); // This will remove 3
console.log(testArr); // Outputs [1, 2, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;It is advised to name the custom methods being added to the object prototypes cautiously, since some external libraries may try to manipulate the object prototype their own way and may conflict with the names of methods added by the user.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Cover Photo By &lt;a href="https://unsplash.com/@brett_jordan?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Brett Jordan&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/scrabble?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>arrays</category>
    </item>
  </channel>
</rss>
