<?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: Franziska Hinkelmann, Ph.D.</title>
    <description>The latest articles on DEV Community by Franziska Hinkelmann, Ph.D. (@fhinkel).</description>
    <link>https://dev.to/fhinkel</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%2F126451%2F442be9cc-f6e8-4fcf-98c6-83fcd3e1e4ce.jpg</url>
      <title>DEV Community: Franziska Hinkelmann, Ph.D.</title>
      <link>https://dev.to/fhinkel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fhinkel"/>
    <language>en</language>
    <item>
      <title>Leetcode: Container With Most Water</title>
      <dc:creator>Franziska Hinkelmann, Ph.D.</dc:creator>
      <pubDate>Sun, 27 Feb 2022 22:24:00 +0000</pubDate>
      <link>https://dev.to/fhinkel/leetcode-container-with-most-water-3k0k</link>
      <guid>https://dev.to/fhinkel/leetcode-container-with-most-water-3k0k</guid>
      <description>&lt;p&gt;I love solving &lt;a href="https://leetcode.com/problemset/all/" rel="noopener noreferrer"&gt;Leetcode&lt;/a&gt; coding problems for fun. I came across this problem and was intrigued to prove why the &lt;strong&gt;sliding window algorithm&lt;/strong&gt; is correct. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given an array of heights, find two lines that together with the x-axis form a container, such that the container contains the most water.&lt;/p&gt;
&lt;/blockquote&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%2Fuk0w1uvtdqsp40i5yqfr.png" 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%2Fuk0w1uvtdqsp40i5yqfr.png" width="800" height="482"&gt;&lt;/a&gt;Representation of [1,8,6,2,5,4,8,3,7]. For this input, the most water a container can contain is 49.&lt;/p&gt;

&lt;p&gt;You can solve this &lt;strong&gt;brute force&lt;/strong&gt; by comparing all possible combinations of left and right lines and keeping track of the most water. The complexity of this solution is quadratic.&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="nf"&gt;maxWaterQuadratic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
            &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
            &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;max&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;Algorithms with &lt;strong&gt;quadratic complexity&lt;/strong&gt; do not work well for very large datasets. For example, given an array with 100 entries as input to a quadratic algorithm takes on the order of &lt;code&gt;100^2 = 10,000&lt;/code&gt; instructions. No problem for a modern computer. But as the array size increases, say to 300 million (population size of the US), now we need something on the order of &lt;code&gt;90,000,000,000,000,000&lt;/code&gt; instructions. Given that we measure CPUs in GHz (billions of instructions), a quadratic algorithm would not work for this scale. In fact, if you submit this algorithm on &lt;a href="https://leetcode.com/problems/container-with-most-water/" rel="noopener noreferrer"&gt;Leetcode&lt;/a&gt;, you get a Time Limit Exceeded error for one of the test cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linear vs quadratic complexity
&lt;/h2&gt;

&lt;p&gt;Can we solves this problem with &lt;strong&gt;linear complexity&lt;/strong&gt;? Is there an algorithm that looks at each array entry just once (or a constant multiple of once) instead of all combinations of pairs of entries?&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%2Fnsfquyocgrergy8zvsp9.png" 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%2Fnsfquyocgrergy8zvsp9.png" alt="Chart of linear vs quadratic complexity" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In fact, yes, there's a solution that runs in linear time: Start with the widest container. That means use the first and last element as the left and right boundary. Move the shorter of the left and right boundary one step inwards. Keep track of the most water until the left and right boundaries overlap. This is a &lt;strong&gt;sliding window algorithm&lt;/strong&gt; where one pointer starts at the front, the other at the back.&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="nf"&gt;maxWaterLinear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;area&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="nx"&gt;max&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;area&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&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;max&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;Why is this algorithm correct though? It passes all the test cases on Leetcode - that doesn't prove correctness though. How do we know there isn't some edge case where this algorithm would give us the wrong solution?&lt;/p&gt;

