<?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: Lisa Dean</title>
    <description>The latest articles on DEV Community by Lisa Dean (@lisadean).</description>
    <link>https://dev.to/lisadean</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%2F15435%2Fa3e1dcd1-431a-4cd2-97b9-e80935d19629.jpeg</url>
      <title>DEV Community: Lisa Dean</title>
      <link>https://dev.to/lisadean</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lisadean"/>
    <language>en</language>
    <item>
      <title>Static Code Analysis for Shell Scripts (or Protecting Yourself From Foot Guns)</title>
      <dc:creator>Lisa Dean</dc:creator>
      <pubDate>Fri, 22 Sep 2023 00:09:58 +0000</pubDate>
      <link>https://dev.to/lisadean/static-code-analysis-for-shell-scripts-or-protecting-yourself-from-foot-guns-14ih</link>
      <guid>https://dev.to/lisadean/static-code-analysis-for-shell-scripts-or-protecting-yourself-from-foot-guns-14ih</guid>
      <description>&lt;p&gt;I ran across &lt;a href="https://www.shellcheck.net/"&gt;ShellCheck&lt;/a&gt;, a static code analysis tool for shell scripts, the other day. Turns out there’s a &lt;a href="https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck"&gt;vscode extension&lt;/a&gt; for it, too.&lt;/p&gt;

&lt;p&gt;It's really helpful to point out where you should be double-quoting variable substitutions (or maybe you used a single quote because you thought it works the same) among many other &lt;a href="https://mywiki.wooledge.org/BashPitfalls"&gt;pitfalls&lt;/a&gt; in writing shell scripts.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nnAT9mmN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4k8fl8nlm5lggxcdp2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nnAT9mmN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4k8fl8nlm5lggxcdp2a.png" alt="ShellCheck example" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>shell</category>
    </item>
    <item>
      <title>Tired Of Typing Commonly Used URLs into Chrome’s Address Bar?</title>
      <dc:creator>Lisa Dean</dc:creator>
      <pubDate>Wed, 15 Sep 2021 22:50:18 +0000</pubDate>
      <link>https://dev.to/lisadean/tired-of-typing-commonly-used-urls-into-chrome-s-address-bar-2f5n</link>
      <guid>https://dev.to/lisadean/tired-of-typing-commonly-used-urls-into-chrome-s-address-bar-2f5n</guid>
      <description>&lt;p&gt;I found myself switching back and forth between several different repositories on GitHub over the course of an afternoon. I got very tired of typing &lt;code&gt;github.com/blahblahorgname/firstfewlettersofrepo&lt;/code&gt; or however many characters were needed for the repo to show up in the suggestion list and then arrowing down to the entry I needed. (Yes, I could have used the bookmark bar, but I hate using the mouse when my hands are already on the keyboard.)&lt;/p&gt;

&lt;p&gt;Hmm, surely there’s a better way, right? We &lt;strong&gt;HAVE&lt;/strong&gt; the technology.&lt;/p&gt;

&lt;p&gt;Turns out there is a better way. You can use the custom search engine feature in Chrome.&lt;/p&gt;

&lt;p&gt;Open Chrome Settings and search for ‘manage search engines’. Click on the result, scroll down to ‘Other search engines’, and click on the Add button.&lt;/p&gt;

&lt;p&gt;Type a description in the ‘Search engine’ field and what you want to use as your shortcut in the ‘Keyword’ field. In the ‘URL’ field, put the address you want your shortcut to go to and click the Add button. Ignore the note about ‘%s’ for now. I’ll talk about that in a bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YvpWm7Dc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519516-8044573a-5d60-48ad-859d-6ed4fb5028aa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YvpWm7Dc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519516-8044573a-5d60-48ad-859d-6ed4fb5028aa.png" alt="43C3A172-1FED-4584-AB95-98DE7DD60821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, type what you used for the keyword into the address bar and hit Enter. Success!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NxR2YZ3r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519538-a80258a9-2f37-47d5-8d31-1f1a351918db.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NxR2YZ3r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519538-a80258a9-2f37-47d5-8d31-1f1a351918db.png" alt="85C63B9D-CDD6-40BF-B7D0-6BC0D53D93D7"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, about that ‘%s’ thing — you &lt;strong&gt;can&lt;/strong&gt; actually use this for searching as intended. Perform a search like you would normally on a site and look at the url of the result.&lt;/p&gt;

