<?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: George Jempty</title>
    <description>The latest articles on DEV Community by George Jempty (@dexygen).</description>
    <link>https://dev.to/dexygen</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%2F67498%2F6f8614e5-adc2-4de8-9010-270e787eb338.jpeg</url>
      <title>DEV Community: George Jempty</title>
      <link>https://dev.to/dexygen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dexygen"/>
    <language>en</language>
    <item>
      <title>Why can't AUTOMATIC post throttling be instituted for new accounts</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Mon, 11 May 2020 11:44:52 +0000</pubDate>
      <link>https://dev.to/dexygen/why-can-t-automatic-post-throttling-be-instituted-for-new-accounts-33bg</link>
      <guid>https://dev.to/dexygen/why-can-t-automatic-post-throttling-be-instituted-for-new-accounts-33bg</guid>
      <description>&lt;p&gt;I hadn't posted anything in 3 months until today, AND IT WAS THE SAME THING ALL OVER AGAIN.  When I was posting more regularly about 3-6 months ago, more than once I complained about new users spamming tags such as Vue or PHP with dozens of submissions within days of joining the site.&lt;/p&gt;

&lt;p&gt;So I post something in the Go tag this morning, then navigate to the tag for the page, and somebody who joined the site less than a week ago is spamming the tag, including several posts in just the past 24 hours.  &lt;/p&gt;

&lt;p&gt;It is not fair to others to have their content pushed down.  I brought up the need for automatic throttling a few months ago, I even offered to help, but that didn't get prioritized.&lt;/p&gt;

&lt;p&gt;Until it does get prioritized, I'll hardly considering using this platform any more.&lt;/p&gt;

</description>
      <category>abuse</category>
      <category>discuss</category>
    </item>
    <item>
      <title>First SO Go Question 😜</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Mon, 11 May 2020 11:27:48 +0000</pubDate>
      <link>https://dev.to/dexygen/first-so-go-question-2i6f</link>
      <guid>https://dev.to/dexygen/first-so-go-question-2i6f</guid>
      <description>&lt;p&gt;Have been working with Go for a few weeks now and have finally posted a question to Stack-overflow.  I've got a work around but would like to know a better way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/61728420/would-like-to-work-with-same-file-content-passed-to-library-without-opening-fil"&gt;https://stackoverflow.com/questions/61728420/would-like-to-work-with-same-file-content-passed-to-library-without-opening-fil&lt;/a&gt; (without opening file twice)&lt;/p&gt;

</description>
      <category>stackoverflow</category>
      <category>go</category>
    </item>
    <item>
      <title>Two ways to determine if any arrays in an object has an entry</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Mon, 03 Feb 2020 15:55:26 +0000</pubDate>
      <link>https://dev.to/dexygen/two-ways-to-determine-if-any-arrays-in-an-object-has-an-entry-1l2g</link>
      <guid>https://dev.to/dexygen/two-ways-to-determine-if-any-arrays-in-an-object-has-an-entry-1l2g</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let pendingAdditions = {
  hospitals: ['Silencio Hospital','St Judes'],
  licenses: ['poe-tic license'],
  medschools: []
}

let somePendingAdditions = Object.values(pendingAdditions).some(arr =&amp;gt; arr.length);
console.log(somePendingAdditions); // true
somePendingAdditions = 
    Boolean(Array.prototype.concat.apply([], Object.values(pendingAdditions)).length);
console.log(somePendingAdditions); // true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Pitfalls regarding the second approach noted at: &lt;a href="https://stackoverflow.com/questions/60042666/how-to-determine-if-any-arrays-in-an-object-has-an-entry/"&gt;https://stackoverflow.com/questions/60042666/how-to-determine-if-any-arrays-in-an-object-has-an-entry/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Javascript: When Less is More</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Tue, 14 Jan 2020 01:53:24 +0000</pubDate>
      <link>https://dev.to/dexygen/javascript-when-less-is-more-4m02</link>
      <guid>https://dev.to/dexygen/javascript-when-less-is-more-4m02</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pJpChPl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/PCCSqaG.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pJpChPl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/PCCSqaG.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NOTE: I have added the regex tag based on help I got on Stackoverflow in the few hours since writing this, please see my comment, the first, below (I didn't think it warranted a whole separate sequel/post).  Regex's could well be "The King of Less is More" 👑 &lt;/p&gt;