&lt;h2&gt;
  
  
  Proof of Sliding Window Algorithm
&lt;/h2&gt;

&lt;p&gt;Suppose the real solution of the problem is from index &lt;code&gt;a&lt;/code&gt; to &lt;code&gt;b&lt;/code&gt; with water height &lt;code&gt;h.&lt;/code&gt; Then both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are greater or equal to &lt;code&gt;h&lt;/code&gt;. Then &lt;strong&gt;for any index to the left or to the right of the optimal container, the height must be less than &lt;code&gt;h&lt;/code&gt;.&lt;/strong&gt; Otherwise we could extend the optimal container to that index without sacrificing height and have a larger water container.&lt;/p&gt;

&lt;p&gt;In our sliding window algorithm, as we move our indexes from the outside in, we will eventually reach &lt;code&gt;a&lt;/code&gt; or &lt;code&gt;b&lt;/code&gt;. Suppose we reach &lt;code&gt;a&lt;/code&gt; first. We just proved that everything outside of the other index &lt;code&gt;b&lt;/code&gt;, must be smaller than &lt;code&gt;h&lt;/code&gt; and thus smaller than &lt;code&gt;a&lt;/code&gt;. Therefore, one pointer in our algorithm will keep moving until it reaches &lt;code&gt;b&lt;/code&gt; while the other pointer stays on &lt;code&gt;a.&lt;/code&gt; At which point the optimal volume is recorded. If we  reach &lt;code&gt;b&lt;/code&gt; first, the argument is exactly the same. Thus, this linear time algorithm will always find the optimal solution. &lt;/p&gt;

&lt;p&gt;Happy algorithm coding!  &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>algorithms</category>
      <category>programming</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How I learned to love the terminal</title>
      <dc:creator>Franziska Hinkelmann, Ph.D.</dc:creator>
      <pubDate>Wed, 13 Nov 2019 21:19:16 +0000</pubDate>
      <link>https://dev.to/fhinkel/how-i-learned-to-love-the-terminal-27n3</link>
      <guid>https://dev.to/fhinkel/how-i-learned-to-love-the-terminal-27n3</guid>
      <description>&lt;p&gt;&lt;em&gt;An introduction to the command line.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Knowing your way around the commnand line has many benefits. With a bit of practice, you can accomplish many tasks much faster on the command line than using any other tool.&lt;/p&gt;

&lt;p&gt;The command line is almost always available, unlike some GUI tools that must be installed. You can save frequently-used commands as aliases and save time. Your bash history will save your bacon at least once when you forget how to do something. When you ssh into a remote machine, such as your work station or a virtual machine in the cloud, you can use the command line instead of a slow GUI.&lt;/p&gt;

&lt;p&gt;Here are some tips that'll make working on the command line much easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shortcuts instead of typing full commands
&lt;/h2&gt;

&lt;p&gt;Use the &lt;strong&gt;arrow up&lt;/strong&gt; and &lt;strong&gt;arrow down&lt;/strong&gt; keys to iterate over the last used commands. &lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;tab completion&lt;/strong&gt; to complete commands, directories and files, and even some parameters. Start typing one or two characters of a command. Then hit tab twice. If that gives you several options, type a few more letters and then hit tab again. You should never type out a full filename. Use tab aggressivly. It's muscle memory you need to build if you want to be fast on the command line.&lt;/p&gt;

&lt;p&gt;If you remember part of a command, but not necessarily the beginning, you can search for that command using &lt;strong&gt;reverse-i-search&lt;/strong&gt;. To use reverse-i-search, press Ctrl+R, then start typing the command. If there are commands that match what you've typed, you'll see a suggestion. You can keep typing to further refine your search results or press Ctrl+R again to cycle through the commands that match your search query in reverse order. &lt;/p&gt;