&lt;p&gt;For instance, searching a GitHub repo for the word ‘chicken’ will take you to a url similar to this: &lt;code&gt;https://github.com/lisadean/TheWailingChicken/search?q=chicken&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s go back and add another search engine but now we’ll use the ‘%s’ replacement.&lt;/p&gt;

&lt;p&gt;For my shortcuts, I just used the same keyword but added an ’s’ onto the end of it. (The keywords have to be unique.) In the URL field, I entered &lt;code&gt;https://github.com/lisadean/TheWailingChicken/search?q=%s&lt;/code&gt;. Notice I replaced ‘chicken’ (the search term I used) with ‘%s’.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oPjygIhz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519550-bccf6098-43f3-4640-92ba-81c807746427.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oPjygIhz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519550-bccf6098-43f3-4640-92ba-81c807746427.png" alt="42581069-AF32-4002-B913-656DD2724908"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, after adding this new entry, you can go to your address bar, type in the new keyword and hit space or tab and the prompt will change to look something like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--45jVS7Yg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519559-14c7a459-7499-408a-aa84-347b81d8c3b8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--45jVS7Yg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/913697/133519559-14c7a459-7499-408a-aa84-347b81d8c3b8.png" alt="01925819-BD88-4CF2-AB56-898C5913C7FC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can enter your search term — I’m using ‘chicken’ again here — hit enter and it will perform a search and bring you to the results page.&lt;/p&gt;

&lt;p&gt;Removing friction and annoyances like these are the little things that make me happy. They really do add up over time!&lt;/p&gt;

&lt;p&gt;I found this little trick in an article full of other useful Chrome features you might not be aware of. Many of them I already knew about, some I didn’t. Might be worth a a read for you, too. &lt;a href="https://www.fastcompany.com/40557798/27-incredibly-useful-things-you-didnt-know-chrome-could-do"&gt;27 incredibly useful things you didn’t know Chrome could do&lt;/a&gt;&lt;/p&gt;

</description>
      <category>chrome</category>
      <category>productivity</category>
      <category>keyboard</category>
    </item>
    <item>
      <title>TIL: A Basic Thing about map()</title>
      <dc:creator>Lisa Dean</dc:creator>
      <pubDate>Thu, 08 Jul 2021 18:30:57 +0000</pubDate>
      <link>https://dev.to/lisadean/til-a-basic-thing-about-map-nc1</link>
      <guid>https://dev.to/lisadean/til-a-basic-thing-about-map-nc1</guid>
      <description>&lt;p&gt;So many times I learn or correct my knowledge of things when I'm doing code reviews. TIL that I was under the incorrect assumption that &lt;code&gt;map()&lt;/code&gt; would skip over &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt; array entries. I was wrong. It makes sense in hindsight. Especially since it's in the first line of the documentation. 🤦‍♀️&lt;/p&gt;

&lt;p&gt;&lt;a href="%5BArray.prototype.map()%20-%20JavaScript%20%7C%20MDN%5D(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)"&gt;MDN Docs&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;em&gt;map()&lt;/em&gt; method &lt;em&gt;creates a new array&lt;/em&gt; populated with the results of calling a provided function on every element in the calling array.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mapped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;was&lt;/span&gt; &lt;span class="nx"&gt;thinking&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="nx"&gt;would&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;was&lt;/span&gt; &lt;span class="nx"&gt;wrong&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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