<?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: Dani</title>
    <description>The latest articles on DEV Community by Dani (@thrivensunshine).</description>
    <link>https://dev.to/thrivensunshine</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%2F257518%2Fa68f5e1a-91ac-4fe9-a362-1db61ddfeeec.jpeg</url>
      <title>DEV Community: Dani</title>
      <link>https://dev.to/thrivensunshine</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thrivensunshine"/>
    <language>en</language>
    <item>
      <title>100 Days of code challenge - worth it !  </title>
      <dc:creator>Dani</dc:creator>
      <pubDate>Sat, 11 Apr 2020 19:16:22 +0000</pubDate>
      <link>https://dev.to/thrivensunshine/100-days-of-code-4d9a</link>
      <guid>https://dev.to/thrivensunshine/100-days-of-code-4d9a</guid>
      <description>&lt;p&gt;A little more than a year ago I found myself at a crossroads; I was preparing to change careers. The only problem is, I had no experience or knowledge of the career I wanted to get into. All I knew is I wanted to learn to code and to pursue a future in tech.&lt;br&gt;
Now, I'll spare you the whole story of that arduous endeavor because, &lt;em&gt;thats not what we're here to talk about&lt;/em&gt;.&lt;br&gt;
We're here to talk about the:&lt;/p&gt;

&lt;h3&gt;
  
  
  100 Days Of Code Challenge
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;and why I think YOU should participate&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;This challenge played an enormous role in my career change as well as my growth as a developer, and helped me to immerse myself into a supportive community of learners. &lt;/p&gt;

&lt;p&gt;I had just started looking into freecodecamp.org in late 2018 without a clue about what I was doing, what the jargon meant, or anything really. I was reading everything I could about success stories about career changes, and resources and stumbled upon the 100daysOfCode challenge, and I got excited. It felt like something I could do, something I could accomplish everyday, something that had an attainable end goal. As a newb... this was appealing.&lt;/p&gt;

&lt;p&gt;so what is it? &lt;br&gt;
as I understood it &lt;/p&gt;

&lt;h4&gt;
  
  
  the &lt;em&gt;100 Days Of Code&lt;/em&gt; challenge is a public commitment to code for at least an hour, everyday, for 100 days and tweet about it.
&lt;/h4&gt;

&lt;p&gt;My public commitment was made on twitter- then every day I tweeted with the day and the hashtag #100DaysOfCode&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%2Fi%2Fr2a7ymync2vl1ezzdapa.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%2Fi%2Fr2a7ymync2vl1ezzdapa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since that day I have completed 3 full 100 days code and one partial (I started over in the new year) so 356 days. &lt;br&gt;
In that time I completed a coding bootcamp, attended awesome conferences, made some amazing dev friends and got my first job in tech as Junior Dev! Participating in the 100 days challenge helped to connect me to other people just starting out, as well as established devs who could lend a helping hand and all levels in between. It helped to keep me motivated, and to keep me practicing, to keep me coding- which is the goal above all.&lt;/p&gt;

&lt;p&gt;So let me share what I've learned and how I might go about my next 100 days of code.&lt;/p&gt;

&lt;h3&gt;
  
  
  First things first
&lt;/h3&gt;

&lt;p&gt;This challenge is to keep you coding, everyday - that being said - Life happens, this is not meant to cause anxiety or to stress you out. It's to help you learn, and improve your skills. It's meant to aid you, not hinder. Keep on it, everyday, but remember the purpose it be helpful.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interact with other people participating
&lt;/h3&gt;

&lt;p&gt;Check out what other people are doing. You may find useful information, or have tips someone else could use. Use it as an opportunity to build your network, make friends, find coding buddies (the best), and essentially become part of a bigger community. You will be surprised how important that can be to you in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practice Deliberately
&lt;/h3&gt;

&lt;p&gt;When I first started I felt like I was wandering around in the dark. I would work on something for a week and then find something else to work on, I was all over the place.&lt;br&gt;
I would suggest setting some goals for yourself. Figure out what you want to learn, what you want to improve, and give yourself some milestones to hit. It doesn't have to be one thing, or one track- but you should see the end of the path and be heading in that direction.&lt;br&gt;
Setting &lt;em&gt;measurable&lt;/em&gt; goals will help &lt;/p&gt;

