<?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: Andrew Usher</title>
    <description>The latest articles on DEV Community by Andrew Usher (@andrewusher).</description>
    <link>https://dev.to/andrewusher</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%2F594160%2Fa1922d07-5915-4525-b1c1-a0d985031eb0.jpeg</url>
      <title>DEV Community: Andrew Usher</title>
      <link>https://dev.to/andrewusher</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andrewusher"/>
    <language>en</language>
    <item>
      <title>Simplifying VSCode</title>
      <dc:creator>Andrew Usher</dc:creator>
      <pubDate>Mon, 12 Jun 2023 02:30:05 +0000</pubDate>
      <link>https://dev.to/andrewusher/simplifying-vscode-2mn</link>
      <guid>https://dev.to/andrewusher/simplifying-vscode-2mn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As a long-time user of Visual Studio Code (VSCode), I've accumulated a vast array of extensions, settings, and files that have made my workspace cluttered and overwhelming. I found myself spending more time searching for files and navigating through menus than actually coding. It was time for a change.&lt;/p&gt;

&lt;p&gt;In this blog post, I'll share my experience of cleaning up and simplifying my VSCode workspace. I'll discuss the steps I took to remove unused extensions, organize my files, customize settings, and use keyboard shortcuts and snippets to streamline my workflow. By the end of this post, you'll have a better understanding of how to optimize your workspace and improve your coding experience. So, let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Extensions I Removed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=codecrumbs.codecrumbs-vs-code"&gt;codecrumbs-vs-code&lt;/a&gt; - Never used it after the first few weeks of installing&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour"&gt;Codetour&lt;/a&gt; - Same as above&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost"&gt;Import Cost&lt;/a&gt; - I use Bundlephobia for this instead&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright"&gt;Playwright Test for VSCode&lt;/a&gt; - I use &lt;a href="https://playwright.dev/docs/test-ui-mode"&gt;Playwright's UI mode&lt;/a&gt; for this functionality now&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=pnp.polacode"&gt;Polacode&lt;/a&gt; - I use &lt;a href="https://ray.so/"&gt;ray.so&lt;/a&gt; instead now&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ReacTreeDev.reactree"&gt;ReacTree&lt;/a&gt; - Seemed cool when I looked at it, but I've never had a use case for it&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=SamuelCharpentier.remove-non-ascii-chars"&gt;Remove Non ASCII Chars&lt;/a&gt; - The linting tools I use already handles this&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Status Bar Sections Removed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Workspace Trust&lt;/li&gt;
&lt;li&gt;GitLens Commit Graph&lt;/li&gt;
&lt;li&gt;Problems&lt;/li&gt;
&lt;li&gt;Editor Selection&lt;/li&gt;
&lt;li&gt;Editor Indentation&lt;/li&gt;
&lt;li&gt;Editor Encoding&lt;/li&gt;
&lt;li&gt;Editor End of Line&lt;/li&gt;
&lt;li&gt;Editor Language Status&lt;/li&gt;
&lt;li&gt;Editor Language&lt;/li&gt;
&lt;li&gt;Prettier&lt;/li&gt;
&lt;li&gt;Feedback&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sidebar Icons Removed
&lt;/h2&gt;

&lt;p&gt;After years of use, the sidebar in VSCode can become cluttered with icons, making it difficult to navigate and find what you need. To simplify my workspace, I recently removed the below sidebar icons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run and Debug&lt;/li&gt;
&lt;li&gt;Extensions&lt;/li&gt;
&lt;li&gt;GitLab Workflow&lt;/li&gt;
&lt;li&gt;GitLens&lt;/li&gt;
&lt;li&gt;TODOs&lt;/li&gt;
&lt;li&gt;Bookmarks&lt;/li&gt;
&lt;li&gt;Accounts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, by removing unused extensions, status bar sections, and sidebar icons, as well as organizing files, customizing settings, and using keyboard shortcuts and snippets, I was able to simplify my VSCode workspace and improve my coding experience. It's important to regularly review and optimize your workspace to ensure that it remains efficient and clutter-free.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Updating from @sveltejs/kit@1.0.0-next.350 to @sveltejs/kit@1.0.0-next.403</title>
      <dc:creator>Andrew Usher</dc:creator>
      <pubDate>Sat, 06 Aug 2022 18:36:19 +0000</pubDate>
      <link>https://dev.to/andrewusher/updating-from-sveltejskit100-next350-to-sveltejskit100-next403-36b0</link>
      <guid>https://dev.to/andrewusher/updating-from-sveltejskit100-next350-to-sveltejskit100-next403-36b0</guid>
      <description>&lt;p&gt;TLDR: &lt;a href="https://github.com/AndrewUsher/qr-gen/commit/612b7c76710e662f8c9adab22f3753f459f2edb5"&gt;Here's the commit that I made all code changes in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recently updated the version of sveltekit I'm using for &lt;a href="https://qr-gen-murex.vercel.app/"&gt;qr-gen&lt;/a&gt;, and it was quite the experience :). There's not much documentation out there (at least that I could find), so I'm documenting what I needed to change here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update dependencies
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add @sveltejs/kit@latest @sveltejs/adapter-auto@latest &lt;span class="nt"&gt;--exact&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: if you're using any other packages under the &lt;code&gt;@sveltejs&lt;/code&gt; org, you'll likely need to update those as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add vite.config.js
&lt;/h2&gt;