&lt;p&gt;ALSO ADDING VUE TAG: I since realized that a post of mine from a week ago regarding nesting Vue methods also falls into the "less is more" category.  See &lt;a href="https://dev.to/dexygen/grouping-related-methods-together-in-an-object-in-vue-1ie0"&gt;https://dev.to/dexygen/grouping-related-methods-together-in-an-object-in-vue-1ie0&lt;/a&gt; or for the tl;dr just go here: &lt;a href="https://stackoverflow.com/a/59614452/34806"&gt;https://stackoverflow.com/a/59614452/34806&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;In 2017 when my title was Application Developer IV I stumbled across some code written by an Application Developer III (so I was one level senior and I think it was the kind of place that tied those titles to your pay grade) such as the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (foo === 'bar') {
  return true;
}
else {
  return false;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It had been probably a decade since I'd ever written anything like that, I hope he brought other redeeming qualities to the table, because if he did that with any regularity, I was certainly at least 2 levels senior to him, in my opinion.  Of course that should be re-written in the following "less is more" fashion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return foo === 'bar';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A related example is as follows.  You might be returning a particular value from within an if statement, and if the condition is not met, you otherwise return false.  Here's the first potentially unnecessarily long way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (foobarbaz) {
   return foo === 'bar';
}
else {
   return false;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Unless you need to do some processing within the else block, it isn't strictly necessary and you could write it like as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (foobarbaz) {
   return foo === 'bar';
}

return false;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Indeed I started writing code such as the above just this morning.  However, unless you are explicitly testing the return value with &lt;code&gt;===false&lt;/code&gt;, even &lt;code&gt;return false&lt;/code&gt; is unnecessary, as a function will otherwise implicitly return the falsy undefined, in which case we could potentially tighten up the code even further with the following as the last statement of a function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (foobarbaz) return foo === 'bar;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For the current user story I'm working on I've probably written a couple of things in a "less is more" fashion, but the following didn't start out that way but rather as your typical if/else construct, not unlike the code I disparaged above 😜  By the way, below is how I tend to write legible ternary statements if they become too long, but maybe because it's spread over more lines you don't think this is a case of "less is more"?  Except that it's one statement, and the "lines of code" (LOC) metric is, in my opinion, ridiculous.  In fact, particularly when I'm maintaining code, I'm usually shrinking the size of the code base, yet I digress; rather the point is, the following is arguably better than using if/else's:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;toggleShowAttachmentsPanel() {
  // Keep panel open as long as there are attachments
  this.attachments.showPanel = this.attachments.showPanel ? 
    this.attachments.selected.length !== 0 
    : 
    true;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Also note that, since this is not your typical toggle function &lt;br&gt;
(&lt;code&gt;showPanel = !showPanel&lt;/code&gt;) I added a comment.&lt;/p&gt;

&lt;p&gt;One last example, I don't know what the alternative might be as I've been doing this for so long, in fact since implementing something akin to Promise.all at the beginning of last decade.  And in fact I was doing something similar to back then, making XHR calls in a loop.  We've mostly been using &lt;code&gt;axios.all&lt;/code&gt; for this, but this was trickier in that they weren't distinct calls to separate endpoints, but rather consecutive calls to the same endpoint, with different parameters on each call, and I just didn't have the time to figure out how to make that work (I've been on this story over the course of parts of 2 sprints 😢) and we already had some existing jQuery code that I was converting that did the same thing in a loop, so I took the path of least resistance.&lt;/p&gt;

&lt;p&gt;First I set a variable equal to the length of the array I'd be iterating over:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// will get decremented until reaching 0 when this.sendEmail() will be called
let attachmentUploadsPending = this.attachments.selected.length;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Again, notice the comment; I think it makes it easier to understand how I then perform a "count-down" from that value within &lt;code&gt;axios.then&lt;/code&gt;: I use logical not (!) against the value returned by the &lt;em&gt;prefix&lt;/em&gt; form of the decrement operator (--) (&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Decrement"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Decrement&lt;/a&gt;), logical not of course returning true for 0, since 0 is falsy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (!--attachmentUploadsPending) this.sendEmail();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I hope I haven't rambled on too much, ironically that would go against the "less is more" principle.  But bedtime is fast approaching, and as Mark Twain is accredited to have said/written: "I didn't have time to write a short letter, so I wrote a long one instead.": &lt;a href="https://www.goodreads.com/quotes/21422-i-didn-t-have-time-to-write-a-short-letter-so"&gt;https://www.goodreads.com/quotes/21422-i-didn-t-have-time-to-write-a-short-letter-so&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>regex</category>
      <category>vue</category>
    </item>
    <item>
      <title>Find the Easter Egg in my Resume's "Summary/Skills" Header Section</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Mon, 13 Jan 2020 00:06:03 +0000</pubDate>
      <link>https://dev.to/dexygen/find-the-easter-egg-in-my-resume-s-summary-skills-header-section-4338</link>
      <guid>https://dev.to/dexygen/find-the-easter-egg-in-my-resume-s-summary-skills-header-section-4338</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Co5_llC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/x0966yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Co5_llC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/x0966yo.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>humor</category>
      <category>fun</category>
      <category>resume</category>
    </item>
    <item>
      <title>Implementing Javascript Objects with Multi-part Keys</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Fri, 10 Jan 2020 12:13:01 +0000</pubDate>
      <link>https://dev.to/dexygen/implementing-javascript-objects-with-multi-part-keys-4dop</link>
      <guid>https://dev.to/dexygen/implementing-javascript-objects-with-multi-part-keys-4dop</guid>
      <description>&lt;p&gt;If you've done Javascript development for any period of time, you've likely encountered a situation where you've wanted the key for an object to be composed of multiple values.  I've googled for relevant Javascript examples but they all seem to come up with associating multiple values with one key, that's not what I mean.&lt;/p&gt;

&lt;p&gt;Rather, perhaps you want to compose an Object key from the values "foo" and "bar".  A naive approach might be to concatenate the values with a delimiter unlikely to appear in the string, for instance the tilde, in which case you might create the key: "foo~bar".&lt;/p&gt;

&lt;p&gt;Depending on the data though there could be the possibility that one of the values needed for the key could contain the delimiter you have chosen, and this will make it difficult to use the object's keys for some subsequent purpose, e.g if you thought you'd have a two-part key, and split it on the delimiter, you could end up with more than two values.  Luckily there is another solution...&lt;/p&gt;

&lt;p&gt;Put the values for the multi-part key into an array, then call &lt;code&gt;JSON.stringify&lt;/code&gt; on it, and use the result for the array key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const key = JSON.stringify(['foo','bar']); // '["foo","bar"]'

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you don't care about the order and want to treat &lt;code&gt;['bar', 'foo']&lt;/code&gt; the same way as &lt;code&gt;['foo', 'bar']&lt;/code&gt;, sort the array you pass to &lt;code&gt;JSON.stringify&lt;/code&gt;: &lt;code&gt;['foo','bar'].sort()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;See the following answer I posted on StackOverflow this morning using this technique: &lt;a href="https://stackoverflow.com/a/59680851/34806"&gt;https://stackoverflow.com/a/59680851/34806&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>2020 Things Every Dev Must Know for 2020</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Thu, 09 Jan 2020 19:44:59 +0000</pubDate>
      <link>https://dev.to/dexygen/2020-things-every-dev-must-know-for-2020-548d</link>
      <guid>https://dev.to/dexygen/2020-things-every-dev-must-know-for-2020-548d</guid>
      <description>&lt;p&gt;The same 2020 things you should have known on Dec. 31 2019&lt;/p&gt;

</description>
      <category>humor</category>
      <category>fun</category>
    </item>
    <item>
      <title>Grouping Related Methods Together in an Object in Vue</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Tue, 07 Jan 2020 18:00:28 +0000</pubDate>
      <link>https://dev.to/dexygen/grouping-related-methods-together-in-an-object-in-vue-1ie0</link>
      <guid>https://dev.to/dexygen/grouping-related-methods-together-in-an-object-in-vue-1ie0</guid>
      <description>&lt;p&gt;tl;dr: &lt;a href="https://stackoverflow.com/a/59614452/34806"&gt;https://stackoverflow.com/a/59614452/34806&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When first working with AngularJS about 6 years ago I was a bit distrurbed by the the lack of organization allowed within &lt;code&gt;$scope&lt;/code&gt; --- both attributes and methods could be added anywhere in any order.  So I asked the following question on stackoverflow: &lt;a href="https://stackoverflow.com/q/21285627/34806"&gt;https://stackoverflow.com/q/21285627/34806&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In reply I not only got validation for my design, but also informed of an important, if esoteric reason, for why my idea was a good one in a way I'd not even thought of.  When I moved to Vue years later, this was one of the improvements that I recognized: data was in &lt;code&gt;data&lt;/code&gt; and methods in &lt;code&gt;methods&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Sometimes though you might like to further organize your Vue methods.  For instance, if all handlers could reside within an &lt;code&gt;on&lt;/code&gt; object, then it would be a matter of looping over them to nullify them in a beforeDestroy/destroyed hook lifecycle method (but be careful as noted here: &lt;a href="https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712"&gt;https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;There are a number of attempts at solving this given at: &lt;a href="https://stackoverflow.com/questions/36108953/is-it-possible-to-nest-methods-in-vue-js-in-order-to-group-related-methods/"&gt;https://stackoverflow.com/questions/36108953/is-it-possible-to-nest-methods-in-vue-js-in-order-to-group-related-methods/&lt;/a&gt; but IMO not of them is particularly clean.  My idea is to not add this object containing methods, to &lt;code&gt;methods&lt;/code&gt;, but rather, to declare them in the &lt;code&gt;created&lt;/code&gt; hook:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;created() {
  this.on = {
    test: () =&amp;gt; {console.log(this)}
  }
  this.on.test();
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;See this codepen &lt;a href="https://codepen.io/dexygen/pen/povpxqy"&gt;https://codepen.io/dexygen/pen/povpxqy&lt;/a&gt; and open developer tools to see what gets logged.&lt;/p&gt;

</description>
      <category>vue</category>
    </item>
    <item>
      <title>Where can I find a list of *all* dev.to's tags</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Mon, 06 Jan 2020 02:01:47 +0000</pubDate>
      <link>https://dev.to/dexygen/where-can-i-find-a-list-of-all-dev-to-s-tags-53aj</link>
      <guid>https://dev.to/dexygen/where-can-i-find-a-list-of-all-dev-to-s-tags-53aj</guid>
      <description>&lt;p&gt;Maybe I'm over-looking something obvious, but when I search I only find the page with the &lt;em&gt;top 100&lt;/em&gt; tags (&lt;a href="https://dev.to/tags"&gt;https://dev.to/tags&lt;/a&gt;) but I'm wondering where I can find &lt;em&gt;all&lt;/em&gt; the tags, thanks&lt;/p&gt;

</description>
      <category>meta</category>
      <category>help</category>
    </item>
    <item>
      <title>dev.to posts tagged 'beginners' considered harmful</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Tue, 31 Dec 2019 22:26:59 +0000</pubDate>
      <link>https://dev.to/dexygen/dev-to-posts-tagged-beginners-considered-harmful-2hjd</link>
      <guid>https://dev.to/dexygen/dev-to-posts-tagged-beginners-considered-harmful-2hjd</guid>
      <description>&lt;p&gt;About 10 years ago I made my transition from full-stack web developer (though the term wasn't in use at the time) to front-end-focused.  I had no prior ExtJS experience but was hired on the strength of my Javascript experience in general.&lt;/p&gt;

&lt;p&gt;Prior to my first day I bought a book on ExtJS.  I could not have succeeded at that position the way I did if not for the book, but still it contained at least one glaring mistake -- it referred to the configuration object literal used to create an ExtJS instance, as JSON.&lt;/p&gt;

&lt;p&gt;What's the harm?  Well to this date you will see questions on StackOverflow where the uninitiated think any old Javascript object is JSON and can't understand why parsing a string representation of the same fails.&lt;/p&gt;

&lt;p&gt;Just within the past 7 days I started writing on dev.to again, after a hiatus stretching back to February.  One of the more recent posts has to do with not blindly following the suggestions of &lt;em&gt;known experts&lt;/em&gt;: &lt;a href="https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712"&gt;https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well I'm seeing content in dev.to's beginners tag that is far more egregiously wrong than that ExtJS book about JSON, or LinusBorg about removing event listeners in Vue.js instances' destroyed hooks.  Remember beginners, &lt;em&gt;anybody&lt;/em&gt; can post &lt;em&gt;anything&lt;/em&gt; on dev.to and unlike books for instance, it is &lt;em&gt;not&lt;/em&gt; curated.  Therefore I implore you, everything that you read targeting beginners on this platform, do so with a critical eye -- don't simply trust it to be correct.&lt;/p&gt;

&lt;p&gt;Interestingly it is ironic that, the beginners being targeted are at the "don't know but know that they don't know" stage of their accrual of expertise, and that is why they are reading these articles, to try to learn more.  But as long as the beginner's content is not curated (and I have now come to believe that it absolutely should be), you will have content authored by those who "don't know, and don't know that they don't know", which is at the previous, initial, stage.&lt;/p&gt;

&lt;p&gt;There's even a term for "don't know and don't know that they don't know", Dunning-Kruger effect: &lt;a href="https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect"&gt;https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last two stages are "know but don't know that you know" and "know and know that you know".  I like to think that depending on the technology involved I'm at the 2nd, 3rd or 4th step.  Or that if I am at the 1st step, I can at least be disabused of my ignorance through logical argument.  I suspect however that those suffering from the Dunning-Kruger effect probably cannot be persuaded.&lt;/p&gt;

&lt;p&gt;Yet I digress.  My main point is, to reiterate, that beginners need to read everything critically; research what you read and/or seek out clarification from other seeming experts.&lt;/p&gt;

</description>
      <category>beginners</category>
    </item>
    <item>
      <title>Hexadecimal addition in a MAC address context</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Sun, 29 Dec 2019 17:56:19 +0000</pubDate>
      <link>https://dev.to/dexygen/hexadecimal-addition-in-a-mac-address-context-9dk</link>
      <guid>https://dev.to/dexygen/hexadecimal-addition-in-a-mac-address-context-9dk</guid>
      <description>&lt;p&gt;I don't answer a lot of StackOverflow questions any more, they are mostly so specialized, or when they are something I can answer a lot of the time while I'm composing my answer, two or three new answers are posted all similar to my intended answer.  On the other hand sometimes when I truly do want to answer I cannot do so at that very moment, for I'm at work, or, as was the case last night, was out with my wife for the evening with only my tablet which IMO is hardly sufficient for writing a properly tested SO answer with, though your experience may be different.&lt;/p&gt;

&lt;p&gt;In any case, I often mark such questions as favorites and then review later at a more convenient time, which is what I did with last night's.  I won't go into the details here, it's all in the StackOverflow post, so the link follows.  My answer doesn't do a &lt;em&gt;lot&lt;/em&gt; that's different from the others though, biased as I am, I like to think of it as a clean synthesis of those ideas that uses some more modern Javascript techniques than the others.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/59515305/incrementing-hexadecimal-string-from-mac-address/59521438#59521438"&gt;https://stackoverflow.com/questions/59515305/incrementing-hexadecimal-string-from-mac-address/59521438#59521438&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Actually for the sake of being more complete and not forcing readers to follow the above link, here's my code, though you may still need to refer to the question for the requirements.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const macAddrs = [
  '84:1D:A2:B9:A3:D0',
  '84:1D:A2:B9:A3:99',
  '84:1D:A2:B9:A3:AF',
  '84:1D:A2:B9:A3:FF'
];

const addrsIncr = macAddrs.map(addr =&amp;gt; {
  let addrPrefix = addr.slice(0, 15); // everything up to and including last colon
  let modulusIncrLastOctet = (parseInt(addr.slice(15), 16) + 1) % 256; // converts FF to 01
  return addrPrefix + modulusIncrLastOctet.toString(16).padStart(2, 0).toUpperCase();
});
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>LinusBorg's (nor Other Expert's) Advice Not to be Followed Blindly</title>
      <dc:creator>George Jempty</dc:creator>
      <pubDate>Thu, 26 Dec 2019 23:04:34 +0000</pubDate>
      <link>https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712</link>
      <guid>https://dev.to/dexygen/linus-borg-s-nor-other-expert-s-advice-not-to-be-followed-blindly-1712</guid>
      <description>&lt;p&gt;I started working with Vue.js in 2017, and based on the profile I used at the time I see I posted thrice during my first 2 months.  And LinusBorg (&lt;a href="https://forum.vuejs.org/u/linusborg/summary"&gt;https://forum.vuejs.org/u/linusborg/summary&lt;/a&gt;), a core Vue.js team member, responded every time.&lt;/p&gt;

&lt;p&gt;Ironically though, I never gleaned anything Vue-specific from his responses to apply to my problems, but rather, unknown to him, he turned out to be my "rubber duck" (&lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging"&gt;https://en.wikipedia.org/wiki/Rubber_duck_debugging&lt;/a&gt;).  He still helped me, it's just that in the end my issues never really were Vue-specific.&lt;/p&gt;

&lt;p&gt;I was new to Vue at the time and other members already on the team when I joined had a bit of a head-start on me.  Those other team members conveyed that it was best practice to remove event listeners in the beforeDestroy or destroyed life-cycle hooks, so we adopted that technique.&lt;/p&gt;

&lt;p&gt;Months later though when I was mired in defect-remediation 95% of the time due to a business decision to change the back-end but shorten the deadline, one defect kept me busy for an entire day give or take, until I traced it back to event listeners being removed.  The issue was that we had multiple components of a particular type on the page, and they could be added and removed, but when any single one of them got removed, the event listeners were removed for all of them :(&lt;/p&gt;

&lt;p&gt;Within the last week while googling I found the following post of LinusBorg's on the Vue forum (&lt;a href="https://forum.vuejs.org/t/adding-eventlistener-on-mounted/3337/3"&gt;https://forum.vuejs.org/t/adding-eventlistener-on-mounted/3337/3&lt;/a&gt;) wherein he stated, in 2016, that "you should simply use the destroyed() hook to remove the listener when the component is destroyed".  Which made me wonder if my team members had possibly seen this?&lt;/p&gt;

&lt;p&gt;So be careful about removing those event listeners in your beforeDestroy/destroyed hooks.  And also when following expert advice, do so with a critical eye.&lt;/p&gt;

</description>
      <category>vue</category>
    </item>
  </channel>
</rss>
