<?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: Timothy Merritt</title>
    <description>The latest articles on DEV Community by Timothy Merritt (@timmybytes).</description>
    <link>https://dev.to/timmybytes</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%2F432562%2F4a2ae110-a50b-4224-b139-addf33e69697.png</url>
      <title>DEV Community: Timothy Merritt</title>
      <link>https://dev.to/timmybytes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/timmybytes"/>
    <language>en</language>
    <item>
      <title>It’s Okay to Feel Like You Suck: Mental Health Check-In</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Thu, 14 Jan 2021 18:41:58 +0000</pubDate>
      <link>https://dev.to/timmybytes/it-s-okay-to-feel-like-you-suck-mental-health-check-in-2gj6</link>
      <guid>https://dev.to/timmybytes/it-s-okay-to-feel-like-you-suck-mental-health-check-in-2gj6</guid>
      <description>&lt;p&gt;Hi, friends. The world has been a pretty harrowing place lately, particularly if you live in the U.S. (although if you live in New Zealand, please adopt me). Stressors can and do come from every corner of the big bad world, and none of it makes being a developer any easier. Here are a few tips to maintain your equilibrium in an already challenging field. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;⚠️ Note: These tips aren't exhaustive, and if you're dealing with more serious issues, you should seek help from trained professionals. Check the resources listed at the end for options.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fail
&lt;/h2&gt;

&lt;p&gt;No, really. A large part of being a developer is constantly learning new things: learning new tech stacks that sometimes unravel previous knowledge, new ways of doing things you’ve already "mastered", but above all &lt;a href="https://www.freecodecamp.org/news/learning-how-to-learn-the-most-important-developer-skill-7bf62dfaf67d/" rel="noopener noreferrer"&gt;learning &lt;em&gt;how&lt;/em&gt; to learn&lt;/a&gt;. And along with diving into new, scary subjects comes a propensity to get things wrong. That’s okay—&lt;em&gt;get things wrong&lt;/em&gt;. Fail. Screw-up magnificently (just try to do it &lt;em&gt;before&lt;/em&gt; you push to &lt;code&gt;main&lt;/code&gt;). Every mistake you make helps you understand &lt;em&gt;why&lt;/em&gt; it was a mistake, and how to improve the next time around. It doesn’t mean you’re a failure, it just means you’re learning. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Ffixing_problems.png" class="article-body-image-wrapper"&gt;&lt;img alt="xkcd #1739: Trying to fix the problems I created when I tried to fix the problems I created when I tried to fix the problems I created when…" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Ffixing_problems.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="https://xkcd.com/1739" rel="noopener noreferrer"&gt;xkcd 1739&lt;/a&gt;



&lt;p&gt;The more comfortable you are diving into the unknown and making a mess the better adapted you’ll be as you continue on your journey. So fail spectacularly, learn from what went wrong, and then pick yourself up and keep going. &lt;/p&gt;

&lt;h2&gt;
  
  
  Pace Yourself
&lt;/h2&gt;

&lt;p&gt;Are you in a rush to learn everything there is to know about development? Do you have short term plans that involve mastering multiple languages and workflows? Great! It’s good to be ambitious and eager, but literally no one knows it all. Know why? It’s impossible. The scope and depth of even "just" &lt;a href="https://www.freecodecamp.org/news/2019-web-developer-roadmap/" rel="noopener noreferrer"&gt;learning web development is massive&lt;/a&gt;. There will always be people who make everything look easy. There will always be more to do, more to learn, and more to make. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.explainxkcd.com%2Fwiki%2Fimages%2F4%2F41%2Ftime-animated.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.explainxkcd.com%2Fwiki%2Fimages%2F4%2F41%2Ftime-animated.gif" alt="xkcd #1190: Time"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="https://xkcd.com/1190" rel="noopener noreferrer"&gt;xkcd 1190&lt;/a&gt;



&lt;p&gt;Keep your focus on what you’re doing, and whether that means spending twelve hours a day coding (don’t do this long term) or trying to squeeze a half hour in somewhere between putting the kids to bed and trying to get some sleep (you’re a superstar), remember that you’re still making progress. &lt;em&gt;Baby steps still carry you forward&lt;/em&gt;, and even if you end up taking a few steps back, you’re still moving. Acknowledge your milestones, and enjoy the ride. &lt;/p&gt;

&lt;h2&gt;
  
  
  Ask For Help
&lt;/h2&gt;

&lt;p&gt;Just like how no one person can contain all the knowledge of the tech field, no one person built all of it on their own. Development can so often feel like a solitary endeavor (especially if you’re learning on your own), and by extension when you’re out of your depth it can seem like you’re the only one struggling. But one of the best ways to get out of the deep end is know your limits, and &lt;a href="https://www.freecodecamp.org/news/read-search-dont-be-afraid-to-ask-743a23c411b4/" rel="noopener noreferrer"&gt;know when to reach out for help&lt;/a&gt;. Ask questions, seek advice, listen to feedback, collaborate with others, and realize that more often than not, two heads really are better than one. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fhere_to_help_2x.png" class="article-body-image-wrapper"&gt;&lt;img alt="xkcd #1831: Here to Help" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fhere_to_help_2x.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="https://xkcd.com/1831" rel="noopener noreferrer"&gt;xkcd 1831&lt;/a&gt;



&lt;p&gt;Asking for help in itself can sometimes feel impossible, but taking that chance can act as a reminder that so many others have been where you are, struggled with what you’re struggling with. Giving and receiving that empathy can reinforce that we’re all human, we all make mistakes, and sometimes we all need some help. Asking for it isn’t weakness—it’s a valuable skill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop Coding
&lt;/h2&gt;

