<?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: Mindy Zwanziger</title>
    <description>The latest articles on DEV Community by Mindy Zwanziger (@mindyzwan).</description>
    <link>https://dev.to/mindyzwan</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%2F215807%2F0c69d249-e5ea-420b-9c18-b6ae147cd0e9.JPG</url>
      <title>DEV Community: Mindy Zwanziger</title>
      <link>https://dev.to/mindyzwan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mindyzwan"/>
    <language>en</language>
    <item>
      <title>Models - Oversimplified</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Mon, 10 Feb 2025 23:50:57 +0000</pubDate>
      <link>https://dev.to/mindyzwan/models-oversimplified-5gk3</link>
      <guid>https://dev.to/mindyzwan/models-oversimplified-5gk3</guid>
      <description>&lt;p&gt;Generally writing this for my own benefit as I'm diving into Natural Language Processing (NLP) for a current project. In the era of AI, folks throw around the term "model" and my mind (even as a certified math person™) replaces that with &lt;code&gt;&amp;lt;vague mathy, computer-sciencey magic thingamajig&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But I wanted to understand it a little more and did a little digging. My current understanding can be narrowed down to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a set of test data&lt;/li&gt;
&lt;li&gt;a set of features (things about the data - like "is capitalized")&lt;/li&gt;
&lt;li&gt;a set of weights (numbers between 0 to 1) for each feature&lt;/li&gt;
&lt;li&gt;a loop where the program makes a guess, changes the weights, and tries again - millions of times until it gets it right enough that it's worthwhile to keep around&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Concretely, if you were implementing NLP you might have categories that define a word as being a person, an organization, or a location.&lt;/p&gt;

&lt;p&gt;So you'd get some basic features like the below:&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="nx"&gt;word_features&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;is_capitalized&lt;/span&gt;&lt;span class="dl"&gt;"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;previous_word&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="s2"&gt;new&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="s2"&gt;next_word&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="s2"&gt;announced&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="s2"&gt;is_followed_by_Inc&lt;/span&gt;&lt;span class="dl"&gt;"&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you might start off with random weights and then, through the loops (this is the "training" part of creating a model), it'd eventually get to something like this:&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="nx"&gt;weights&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;is_capitalized&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ORG&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// High, most organizations are capitalized&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PERSON&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// ...same for person names&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;LOC&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.6&lt;/span&gt;     &lt;span class="c1"&gt;// Somewhat high for locations - as some are capitalized and some aren't like "school" vs "Fred Meyer"&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;previous_word&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;new&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ORG&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// etc... for the rest of the categories and features&lt;/span&gt;
       &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, of course, there's some probability mathy mathness in there that looks at all the weights across all the features and decides which category is most probable. &lt;/p&gt;

&lt;p&gt;Makes me think of those personality tests I took in middle school: "if you answered mostly C, you're a sporty tortoise"! Though I suspect it's more complicated than that.  &lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>First Year Retro</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Tue, 23 Feb 2021 23:48:48 +0000</pubDate>
      <link>https://dev.to/mindyzwan/first-year-retro-1jn3</link>
      <guid>https://dev.to/mindyzwan/first-year-retro-1jn3</guid>
      <description>&lt;p&gt;I've just wrapped up my first year as a professional software engineer. It's been quite a ride - a little chaotic at times, but full of good as well. &lt;/p&gt;

&lt;p&gt;As an intro, I'm a career-changer who took a very circuitous path to get to where I am today. The outline version of my story involves graduating with a double major in math and math education, spending three years exploring a variety of odd jobs, teaching middle and high school math for two years, and then working as an admin at a civil engineering firm for four more years. &lt;/p&gt;

&lt;p&gt;I started looking into coding because a coworker's partner who worked as a software engineer encouraged me to try it out. I dabbled for a few weeks until deciding to attend an online code school called Launch School. About halfway through the program, I attended an &lt;a href="https://act-w.org/" rel="noopener noreferrer"&gt;ACT-W&lt;/a&gt; conference (Advancing the Careers of Technical Women) and met an engineer there who offered to meet up with me and help me find and communicate the value of my non-tech experience in the context of a particular job opening at New Relic. I applied for that position and (unsurprisingly) didn't get that first job, but it did kickstart my job search. &lt;/p&gt;

&lt;p&gt;Before this becomes a retro on my job hunting experience (TLDR: it was unpleasant), I'll fast forward a bit. I was offered a position as an "Application Engineer Trainee" at a small company (Sitka Technology Group) that worked with folk in the natural resource management field. The position would last at most 6 months and could lead to a permanent role as a Junior Engineer on their team. It did lead to a new role, but it wasn't permanent - because I was offered a position in the &lt;a href="https://blog.newrelic.com/product-news/ignite-hiring-early-career-engineers/" rel="noopener noreferrer"&gt;Ignite program&lt;/a&gt; back at New Relic and couldn't pass up that opportunity. &lt;/p&gt;