&lt;h3&gt;
  
  
  Don't worry about "boring" tweets
&lt;/h3&gt;

&lt;p&gt;At one point I got caught up in trying to put something "new" in every tweet- this only aided in me not staying focused to one or two things. It's ok if you're coding the same stuff. Practice is about do the same thing and improving on it. You can find a new thought or observation in what you're doing but sometimes its gonna feel like you're just saying the same thing you did the day before. This is fine- tweet it anyway! &lt;/p&gt;

&lt;h3&gt;
  
  
  Consistency
&lt;/h3&gt;

&lt;p&gt;Consistency is important in any endeavor. If you can stick to a schedule do it. It will make it easier to get into the right mindset and will help you it your goals.&lt;/p&gt;

&lt;h1&gt;
  
  
  KEEP ON CODING
&lt;/h1&gt;

&lt;p&gt;practice practice practice&lt;/p&gt;

&lt;p&gt;I know some people focus heavy on tutorials, others on just making things.&lt;br&gt;
If you can find a tutorial where you make something I think you got the best of both worlds. Build stuff, ask questions, code, code, code.&lt;/p&gt;

&lt;p&gt;This is what I have for now folks, and I'll add more as it comes to me, as well as resources. If you have tips or resources add em!! Im open to questions, find me the twittah &lt;a href="https://twitter.com/thrivensunshine" rel="noopener noreferrer"&gt;https://twitter.com/thrivensunshine&lt;/a&gt;&lt;br&gt;
I highly suggest trying 100 Days Of Code!  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Remember its supposed to be helpful&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Interact with other people! Get Involved&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Practice Deliberately&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Tweet regardless- even if it feels like the same tweet!&lt;/em&gt; &lt;br&gt;
&lt;em&gt;Keep Consistency&lt;/em&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Practice Make Better
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Happy Coding
&lt;/h1&gt;