&lt;p&gt;Hear me out. I don’t mean quit altogether, but when it feels like no matter what you do you can’t get a print statement to work, or a git commit to take, and you’re ready to write “Hello world” with the entrails of your computer… it’s time to step away for a little while. Take a break. Take a &lt;em&gt;long&lt;/em&gt; break if you need to. You could read a book, play a game, watch a movie, meditate, practice a hobby you have, or eat large quantities of chocolate—but what's most important is taking the kind of &lt;a href="https://www.freecodecamp.org/news/how-to-take-a-good-break-6b1bb9239bd3/" rel="noopener noreferrer"&gt;break that works for you&lt;/a&gt;. The point is to let the things you were stuck on melt away for awhile, so when you come back to them you do so with fresh eyes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fcompiling.png" class="article-body-image-wrapper"&gt;&lt;img alt="Compiling" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fcompiling.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="https://xkcd.com/303/" rel="noopener noreferrer"&gt;xkcd 303&lt;/a&gt;



&lt;p&gt;Don’t feel guilty when you need to press pause for a while, and don’t let anyone tell you that you must always keep pushing on &lt;em&gt;at all costs&lt;/em&gt;. You’ll burn out, or start to resent what you’re doing. Particularly when you’re learning, your brain needs time to absorb the new information, and it can’t do that if you’re constantly pushing it. Learn when to stop, and you’ll be surprised how often you’ll end up finding your way back more clearly. &lt;/p&gt;

&lt;h2&gt;
  
  
  Be Kind to Your Butt
&lt;/h2&gt;

&lt;p&gt;You know what I’m going to say. Do some stretches. Get up and go outside. Go for a walk. Pretend you’re an elite hacker being chased by mercenaries and let the fear of a convoluted plot motivate your exercise. Eat as healthy as you’re able and combine that with some daily exertion, and you’ll find your brain works much better when you’re trying to solve a difficult development task. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fexercise.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fexercise.png" alt="Exercise"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="https://xkcd.com/189/" rel="noopener noreferrer"&gt;xkcd 189&lt;/a&gt;



&lt;p&gt;I’m not going to belabor this point, since we’re all differently abled and divided by our respective socioeconomic circumstances, but just do what you can to get some helpful nutrients in your body and some exercise, and &lt;a href="https://www.psychologytoday.com/us/blog/the-fifth-vital-sign/201901/why-exercise-is-good-your-brain" rel="noopener noreferrer"&gt;your brain will thank you&lt;/a&gt;. No, the chocolate from earlier doesn’t count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it All Together
&lt;/h2&gt;

&lt;p&gt;It’s a rough time right now, and if you’re learning or working in development it can be hard to juggle everything at once. So remember: it’s okay to fail, keep a steady pace, ask for help, take breaks, and try to eat something green and break a sweat regularly. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;If you're in need of more serious help, you aren’t alone, and there are many resources available. And while I'm not a professional and can't vouch for the efficacy of any of these sources, they should be a good place to start.&lt;/p&gt;

&lt;h4&gt;
  
  
  U.S.-Based
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://nami.org/help" rel="noopener noreferrer"&gt;National Alliance on Mental Illness&lt;/a&gt; has a free helpline where you can get advice and get pointed towards the resources you need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you’re having thoughts of self-harming of thoughts of suicide, &lt;strong&gt;you are not alone&lt;/strong&gt;. &lt;a href="https://suicidepreventionlifeline.org/" rel="noopener noreferrer"&gt;The National Suicide Prevention Lifeline&lt;/a&gt; can offer confidential help and resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://www.samhsa.gov/find-help/disaster-distress-helpline" rel="noopener noreferrer"&gt;SAMHSA Disaster Distress Hotline&lt;/a&gt; provides 24/7, 365-day-a-year crisis counseling and support to people experiencing emotional distress related to natural or human-caused disasters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.psychguides.com/guides/mental-health-hotline/" rel="noopener noreferrer"&gt;Here’s a list of resources and helplines&lt;/a&gt; you can call to get help from a variety of organizations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  International
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://checkpointorg.com/global/" rel="noopener noreferrer"&gt;Checkpoint&lt;/a&gt; has a long list of international websites and hotlines you can contact for a wide variety of needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.therapyroute.com/article/helplines-suicide-hotlines-and-crisis-lines-from-around-the-world" rel="noopener noreferrer"&gt;TherapyRoute&lt;/a&gt; has lists for suicide and crisis helplines from around the world.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://timmybytes.com" rel="noopener noreferrer"&gt;&lt;img alt="timmybytes banner" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Ftimmybytes%2Ftimmybytes-website%2Fmain%2Fimg%2Ftimmybytes-header.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ko-fi.com/O4O82TAZB" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fko-fi.com%2Fimg%2Fgithubbutton_sm.svg" alt="ko-fi"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you enjoyed this...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read more of my articles &lt;a href="https://dev.to/timmybytes"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check out larger projects I’ve done in my &lt;a href="https://timmybytes.com" rel="noopener noreferrer"&gt;portfolio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Catch up with me on &lt;a href="https://twitter.com/timmybytes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/timmybytes" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>mentalhealth</category>
      <category>beginners</category>
      <category>motivation</category>
    </item>
    <item>
      <title>Keeping Git Commit Messages Consistent with a Custom Template</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Sun, 10 Jan 2021 17:38:33 +0000</pubDate>
      <link>https://dev.to/timmybytes/keeping-git-commit-messages-consistent-with-a-custom-template-1jkm</link>
      <guid>https://dev.to/timmybytes/keeping-git-commit-messages-consistent-with-a-custom-template-1jkm</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fgit_commit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgs.xkcd.com%2Fcomics%2Fgit_commit.png" alt="XKCD comic 1296 displaying increasingly less informative git commit messages over the course of a project"&gt;&lt;/a&gt;&lt;/p&gt;
