<?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: Steven G. Harms</title>
    <description>The latest articles on DEV Community by Steven G. Harms (@sgharms).</description>
    <link>https://dev.to/sgharms</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%2F33170%2F9685302e-a45f-4095-a360-3c160205ca9a.jpeg</url>
      <title>DEV Community: Steven G. Harms</title>
      <link>https://dev.to/sgharms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sgharms"/>
    <language>en</language>
    <item>
      <title> Madeline Miller's Circe: Describing the sorcery of programming </title>
      <dc:creator>Steven G. Harms</dc:creator>
      <pubDate>Sun, 12 Jan 2020 01:57:45 +0000</pubDate>
      <link>https://dev.to/sgharms/madeline-miller-s-circe-describing-the-sorcery-of-programming-3f8b</link>
      <guid>https://dev.to/sgharms/madeline-miller-s-circe-describing-the-sorcery-of-programming-3f8b</guid>
      <description>&lt;p&gt;I've spent the better part of a decade teaching people to code and one of the hardest questions I've encountered is "What's it like when you're doing it right?" What's it like to know that this &lt;code&gt;class&lt;/code&gt; is too big? What's it like to not be sure you can learn a new framework "in time?" What's it like when you find the thing you needed, but which had eluded you, had been discovered a generation ago, but was forgotten, lain silent and fallow in a far off land?&lt;/p&gt;

&lt;p&gt;A great source for these metaphors is literature; the humanities. Far too often downplayed if not outright scoffed by the pedagogy and disciples of the Computer Science mainstream, fiction can provide us the metaphors of the shape of the feeling that most aptly applies. I found a number of wonderful passages about creating in Madeline Miller's examination of the Odyssey / Minoan Myths, &lt;em&gt;Circe&lt;/em&gt; (full review &lt;a href="https://stevengharms.com/books/2020-01-11-circe-by-madeline-miller/"&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Circe is a sorceress and her language for describing her craft rang exceedingly familiar to me for my own. Here are some metaphors that might serve you well too. Do a quick &lt;code&gt;s/(witchcraft|sorcery)/programming/g&lt;/code&gt; and you'll be surprised by how many of the quotes still apply.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let me say what sorcery is not: it is not divine power, which comes with a thought and a blink. It must be made and worked, planned and searched out, dug up, dried, chopped and ground, cooked, spoken over, and sung.  Even after all that, it can fail, as gods do not. If my herbs are not fresh enough, if my attention falters, if my will is weak, the draughts go stale and rancid in my hands (p. 83).&lt;/p&gt;

&lt;p&gt;Witchcraft is nothing but such drudgery (p. 84).&lt;/p&gt;

&lt;p&gt;Day upon patient day, you must throw out your errors and being again. So why did I not mind? Why did none of us mind (p. 84)?&lt;/p&gt;

&lt;p&gt;Then I learned that I could bend the world to my will, as a bow is bet for an arrow. I would have done that toil a thousand times to keep such power in my hands. I thought: this is how Zeus felt when he first lifted the thunderbolt (p. 84).&lt;/p&gt;

&lt;p&gt;Each spell was a mountain to be climbed anew. All I could carry with me from last time was the knowledge that it could be done (p. 85).&lt;/p&gt;

&lt;p&gt;I would like the whole business of it [loom-weaving], the simplicity and skill at once, the smell of the wood, the shush of the shuttle, the satisfying way weft stacked upon weft. It was a little like spell-work, I thought for your hands must be busy, and your mind sharp and free (p. 155).&lt;/p&gt;

&lt;p&gt;Of course not, he said, it has been hidden in the foundation, but look, there it is, plain as day. See the cracked beam? See the beetles eating the floor? See how the stone is sinking into the swamp?...When there is rot in the walls, there is only one remedy...Tear down, I thought. Tear down and build again (p. 192).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every creator knows these metaphors. I hope they provide you a sense of equanimity when considering where you and your code, your spells, fit within the great narrative of creating. Worse comes to worse, they're some great email signature quotes. :)&lt;/p&gt;

</description>
      <category>programming</category>
      <category>literature</category>
      <category>circe</category>
      <category>learningtocode</category>
    </item>
    <item>
      <title>Automating Development With Tasks in VSCode</title>
      <dc:creator>Steven G. Harms</dc:creator>
      <pubDate>Thu, 09 Jan 2020 15:53:31 +0000</pubDate>
      <link>https://dev.to/sgharms/automating-development-with-tasks-in-vscode-5a51</link>
      <guid>https://dev.to/sgharms/automating-development-with-tasks-in-vscode-5a51</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published: &lt;a href="https://stevengharms.com/posts/2020-01-08-automating-development-with-tasks-in-vscode/"&gt;https://stevengharms.com/posts/2020-01-08-automating-development-with-tasks-in-vscode/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A great feature that ships with VSCode is the "tasks" capability. I've not seen many developers use it, so I thought I'd document how it's made my life blogging with a statically-generated site simpler.&lt;/p&gt;

&lt;p&gt;Often, when doing any development, developers find themselves performing certain loops: drop to shell, run some command, capture output, paste output back into the editor, etc. Eventually most developers wind up curating a per-project set of shell aliases and functions to accelerate that loop. Perhaps the high-water mark for this behavior is the Rails framework which came with a task runner, &lt;code&gt;rake&lt;/code&gt;, by default.&lt;/p&gt;