&lt;p&gt;My cohort couldn't participate in the traditional Ignite program (COVID), and instead, I was placed directly on a team. That’s where I am now, and I’m happily chugging along. So without further ado...&lt;/p&gt;

&lt;h2&gt;
  
  
  What's gone well
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning a new language/framework/etc...&lt;/strong&gt;&lt;br&gt;
At Sitka, we used C#, .NET, MySQL, and AngularJS - none of which I'd used before. I picked it up without much trouble which was a definite confidence boost. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;My team(s)&lt;/strong&gt;&lt;br&gt;
I've had the fortunate experience of working with really supportive folk. People have always been encouraging and willing to step in to either pair or mob our way to answers. I've never felt discouraged from asking questions or seeking out help. Special props to my current team who are some of the most affirming folk I've ever worked with. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Challenging work&lt;/strong&gt;&lt;br&gt;
My brain hurts regularly and I'm happy about it. Most of the time. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rhythms of engineering work&lt;/strong&gt;&lt;br&gt;
The daily/weekly/monthly rhythms of engineering work suit me well. It's a great combo of meetings/collaborative work and solo, heads-down time. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Focus on growth is multi-faceted&lt;/strong&gt;&lt;br&gt;
Engineering isn't purely about technical ability and the teams and managers I've worked with have been all about incorporating and encouraging growth in core (aka "soft") skills along with technical expertise. I can't get enough of that stuff. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supporting other career-changers&lt;/strong&gt;&lt;br&gt;
This transition was hard and I wouldn't have made it without the support and encouragement of a lot of people who are actively engaged in making the tech world a better place. Friends and mentors from &lt;a href="https://the-collab-lab.codes/" rel="noopener noreferrer"&gt;The Collab Lab&lt;/a&gt;, &lt;a href="https://www.agilepdx.org/" rel="noopener noreferrer"&gt;Agile PDX&lt;/a&gt;, and the &lt;a href="https://www.meetup.com/Portland-JR-DEVELOPER-Meetup/" rel="noopener noreferrer"&gt;PDX Junior Developers Group&lt;/a&gt;, I'm looking at you! I've started being able to give back to these communities and that brings me so much joy. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's not gone well
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loneliness&lt;/strong&gt;&lt;br&gt;
At various times over the past year, there have been times in this pandemic-ridden land where I've felt I was on my own, just fighting to keep moving forward. I think this was inevitable, despite the efforts of the wonderfully supportive folk around me. #yaycovid&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Imposter syndrome&lt;/strong&gt;&lt;br&gt;
This is actually a recent development for me. For the first 9 months or so, I was just like "I'm new, I don't know anything and that's okay!" but now that I'm not so new, I get to battle with the feeling that I should already know _____ (fill in the blank). It's silly because I don't expect other people to know everything, but you know - I have to be perfect *rolls eyes*&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Surprises
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Different companies, different roles&lt;/strong&gt;&lt;br&gt;
My work at Sitka was significantly different from my work at New Relic. I simultaneously expected this (small vs big company, a different type of product, etc...) and was surprised at how different it really could be.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;I knew more than I thought I did&lt;/strong&gt;&lt;br&gt;
While building projects on my own, I always assumed there was a better way to do literally everything I was doing. Now that I've seen a lot more examples of professional code, I realize the work I'd done previously was actually perfectly fine. Room for improvement? Absolutely. But nowhere near as bad as I thought it was! &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Action items (current goals)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Knowledge sharing&lt;/strong&gt;&lt;br&gt;
I get in my own way a lot by assuming folk don't want to hear what I have to say. I'm working towards being more vocal and contributing more to my team, my company, and the industry in general.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mentoring&lt;/strong&gt;&lt;br&gt;
I've been fortunate to have folk come alongside and support me as mentors. It made (and is making) a world of difference. I want other folk to have that same benefit. So I've signed up as a mentor with The Collab Lab and am also always on the lookout for impromptu/on-the-spot mentoring opportunities in my community. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technical depth&lt;/strong&gt;&lt;br&gt;
There's so much to learn and understand! I'm participating in technical book clubs, constantly asking questions, and taking on new roles and tasks where I can. So much learning happens automatically with my current role but making concerted efforts to gain contextual or tangential knowledge has also been helpful. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So here we go, on to year two! Code well, my friends!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>career</category>
      <category>womenintech</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Ohhh, a SIGTERM signal!</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Mon, 12 Oct 2020 22:46:46 +0000</pubDate>
      <link>https://dev.to/mindyzwan/ohhh-a-sigterm-signal-1ii0</link>
      <guid>https://dev.to/mindyzwan/ohhh-a-sigterm-signal-1ii0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fobqna60fm2rdqz96lhme.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fobqna60fm2rdqz96lhme.jpg" alt="Red " width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fun fact: When you use &lt;code&gt;Ctrl + C&lt;/code&gt; to stop your application, that sends a &lt;code&gt;SIGTERM&lt;/code&gt; signal. &lt;/p&gt;