xkcd on git commit messages



&lt;p&gt;The ability to write consistent git commit messages is a skill that will serve both you and any team you’re working with well in the long run. If you often find yourself struggling to come up with a decent message format, or you’re unable to decipher what it was you were doing when looking back through old commits, this little fix might help. And the best part is it’s extremely easy to implement.&lt;/p&gt;

&lt;p&gt;You can set a file to act as a commit message template through git’s global configuration. I tend to follow the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0-beta.2/" rel="noopener noreferrer"&gt;conventional commits format&lt;/a&gt;, which makes it easy to decide how to format your messages, and keeps things organized across all your commits. &lt;a href="https://chris.beams.io/posts/git-commit/" rel="noopener noreferrer"&gt;Chris Beams also has a great article on this topic.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, create a .txt file in a directory of your choice that will act as the template. I’ll assume you’re using the terminal for the process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;commit-conventions.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the .txt file with the editor of your choice. Git will ignore lines that begin with a &lt;code&gt;#&lt;/code&gt; or &lt;code&gt;;&lt;/code&gt; by default, so we’ll use those to make a template of ignored lines that only you will see when you’re making commits.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: By default, &lt;a href="https://git-scm.com/docs/git-config#_syntax" rel="noopener noreferrer"&gt;git allows both &lt;code&gt;#&lt;/code&gt; and &lt;code&gt;;&lt;/code&gt; as comment characters for configuration files&lt;/a&gt;, but you can set a character of your choice with &lt;code&gt;git config --global core.commentChar '#'&lt;/code&gt;, substituting &lt;code&gt;#&lt;/code&gt; with your preferred character.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can put whatever you want in your template, but here’s mine as an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ----------------------------------------------------------
# Header - type(scope): Brief description
# ----------------------------------------------------------
#    * feat             A new feature - SemVar PATCH
#    * fix              A bug fix - SemVar MINOR
#    * BREAKING CHANGE  Breaking API change - SemVar MAJOR
#    * docs             Change to documentation only
#    * style            Change to style (whitespace, etc.)
#    * refactor         Change not related to a bug or feat
#    * perf             Change that affects performance
#    * test             Change that adds/modifies tests
#    * build            Change to build system
#    * ci               Change to CI pipeline/workflow
#    * chore            General tooling/config/min refactor
# ----------------------------------------------------------


# ----------------------------------------------------------
# Body - More description, if necessary
# ----------------------------------------------------------
#    * Motivation behind changes, more detail into how
#      functionality might be affected, etc.
# ----------------------------------------------------------


# ----------------------------------------------------------
# Footer - Associated issues, PRs, etc.
# ----------------------------------------------------------
#    * Ex: Resolves Issue #207, see PR #15, etc.
# ----------------------------------------------------------


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add the template to your global git config is enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; commit.template path/to/your/file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now whenever you’re making a commit, instead of the typical &lt;code&gt;git commit -m "A brief commit message"&lt;/code&gt;, just enter &lt;code&gt;git commit&lt;/code&gt; to open your default editor with the template in place. You’ll automatically have a guide to choose conventions from to create a structured message. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ----------------------------------------------------------
# Header - type(scope): Brief description
# ----------------------------------------------------------
#    * feat             A new feature - SemVar PATCH
#    * fix              A bug fix - SemVar MINOR
#    * BREAKING CHANGE  Breaking API change - SemVar MAJOR
#    * docs             Change to documentation only
#    * style            Change to style (whitespace, etc.)
#    * refactor         Change not related to a bug or feat
#    * perf             Change that affects performance
#    * test             Change that adds/modifies tests
#    * build            Change to build system
#    * ci               Change to CI pipeline/workflow
#    * chore            General tooling/config/min refactor
# ----------------------------------------------------------
docs: Update README with contributing instructions

# ----------------------------------------------------------
# Body - More detailed description, if necessary
# ----------------------------------------------------------
#   * Motivation behind changes, more detail into how 
# functionality might be affected, etc.
# ----------------------------------------------------------
Adds a CONTRIBUTING.md with PR best practices, code style 
guide, and code of conduct for contributors.

# ----------------------------------------------------------
# Footer - Associated issues, PRs, etc.
# ----------------------------------------------------------
#   * Ex: Resolves Issue #207, see PR #15, etc.
# ----------------------------------------------------------
Closes #9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The “header” of the commit message notes the type of the commit as &lt;code&gt;docs&lt;/code&gt; and a brief description that does not exceed 60 characters to ensure readability (the commented lines are 60 characters long and act as guides for when to use a line break). The “body” optionally elaborates on the changes made, and the “footer” optionally notes any issue/PR the commit is related to. The final message will simply look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs: Update README with contributing instructions

Adds a CONTRIBUTING.md with PR best practices, code style 
guide, and code of conduct for contributors.

Closes #9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more specifics on the convention formatting or how it works with semantic versioning, see my &lt;a href="https://github.com/timmybytes/dotfiles/blob/main/git/README.md" rel="noopener noreferrer"&gt;git configuration&lt;/a&gt;. If it's too confusing or overly complex for your use cases, just simplify as needed.&lt;/p&gt;