&lt;p&gt;I'm glad to say that VSCode has a built-in &lt;a href="https://go.microsoft.com/fwlink/?LinkId=733558"&gt;task runner&lt;/a&gt; facility that can be leveraged to make whole series of routine tasks much more pleasant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Set Up
&lt;/h2&gt;

&lt;p&gt;We define tasks in a file called &lt;code&gt;project_home/.vscode/tasks.json&lt;/code&gt;. Think of each task as a "function" or a "method" in a programming language. It should do one shell operation. Much like functional programming, these small tasks can be composed together to create macro-level tasks.&lt;/p&gt;

&lt;p&gt;Here's one of my tasks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Publish to BLOG SITE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"shell"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rsync -azrP ${workspaceFolder}/public/ HOST:/web/server/directory"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"dependsOrder"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sequence"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"dependsOn"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="s2"&gt;"Push Images to servers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hugo Build"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"problemMatcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Start with the &lt;code&gt;dependsOn&lt;/code&gt;. When I run this task (which is available through VSCode's &lt;code&gt;Command-Shift-P&lt;/code&gt; menu), it first runs the tasks &lt;code&gt;"Push Images to servers"&lt;/code&gt; and &lt;code&gt;"Hugo Build"&lt;/code&gt;. The first synchronizes local assets I used to the production host, the second runs the static site generator and emits the processed site to &lt;code&gt;${workspaceFolder}/public&lt;/code&gt;. Then this task's &lt;code&gt;"command"&lt;/code&gt; runs and uses &lt;code&gt;rsync&lt;/code&gt; to send the completed web page content to the HOST. That's it!  The dependencies are run in order because of the &lt;code&gt;"dependsOrder"&lt;/code&gt; attribute being set to &lt;code&gt;"sequence"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I later decide to update the piece, no problem, simply run the command again.  By allowing me to stay in the editor I don't have to do the context switch out to make the content go live.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tooling</category>
      <category>editors</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Guide to Developing Chrome Context-Menu Applications</title>
      <dc:creator>Steven G. Harms</dc:creator>
      <pubDate>Wed, 04 Oct 2017 14:47:09 +0000</pubDate>
      <link>https://dev.to/sgharms/guide-to-developing-chrome-context-menu-applications-47c</link>
      <guid>https://dev.to/sgharms/guide-to-developing-chrome-context-menu-applications-47c</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I recently shipped the &lt;a href="https://chrome.google.com/webstore/search/amajson?hl=en-US"&gt;amaJSON Chrome extension&lt;/a&gt; and I believe I've come up with an improved process for understanding how to build similar applications.&lt;/p&gt;

&lt;p&gt;This tutorial will help you create a practical "context-menu" Event Page extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rni4o-Vv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://stevengharms.com/images/2017/09/amajson_in_work.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rni4o-Vv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://stevengharms.com/images/2017/09/amajson_in_work.png" alt="amaJSON Chrome Extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Extensions, Google has delivered (yet) another astounding technical platform with superior reference documentation. Nevertheless this documentation leaves delivery practices beyond a trivial proof of concept hard to determine or worse leaves the guidance to — "look at these examples." This guide fills in any gaps and attempts to move step-by-step.&lt;/p&gt;

&lt;p&gt;For beginners to programming there's also a meta-lesson in this post: how to approach programming to someone else's API. I'll describe my research methods and approach throughout the technical tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt; The reader is assumed to have proficiency with JavaScript and to have facility with core features / issues associated with the language particularly closures, callbacks, enclosed variables, and functions as first-class data. This tutorial will provide you opportunities to "put it on pause" and go learn about these concepts as well. So for those learning them, it provides practical applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading &lt;code&gt;diff&lt;/code&gt; Output; &lt;code&gt;git&lt;/code&gt; familiarity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Throughout this tutorial I'll post code as &lt;code&gt;diff&lt;/code&gt;s or make passing reference to core &lt;code&gt;git&lt;/code&gt; ideas ("branching" or "commits"). The ability to read a &lt;code&gt;diff&lt;/code&gt; is quite important so you can see what was removed and added. Knowledge of &lt;code&gt;git&lt;/code&gt;, while not strictly necessary to benefitting from this post will help contextualize the "steps" and, hopefully, cast light on good developer practice (or, at the very least, &lt;em&gt;my&lt;/em&gt; practice!).&lt;/p&gt;

&lt;p&gt;Code created in this tutorial can be found in the &lt;a href="https://github.com/sgharms/canned_responses"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please report &lt;a href="https://github.com/sgharms/canned_responses/issues"&gt;bugs / issues / "didn't work for me" there&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Posts
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="http://stevengharms.com/blog/2017/09/27/guide-to-developing-chrome-context-menu-applications-part-1/"&gt;Requirements and Project Definition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stevengharms.com/blog/2017/09/27/guide-to-developing-chrome-context-menu-applications-part-2/"&gt;Parsing the Google Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stevengharms.com/blog/2017/09/27/guide-to-developing-chrome-context-menu-applications-part-3/"&gt;Basic Page Action &amp;amp; Content Script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stevengharms.com/blog/2017/09/27/guide-to-developing-chrome-context-menu-applications-part-4/"&gt;Context Menu UI &amp;amp; Passing Canned Responses&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stevengharms.com/blog/2017/09/27/guide-to-developing-chrome-context-menu-applications-part-5/"&gt;Canned Responses in LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

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