&lt;h2&gt;
  
  
  Navigate around
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;cd ..&lt;/code&gt; to navigate up one directory. Use &lt;code&gt;cd&lt;/code&gt; to jump to your home directory. This is the same as &lt;code&gt;cd ~/&lt;/code&gt;. Use &lt;code&gt;cd /&lt;/code&gt; to jump to the root directory and &lt;code&gt;cd -&lt;/code&gt; to go back to the last directory. &lt;/p&gt;

&lt;p&gt;Jump to the beginning and end of the line with &lt;strong&gt;Ctrl A&lt;/strong&gt; and &lt;strong&gt;Ctrl E&lt;/strong&gt;. You can move word by word with &lt;strong&gt;option arrow left&lt;/strong&gt; and &lt;strong&gt;option arrow right&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you realize that you're typing the wrong command, use &lt;strong&gt;Ctrl C&lt;/strong&gt; to start over. This is faster than deleting the command character by character.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Hidden config files
&lt;/h2&gt;

&lt;p&gt;To see hidden files, i.e., filenames that start with a dot, use &lt;code&gt;ls -la&lt;/code&gt;. Check out the hidden .gitconfig in your home directory. Or edit the .gitignore file in a git project to exclude files from source control. You can configure a lot of tools via a dot file. Many follow the convention of the config file name ending in rc ("run command"), like .npmrc for npm config settings. &lt;/p&gt;

&lt;h2&gt;
  
  
  Configure your terminal
&lt;/h2&gt;

&lt;p&gt;The config file .bash_profile determines how your terminal, more specifically bash, behaves¹. The .bash_profile file is in your home directory (&lt;code&gt;~/&lt;/code&gt;) . In this file you can do things like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;specify shortcuts with &lt;code&gt;alias&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;configure your prompt&lt;/li&gt;
&lt;li&gt;set environment variables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Git on the command line
&lt;/h2&gt;

&lt;p&gt;If you use git on the command line, there are a few tricks to make your life easier. You can enable tab completion for git and configure custom shortcuts like &lt;code&gt;git co&lt;/code&gt; for &lt;code&gt;git checkout&lt;/code&gt;. For me, the most important feature is to always see what branch I'm on. &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%2Fa7m7nsg176cv2c531pem.png" 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%2Fa7m7nsg176cv2c531pem.png" alt="Terminal where the prompt shows the current directory and git branch" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My bash shows the current directory and the branch I'm on if I'm in a git directory. I configure this behavior in my &lt;code&gt;.bash_profile&lt;/code&gt; with the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# The next line enables git autocompletion
. ~/.git-completion.bash

# The next lines configures a fancy prompt
. ~/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\[\e[35m\]\w$(__git_ps1 " (%s)")\$\[\e[0m\] '
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download the scripts from the git source code mirror and follow the instructions:  &lt;a href="https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh" rel="noopener noreferrer"&gt;.git-prompt.sh&lt;/a&gt; and &lt;a href="https://github.com/git/git/blob/master/contrib/completion/git-completion.bash" rel="noopener noreferrer"&gt;.git-completion.bash&lt;/a&gt;. You can customize the color of the prompt. I use different colors on different machines to easily see what machine I'm ssh'ed into.&lt;/p&gt;

&lt;h2&gt;
  
  
  Most importantly 
&lt;/h2&gt;

&lt;p&gt;Be adventurous. Don't let the terminal intimidate you! Once you know some basics, it's easy to work efficiently with the command line. Search &lt;a href="https://stackoverflow.com/questions/tagged/command-line" rel="noopener noreferrer"&gt;StackOverflow&lt;/a&gt; for tips to make things even easier. Read through other people's config files (mine are &lt;a href="https://github.com/fhinkel/configs" rel="noopener noreferrer"&gt;here&lt;/a&gt;). Go explore and try a few things. Lots of tips are really helpful, you just need to find those that work for you.&lt;/p&gt;

&lt;p&gt;¹ .bash_profile is the default config for bash on MacOS. On Linux, use .bashrc.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Many thanks to Amy Unruh, Sofia Leon, ErinMcKean, Sandra Friesen, and Sarah Clark for their thoughtful reviews and comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>terminal</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
