<?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: Katelyn</title>
    <description>The latest articles on DEV Community by Katelyn (@katelynjewel).</description>
    <link>https://dev.to/katelynjewel</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%2F711447%2F131bd0fb-94ec-4402-a717-89cedf7e5160.jpeg</url>
      <title>DEV Community: Katelyn</title>
      <link>https://dev.to/katelynjewel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/katelynjewel"/>
    <language>en</language>
    <item>
      <title>Git Commands That Could Save your Project</title>
      <dc:creator>Katelyn</dc:creator>
      <pubDate>Tue, 04 Jan 2022 22:51:18 +0000</pubDate>
      <link>https://dev.to/katelynjewel/git-commands-that-could-save-your-project-2hi3</link>
      <guid>https://dev.to/katelynjewel/git-commands-that-could-save-your-project-2hi3</guid>
      <description>&lt;p&gt;If you haven't had a chance to utilize Github with your projects, now is a good time to consider it. Github is a distributed version control system that is intended to help you keep track of changes you've made to files in your project as well as make collaboration among developers more streamlined. On top of these, Github's will also let you revert to a previous version of your project if something goes awry because of the change history it stores on your local machine. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3emb4gvt0nq2qrhwc1v.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3emb4gvt0nq2qrhwc1v.png" alt="Git Overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below are some easy to use commands that may help you survive possible project disasters. &lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring your Project
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git config --global user.name "Your Name"&lt;/code&gt;&lt;br&gt;
Set the name that will be attached to your commits and tags.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git config --global user.email "you@example.com"&lt;/code&gt;&lt;br&gt;
Set the email address that will be attached to your commits and tags.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git config --global color.ui auto&lt;/code&gt;&lt;br&gt;
Enable some colorization of Git output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Starting a Project
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git init [project name]&lt;/code&gt;&lt;br&gt;
Create a new local repository. If [project name] is provided, Git will create a new directory name [project name] and will initialize a repository inside it. If [project name] is not provided, then a new repository is initialized in the current directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git clone [project url]&lt;/code&gt;&lt;br&gt;
Downloads a project with the entire history from the remote repository. &lt;/p&gt;