&lt;p&gt;Oh a &lt;code&gt;SIGTERM&lt;/code&gt; signal! 🐧🧊&lt;br&gt;
...&lt;br&gt;
What's a &lt;code&gt;SIGTERM&lt;/code&gt;? 🐧&lt;br&gt;
What's a signal? 🧊&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;signal&lt;/strong&gt; is basically a road sign for a computer. Stop, slow down, prepare for a stop, road closed, etc... It's referred to as a form of "inter-process communication" or IPC and is typically used in POSIX-compliant operating systems. POSIX being "Portable Operating System Interface" which is just a set of standards used to help operating systems work well-ish with each other. &lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;&lt;code&gt;SIGTERM&lt;/code&gt;&lt;/strong&gt; is a type of signal, namely of the "prepare for a stop" variety. It's a type of signal that your code can "catch" and use - usually to wrap up any processes you have going on before the application shuts down fully. This is in contrast to &lt;code&gt;SIGKILL&lt;/code&gt;, which just shuts down automatically.&lt;/p&gt;
&lt;h2&gt;
  
  
  Graceful Shutdowns
&lt;/h2&gt;

&lt;p&gt;Why is this important? You can "catch" and handle a received &lt;code&gt;SIGTERM&lt;/code&gt; to perform a graceful shutdown of an application.&lt;/p&gt;

&lt;p&gt;A graceful shutdown can include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stopping new requests from coming in&lt;/li&gt;
&lt;li&gt;Finishing any ongoing requests&lt;/li&gt;
&lt;li&gt;Cleaning up resources (like database connections)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It leaves your app, resources, and users in a happy place. &lt;/p&gt;

&lt;p&gt;For some apps, this will require a significant amount of configuration. Sometimes though, all you need is a timeout to let a process finish:&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="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SIGTERM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;shutdown&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;shutdown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;gracePeriodInMS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;gracePeriodInMs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code well, my friends!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More resources:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://hackernoon.com/graceful-shutdown-in-nodejs-2f8f59d1c357" rel="noopener noreferrer"&gt;Graceful Shutdown in NodeJS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://man7.org/linux/man-pages/man7/signal.7.html" rel="noopener noreferrer"&gt;Linux Manual Page - Signals&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.risingstack.com/graceful-shutdown-node-js-kubernetes/#settingupgracefulshutdown" rel="noopener noreferrer"&gt;Graceful Shutdown with NodeJS and Kubernetes&lt;/a&gt;: &lt;em&gt;I particularly like the "How does it work" image here. I'm all about the visual representations!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>node</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Shortcut to a Folder - Command Prompt</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Thu, 12 Mar 2020 22:19:38 +0000</pubDate>
      <link>https://dev.to/mindyzwan/shortcut-to-a-folder-command-prompt-58o6</link>
      <guid>https://dev.to/mindyzwan/shortcut-to-a-folder-command-prompt-58o6</guid>
      <description>&lt;p&gt;Find yourself going to a particular folder quite often? Here's a quick and dirty way to set up a command shortcut for Windows Command Prompt to get to that folder more easily. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 - Run command prompt as an administrator.
&lt;/h2&gt;

&lt;p&gt;To do this, right-click on the icon - wherever it lives. I have my command prompt pinned to my taskbar. A menu will appear - depending on where it lives, the "Run as Administrator" option may be available on that first menu, or you may need to keep digging by right-clicking on "Command Prompt" again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 - Create a file in &lt;code&gt;C:\WINDOWS\system32&lt;/code&gt;.
&lt;/h2&gt;