&lt;p&gt;If you use Vim or Neovim, and you want to speed up the process even more, you can add this to your git config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Neovim&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; core.editor&lt;span class="o"&gt;=&lt;/span&gt;nvim +16 &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'startinsert'&lt;/span&gt;

&lt;span class="c"&gt;# Vim&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; core.editor &lt;span class="s2"&gt;"vim +16 +startinsert"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sets the default editor to Neovim (or Vim), and places the cursor on line 16 in Insert Mode as soon the editor opens. Now whenever you’re committing, when you type &lt;code&gt;git commit&lt;/code&gt;, Neovim opens the template, places your cursor, and accepts typing input immediately. Also note that you can still use &lt;code&gt;git commit -m "Your message"&lt;/code&gt; exactly as you did before, but the configuration will default to the template setup when you just type &lt;code&gt;git commit&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits" rel="noopener noreferrer"&gt;See more tips for configuring your editor with git here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Setting up this template has saved me countless time and frustration, and makes it so much easier to track my commits since all my repos use the same global commit format. You can get much more creative with git defaults and complex githooks, but this is a great way to solve a common problem for most developers. &lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Ftimmybytes%2Ftimmybytes-website%2Fmain%2Fimg%2Ftimmybytes-header.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Ftimmybytes%2Ftimmybytes-website%2Fmain%2Fimg%2Ftimmybytes-header.png" alt="timmybytes banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you enjoyed this...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;☕ &lt;a href="https://ko-fi.com/timmybytes" rel="noopener noreferrer"&gt;Buy me a coffee to fuel my work&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;See more of my configurations in my &lt;a href="https://github.com/timmybytes/dotfiles" rel="noopener noreferrer"&gt;dotfiles&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check out larger projects I’ve done in my &lt;a href="https://timmybytes.com" rel="noopener noreferrer"&gt;portfolio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Catch up with me on &lt;a href="https://twitter.com/timmybytes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/timmybytes" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Consider contributing to Compuneers, a site highlighting unsung women, BIPOC, and LGBT+ pioneers in Computer Science</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Wed, 21 Oct 2020 00:02:14 +0000</pubDate>
      <link>https://dev.to/timmybytes/consider-contributing-to-compuneers-a-site-highlighting-unsung-women-bipoc-and-lgbt-pioneers-in-computer-science-46m</link>
      <guid>https://dev.to/timmybytes/consider-contributing-to-compuneers-a-site-highlighting-unsung-women-bipoc-and-lgbt-pioneers-in-computer-science-46m</guid>
      <description>&lt;p&gt;If you’re still working on getting your 4 PRs for &lt;a href="https://hacktoberfest.digitalocean.com"&gt;Hacktoberfest&lt;/a&gt;, consider contributing to &lt;a href="https://github.com/timmybytes/compuneers"&gt;Compuneers&lt;/a&gt;, a site highlighting important women, BIPOC, and/or LGBT+ figures often overlooked in the history of Computer Science. Most people don’t know the stories of Grace Hopper, the ENIAC programmers, Lynn Conway, and so many other fascinating people who helped create the modern computing industry, and I hope this site goes a small step towards shedding light on who they were and are. &lt;/p&gt;

&lt;p&gt;This is a project I’ve been wanting to start for a while now, with an emphasis on opportunities for collaboration. Right now it’s a simple Jekyll blog-style site, with a good amount of issues to tackle, and the option to submit issues for adding new figures from history to the site. It won’t take a lot of technical know how right now, since the focus is on publishing posts with as many important figures as possible to create a rich amount of content. Eventually, if people are interested enough, I’d like to move it to React, but for now this will do the job. &lt;/p&gt;

&lt;p&gt;The whole point of the project is inclusion, so if you aren’t very experienced in web development yet and want to start contributing to open source, this should be a good beginner project to help out with. Likewise, if you’re passionate about bringing the stories of these often overlooked people to light, whatever your skill level, please consider contributing. &lt;/p&gt;

&lt;p&gt;You can find instructions on how to contribute &lt;a href="https://github.com/timmybytes/compuneers/blob/main/CONTRIBUTING.md"&gt;here&lt;/a&gt; or check out &lt;a href="https://github.com/timmybytes/compuneers/issues"&gt;currently open issues&lt;/a&gt; if you’re interested. Thanks for reading!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;You can find me on &lt;a href="https://twitter.com/timmybytes"&gt;Twitter&lt;/a&gt;, check out my projects on &lt;a href="https://github.com/timmybytes"&gt;GitHub&lt;/a&gt;, or view &lt;a href="https://timmybytes.com"&gt;my portfolio&lt;/a&gt; for more info about me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>contributorswanted</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>My First npm Package - A Custom React Theme</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Wed, 14 Oct 2020 22:50:52 +0000</pubDate>
      <link>https://dev.to/timmybytes/my-first-npm-package-a-custom-react-theme-4d2k</link>
      <guid>https://dev.to/timmybytes/my-first-npm-package-a-custom-react-theme-4d2k</guid>
      <description>&lt;p&gt;After being sick and tired of constantly having to delete and rearrange the &lt;code&gt;create-react-app&lt;/code&gt; boilerplate, I finally made a custom &lt;a href="https://github.com/timmybytes/timmybytes-template#readme"&gt;stripped-down React template&lt;/a&gt; for starting new projects. So far it doesn’t include anything extraordinary (though I did incorporate my SCSS boilerplate called &lt;a href="https://github.com/timmybytes/splate"&gt;SPLATE&lt;/a&gt;), but it removes all of the extraneous defaults for new React apps. I also managed to setup GitHub Actions to automatically release new versions to the npm registry when I update the &lt;code&gt;main&lt;/code&gt; branch. &lt;/p&gt;