&lt;p&gt;Next, I needed to create &lt;code&gt;vite.config.js&lt;/code&gt; in the root of the repo and add the svelte-kit plugin to the config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sveltekit&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@sveltejs/kit/vite&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="cm"&gt;/** @type {import('vite').UserConfig} */&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;sveltekit&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll also need to remove any configuration you have under the &lt;code&gt;kit.vite&lt;/code&gt; property in &lt;code&gt;svelte.config.js&lt;/code&gt;. &lt;a href="https://vitejs.dev/config/"&gt;Consulting the vite configuration docs&lt;/a&gt; should be helpful here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update API Routes to Use Uppercase Method Names
&lt;/h2&gt;

&lt;p&gt;Updating &lt;code&gt;export const post&lt;/code&gt; to &lt;code&gt;export const POST&lt;/code&gt; (and so forth for other request methods)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>svelte</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How To Use Default Function Parameter Values In JS</title>
      <dc:creator>Andrew Usher</dc:creator>
      <pubDate>Sun, 08 May 2022 00:21:17 +0000</pubDate>
      <link>https://dev.to/andrewusher/how-to-use-default-function-parameter-values-in-js-5229</link>
      <guid>https://dev.to/andrewusher/how-to-use-default-function-parameter-values-in-js-5229</guid>
      <description>&lt;p&gt;Function parameters are undefined by default in JavaScript. Sometimes, you want to define a default parameter in this case. Before &lt;a href="http://es6-features.org/#Constants"&gt;ES6&lt;/a&gt; (also known as ES2015), creating default paramaters was a little tedious:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;createName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jane&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;secondName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;createName&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Jane Doe&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the introduction of default parameter values in ES6, the above could be simplified to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;createName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jane&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;createName&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Jane Doe&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>NPM Needs: snarkdown</title>
      <dc:creator>Andrew Usher</dc:creator>
      <pubDate>Mon, 11 Apr 2022 02:22:11 +0000</pubDate>
      <link>https://dev.to/andrewusher/npm-needs-snarkdown-3l9b</link>
      <guid>https://dev.to/andrewusher/npm-needs-snarkdown-3l9b</guid>
      <description>&lt;h2&gt;
  
  
  What Is It?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;snarkdown&lt;/code&gt; is a barebones markdown parser with the sole purpose of converting markdown to HTML. This could be used in cases where you don't need a full fledged tool like &lt;a href="https://github.com/markedjs/marked"&gt;&lt;code&gt;marked&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://github.com/remarkjs/remark"&gt;&lt;code&gt;remark&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;snarkdown&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;snarkdown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;snarkdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;# Hello World&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;// '&amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  More Info
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Github Repo: &lt;a href="https://github.com/developit/snarkdown"&gt;developit/snarkdown&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author: &lt;a href="https://github.com/developit"&gt;Jason Miller&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>NPM Needs: pretty-bytes</title>
      <dc:creator>Andrew Usher</dc:creator>
      <pubDate>Sat, 09 Apr 2022 22:31:15 +0000</pubDate>
      <link>https://dev.to/andrewusher/npm-needs-pretty-bytes-4h56</link>
      <guid>https://dev.to/andrewusher/npm-needs-pretty-bytes-4h56</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Note: this was originally &lt;a href="https://andrewusher.dev/blog/npm-needs-pretty-bytes"&gt;posted on my personal site&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What Is It?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;pretty-bytes&lt;/code&gt; is a utility used to convert an integer form of bytes to a more human readable form (bytes to kilobytes, for example). &lt;code&gt;pretty-bytes-cli&lt;/code&gt; is a command line wrapper for the same package.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;prettyBytes&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pretty-bytes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="nx"&gt;prettyBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// '100 B'&lt;/span&gt;
&lt;span class="nx"&gt;prettyBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1650&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// '1.65 kB'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  More Info
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Github Repo: &lt;a href="https://github.com/sindresorhus/pretty-bytes"&gt;sindresorhus/pretty-bytes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author: &lt;a href="https://sindresorhus.com/"&gt;Sindre Sorhus&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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