<?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: Vishwa Jay</title>
    <description>The latest articles on DEV Community by Vishwa Jay (@vishwajay).</description>
    <link>https://dev.to/vishwajay</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%2F935830%2F7b4afbf5-ab6e-4257-842e-70f066509433.jpeg</url>
      <title>DEV Community: Vishwa Jay</title>
      <link>https://dev.to/vishwajay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishwajay"/>
    <language>en</language>
    <item>
      <title>Please Explain Passwords Like I'm Five</title>
      <dc:creator>Vishwa Jay</dc:creator>
      <pubDate>Mon, 10 Oct 2022 01:50:07 +0000</pubDate>
      <link>https://dev.to/vishwajay/explain-passwords-like-im-five-15ci</link>
      <guid>https://dev.to/vishwajay/explain-passwords-like-im-five-15ci</guid>
      <description>&lt;p&gt;While I was trying to create a new website (the hobby kind of site, not the business kind), I encountered a problem: user login.&lt;/p&gt;

&lt;p&gt;And yes, I'm a beginning coder. I need the five-year-old-level of this.&lt;/p&gt;

&lt;p&gt;My friend saw me code the more typical "one-uppercase, one-lowercase, one number, and one special character" version with a minimum of 12 characters. That that's when he hit me with both the US National Institute for Science and Technology (NIST) guidelines  guidelines (&lt;a href="https://specopssoft.com/blog/nist-800-63b/"&gt;800-63b&lt;/a&gt;) and XKCD comic about &lt;a href="https://xkcd.com/936/"&gt;Correct Horse Battery Staple&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But then someone else overheard, and sent me &lt;a href="https://blog.diogomonica.com/2014/10/11/password-security-why-the-horse-battery-staple-is-not-correct/"&gt;this rather awful slippery-slope straw-man article&lt;/a&gt;. And when I went to get the actual thinking behind each, I found there was more subjectivity than sound reasoning.&lt;/p&gt;

&lt;p&gt;The debate quickly devolved into each side calling the other side names like "idiot" and "fascist", while neither side really made its case (other than taking lots of time to show me "what ifs" and engage in slippery-slope, strawman, red herring, and various other fallacious arguments). &lt;/p&gt;

&lt;p&gt;So, what's the actual logic behind the answers? Can you please explain to me the actual thinking as if I'm five years old?&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
      <category>webdev</category>
      <category>security</category>
      <category>question</category>
    </item>
    <item>
      <title>Overcoming execCommand()</title>
      <dc:creator>Vishwa Jay</dc:creator>
      <pubDate>Sun, 02 Oct 2022 16:56:21 +0000</pubDate>
      <link>https://dev.to/vishwajay/overcoming-execcommand-24d5</link>
      <guid>https://dev.to/vishwajay/overcoming-execcommand-24d5</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Author's Note:&lt;/strong&gt; It's my very first article on Dev.to, so apologies in advance if I seem a bit outside the norm.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a relative beginner in javascript, I don't always know what's what. But what I do know is that my first real learning JS project was a text editor that made &lt;em&gt;extensive&lt;/em&gt; use of &lt;code&gt;execCommand()&lt;/code&gt;. But inevitably, everything that isn't 100% great dies out. And with that understanding, it wasn't a complete shock that &lt;code&gt;execCommand()&lt;/code&gt;'s API was being deprecated, and everyone was being told to move to the &lt;code&gt;Selection&lt;/code&gt; and &lt;code&gt;Range&lt;/code&gt; API's.&lt;/p&gt;

&lt;p&gt;Fully 90% (and probably more) of the web's WYSIWYG and text editors use &lt;code&gt;execCommand()&lt;/code&gt;. I wasn't able to find a single WYSIWYG project on GitHub that didn't make use of the &lt;code&gt;execCommand()&lt;/code&gt; API at some point in the code, except for those using Markdown (and even then, some part of the API was included in all but one of the cases). This isn't to say there isn't some great project I'm missing; it's merely pointing out the vast majority of the text-editing web runs on &lt;code&gt;execCommand()&lt;/code&gt;'s API, sometimes without even realizing it.&lt;/p&gt;

&lt;p&gt;One of the things I've noticed from those few who don't run with &lt;code&gt;execCommand()&lt;/code&gt; in their code is that there's a decided lack of "undo" at work. Meaning, that there isn't a &lt;em&gt;"detect if it's already there and undo the application of that particular command"&lt;/em&gt; feature. There's no command history. There's no equal functionality. And it's not that I think someone should come up with it in anything under two years. Rather, I think it would be an amazing gesture to come up with a replacement set of API's which didn't have so many random parts on it.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand"&gt;MDN's entry&lt;/a&gt; about &lt;code&gt;document.execCommand()&lt;/code&gt; there are lots of other APIs to replace it. But from the code perspective, it makes things more complicated, because we actually have to think about the code, and implement the things in our own unique ways. But there's no good answer out there as to a "best practices" kind of thing, so what we're looking at seems (from this end of time, at least) to be a time of uncertainty, where WYSIWYG editors are going to need vast amounts of overhaul and larger JS codebases to address what should have been simpler.&lt;/p&gt;

&lt;p&gt;And that's the point of this article: simplicity.&lt;/p&gt;

&lt;p&gt;If we're going to overcome something, we need it simpler than it is. We need to ensure that there's something akin to a "best practices" for WYSIWYG editors, so that they aren't unwieldy, insecure messes. The last thing we need is another amoeba, trying to be all things to all coders.&lt;/p&gt;

&lt;p&gt;But, being a beginner, I'm just one voice, and not a very loud one. My aim is to get us newbies to drive for simplicity (which is easier to secure, in most cases), to get us moving forward, and to actually, I don't know, &lt;em&gt;listen&lt;/em&gt; to people who have ideas that work, instead of trying to say why they won't before they're even tested.&lt;/p&gt;

&lt;p&gt;Because, ultimately, it's the results that demonstrate why something works or not. And it needs to be simple enough to not cause older machines to bend under the weight of new code.&lt;/p&gt;

&lt;p&gt;Just ask &lt;code&gt;execCommand()&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