&lt;p&gt;If you’d like to try it out, you can use it via &lt;code&gt;npx create-react-app [name-of-your-app] --template timmybytes-template&lt;/code&gt;. I’ll be adding more helpful starting features, and more automation for deployment. &lt;/p&gt;

</description>
      <category>react</category>
      <category>npm</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>#discuss What’s your preferred build process for a project?</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Fri, 09 Oct 2020 15:48:17 +0000</pubDate>
      <link>https://dev.to/timmybytes/what-s-your-preferred-build-process-for-a-project-47c8</link>
      <guid>https://dev.to/timmybytes/what-s-your-preferred-build-process-for-a-project-47c8</guid>
      <description>&lt;p&gt;Do you use Webpack, npm scripts, etc.? What’s your preferred method for getting a distributable package? And what tips do you have for the process?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>npm</category>
      <category>webpack</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What I Learned From 100 Days of Code</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Wed, 07 Oct 2020 19:14:37 +0000</pubDate>
      <link>https://dev.to/timmybytes/what-i-learned-from-100-days-of-code-3k61</link>
      <guid>https://dev.to/timmybytes/what-i-learned-from-100-days-of-code-3k61</guid>
      <description>&lt;p&gt;Yesterday was day 100 of my personal &lt;a href="https://www.100daysofcode.com"&gt;100DaysOfCode&lt;/a&gt; challenge. Before beginning, I already had some experience with HTML/CSS, Python, and the command line, but my comprehension was limited and mostly fragmentary. Over these last few months, however, I’ve completely thrown myself into learning to code, web development best practices, and computer science theory (in a limited fashion). Here are some tips I’ve picked up along the way. &lt;/p&gt;

&lt;h2&gt;
  
  
  Feeling like an imposter can be a good thing
&lt;/h2&gt;

&lt;p&gt;One of the most common aspects of being a newbie to coding and development is the dreaded “Imposter Syndrome”: the feeling of being a fraud when you don’t know as much as you think you should, or when you’re just sort of faking it until you make it. This mindset is particularly applicable to people who’ve just landed their first developer job (or even long after), and while it can be stressful and depressing to compare yourself to seasoned savants, there’s a simple solution—don’t. &lt;/p&gt;

&lt;p&gt;If you’re new, you’re new. There’s nothing wrong with that. Not everyone learns to write DRY code before they’re out of diapers, and whatever path led you to coding at whatever age is a valid one. I’ve spent years working in retail, have an unrelated degree in English, and one of the things I’ve learned to embrace over this period diving into programming has been my &lt;em&gt;lack&lt;/em&gt; of knowledge. &lt;/p&gt;

&lt;p&gt;When you don’t know how a particular piece of code works, or what a tool does, or why a technology exists, it gives you the opportunity to find out. Computer Science is so dense with history and evolution that no one person can know it all, but learning to embrace going down wormholes to clear up gaps in your knowledge is a useful skill, and along the way you’ll find another dozen topics you’ll want to look into later for even more clarification. Part of learning to code is learning how to learn, and being okay with the fact that there’s always more to find out. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/what-is-imposter-syndrome-and-how-do-you-overcome-it/"&gt;How to Overcome Imposter Syndrome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/the-self-taught-developers-guide-to-coding/"&gt;The Self-Taught Developer’s Guide to Coding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bayandin/awesome-awesomeness"&gt;Awesome Programming Resources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stick with a central programming language
&lt;/h2&gt;

&lt;p&gt;You might feel inclined to try and cram as much into your brain as possible when starting out, and desire to learn how every popular programming language works. This is a recipe for remaining confused and staying stuck at the beginner level indefinitely. Instead, focus on one language. &lt;/p&gt;

&lt;p&gt;For me, I’ve pursued front-end web development, so after getting the hang of HTML and CSS (which aren’t really programming languages at all), I’ve focused solely on JavaScript. As a result, I’ve deepened my knowledge of the language rather than spreading myself thin over many others, and this applies to any other language you’re interested in. &lt;/p&gt;

&lt;p&gt;There isn’t a “right” language to learn first, though some may be better suited for you if you’re looking to work with certain realms of development or engineering. JavaScript is tailored to web development, Python is often the choice for machine learning, Java is popular for enterprise software, etc. There are exceptions to all of these, but the gist is that once you start with a language, stick with it. &lt;/p&gt;

&lt;p&gt;A language’s syntax is something you can pick up pretty quickly, or look up once you know what you need, but the important thing is to learn the concepts of programming and /thinking/ programmatically. Once you’ve become adept at one language, it becomes easier to learn another because the same underlying concepts will usually apply. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/what-programming-language-should-i-learn-first-19a33b0a467d/"&gt;What Programming Language Should I Learn First?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/a-cautionary-tale-of-learning-to-code-my-own-eddb24d9d5a7/"&gt;A Cautionary Tale of Learning to Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Track your progress
&lt;/h2&gt;

&lt;p&gt;Publicly committing to the &lt;code&gt;#100DaysOfCode&lt;/code&gt; challenge gave me some accountability for reporting what I’d done each day on Twitter, and eventually I started using tools like Toggl Track and Wakatime to record the time I was studying and actually working on things. Gamifying your progress can be a great incentive to keep trying to up your own “scores”, but more than anything it gives you tangible evidence that you’re really taking ownership over your own learning. Seeing weekly reports of the hours you’ve put in can give you that added boost of knowing you’re accomplishing something incrementally, especially if it feels like you’re just spinning your wheels in the moment. &lt;/p&gt;