&lt;p&gt;If the command prompt window doesn't already show that you're in the &lt;code&gt;System32&lt;/code&gt; folder, navigate there using the &lt;code&gt;cd&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd C:\Windows\System32&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;There are a number of ways to create a new file through the command line, but here is a simple command to use:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;copy con filename.cmd&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;When you press ENTER, the cursor will hop down to the next line. This is the beginning of the text going into your file. As a note, the &lt;strong&gt;filename&lt;/strong&gt; above is the command you'd like to use. For example, if you want to go to your project's folder you could use go_project_name as the file name (don't forget the &lt;code&gt;.cmd&lt;/code&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - Add the directory information to the file.
&lt;/h2&gt;

&lt;p&gt;Let's say my project's name is Listly and it's lives on my Desktop. I'd create the file:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;copy con go_listly.cmd&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;On the next line, I'd type &lt;code&gt;cd /d file_path&lt;/code&gt; (the &lt;code&gt;/d&lt;/code&gt; is optional and allows you to change directories across different drives).&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd /d C:\Users\Mindy\Desktop&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Then type &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Z&lt;/code&gt; to save, and ENTER to finish creating the file. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 - Use the Shortcut!
&lt;/h2&gt;

&lt;p&gt;And you're all set! Simply type your new shortcut anytime you're in your command prompt and you'll be redirected to your folder. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command well, my friends!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>productivity</category>
      <category>devops</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Learning Javascript As a Rubyist</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Tue, 17 Sep 2019 01:37:11 +0000</pubDate>
      <link>https://dev.to/mindyzwan/learning-javascript-as-a-rubyist-4cbn</link>
      <guid>https://dev.to/mindyzwan/learning-javascript-as-a-rubyist-4cbn</guid>
      <description>&lt;p&gt;A handful of simplified comparisons to make those first few steps into Javascript a bit easier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--whYPn5H_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AFyWmdsQEnvWsCh_fEvZIFA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--whYPn5H_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AFyWmdsQEnvWsCh_fEvZIFA.jpeg" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://www.pexels.com/@gratisography?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Gratisography &lt;/a&gt;from &lt;a href="https://www.pexels.com/photo/man-person-legs-grass-539/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I love Ruby.&lt;/p&gt;

&lt;p&gt;I also recently discovered that some people vehemently dislike it.&lt;/p&gt;

&lt;p&gt;So here I am, learning Javascript.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The people I talked to would probably be appalled that their comments had such an effect on me. Here’s a secret —I still love Ruby and Javascript is the next part of the curriculum at the online school I’m attending (&lt;/em&gt;&lt;a href="https://launchschool.com/"&gt;&lt;em&gt;Launch School&lt;/em&gt;&lt;/a&gt;&lt;em&gt;) so I’d be studying it anyway, but that makes for a much less interesting story.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So here I am, learning Javascript.&lt;/p&gt;

&lt;p&gt;The first few days of diving into a new language feels a little like a firehouse of information being directed at your face. As a former high school teacher, I’m here to tell you how to deal, with a tip — we learn best by connecting new information to old information.&lt;/p&gt;

&lt;p&gt;So let’s make some connections!&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing Syntax
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Commenting
&lt;/h4&gt;

&lt;p&gt;In Ruby, we use # to make one-line comments, and =begin with =end for our multi-line comments.&lt;/p&gt;

&lt;p&gt;A Ruby Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# Comments are great!&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=begin
Honestly, I find this a weird
syntax for comments. 
=end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To write a comment in Javascript, you use // for a one-liner, and /* with */ for a multi-line comment.&lt;/p&gt;

&lt;p&gt;A Javascript Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// I'm a wonderfully useful comment!&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* 
Me
Too! 
*/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  cAsE
&lt;/h4&gt;

&lt;p&gt;In Ruby, we use snake_case for variables, files, directories, etc…, CamelCase for class names, and SCREAMING_SNAKE for constants.&lt;/p&gt;

&lt;p&gt;Javascript mostly uses camelCase. You’ll see PascalCase with constructors (more about whatever those are soon), and SCREAMING_SNAKE for constants, just like in Ruby. Underscores (_) are for use in constants only.&lt;/p&gt;

&lt;h4&gt;
  
  
  Methods vs. Functions
&lt;/h4&gt;

&lt;p&gt;In Ruby, we use the term “method” to denote a function. In Javascript, we see the term “function” more often, as it’s part of the method/function definition.&lt;/p&gt;

&lt;p&gt;A Ruby Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;method_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="c1"&gt;# some code&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A Javascript Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;methodName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="c1"&gt;// some code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I find this quote helpful to further clarify this delineation from &lt;a href="https://dev.to/tiffany"&gt;Tiffany White&lt;/a&gt; on a &lt;a href="https://dev.to/tiffany/what-is-the-difference-between-a-function-and-a-method-in-javascript-3mkj"&gt;dev.to article&lt;/a&gt; earlier this year:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In short: a &lt;em&gt;method&lt;/em&gt; is a &lt;strong&gt;function&lt;/strong&gt; that belongs to a class. In JavaScript, however, a &lt;em&gt;method&lt;/em&gt; is a &lt;strong&gt;function&lt;/strong&gt; that belongs to an  &lt;strong&gt;&lt;em&gt;object&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  String Interpolation
&lt;/h4&gt;

&lt;p&gt;Both languages provide syntax for inserting variable values into a string.&lt;/p&gt;

&lt;p&gt;A Ruby Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;site_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Medium"&lt;/span&gt;

&lt;span class="s2"&gt;"Welcome to &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;site_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Javascript uses backticks (&lt;code&gt;`&lt;/code&gt;) and a dollar symbol (&lt;code&gt;$&lt;/code&gt;) to create what is called a “Template String Literal” which allows for string interpolation.&lt;/p&gt;

&lt;p&gt;A Javascript Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;siteName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Medium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="s2"&gt;`Welcome to &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;siteName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Methods, Etc…
&lt;/h3&gt;

&lt;p&gt;A great reference point for these is the Mozilla Developer Network (MDN). Here’s the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference"&gt;Javascript Reference link&lt;/a&gt;. I’d recommend starting by looking at something familiar, like the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"&gt;Array documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let’s start with something familiar — instance methods!&lt;/p&gt;

&lt;h4&gt;
  
  
  Instance method
&lt;/h4&gt;

&lt;p&gt;Luckily for us, both Ruby and Javascript use instance methods.&lt;/p&gt;

&lt;p&gt;A Ruby example: &lt;code&gt;[4, 3, 2].sort&lt;/code&gt;&lt;br&gt;&lt;br&gt;
A Javascript example: &lt;code&gt;[4, 3, 2].sort // Oh hey, they're the same — NICE.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In our handy MDN reference list, You can tell if a method is an instance method if it includes the wordprototype.&lt;/p&gt;
&lt;h4&gt;
  
  
  Static method
&lt;/h4&gt;

&lt;p&gt;These are akin to Ruby’s class methods.&lt;/p&gt;

&lt;p&gt;A Ruby example: &lt;code&gt;Hash.new&lt;/code&gt; &lt;br&gt;
A Javascript example: &lt;code&gt;String.fromCharCode(65, 66 ,67) // Returns 'ABC'&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Constructor
&lt;/h4&gt;

&lt;p&gt;As an introductory point of reference, constructors can be compared to Ruby’s classes. While Javascript constructors and Ruby classes are very different at the core, they are both the vehicles by which a new object is created, and in that, they are similar.&lt;/p&gt;

&lt;p&gt;A Ruby example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;breed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="vi"&gt;@name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;
 &lt;span class="vi"&gt;@age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;
 &lt;span class="vi"&gt;@breed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;breed&lt;/span&gt;
 &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;new_dog_object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Dog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Coco'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mixed'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A Javascript example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;Dog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;breed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;breed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;breed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;newDogObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Dog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Coco&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Mixed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Other comparisons can be made, of course, but this will give you a great place to start! Code well, my friends!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;article.stop();&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>learningtocode</category>
      <category>ruby</category>
    </item>
    <item>
      <title>SELECT beginner FROM all;</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Sat, 03 Aug 2019 18:57:17 +0000</pubDate>
      <link>https://dev.to/mindyzwan/select-beginner-from-all-3okn</link>
      <guid>https://dev.to/mindyzwan/select-beginner-from-all-3okn</guid>
      <description>&lt;h4&gt;
  
  
  A collection of beginner commands for navigating SQL &amp;amp; PostgreSQL
&lt;/h4&gt;

&lt;p&gt;For folk who are beginning their journey in using SQL, this can be a point of reference while you practice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffy0s9m18uumjkfjetzsf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffy0s9m18uumjkfjetzsf.jpeg" width="800" height="533"&gt;&lt;/a&gt;Index cards. Photo Credit: Pixabay&lt;/p&gt;

&lt;p&gt;Replace anything in &amp;lt; &amp;gt;'s with your actual table name/column name/constraint/data/etc…&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NOTE: Never spent much time in Google Sheets or Excel? Start there! I recommend spending 1–3 hours playing around with the QUERY function in Google Sheets — a.) it’s a ton of fun and b.) it may help you visualize what’s going on with some of these concepts. Check out David Krevitt’s&lt;/em&gt; &lt;a href="https://learn.codingisforlosers.com/the-google-sheets-query-function" rel="noopener noreferrer"&gt;&lt;em&gt;course on the QUERY function&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(or if you’d rather not spend $49, just go to his&lt;/em&gt; &lt;a href="https://codingisforlosers.com/google-sheets-query-function/" rel="noopener noreferrer"&gt;&lt;em&gt;blog post&lt;/em&gt;&lt;/a&gt; &lt;em&gt;about it).&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Terminal Commands
&lt;/h3&gt;

&lt;p&gt;These are used when you’re in your terminal, before opening the psql console.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;createdb &amp;lt;table name&amp;gt;&lt;/code&gt; : Creates a table&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dropdb &amp;lt;table name&amp;gt;&lt;/code&gt;: Drops (deletes) a table&lt;/p&gt;

&lt;p&gt;&lt;code&gt;psql &amp;lt;table name&amp;gt;&lt;/code&gt;: Opens a terminal-based console to interact with PostgreSQL and the databases within — similar to irb for Ruby.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;postgres&lt;/code&gt; is a default database that is created when you install PostgreSQL. You can always use &lt;code&gt;psql postgres&lt;/code&gt; to open the console. Then, you can move to other databases from within the psql console.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;psql &amp;lt;database name&amp;gt; &amp;lt; &amp;lt;file name&amp;gt;.sql&lt;/code&gt;: Imports a file into a database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meta-Commands
&lt;/h3&gt;

&lt;p&gt;Always start with a backslash (). These are used when you’re in the psql console.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\q&lt;/code&gt;: Quits&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\c &amp;lt;database name&amp;gt;&lt;/code&gt;: Connects to a different database&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\l&lt;/code&gt;: Lists all of the databases&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\dt&lt;/code&gt;: Describes the tables in the current database&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\d &amp;lt;table name&amp;gt;&lt;/code&gt;: Describes the table&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Commands — DDL
&lt;/h3&gt;

&lt;p&gt;Always end with a semicolon (;). These are used when you’re in the psql console.&lt;/p&gt;

&lt;h4&gt;
  
  
  CREATE/DROP
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;CREATE DATABASE &amp;lt;database name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Creates a new database.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DROP DATABASE &amp;lt;database name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Deletes the database. Careful with this one — irreversible!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CREATE TABLE &amp;lt;table name&amp;gt;(&amp;lt;column setup&amp;gt;);&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Creates a new table within the current database. Column setup information goes in the parenthesis.&lt;/p&gt;

&lt;p&gt;Column setup includes three items: the name of the column, the data type, and the constraints. The below example creates a table with three new columns, each with a data type and a constraint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE a_new_table(
 name data_type constraint,
 name2 data_type2 constraint,
 name3 data_type3 constraint
 );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;DROP TABLE &amp;lt;table name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Deletes the table. Careful with this one — irreversible!&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;ALTER: TABLE&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; RENAME TO &amp;lt;new name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Renames a table.&lt;/p&gt;
&lt;h4&gt;
  
  
  ALTER: COLUMN
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; RENAME COLUMN &amp;lt;column name&amp;gt; TO &amp;lt;new name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Renames a column.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ALTER COLUMN &amp;lt;column name&amp;gt; TYPE &amp;lt;new type&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Changes data type of a column.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ADD COLUMN &amp;lt;column setup&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Creates a new column, &lt;code&gt;&amp;lt;column setup&amp;gt;&lt;/code&gt; is the same as it is in creating a new table: &lt;code&gt;&amp;lt;column name&amp;gt; &amp;lt;data type&amp;gt; &amp;lt;constraints&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; DROP COLUMN &amp;lt;column name&amp;gt;;&lt;/code&gt; &lt;br&gt;
Deletes a column. Careful with this one — irreversible!&lt;/p&gt;
&lt;h4&gt;
  
  
  ALTER: CONSTRAINTS
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ADD CONSTRAINT &amp;lt;constraint name&amp;gt; &amp;lt;constraint&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Add a table constraint, you make up the constraint name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; DROP CONSTRAINT &amp;lt;constraint name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Delete a table constraint.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ADD UNIQUE (&amp;lt;column name&amp;gt;);&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Adds a unique constraint to the given column.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ADD CHECK (&amp;lt;expression&amp;gt;);&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Adds a check constraint to the table. Can use multiple columns in expression. SQL functions (explained below) are useful tools.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ALTER COLUMN &amp;lt;column name&amp;gt; SET &amp;lt;constraint&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Add a column constraint.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ALTER COLUMN &amp;lt;column name&amp;gt; DROP CONSTRAINT &amp;lt;constraint&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Delete a column constraint.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ALTER TABLE &amp;lt;table name&amp;gt; ALTER COLUMN &amp;lt;column name&amp;gt; DROP DEFAULT;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Remove a default clause.&lt;/p&gt;
&lt;h3&gt;
  
  
  SQL Commands — DML
&lt;/h3&gt;

&lt;p&gt;Always end with a semicolon (;). These are used when you’re in the psql console.&lt;/p&gt;
&lt;h4&gt;
  
  
  INSERT
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;INSERT INTO &amp;lt;table name&amp;gt; (&amp;lt;column name&amp;gt;) VALUES (&amp;lt;data&amp;gt;);&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Inserts data into the table. Can add more columns using commas and can add multiple rows of data by adding more sets of values in parenthesis after the first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSERT INTO &amp;lt;table name&amp;gt; (&amp;lt;col 1&amp;gt;, &amp;lt;col 2&amp;gt;)
 VALUES (&amp;lt;data-1a&amp;gt;, &amp;lt;data-1b&amp;gt;),
 (&amp;lt;data-2a&amp;gt;, &amp;lt;data-2b&amp;gt;),
 (&amp;lt;data-3a&amp;gt;, &amp;lt;data-3b&amp;gt;);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  UPDATE
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;UPDATE &amp;lt;table name&amp;gt; SET &amp;lt;column name&amp;gt; = &amp;lt;new value&amp;gt; WHERE &amp;lt;expression&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Updates data to the &amp;lt;new value&amp;gt; in the column given where the expression is true. The WHERE clause is optional — if you leave it off, the command will update &lt;strong&gt;every&lt;/strong&gt; row in the table with the &lt;code&gt;&amp;lt;new value&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  DELETE
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;DELETE FROM &amp;lt;table name&amp;gt; WHERE &amp;lt;expression&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Deletes data where the expression is true. The WHERE clause is optional — if you leave it off, the command will delete &lt;strong&gt;every&lt;/strong&gt; row in the table.&lt;/p&gt;

&lt;h4&gt;
  
  
  SELECT
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;SELECT * FROM &amp;lt;table name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Displays all of the data from the listed table. &lt;em&gt;Note:&lt;/em&gt; &lt;em&gt;* is a wild card character — grabs all of the columns in a given table.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT &amp;lt;column name&amp;gt;, &amp;lt;column name&amp;gt; FROM &amp;lt;table name&amp;gt;;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Display specific columns by listing them after SELECT. Can display one or multiple by separating names with a comma.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT Clauses&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;... WHERE &amp;lt;expression&amp;gt;;&lt;/code&gt;
Specify which rows of data you’d like by adding an expression. See SQL operators below.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;... ORDER BY &amp;lt;column name&amp;gt;;&lt;/code&gt;
Sorts the data according to the column. Can add &lt;code&gt;ASC&lt;/code&gt; or &lt;code&gt;DESC&lt;/code&gt; to specify whether it is in ascending or descending order. Can also sort using functions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;... LIMIT &amp;lt;number&amp;gt;;&lt;/code&gt;
Limits the results to the number given.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;... OFFSET &amp;lt;number&amp;gt;;&lt;/code&gt;
Leaves off some of the first results, depending on the number given.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;... GROUP BY &amp;lt;column name&amp;gt;;&lt;/code&gt;
Combines data by common values in the given column. Often need this in the &lt;code&gt;SELECT&lt;/code&gt; command to use aggregate functions (see SQL functions below).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SQL Operators/Comparisons
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;=&lt;/code&gt;: Equal to&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt; or &lt;code&gt;!=&lt;/code&gt;: Not equal to&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;: Greater than, less than&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;: Greater than or equal to, less than or equal to&lt;/p&gt;

&lt;p&gt;&lt;code&gt;BETWEEN&lt;/code&gt; / &lt;code&gt;NOT BETWEEN&lt;/code&gt; : Between or not between two values&lt;/p&gt;

&lt;p&gt;&lt;code&gt;IS NULL&lt;/code&gt; / &lt;code&gt;IS NOT NULL&lt;/code&gt; : Is or is not NULL&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;: Logical operators to add multiple clauses&lt;/p&gt;

&lt;p&gt;&lt;code&gt;LIKE&lt;/code&gt; / &lt;code&gt;NOT LIKE&lt;/code&gt;: Use with &lt;code&gt;%&lt;/code&gt; (multi-character wild card) or &lt;code&gt;_&lt;/code&gt; (single character wild card) to match substrings (e.g. &lt;code&gt;...LIKE %Smith;&lt;/code&gt; would match to “Harry Smith” and “Lane Smith”)&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Functions
&lt;/h3&gt;

&lt;h4&gt;
  
  
  String
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;length()&lt;/code&gt;: Returns the length of the given string argument.&lt;/p&gt;

&lt;h4&gt;
  
  
  Date/Time
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;now()&lt;/code&gt;: Returns the current date and time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;date_part()&lt;/code&gt;: Takes two arguments, the part of the date (e.g. ‘year’) and where that data is coming from (e.g. a column name).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;age()&lt;/code&gt;: Takes a timestamp argument, calculates time elapsed between the timestamp and the current time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Aggregate
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;count()&lt;/code&gt;: Returns the number of values in the data specified.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sum()&lt;/code&gt;: Returns the sum of the values in the data specified.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;min()&lt;/code&gt;: Returns the minimum value in the data specified.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;max()&lt;/code&gt;: Returns the maximum value in the data specified.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;avg()&lt;/code&gt;: Returns the average of the values in the data specified.&lt;/p&gt;

&lt;p&gt;There are so many other commands/functions/uses out there than what is described above, so be adventurous and scour the internet for more information when you need it. A great place to turn to first? The PostgreSQL Docs: &lt;a href="https://www.postgresql.org/docs/" rel="noopener noreferrer"&gt;postgresql.org/docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That’s all for now — code well, my friends!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\q&lt;/code&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>beginners</category>
      <category>sql</category>
      <category>programming</category>
    </item>
    <item>
      <title>Files &amp; Directories in Ruby: A Primer</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Thu, 18 Jul 2019 05:48:43 +0000</pubDate>
      <link>https://dev.to/mindyzwan/files-directories-in-ruby-a-primer-4l8m</link>
      <guid>https://dev.to/mindyzwan/files-directories-in-ruby-a-primer-4l8m</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/swlh/files-directories-in-ruby-a-primer-b146cb17d4b9?source=rss-fdaade453a5a------2"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YRSFwhMV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/960/1%2AXipo4DR8w5yut-uVlsS9zQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because sometimes the documentation has too much information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/swlh/files-directories-in-ruby-a-primer-b146cb17d4b9?source=rss-fdaade453a5a------2"&gt;Continue reading on The Startup »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginnercoding</category>
      <category>ruby</category>
      <category>files</category>
    </item>
    <item>
      <title>Intro to Pry — The Short Version</title>
      <dc:creator>Mindy Zwanziger</dc:creator>
      <pubDate>Sun, 31 Mar 2019 16:13:46 +0000</pubDate>
      <link>https://dev.to/mindyzwan/intro-to-pry-the-short-version-4d2f</link>
      <guid>https://dev.to/mindyzwan/intro-to-pry-the-short-version-4d2f</guid>
      <description>&lt;h3&gt;
  
  
  Intro to Pry — The Short Version
&lt;/h3&gt;

&lt;p&gt;While I have never been formally taught how to code until fairly recently, I’ve dabbled in it over the years quite a bit — playing in Google Apps Script, building simple web sites for friends, making my emails prettier. I had never used any sort of debugging tool prior to about a month ago. At which point, I had taken a free Google Apps Script course (from Ben Collins — definitely check it out if you’d like a quick intro) and learned about Logger.log.&lt;/p&gt;

&lt;p&gt;Stack Overflow has, of course, been my friend for years, but I distinctly remember being frustrated anytime someone referenced using Logger.log. i.e. “Have you tried using Logger.log?” What kind of response is that? At the time, it seemed this unconquerably large unknown and I didn’t want to try to learn it because it would take too much time— now I use it constantly. It was a lot simpler to use than I thought it would be, and so is pry. At least at the most basic level — which is all you really need to learn at first.&lt;/p&gt;

&lt;p&gt;So here’s the short version:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Install it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can check if it’s already installed by using this in your command line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem -i list pry&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will return a boolean. If it’s not installed, use this in your command line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem install pry&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Require it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the top of your code, write out the line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;require “pry”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Insert it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use this as many times as you’d like in your code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;binding.pry&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Place it at a point or points in your code. To start, just pick any spot, so you can play with it and see how it works. As you go, you’ll find where exactly you want to place it when you run into various logical errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 — Run your code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pry stops the code at the point(s) where you placed binding.pry. At each point you can type in various variables and see what’s going on in your code at that particular spot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 — Exit.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Exit the pry session by just typing exit. Exit the whole program by typing exit-program.&lt;/p&gt;

&lt;p&gt;That’s all, folks! It’s super simple. There are other add-ons and such you can use, and more to learn about it, but this will get you over the “THIS IS SOME WEIRD THING I DON’T KNOW ANYTHING ABOUT” hump.&lt;/p&gt;

&lt;p&gt;Code well, my friends!&lt;/p&gt;

</description>
      <category>pry</category>
      <category>debugging</category>
      <category>webdev</category>
      <category>launchschool</category>
    </item>
  </channel>
</rss>