&lt;h3&gt;
  
  
  Daily Necessities
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git status&lt;/code&gt;&lt;br&gt;
Displays the status of your working directory. Options include new, staged, and modified files. It will retrieve branch name, current commit identifier, and changes pending commit. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git add [file]&lt;/code&gt;&lt;br&gt;
Add a file to the staging area. Use in place of the full file path to add all changed files from the current directory down in the directory tree. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git diff [file]&lt;/code&gt;&lt;br&gt;
Shows changes between working directory and staging area.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git diff --staged [file]&lt;/code&gt;&lt;br&gt;
Shows any changes between the staging area and the repository.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git checkout -- [file]&lt;/code&gt;&lt;br&gt;
Discard changes in working directory. This operation is unrecoverable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git reset [file]&lt;/code&gt;&lt;br&gt;
Revert your repository to a previous known working state.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git commit&lt;/code&gt;&lt;br&gt;
Create a new commit from changes added to the staging area. The commit must have a message (ex. &lt;code&gt;git commit -m [message here]&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git rm [file]&lt;/code&gt;&lt;br&gt;
Remove file from working directory and staging area.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git stash&lt;/code&gt;&lt;br&gt;
Put current changes in your working directory into stash for later use.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git stash pop&lt;/code&gt;&lt;br&gt;
Apply stored stash content into working directory, and clear stash.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git stash drop&lt;/code&gt;&lt;br&gt;
Delete a specific stash from all your previous stashes. &lt;/p&gt;

&lt;h3&gt;
  
  
  Branching
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git branch [-a]&lt;/code&gt;&lt;br&gt;
List all local branches in repository. With -a: show all branches (with remote).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git branch [branch name]&lt;/code&gt;&lt;br&gt;
Create new branch, referencing the current main.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git checkout [-b][branch_name]&lt;/code&gt;&lt;br&gt;
Switch working directory to a specified branch. With -b: Git will create specified branch if it does not exist.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git merge [from name]&lt;/code&gt;&lt;br&gt;
Join specified [from name] branch into your current branch (the one you are currently on).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git branch -d [name]&lt;/code&gt;&lt;br&gt;
Remove selected branch , if it is already merged into any other. -D instead of -d forces deletion. &lt;/p&gt;

&lt;h3&gt;
  
  
  Review &amp;amp; Revert work
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git log [-n count]&lt;/code&gt;&lt;br&gt;
List commit history of current branch. -n count limits list to last n commits.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git log --oneline --graph --decorate&lt;/code&gt;&lt;br&gt;
An overview with reference labels and history graph. One commit per line.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git log  ref..&lt;/code&gt;&lt;br&gt;
List commits that are present on the current branch and not merged into ref. A ref can be a branch name or a tag name. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git log ..reg&lt;/code&gt;&lt;br&gt;
List commit that are present on reg and not merged into current branch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git reflog&lt;/code&gt;&lt;br&gt;
List operations (ex. checkouts or commits) made on local repository. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git reset [--hard] [target reference]&lt;/code&gt;&lt;br&gt;
Switches the current branch to the target reference, leaving a difference as an uncommitted change. When --hard is used, all changes are discarded.  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git revert [commit sha]&lt;/code&gt;&lt;br&gt;
Create a new commit, reverting changed from the specified commit. It generates an inversion of changes. &lt;/p&gt;

&lt;h3&gt;
  
  
  Repository syncing
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git fetch [remote]&lt;/code&gt;&lt;br&gt;
Fetch changes from the remote, but not update tracking branches.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git fetch --prune [remote]&lt;/code&gt;&lt;br&gt;
Delete remote Refs that were removed from the remote repository. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git pull [remote]&lt;/code&gt;&lt;br&gt;
Fetch changes from the remote and merge current branch with its upstream. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git push -u [remote] [branch]&lt;/code&gt;&lt;br&gt;
Push local branch to remote repository. Set its copy as an upstream. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hojum6tve75rdcnlwjo.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hojum6tve75rdcnlwjo.png" alt="Git Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&gt;

&lt;p&gt;You should really consider a secondary back up as you work on projects in case something goes wrong. Github is a great option that also allows collaboration amongst groups.&lt;/p&gt;

</description>
      <category>github</category>
      <category>programming</category>
      <category>beginners</category>
      <category>git</category>
    </item>
    <item>
      <title>Let's Talk Logical Operators</title>
      <dc:creator>Katelyn</dc:creator>
      <pubDate>Thu, 09 Dec 2021 21:26:31 +0000</pubDate>
      <link>https://dev.to/katelynjewel/lets-talk-logical-operators-1gnd</link>
      <guid>https://dev.to/katelynjewel/lets-talk-logical-operators-1gnd</guid>
      <description>&lt;h2&gt;
  
  
  We're going to go over three of the logical operators that Javascript uses:
&lt;/h2&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ia76ynvidwmmwgd3557.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ia76ynvidwmmwgd3557.png" alt="truthy operator values"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use a logical operator?
&lt;/h3&gt;

&lt;p&gt;The benefit of a logical operator is to connect two (or more!) expressions so that the value of the total (all of the expressions you just connected) is dependent on those expressions. &lt;/p&gt;

&lt;p&gt;These operators are used within code to compare variables and values when creating various logic methods, often using their boolean values. When used within functions it gives more logic options for the code to use and change based on user behavior. This can also help DRY up code in condensing functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  ! (NOT)
&lt;/h3&gt;

&lt;p&gt;The NOT &lt;code&gt;!&lt;/code&gt; operator is generally used as a boolean. Logical NOT will have truthy value if the operator it's called on (like &lt;code&gt;!(6 === 3)&lt;/code&gt; is false and vice-versa (like &lt;code&gt;!(6 === 6)&lt;/code&gt; is considered a false value. Here's a different way of wording the NOT operator with the previous examples: Return true if x is not strictly equal to y, otherwise return false. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7zfe4gt7jnhzc134bnp.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7zfe4gt7jnhzc134bnp.png" alt="Logical Operators"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &amp;amp;&amp;amp; (AND)
&lt;/h3&gt;

&lt;p&gt;The AND &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; operator will return true if both sides of the operator or boolean values are true (&lt;code&gt;(x &amp;lt; 10 &amp;amp;&amp;amp; y &amp;gt; 1)&lt;/code&gt; is true) otherwise, it returns false. In other words, when using the AND operator, if both x and y are true, then the logic as a whole is true. If one part of the logic is false, the whole problem returns false. It's also important to not that you can chain on the AND operator more than once. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdn3yv2zl5t3ne63j8yiv.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdn3yv2zl5t3ne63j8yiv.png" alt="AND Operator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  || (OR)
&lt;/h3&gt;

&lt;p&gt;As with the other operators, the OR &lt;code&gt;||&lt;/code&gt; operator is usually used within a boolean context. A problem using the OR operator will return true if either side of the values are true. If either/both x or y are true, return true. If both are false, return false. It's also important to not that you can chain on the OR operator more than once. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8th6s63s8fiom947h8ja.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8th6s63s8fiom947h8ja.png" alt="OR Operator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What if you mix operators?
&lt;/h3&gt;

&lt;p&gt;Operators can be mixed within one expression. However, logical operators use an order of precedence, called logical operator precedence if that occurs. The order is as follows: logical NOT (&lt;code&gt;!&lt;/code&gt;), logical AND (&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;), then logical OR (&lt;code&gt;||&lt;/code&gt;)&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvqvcgup97hhnj0osj12.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvqvcgup97hhnj0osj12.png" alt="example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;NOT &lt;code&gt;!&lt;/code&gt; - this will negate a boolean value (!is = is not)&lt;/li&gt;
&lt;li&gt;AND &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; - can be used with two (or more) values and will return true if all values are also true, will return false otherwise&lt;/li&gt;
&lt;li&gt;OR &lt;code&gt;||&lt;/code&gt; - can also be used with two (or more) values and will return if any of the values are true, will return false if all of the values are false&lt;/li&gt;
&lt;li&gt;if you use these operators in the same expression, keep in mind the order in which Javascript will go through them. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Controlled vs Uncontrolled Components</title>
      <dc:creator>Katelyn</dc:creator>
      <pubDate>Tue, 23 Nov 2021 23:49:22 +0000</pubDate>
      <link>https://dev.to/katelynjewel/controlled-vs-uncontrolled-components-44e0</link>
      <guid>https://dev.to/katelynjewel/controlled-vs-uncontrolled-components-44e0</guid>
      <description>&lt;h2&gt;
  
  
  What is the difference between controlled and uncontrolled components in react?
&lt;/h2&gt;

&lt;p&gt;To put simply, controlled components have their data being handled with a react component whereas an uncontrolled component's data is being handled with the DOM itself. Let's dig into this answer a bit more though starting at the basics and including a few visual examples. &lt;/p&gt;

&lt;h3&gt;
  
  
  What are controlled and uncontrolled components?
&lt;/h3&gt;

&lt;p&gt;Form elements are rendered with HTML within React components where data is being accessed and manipulate. &lt;em&gt;When we are discussing uncontrolled and controlled components these are terms that are specifically discussing the way in which the form created is handling and accessing that said data.&lt;/em&gt; The data handling can be done a few different ways but is commonly seen using typed elements like, &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; or selected elements such as: &lt;code&gt;&amp;lt;checkbox&amp;gt;, &amp;lt;select&amp;gt;, &amp;lt;radiobutton&amp;gt;&lt;/code&gt;.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xp30fh9v4sjfj1kv45w.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xp30fh9v4sjfj1kv45w.png" alt="Visual chart with differences between controlled and uncontrolled components"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Controlled Components
&lt;/h3&gt;

&lt;p&gt;As we stated earlier controlled components handle their updated data using use state. This would look like setting the value for the input form element to &lt;code&gt;this.state.value&lt;/code&gt; or to a use state. When setting these element's value to use state, we have wrapped up the control for both the rendering of the form as well as future input of the form into the same React component. Another way to think of is is that the React state will always act as "the source of truth". As users interact with the form, handleChange will run on every keystroke or interaction - which then updates the React state. &lt;/p&gt;

&lt;p&gt;The React documentation acknowledges that writing out controlled components can feel banal since you do need to create an event handler for each way the data can change while also containing that in the React component use state.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2sxyth0k3icozju567j.jpeg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2sxyth0k3icozju567j.jpeg" alt="controlled vs uncontrolled forms"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Uncontrolled Components
&lt;/h3&gt;

&lt;p&gt;A helpful tidbit to remember about uncontrolled components is that the part of the reason it's uncontrolled is because the value is set by the user and not by the program. With this in mind the input: &lt;code&gt;&amp;lt;input type="file" /&amp;gt;&lt;/code&gt; will always be uncontrolled without the value being set. This will render the for element's, where the form element's data is handled by the DOM. In this way it functions similarly to traditional HTML code. &lt;/p&gt;

&lt;p&gt;Due to uncontrolled components keeping their "source of truth" in the DOM, it is sometimes easier to integrate React and non-React code when using uncontrolled components. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet4eofywmwcdzb1k0d5o.jpeg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet4eofywmwcdzb1k0d5o.jpeg" alt="controll vs uncontroll"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj5gv0ed3xiylid1yblr.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj5gv0ed3xiylid1yblr.png" alt="kyle's version"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The primary difference between a controlled component vs an uncontrolled component is related to how they handle their value. Uncontrolled components pass down the value through props. In contrast, controlled components use state to handle the value internally. For most use cases, controlled components are the best option in code. &lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>forms</category>
    </item>
    <item>
      <title>Algorithmic Problem Solving - Step by Step</title>
      <dc:creator>Katelyn</dc:creator>
      <pubDate>Thu, 18 Nov 2021 15:16:36 +0000</pubDate>
      <link>https://dev.to/katelynjewel/algorithmic-problem-solving-step-by-step-58jj</link>
      <guid>https://dev.to/katelynjewel/algorithmic-problem-solving-step-by-step-58jj</guid>
      <description>&lt;p&gt;Let's be real - in the current job market most employers want to know that you can not only learn a coding language, but also apply it while actively problem solving. In walks algorithm problems (or also fondly know as &lt;em&gt;algos&lt;/em&gt;) which are often used as a tool for employers to filter for exactly what they're looking for. At first glance, algorithm problems can be intimidating! The secret to tackling these is going step by step.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo3dsjrxonnjz17gnova.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo3dsjrxonnjz17gnova.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to algorithmic problem solving
&lt;/h2&gt;

&lt;p&gt;Google often has a lot to tell us. One of the many things is how to go about solving a problem. There are four recommended steps: &lt;em&gt;analyze, implement, experiment, design.&lt;/em&gt; Lets go through these four steps and talk through what exactly is being recommended. &lt;/p&gt;

&lt;h4&gt;
  
  
  Analyze
&lt;/h4&gt;

&lt;p&gt;Read through the problem presented. What is the problem being presented? Are there any specifications being listed/stated? If it's easier to separate the problem into sections, do that! Try stating the problem in your own words to solidify that you understand the problem. &lt;/p&gt;

&lt;h4&gt;
  
  
  Implement
&lt;/h4&gt;

&lt;p&gt;We have a firm grasp of the problem at hand. Now, how would we go about solving this problem? What steps do we need to take to solve the problem? Write line by line (similar to how you would write out your code) what exactly you need to do to get the desired outcome. &lt;/p&gt;

&lt;h4&gt;
  
  
  Experiment
&lt;/h4&gt;

&lt;p&gt;This is the fun part - write out your own test cases for the code you'll eventually write. Include what you expect the return to be as well. Think through what you have written out so far, is there a test that would break your code? Include that too. Coding can be fun - embrace the unknown. &lt;/p&gt;

&lt;h4&gt;
  
  
  Design
&lt;/h4&gt;

&lt;p&gt;Thus far, we've read through the problem and grasped what is being presented to us. Then we've written out what we expect  to code out in JavaScript as well as made test cases. Now begin to actually code out the solution. Remember that the code may fail the test cases, try experimenting with the code and tests to see where the issue may be. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxtlsiq753r2hhdzk2vf.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxtlsiq753r2hhdzk2vf.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Our own algorithmic problem to solve
&lt;/h2&gt;

&lt;p&gt;Here's our problem: &lt;/p&gt;

&lt;p&gt;Confirm whether or not a word is a palindrome.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; isPalindrome('kayak')
= true

&amp;gt; isPalindrome('cheetah')
= false

&amp;gt; isPalindrome('tenet')
= true


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Analyze&lt;/strong&gt; &lt;br&gt;
The current problem is asking for a function that will confirm whether or not a string is the same both backwards and forwards. The example it gave is true or false which also implies that this will involve comparing the string at some point in my code.  For our use, let's assume that it will only give single word strings and that case doesn't matter or all strings are lowercase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement&lt;/strong&gt;&lt;br&gt;
Based on the problem's expected answer I'll probably attempt to solve the algorithm like so: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a function that takes a string as an argument&lt;/li&gt;
&lt;li&gt;Reverse the string (using built-in javascript methods like &lt;code&gt;.split()&lt;/code&gt; and &lt;code&gt;.reverse()&lt;/code&gt; could make this quicker but we're going to go the long way this time) so we'll need to run a for loop that iterates through the string&lt;/li&gt;
&lt;li&gt;Compare the initial string to the same string that is reversed using an if statement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Experiment&lt;/strong&gt;&lt;br&gt;
Let's make test cases with expected results! For now, I'll only list the test cases, but think through what you think will work. There's a couple palindromes that are actually two words instead of one, something that isn't accounted for in the hard code. Let's find out what the code does. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; isPalindrome("madam")
&amp;gt; isPalindrome("tacos")
&amp;gt; isPalindrome("trees")
&amp;gt; isPalindrome("race car")
&amp;gt; isPalindrome("racecar")
&amp;gt; isPalindrome("taco cat")
&amp;gt; isPalindrome("tacocat")


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;br&gt;
After rereading the problem and how it could be solved this is what should work:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function isPalindrome(str){
  let long = str.length;
  for(i = 0; i &amp;lt; long/2; i++){
    if (str[i] !== str[long -1 -i])
       return false;
  }
  return true;
}


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

&lt;/div&gt;

&lt;p&gt;Here's our results:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; isPalindrome("madam")
  // expect true
= true

&amp;gt; isPalindrome("tacos")
  // expect false
= false

&amp;gt; isPalindrome("trees")
  // expect false
= false

&amp;gt; isPalindrome("racecar")
  // expect true
= true

&amp;gt; isPalindrome("taco cat")
  // expect false
= false

&amp;gt; isPalindrome("race car")
  // expect false
= false

&amp;gt; isPalindrome("tacocat")
  // expect true
= true


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

&lt;/div&gt;

&lt;p&gt;It works!&lt;/p&gt;

&lt;p&gt;If using the built in methods from javascript we could do something shorter:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function isPalindrom(str) {
    return str == str.split('').reverse().join('');
}


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

&lt;/div&gt;

&lt;p&gt;That's an algorithm problem from start to finish. Though intimidating, they are definitely possible to tackle. Remember - analyze, implement, experiment, and design make breaking down the problem into bite size pieces easier. &lt;/p&gt;

&lt;p&gt;Good luck!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>algorithms</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What Made You Decide to do a Coding Bootcamp?</title>
      <dc:creator>Katelyn</dc:creator>
      <pubDate>Thu, 28 Oct 2021 18:43:31 +0000</pubDate>
      <link>https://dev.to/katelynjewel/what-made-you-decide-to-do-a-coding-bootcamp-41g</link>
      <guid>https://dev.to/katelynjewel/what-made-you-decide-to-do-a-coding-bootcamp-41g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;"What made you decide to do a coding bootcamp?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For those that have made a big career shift of any kind but particularly into the tech field this question is probably familiar. Changing careers from Social Work to Software Engineering has had many people asking this question, sometimes multiple times. At this point, I have most of my answer rehearsed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's a field that is constantly changing&lt;/li&gt;
&lt;li&gt;Working remotely is more often an option - thus making it more possible to travel while working&lt;/li&gt;
&lt;li&gt;The emotional toll is a lot less than social work&lt;/li&gt;
&lt;li&gt;Opportunities are endless - jobs are available in almost every field of interest&lt;/li&gt;
&lt;li&gt;There's still opportunity for helping others in this line of work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This list is just a start too. Some of these are particular to my experiences and preferences. However there are plenty of shared reasons that draw people to make the change. After taking time to do some research on the job field at large, I was easily convinced this was a good decision for me. Here are three reasons that might convince you too: &lt;/p&gt;

&lt;h3&gt;
  
  
  Development is a growing field
&lt;/h3&gt;

&lt;p&gt;In 2020, during a time that many job fields declined  due to COVID, software development continued to grow. It's expected that in the next 10 years alone, the job market will grow by 20%. The US Bureau of Labor Statistics estimates around 150,000 open positions a year. As the daughter of someone from the boomer generation, the phrase "job security" has been hammered in as an important attribute of any job decision. As far as security goes - a growth rate of 20% isn't bad. &lt;/p&gt;

&lt;h3&gt;
  
  
  Development is inherently a team based role
&lt;/h3&gt;

&lt;p&gt;Due to the nature of projects - collaboration is an expectation in this field. The need for diversity within teams becomes more necessary due to this as well. A solid team will be communicative, diverse, and goal oriented. (This is not a complete list, but for our purposes it's enough.) For those who are like me and enjoy working with people - this is a huge draw. The initial stereotype is working on a computer by yourself. Thankfully, only half of that is true. &lt;/p&gt;

&lt;h3&gt;
  
  
  Software Development is a lot like puzzling
&lt;/h3&gt;

&lt;p&gt;Often you'll hear that HTML is like the skeleton, CSS is like the skin, and Javascript is like the brain. Another way to look at it is that HTML and CSS are the edges and corners of a puzzle with Javascript as the the all the middle pieces. There's a lot of time figuring out how individual pieces work together, you have an idea of what the ending result will look like, and sometimes you'll want to make pieces fit that don't. Finally, both have that euphoric feeling of accomplishment when you figure out a section that was proving to be particularly difficult. &lt;/p&gt;

&lt;p&gt;Overall, changing careers is equally terrifying and exhilarating. For me, a list makes the decision process (as well as the reminder of why I made said decision) that much easier. Whatever has lead you down this path, preparing for what's ahead, and remembering why you started down this road helps with the ups and downs. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>bootcamps</category>
    </item>
  </channel>
</rss>