&lt;p&gt;Similarly, take notes! When you’re watching a tutorial or researching a topic that’s unfamiliar to you, it’s immensely helpful to write down contexts for why something is the way it is, preferably with examples you can refer back to later. I personally recommend using &lt;a href="https://bear.app"&gt;Bear&lt;/a&gt; (it’s what I’m using to write this article), a free, full-featured note app that supports markdown and syntax highlighting. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://toggl.com"&gt;Toggl Track&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wakatime.com"&gt;Wakatime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bear.app"&gt;Bear App&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Be kind to yourself when you need a break
&lt;/h2&gt;

&lt;p&gt;Just as tracking your time can make you strive for more time spent working, it’s also important to step /away/ from the keyboard. You can’t learn everything there is to know about programming by staring at code for twelve hours a day, and more often than not life will throw you curveballs that will force you to take a break (and 2020 is the year of curveballs, if nothing else). Burnout is a very real issue for developers, so try to establish good habits from the get go by giving yourself time away from the keyboard. &lt;/p&gt;

&lt;p&gt;For me personally, that has meant juggling chronic migraines, raising my son, air toxicity (I live in Oregon, where we spent two weeks under a blanket of dangerous wildfire smoke), and any number of things on a daily basis that could either distract or derail my focus on coding. There’s always more I want to be doing, always more I wish I was learning, but I’ve learned to be patient and appreciate that even if the pace isn’t always as consistent as I’d like, I’m still moving forward bit by bit. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://simpleprogrammer.com/taking-breaks-will-boost-productivity/"&gt;Taking Breaks Will Boost Productivity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.m.wikipedia.org/wiki/Pomodoro_Technique"&gt;The Pomodoro Technique&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Push out of your comfort zone
&lt;/h2&gt;

&lt;p&gt;When you finally get the hang of a concept, a framework, a tool, etc., it can be easy to fall into the habit of continuing to revisit an area where you feel comfortable—and avoid things that you grapple with. This was me with JavaScript, which was extremely intimidating to me at first, and as a result I kept putting off diving into it. &lt;/p&gt;

&lt;p&gt;But most of the time, doing the thing that seems scary ends up being much less frightening than you thought initially, and it makes you get comfortable with the knowledge that a) you have a lot to learn, and b) you /can/ learn a lot. I spend some part of every day with JavaScript now, and I’ve come to really love it’s quirky personality and the staggering capabilities it has. I’ve gotten so used to trying things I don’t understand, at this point I’ve started making notes and bookmarks of complex topics to come back to or work towards. &lt;/p&gt;

&lt;h2&gt;
  
  
  Use your momentum as a spring board
&lt;/h2&gt;