</description>
      <category>100daysofcode</category>
      <category>codenewbie</category>
      <category>womenintech</category>
      <category>freecodecamp</category>
    </item>
    <item>
      <title>For loop </title>
      <dc:creator>Dani</dc:creator>
      <pubDate>Mon, 02 Dec 2019 00:45:18 +0000</pubDate>
      <link>https://dev.to/thrivensunshine/for-loop-31oj</link>
      <guid>https://dev.to/thrivensunshine/for-loop-31oj</guid>
      <description>&lt;p&gt;We have all been new to code at some point in our lives. Some more recently than others. I am on the more recent side of learning to code and have had my mind blown by some of the concepts I have come across. Learning is fun! But it can also be difficult. Some of the most basic concepts that can be the most frustrating to learn for a newbie. For me, the &lt;em&gt;first&lt;/em&gt; (first of many, and more to come I'm sure) frustrating concept was the java script &lt;em&gt;for loop&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Now for you experienced developers out there, you're probably thinking about what an easy thing a for loop is. Let me reassure you, that for a newb- it most certainly is not.&lt;/p&gt;

&lt;p&gt;In this blog post I will try to explain the for loop in simple words, that I had wished was out there when I was learning. This is my attempt to simplify, I hope I don't miss the mark! &lt;/p&gt;

&lt;p&gt;To start, a for loop is a function that iterates through a data type. This means it goes through data piece by piece. This is very useful in Javascript. &lt;/p&gt;

&lt;p&gt;lets start with a simple array and a simple function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;c2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;d3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;e4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;f5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nx"&gt;loopy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//this can also be written as &lt;/span&gt;
&lt;span class="c1"&gt;// function(arr){&lt;/span&gt;
&lt;span class="c1"&gt;//    console.log(arr)&lt;/span&gt;
&lt;span class="c1"&gt;// } &lt;/span&gt;
&lt;span class="c1"&gt;// but for the purposes of this blog we will use the arrow function &lt;/span&gt;

&lt;span class="nx"&gt;loopy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myArr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;//output = ['a0','b1','c2','d3','e4','f5']&lt;/span&gt;

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



&lt;p&gt;if we want to add 1 to each of these numbers in the array we could add them manually but there is a faster way using the for loop. The for loop takes three in statements and looks like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;statement&lt;/span&gt; &lt;span class="nx"&gt;one&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;statement&lt;/span&gt; &lt;span class="nx"&gt;two&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;statement&lt;/span&gt; &lt;span class="nx"&gt;three&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// always remember its a ";" and NOT a "," between the arguments. when //your starting out and running into problems check this first!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;argument one will be the variable you declare and its starting point, this is what you will call on when you make changes and or loop through the data. very commonly you will see this declared as "i" but it could be anything&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;argument&lt;/span&gt; &lt;span class="nx"&gt;two&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;argument3&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//this could easily be &lt;/span&gt;
&lt;span class="c1"&gt;//for(let banana = 0; argument two; argument3){&lt;/span&gt;
&lt;span class="c1"&gt;//}&lt;/span&gt;
&lt;span class="c1"&gt;// you can name the variable anything you'd like&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;argument two will be the conditions that you set for the variable. You &lt;em&gt;if&lt;/em&gt; statement if you will. Here you will say how far you want the loop to go. we have six pieces of data in out array so let's limit it to five so you can see how it works. Keep in mind arrays &lt;em&gt;start&lt;/em&gt; at the index 0. So if you say i &amp;lt; 5 then continue as long as i is less than 5&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;argument3&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//for(for let banana = 0; banana &amp;lt; 5; argument3){&lt;/span&gt;
&lt;span class="c1"&gt;//}&lt;/span&gt;
&lt;span class="c1"&gt;// you can name the variable anything you'd like&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The third statement is what gets executed after the last code runs. SO if you put i++ its saying to continue on with the code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//for(for let banana = 0; banana &amp;lt; 5; banana++){&lt;/span&gt;
&lt;span class="c1"&gt;//}&lt;/span&gt;
&lt;span class="c1"&gt;// you can name the variable anything you'd like&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now lets do something with the data we have. we can simply console log each index if we place the for loop inside of our function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;c2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;d3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;e4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;f5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nx"&gt;loopy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; is the index of the array &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; the pieces of data at that index&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;loopy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myArr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;//output &lt;/span&gt;
&lt;span class="c1"&gt;//0 is the index of the array a0 the pieces of data at that index&lt;/span&gt;
&lt;span class="c1"&gt;//1 is the index of the array b1 the pieces of data at that index&lt;/span&gt;
&lt;span class="c1"&gt;//2 is the index of the array c2 the pieces of data at that index&lt;/span&gt;
&lt;span class="c1"&gt;//3 is the index of the array d3 the pieces of data at that index&lt;/span&gt;
&lt;span class="c1"&gt;//4 is the index of the array e4 the pieces of data at that index&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;and now that you can access the data in the array you can do so much more! &lt;/p&gt;

</description>
    </item>
    <item>
      <title>SQL Queries </title>
      <dc:creator>Dani</dc:creator>
      <pubDate>Mon, 25 Nov 2019 00:17:24 +0000</pubDate>
      <link>https://dev.to/thrivensunshine/sql-queries-2kl8</link>
      <guid>https://dev.to/thrivensunshine/sql-queries-2kl8</guid>
      <description>&lt;p&gt;SQL stands for Structured Query Language (to not take anything for granted, query is a term meaning to retrieve data). It's a very useful for programmers when dealing with databases of all sizes. &lt;/p&gt;

&lt;p&gt;There are a number of different database management systems that use SQL, I currently use PostrgeSQL and SQLite3. Each management system has their own specifics to how to access the data but for the most part they generally cross over. &lt;/p&gt;

&lt;p&gt;For our example we will use SQLite3 and will go over a very simple database and introduce &lt;em&gt;how&lt;/em&gt; to access the data so that you can go and traverse even larger and more complex databases in the future.&lt;/p&gt;

&lt;p&gt;If you are unsure if you have SQLite3 you can open up your terminal and type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which sqlite3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;if the output is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/sqlite3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;then you are good to go. If not you can go to &lt;a href="https://www.sqlite.org/docs.html"&gt;https://www.sqlite.org/docs.html&lt;/a&gt;&lt;br&gt;
to find out how to install on to your computer &lt;/p&gt;

&lt;p&gt;Since we are all set up lets start by making a very simple database. In this example I will create a database but wont go into to much depth as this is more about accessing data than creating it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sqlite3 practice 
(creating a database called practice)

sqlite&amp;gt; CREATE TABLE people(
        id INTEGER PRIMARY KEY,
        name TEXT,
        age INTEGER,
        favcolor TEXT
        );
(we've created the table)

sqlite&amp;gt; INSERT INTO people (name, age, favcolor) VALUES
        ('Peggy', 68, 'red'),
        ('Reptar', 27, 'green'),
        ('Link', 33, 'green'),
        ('Marge', 36, 'blue');
 (we've added some data)

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



&lt;p&gt;Here we see we have created a very simple database with four columns, and we've added four rows. So how do we now access this data?&lt;/p&gt;

&lt;p&gt;As you can see in the above example there are words in all caps. These are keywords in SQL. You don't &lt;em&gt;have&lt;/em&gt; to write them in all caps but industry standard suggests that you do. Keywords in SQL are easy to use. Here is a list of the possible keywords to use &lt;a href="https://www.sqlite.org/lang_keywords.html"&gt;https://www.sqlite.org/lang_keywords.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in order to get data we will first use the SELECT keyword. SELECT does exactly what it sounds like- it will SELECT something. The next keyword we'll use is FROM, to tell SQL &lt;em&gt;where&lt;/em&gt; to &lt;em&gt;select&lt;/em&gt; &lt;em&gt;from&lt;/em&gt; i.e.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sqlite&amp;gt; SELECT name_of_column FROM name_of_table
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;'*' is another thing you can use to indicate "all". Its fine with smaller databases but as standard its better to be clear and specific. So we could type something like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sqlite&amp;gt; SELECT * FROM people
(and our output would look like this)

1|Peggy|68|red
2|Reptar|27|green
3|Link|33|green
4|Marge|36|blue
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;it gives us the id, name, age, and favcolor &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Slicing in Python</title>
      <dc:creator>Dani</dc:creator>
      <pubDate>Fri, 15 Nov 2019 04:58:38 +0000</pubDate>
      <link>https://dev.to/thrivensunshine/slicing-in-python-2hlk</link>
      <guid>https://dev.to/thrivensunshine/slicing-in-python-2hlk</guid>
      <description>&lt;p&gt;Learning a new programming language can seem like a daunting task. As overwhelming as it may seem; the more you learn, you will start to see similarities, and common types of practices that traverse multiple languages. One of these similarities include the idea of "slicing" some form of data. &lt;br&gt;
Slicing does exactly what it implies, it "slices" up data into smaller parts. Every language has their own particular way of doing this. Lets take a look at how Python in particular handles this kind of operation.&lt;br&gt;
First let's start with making two different variables, one a string, the other a list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, I am a string!"&lt;/span&gt;
&lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"A0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"B1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"C2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"D3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"E4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"F5"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

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



&lt;p&gt;There is a different character at each index. If we wanted to call up that character we could write something like this, using a square bracket&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "l" as l is in the third index of the string. 
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "A0" as "D3" is the first index in the list, and index count starts as 0 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If we wanted to start &lt;em&gt;slicing&lt;/em&gt; things up, all we need to add is a simple colon ":". The colon will indicate a &lt;em&gt;starting&lt;/em&gt; point. It will output the data starting at that point. If you don't add a number after the colon it will automatically print the rest of the length&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, I am a string!"&lt;/span&gt;
&lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"A0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"B1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"C2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"D3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"E4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"F5"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;string_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;list_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "lo, I am a string!"
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "['A0', 'B1', 'C2', 'D3', 'E4', 'F5']"
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you were to add a number after the colon you would be giving it an &lt;em&gt;end&lt;/em&gt; point, for example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, I am a string!"&lt;/span&gt;
&lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"A0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"B1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"C2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"D3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"E4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"F5"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;string_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;list_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "lo, I"
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "['A0', 'B1', 'C2']"
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;for my list_splice we are essentially saying &lt;em&gt;start&lt;/em&gt; at the 0 index, then move 3 spaces forward and stop. we have just successfully sliced our data&lt;br&gt;
But we aren't done yet! A third number can be added, called the step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, I am a string!"&lt;/span&gt;
&lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"A0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"B1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"C2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"D3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"E4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"F5"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;string_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_string&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;list_splice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;my_list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "Hlo  masrn!"
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list_splice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#output would be "['A0', 'C2', 'E4']"
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;the step will essentially say, start at an index:end at this index:take this step through out &lt;/p&gt;

&lt;p&gt;and there you have it. A way to slice data in python.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