&lt;p&gt;Learning to code is a daunting undertaking. There’s more to learn than any one person can cover in a lifetime, and things are changing all the time. It’s easy to get overwhelmed and feel like you aren’t getting anywhere, and an important component to the process is to keep pushing yourself forward. One of the best ways you can do this is to learn in public (by sharing your journey through #100DaysOfCode on Twitter, for example), and more directly, to engage with the developer community at large. &lt;/p&gt;

&lt;p&gt;As someone who deleted most social media accounts years ago, it can often be a hurdle for me to go from passively reading posts and following interesting people online to actively engaging with them, but I’m trying to get better about it (see the current article you’re reading...). &lt;/p&gt;

&lt;p&gt;More than anything though, if you reach Day 100 of your own challenge, keep going. Keep learning, keep coding. Build projects, connect with others online to learn from and share with. Do a second round of the challenge, or create one for yourself. &lt;/p&gt;

&lt;p&gt;I for one plan to keep coding everyday without exception, and am currently trying to land a job in the industry as a developer. I’ve realized the passion I have for this stuff seems to know no bounds, and completing 100DaysOfCode has only seemed to increase my appetite to learn and do more. If you’re just starting your journey, overwhelmed by all there is to learn and know, don’t worry. You’ve got this, and there are many of us here eager to support you along the way. &lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Beginning JavaScript - Variables and Primitive Data Types</title>
      <dc:creator>Timothy Merritt</dc:creator>
      <pubDate>Sat, 12 Sep 2020 15:12:57 +0000</pubDate>
      <link>https://dev.to/timmybytes/beginning-javascript-variables-and-primitive-data-types-49a1</link>
      <guid>https://dev.to/timmybytes/beginning-javascript-variables-and-primitive-data-types-49a1</guid>
      <description>Note: These are some beginner JavaScript concepts explained with as little jargon or complexity as possible. However, this is not an all-encompassing guide (yet), I am not a coding genius, and exceptions exist for some of these examples. The point here is just to get used to some core ideas of programming in JavaScript.




&lt;p&gt;As of a &lt;a href="https://insights.stackoverflow.com/survey/2018/"&gt;2018 StackOverflow&lt;/a&gt; survey, JavaScript is the most popular and widely used programming language today. If you're learning front-end web development, it's an essential skill alongside HTML and CSS, and while at first glance it might seem like JavaScript is just for flashy menu animations, it's a powerful programming language in its own right, and learning how to use it properly will not only help you build better projects, but also teach you more about how the Web works and how your work can best integrate with it.&lt;/p&gt;

&lt;p&gt;JavaScript is governed by the &lt;a href="https://en.wikipedia.org/wiki/ECMAScript"&gt;ECMAScript&lt;/a&gt; standard (if you ever see acronyms like ES6,ES2015, etc., this is what they're referring to), specifications that ensure its cross-compatibility between browsers and platforms, and integrate new features as JavaScript grows and evolves.&lt;/p&gt;

&lt;p&gt;When you’re just starting out with JavaScript, it’s important to focus on the basics. In any programming language, code defines a set of instructions with data. The format that data takes is called a &lt;strong&gt;data type&lt;/strong&gt; and the way those types work together is a &lt;strong&gt;data structure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As of &lt;a href="https://tc39.es/ecma262/2020/"&gt;ECMAScript 2020&lt;/a&gt;, JavaScript has &lt;a href="https://tc39.es/ecma262/2020/#sec-primitive-value"&gt;seven&lt;/a&gt; main—or &lt;strong&gt;primitive&lt;/strong&gt;—data types, five of which we’ll focus on here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Undefined type&lt;/li&gt;
&lt;li&gt;Null type&lt;/li&gt;
&lt;li&gt;Boolean type&lt;/li&gt;
&lt;li&gt;Number type&lt;/li&gt;
&lt;li&gt;String type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s also &lt;code&gt;BigInt&lt;/code&gt; and &lt;code&gt;Symbol&lt;/code&gt;, which are a bit out of the range of what you need to know as a beginner. If you’d like to read more about them, the Mozilla Developer docs have some great info on both &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Symbol"&gt;Symbols&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/BigInt"&gt;BigInts&lt;/a&gt;, but for now, let's focus on the others and the way in which values are stored and reused in JavaScript. &lt;/p&gt;



&lt;h2&gt;
  
  
  Data Types and Variables
&lt;/h2&gt;

&lt;p&gt;Data types can be assigned to &lt;strong&gt;variables&lt;/strong&gt; for ease of repeated use, and variables are simply symbolic names that represent a &lt;strong&gt;value&lt;/strong&gt; (the data type itself). In JavaScript, variables can be declared in three ways that affect how they can behave: &lt;code&gt;var&lt;/code&gt;,&lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt;.&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;var&lt;/span&gt; &lt;span class="nx"&gt;someVariableName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a value&lt;/span&gt;&lt;span class="dl"&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;aDifferentVariableName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a different value&lt;/span&gt;&lt;span class="dl"&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;anotherVariableName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a different value&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;
Three variables with separate values.





&lt;p&gt;Depending on what declaration statement is used to declare a variable, it can be confined to different parts of the code, unable to be used elsewhere. This is called &lt;strong&gt;scope&lt;/strong&gt;, and it affects where a variable is valid in a program.&lt;/p&gt;

&lt;p&gt;In the first example, &lt;code&gt;someVariableName&lt;/code&gt; is, you guessed it, the name of the variable, and &lt;code&gt;a value&lt;/code&gt; is the value of that variable. So if we were to use  &lt;code&gt;someVariableName&lt;/code&gt; somewhere in our code after declaring it (and it fell within a valid scope of use), the code would know we mean &lt;code&gt;a value&lt;/code&gt; when we use that variable again. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primitives&lt;/strong&gt; are the most basic &lt;em&gt;types&lt;/em&gt; of values a variable can hold. Because JavaScript is a &lt;a href="https://en.wikipedia.org/wiki/Type_system#Dynamic_type_checking_and_runtime_type_information"&gt;dynamically-typed language&lt;/a&gt;, variables aren’t explicitly associated with a particular data type, and can be assigned and reassigned values of all types—the variable name is just symbolic. What matters is the data type stored in the variable.&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;const&lt;/span&gt; &lt;span class="nx"&gt;someVariableName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;someVariableName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a different value&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;
Here someVariableName's value of "a value" is replaced when the variable is reassigned "a different value".





&lt;p&gt;Okay, this can get complex quick, but for now, let’s look at the most common kinds of primitive data types in JavaScript as assigned to simple variables. &lt;/p&gt;



&lt;h2&gt;
  
  
  &lt;h2 id="Undefined"&gt;Undefined and Null&lt;/h2&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Undefined&lt;/strong&gt; data types are those that don’t have anything assigned to them yet. Imagine you’ve got a factory you’re starting, but you haven’t decided just what your factory is going to make. The products of the factory are &lt;em&gt;undefined&lt;/em&gt;: you haven’t decided on their specifics yet, you just know they’re going to be &lt;em&gt;something&lt;/em&gt;.&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;const&lt;/span&gt; &lt;span class="nx"&gt;factoryProduct&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
The variable factoryProduct is declared, but not defined with a value, thus it is undefined.





&lt;p&gt;JavaScript automatically assigns this designation of &lt;code&gt;undefined&lt;/code&gt; if you haven’t explicitly declared what data type you’re using. As soon as you say your factory makes something specific, like pots or pencils, you &lt;em&gt;define&lt;/em&gt; the products, and they are no longer undefined.&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;const&lt;/span&gt; &lt;span class="nx"&gt;factoryProduct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pencil&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;
The value of factoryProduct is no longer an undefined type, and is now a string type.





&lt;p&gt;Undefined data types can be useful as a placeholder to come back to later in the program, if the value is going to be dependent on other factors. An undefined value is one that doesn’t exist &lt;em&gt;yet&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Null&lt;/strong&gt;, on the other hand, &lt;em&gt;is&lt;/em&gt; a value (sort of), but it’s an empty one. A variable with a value of &lt;code&gt;null&lt;/code&gt; is intentionally devoid of value... and that &lt;em&gt;is&lt;/em&gt; its value. Does your head hurt yet? Welcome to programming. &lt;/p&gt;

&lt;p&gt;A factory variable with an &lt;code&gt;undefined&lt;/code&gt; value is a factory that doesn’t know (or hasn’t been told) what it’s going to make yet. It might be pencils or candy bars or &lt;a href="https://mcphee.com/products/inflatable-unicorn-horn-for-cats"&gt;inflatable unicorn horns for cats&lt;/a&gt;. A factory with a value of &lt;code&gt;null&lt;/code&gt;, on the other hand, is one whose interior is a vacuum of nothingness as empty as the void. &lt;/p&gt;

&lt;p&gt;Great! Let’s continue. &lt;/p&gt;



&lt;h2&gt;
  
  
  &lt;h2 id="Boolean"&gt;Boolean&lt;/h2&gt;
&lt;/h2&gt;

&lt;p&gt;This can be a scary word when you first start out, but &lt;strong&gt;Booleans&lt;/strong&gt; are extremely simple: they’re either &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. That’s it. Your factory product either &lt;em&gt;is&lt;/em&gt; a pencil, or it isn’t.&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;const&lt;/span&gt; &lt;span class="nx"&gt;pencil&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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;pot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
There's no philosophical debating in programming. The pencil is true and the pot is false.





&lt;p&gt;Booleans (named after mathematician &lt;a href="https://en.wikipedia.org/wiki/George%20Boole"&gt;George Boole&lt;/a&gt;) can be really handy for checking for values or conditions in your code, and are often used as a kind of switch in the flow of a program. If something is &lt;code&gt;true&lt;/code&gt;, do this; if it’s &lt;code&gt;false&lt;/code&gt;, do something else. This can allow for dynamic operations to trigger in your code depending on if certain conditions are met:&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;factoryOpen&lt;/span&gt; &lt;span class="o"&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;span class="nx"&gt;makePencils&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;factoryOpen&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;doNotMakePencils&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;
Booleans help the logic of your code flow towards a desired outcome.





&lt;p&gt;See the &lt;code&gt;===&lt;/code&gt;? That’s called an &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators"&gt;equality operator&lt;/a&gt;. It’s checking that the &lt;code&gt;factoryOpen&lt;/code&gt; variable is &lt;code&gt;true&lt;/code&gt; in the Boolean sense of the value, instead of maybe just representing the &lt;em&gt;word&lt;/em&gt; true. More on those pesky equals signs later. &lt;/p&gt;



&lt;h2&gt;
  
  
  &lt;h2 id="Number"&gt;Number&lt;/h2&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;number&lt;/strong&gt; primitive is just what you think: a number! In other programming languages, there are often specific data types for different kinds of numbers with decimals, whole numbers, etc., but good old JavaScript keeps things simple by just calling most of them numbers. As mentioned earlier, there &lt;em&gt;is&lt;/em&gt; a &lt;code&gt;BigInt&lt;/code&gt; data type for exceptionally large numbers, but we don't need to cover those yet.&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;const&lt;/span&gt; &lt;span class="nx"&gt;numberOfPencils&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;382&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;








&lt;h2&gt;
  
  
  &lt;h2 id="String"&gt;String&lt;/h2&gt;
&lt;/h2&gt;

&lt;p&gt;In  JavaScript, as well as many other languages, a &lt;strong&gt;string&lt;/strong&gt; represents textual data as a sequence of characters surrounded by double or single quotes (either kind work, as the quotes aren't part of the actual stored value). Strings can include numbers or letters, but their value is read literally as textual data, not as numeric data. Hence why these strings are called &lt;strong&gt;string literals&lt;/strong&gt;.&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;const&lt;/span&gt; &lt;span class="nx"&gt;factoryProducts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pencils&lt;/span&gt;&lt;span class="dl"&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;factoryEmployee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Jay 8374-D7&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;
In the second example, Jay 8374-D7 has 





&lt;p&gt;A string can be as small as a single character, or encompass longer text. For text that spans multiple lines, adding a backslash to the end of the line break allows for more text to be stored in the variable.&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;const&lt;/span&gt; &lt;span class="nx"&gt;factoryMotto&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Make the best pencils /
we can make, from the best materials /
available.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
Splitting a string into multiple lines can help with readability for anyone who might need to work on your code (including you!).





&lt;p&gt;Since strings are &lt;em&gt;immutable&lt;/em&gt;, like all other JavaScript data types,  they can be reassigned after getting their initial value. Think of this as if you’re wearing a name tag written in permanent marker. Once you’ve written your name on your tag, you can’t try to squeeze new letters or words in. You &lt;em&gt;can&lt;/em&gt;, however, replace the name tag with a new one that includes your changes.&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;const&lt;/span&gt; &lt;span class="nx"&gt;nametag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Alicia&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;nametag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Tony&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
Strings can’t be changed, but they can be reassigned to a different value.





&lt;p&gt;This works with other data types as well.&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;const&lt;/span&gt; &lt;span class="nx"&gt;nametag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Alicia&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;nametag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;nametag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;845&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;








&lt;h2&gt;
  
  
  Summing Up
&lt;/h2&gt;

&lt;p&gt;The values you use in JavaScript are &lt;strong&gt;data types&lt;/strong&gt;, the most basic of which are called &lt;strong&gt;primitive&lt;/strong&gt; data types: &lt;strong&gt;Boolean&lt;/strong&gt;, &lt;strong&gt;Number&lt;/strong&gt;, &lt;strong&gt;String&lt;/strong&gt;, &lt;strong&gt;Undefined&lt;/strong&gt;, and &lt;strong&gt;Null&lt;/strong&gt;. Other common data types include arrays, functions, and objects, but we'll cover those in the next article, where we'll also talk more about how data types can be assigned and compared, and start manipulating our values in interesting ways. Happy coding!&lt;/p&gt;

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