<?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: SparkedScience</title>
    <description>The latest articles on DEV Community by SparkedScience (@sparkedscience).</description>
    <link>https://dev.to/sparkedscience</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%2F460544%2F2aef92b4-87f9-4dd6-ba03-6d622cb3eb2e.png</url>
      <title>DEV Community: SparkedScience</title>
      <link>https://dev.to/sparkedscience</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sparkedscience"/>
    <language>en</language>
    <item>
      <title>Carded, but with Flashes</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 13 Dec 2021 01:43:18 +0000</pubDate>
      <link>https://dev.to/sparkedscience/carded-but-with-flashes-ick</link>
      <guid>https://dev.to/sparkedscience/carded-but-with-flashes-ick</guid>
      <description>&lt;p&gt;I'm in some kind of mood tonight. I've been banging my head against a wall of code (New favorite phrase) all night with Java, so naturally we should talk about JavaScript. &lt;/p&gt;

&lt;h1&gt;
  
  
  The project
&lt;/h1&gt;

&lt;p&gt;We, being PenStat (links in the bottom), were tasked with creating a flash card element. We took to recreating the original design as close as possible. Here is the reference:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f4V_kVgE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yxk7ar4tl4hxm2qftzrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f4V_kVgE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yxk7ar4tl4hxm2qftzrc.png" alt="Original Flashcard" width="430" height="489"&gt;&lt;/a&gt;&lt;br&gt;
And here is our final product: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0mWiwk-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3zmz8m7esxm8r5jxdhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0mWiwk-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3zmz8m7esxm8r5jxdhx.png" alt="Finished Flashcard" width="368" height="469"&gt;&lt;/a&gt;&lt;br&gt;
There are a few key differences...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We implemented &lt;a href="https://github.com/elmsln/lrnwebcomponents/tree/master/elements/simple-colors"&gt;Simple Colors&lt;/a&gt;. This allows us to implement a simple dark mode, and the library was specifically created by the ELMSLN to be compliant with contrast ratios for accessibility standards. &lt;/li&gt;
&lt;li&gt;Our images are customizable. They also rely on &lt;a href="https://loremflickr.com/"&gt;loremflickr&lt;/a&gt;. I worked on this section in the beginning. If the overall tag isn't given an image, it will pull an image from loremflickr as a placeholder.&lt;/li&gt;
&lt;li&gt;We also added an option for the card to read the question out loud. More info on this portion can be &lt;a href="https://dev.to/opencoder/how-to-add-i18n-support-to-your-web-components-4o2n"&gt;found here.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fun, right?&lt;/p&gt;
&lt;h2&gt;
  
  
  What I did
&lt;/h2&gt;

&lt;p&gt;I briefly touched on the image portion, so we'll cover that further. But I also worked on an addition to the card that allows users to add multiple cards in one element. I'll talk about both of those now.&lt;/p&gt;
&lt;h3&gt;
  
  
  Images
&lt;/h3&gt;

&lt;p&gt;I initially worked on getting loremflickr functional. The final product is very simple. We use &lt;code&gt;&amp;lt;img src="${this.imgSrc}" alt=""/&amp;gt;&lt;/code&gt; if the tag is supplied an image, and &lt;code&gt;&amp;lt;img src="https://loremflickr.com/320/240/${this.imgKeyword}?lock=1" alt=""/&amp;gt;&lt;/code&gt; for default/keyword images. If there isn't a keyword, the element sticks in a placeholder of "grey box." &lt;/p&gt;
&lt;h3&gt;
  
  
  Flash Card Array
&lt;/h3&gt;

&lt;p&gt;The biggest wall of code I worked on in the last week before our deadline. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uMWi8bkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o0qhzcjp55ma6ujxh3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uMWi8bkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o0qhzcjp55ma6ujxh3u.png" alt="Flash Card Array" width="462" height="489"&gt;&lt;/a&gt;&lt;br&gt;
This is my final result. It is a logic heavy element, with very little happening on the front end. I will show you the best bits.&lt;/p&gt;
&lt;h4&gt;
  
  
  The Best Bits
&lt;/h4&gt;

&lt;p&gt;01010100011010000110010100100000010000100110010101110011 011101000010000001000010011010010111010001110011&lt;br&gt;
I'm kidding. I told you, I'm in some kind of mood tonight.&lt;br&gt;
The two functions doing all of the work are getData() and formatEl(). Respectively, they get the data and create the different flash-card tags. Let's look at get data first. Here is the schema to use &lt;code&gt;&amp;lt;flash-card-set&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;flash-card-set&amp;gt;
    &amp;lt;ul&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;p slot="front"&amp;gt;What is strawberry in Spanish?&amp;lt;/p&amp;gt;
        &amp;lt;p slot="back"&amp;gt;fresa&amp;lt;/p&amp;gt;
        &amp;lt;p slot="image"&amp;gt;https://loremflickr.com/320/240/strawberry&amp;lt;/p&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;p slot="image"&amp;gt;https://loremflickr.com/320/240/food&amp;lt;/p&amp;gt;
        &amp;lt;p slot="attributes"&amp;gt;speak&amp;lt;/p&amp;gt;
        &amp;lt;p slot="front"&amp;gt;What is food in Spanish?&amp;lt;/p&amp;gt;
        &amp;lt;p slot="back"&amp;gt;comida&amp;lt;/p&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;p slot="back"&amp;gt;persona&amp;lt;/p&amp;gt;
        &amp;lt;p slot="front"&amp;gt;What is people in Spanish?&amp;lt;/p&amp;gt;
        &amp;lt;p slot="image"&amp;gt;https://loremflickr.com/320/240/manequin&amp;lt;/p&amp;gt;
        &amp;lt;p slot="attributes"&amp;gt;speak dark&amp;lt;/p&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;/flash-card-set&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It doesn't matter the order of the slots, but it relies on using a &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element with &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; and named slots. (I talk about named slots in my series, go check that out for a refresher.) The &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; is a container for all of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;, and each &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; is a separate card. Now for the fun part: code.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;getData() {
    const slotData2 = this.shadowRoot
      .querySelector(`slot`).assignedNodes({ flatten: true })[1].childNodes;
    const questionData = ['','','',''];
    // eslint-disable-next-line no-plusplus
    for (let i = 0; i &amp;lt; slotData2.length; i++) {
      if (i % 2 === 1) {
        // eslint-disable-next-line no-plusplus
        for (let j = 0; j &amp;lt; slotData2[i].childNodes.length; j++) {
          if (j % 2 === 1) {
            const {slot} = slotData2[i].childNodes[j];
            if (slot === 'front') {
              questionData[0] = slotData2[i].childNodes[j].innerHTML;
            }
            if (slot === 'back') {
              questionData[1] = slotData2[i].childNodes[j].innerHTML;
            }
            if (slot === 'image') {
              questionData[2] = slotData2[i].childNodes[j].innerHTML;
            }
            if (slot === 'attributes') {
              questionData[3] = slotData2[i].childNodes[j].innerHTML;
            }
          }
        }
        // eslint-disable-next-line no-plusplus
        for (let k = 0; k &amp;lt; questionData.length; k++) {
          this.questions.push(questionData[k]);
        }
        // eslint-disable-next-line no-plusplus
        for (let l = 0; l &amp;lt; 4; l++) {
          questionData[l] = '';
        }
      }
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Fun, isn't it? I'll go line by line.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const slotData2 = this.shadowRoot
      .querySelector(`slot`).assignedNodes({ flatten: true })[1].childNodes;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I found this syntax after trial and error. We get the slot element in the render function of the element, and then get all of its data, aka the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element. The querySelector renders weird, so we grab the second position in the array and get the child nodes, or all of the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const questionData = ['','','',''];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The specifications of the flash-card-set only allow for four items, the question, answer, image data, and any tag properties; such as speak or dark. Each slot in the array holds one of these values.&lt;br&gt;
&lt;code&gt;// eslint-disable-next-line no-plusplus&lt;/code&gt; eslint hates fun.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let i = 0; i &amp;lt; slotData2.length; i++) {
      if (i % 2 === 1) {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We loop though each &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; node in the slot. With how slots, querySelector, and lists work, we have to call the odd positions in the array. The even positions are just blank lines.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let j = 0; j &amp;lt; slotData2[i].childNodes.length; j++) {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
 Another loop!!!!!!! And I broke dev.to. This loop is to loop through the elements in each &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element, aka the named slot elements. We also need the modulus operator again for the same reason as before.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const {slot} = slotData2[i].childNodes[j];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This gets the name of the slot for comparison later.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (slot === 'front') {
              questionData[0] = slotData2[i].childNodes[j].innerHTML;
            }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It is now later. Each piece of the spec; front, back, image, and attributes; has it's own if block.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;slotData2[i].childNodes[j].innerHTML
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This line gets the innerHTML, or the data of the current slot in the j loop, from the tag of the current card in the i loop. I won't lie, a lot of trial and error went into these lines. It's added to the array in order.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let k = 0; k &amp;lt; questionData.length; k++) {
          this.questions.push(questionData[k]);
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We have a property, questions, for all of the question data of all of the cards in the set. The order of questionData is important since I used integer indexing later on. This loop just adds the data from the j loop into the questions property.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let l = 0; l &amp;lt; 4; l++) {
          questionData[l] = '';
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Reset the array for the next card.&lt;br&gt;
And now to create the elements.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;formatEl(number) {
    // create a new element
    const el = document.createElement('flash-card');
    el.setAttribute('id', `card${number}`);
    if (number !== 0) {
      el.className = 'hidden';
    }
    // add the text
    el.innerHTML = `
      &amp;lt;p slot="front"&amp;gt;${arguments[1]}&amp;lt;/p&amp;gt;
      &amp;lt;p slot="back"&amp;gt;${arguments[2]}&amp;lt;/p&amp;gt;`;
    // eslint-disable-next-line prefer-rest-params
    el.setAttribute('img-src', arguments[3]);
    // eslint-disable-next-line prefer-rest-params
    if (arguments[4].includes('speak')) {
      el.setAttribute('speak', '');
    }
    // eslint-disable-next-line prefer-rest-params
    if (arguments[4].includes('dark')) {
      el.setAttribute('dark', '');
    }
    // eslint-disable-next-line prefer-rest-params
    if (arguments[4].includes('back')) {
      el.setAttribute('back', '');
    }
    // append it to the parent
    this.shadowRoot.querySelector('#content').appendChild(el);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;More code, yay.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const el = document.createElement('flash-card');
    el.setAttribute('id', `card${number}`);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We create a new flash-card element and give it an ID.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (number !== 0) {
      el.className = 'hidden';
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is for the rendering. Everything except the first element is hidden by default. We have css classes for hidden and visible, which another function toggles between.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;el.innerHTML = `
      &amp;lt;p slot="front"&amp;gt;${arguments[1]}&amp;lt;/p&amp;gt;
      &amp;lt;p slot="back"&amp;gt;${arguments[2]}&amp;lt;/p&amp;gt;`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each question has to have a question and answer, so we can hardcode these two arguments. JavaScript has a keyword, arguments, in each method. It's an array of arguments that were supplied in the method call. Very useful.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;el.setAttribute('img-src', arguments[3]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We can also hardcore this since a blank value passed to the image-prompt will use the default value.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; if (arguments[4].includes('speak')) {
      el.setAttribute('speak', '');
    }
    // eslint-disable-next-line prefer-rest-params
    if (arguments[4].includes('dark')) {
      el.setAttribute('dark', '');
    }
    // eslint-disable-next-line prefer-rest-params
    if (arguments[4].includes('back')) {
      el.setAttribute('back', '');
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each of these if statements checks the attributes section of the array. If it contains any of the key words, then that attribute is set in the flash-card element.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this.shadowRoot.querySelector('#content').appendChild(el);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is a div in the render function to house all of the cards. &lt;br&gt;
It's a lot of code, but it's what I'm most proud of from this project. &lt;/p&gt;
&lt;h2&gt;
  
  
  Final schtuff
&lt;/h2&gt;

&lt;p&gt;Go check us out in the links below. &lt;/p&gt;
&lt;h1&gt;
  
  
  Links
&lt;/h1&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/PenStat"&gt;https://github.com/PenStat&lt;/a&gt;&lt;br&gt;
NPM: &lt;a href="https://www.npmjs.com/org/penstat2"&gt;https://www.npmjs.com/org/penstat2&lt;/a&gt;&lt;br&gt;
Flash Card project: &lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/PenStat"&gt;
        PenStat
      &lt;/a&gt; / &lt;a href="https://github.com/PenStat/penguin-project-three"&gt;
        penguin-project-three
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>elmsln</category>
    </item>
    <item>
      <title>Future Plans (Outside of Cybersecurity)</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 08 Nov 2021 14:40:53 +0000</pubDate>
      <link>https://dev.to/sparkedscience/future-plans-outside-of-cybersecurity-25ko</link>
      <guid>https://dev.to/sparkedscience/future-plans-outside-of-cybersecurity-25ko</guid>
      <description>&lt;p&gt;I am in pain. Paintball is fun, but it hurts. Off topic, but now we're getting back on topic. &lt;/p&gt;

&lt;h1&gt;
  
  
  Building an app
&lt;/h1&gt;

&lt;p&gt;Someone asked me, "If you could build an app/website, what would you build?" This question is actually really easy for me, since I've already built my passion project, and I am rebuilding it. My idea is to have a simple website to connect people who are struggling with their mental health to professionals to help them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background &amp;amp; Reasoning
&lt;/h2&gt;

&lt;p&gt;Mental health is a topic I tend to gravitate to since I've struggled with my mental health in the past. I was a part of a team that built a website in the past as a prototype for breaking the stigma around mental health, but we did not know enough to continue on with the project. Now, I want to finally create a service to get people connected. Personally, I do not know of a single resource for finding professionals past a Google search. It seems Google SEO is the only way to find someone, and that's just not right. Just because one therapist has more links online than another, doesn't mean they are better. Don't get me wrong, any help is better than no help. But different places are better for different people. There should be a database with every single resource for people.&lt;/p&gt;

&lt;h2&gt;
  
  
  The website
&lt;/h2&gt;

&lt;p&gt;I'm crazy to think that I could go around and get information about every single mental health service, therapist, hotline, etc. in the world, or even this country. That's why it would be open source. I would provide the backbone and some places local to me to give examples, then the community would fill in the gaps. It's a simple design; just a page with a table and a page to suggest other places. The logic would be more complex, and there would have to be validation on any new resources. My dream is to reach across the world, but I am a builder, not a publicist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadblocks
&lt;/h2&gt;

&lt;p&gt;I'm afraid that even if this website is built better than Google, it still won't get off the ground. It's tough trying to launch a new project. I've seen teams better than me scrap entire projects because they couldn't launch. It's the reason why I keep stalling on development. I can do all this work for it to just be a GitHub repo, staring at me every day until I delete it forever. &lt;br&gt;
Fun, right?&lt;br&gt;
Oh, we also have the internet trolls to worry about. Anything with input is ripe for trolls to destroy. Hence why there will be no user input past suggesting new places. &lt;/p&gt;

&lt;h2&gt;
  
  
  Future
&lt;/h2&gt;

&lt;p&gt;If I really had all the time in the world, and no concern for living costs, I would spend my time developing this website. It's my passion project, but it also faces many giants before it will be successful. Launch will be the first major roadblock. Also, maintenance if it ever becomes popular will be a struggle. And we're going to end the giants there so I don't become discouraged any more. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cookie
&lt;/h2&gt;

&lt;p&gt;I need a cookie. You do too. Go have a cookie. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Slots like you haven't seen them before</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 25 Oct 2021 04:30:49 +0000</pubDate>
      <link>https://dev.to/sparkedscience/slots-like-you-havent-seen-them-before-59nk</link>
      <guid>https://dev.to/sparkedscience/slots-like-you-havent-seen-them-before-59nk</guid>
      <description>&lt;p&gt;Slots like you haven't seen them before...cause I have never seen slots before in HTML. Never worked with slots or named slots. First time for everything, right? &lt;/p&gt;

&lt;h2&gt;
  
  
  Slots
&lt;/h2&gt;

&lt;p&gt;What is a  tag? A quick internet search reveals...slot machines. &lt;em&gt;Note to self, &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; means nothing to Google.&lt;/em&gt; According to &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Slot"&gt;MDN Web Docs&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The  HTML element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together."&lt;/em&gt;&lt;br&gt;
Word jumble. Essentially, instead of using a property for text content, you can use a &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; tag. Take this line of HTML for example.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div id="content"&amp;gt;${this.bodyContent}&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;And in the tag...&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;demo-code bodyContent="I read you"&amp;gt;&amp;lt;/demo-code&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;It works in this example since our string is relatively small, and only a string. But if we want other HTML tags within the bodyContent, then we run into many issues. To get around this, we use slots.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div id="content"&amp;gt;${this.bodyContent}&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Then becomes&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div slot="content"&amp;gt;&amp;lt;slot&amp;gt;&amp;lt;/slot&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;And our tag becomes...&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;demo-code&amp;gt;I read you&amp;lt;/demo-code&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Or, more complex...&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;demo-code&amp;gt; &amp;lt;a href='https://lifelinegame.fandom.com/wiki/Lifeline'&amp;gt;I read you&amp;lt;/a&amp;gt; &amp;lt;/demo-code&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;With slots, we can inject valid HTML code into our Web Component. But this is an unnamed slot, what about if we have multiple pieces of content we want to inject into our element?&lt;/p&gt;

&lt;h2&gt;
  
  
  NAMED SLOTS
&lt;/h2&gt;

&lt;p&gt;THAT'S RIGHT, YOU HEARD IT HERE LAST. NAMED SLOTS. Sorry, caps lock. To used named slots, we have to use &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tags. Once again from &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span"&gt;MDN Web Docs&lt;/a&gt;, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The &lt;span&gt; HTML element is a generic inline container for phrasing content, which does not inherently represent anything."&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;"It's a tag, big whoop." I can hear people say, or maybe that's just the ringing in my ears. Spans aren't very different from divs, that is, until you combine them with slots. Take our code for example.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;learning-card type="science"&amp;gt;&amp;lt;span slot='header'&amp;gt;Header content TEST&amp;lt;/span&amp;gt;&amp;lt;span slot='subheader'&amp;gt;SUBHEADER TESTING&amp;lt;/span&amp;gt;We're trying multi slotted content&amp;lt;/learning-card&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;More specifically...&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;span slot='header'&amp;gt;Header content TEST&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The inner HTML of the span tag get passed to the slot tag within the element. From our element source file&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h2 slot="header"&amp;gt;&amp;lt;slot name="header"&amp;gt;&amp;lt;/slot&amp;gt;&amp;lt;/h2&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The named slot takes in the data from the span element and "replaces" the inner HTML of the heading tag. In essence, the above code block then becomes...&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h2 slot="header"&amp;gt;Header content TEST&amp;lt;/h2&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;It is possible to also read data using the &lt;code&gt;slot&lt;/code&gt; property. The above code block uses this to reference another element. It reads the data from above with the following line of HTML.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;slot name="header"&amp;gt;&amp;lt;/slot&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;It then renders the header tag in the element to be displayed. Two methods; tags with a slot property, or span tags with names. &lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages over properties
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Properties need to be updated whenever they are changed via lifecycle hooks. Slots update automatically&lt;/li&gt;
&lt;li&gt;Less code overall&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Properties are definitely much easier to understand.&lt;/li&gt;
&lt;li&gt;Cannot use slots outside of HTML (to my knowledge)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GitHub Stuff
&lt;/h3&gt;

&lt;p&gt;learning-card&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/PenStat"&gt;
        PenStat
      &lt;/a&gt; / &lt;a href="https://github.com/PenStat/penstat-project2"&gt;
        penstat-project2
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Card while Coughing</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 11 Oct 2021 02:34:03 +0000</pubDate>
      <link>https://dev.to/sparkedscience/building-a-card-while-coughing-5dg3</link>
      <guid>https://dev.to/sparkedscience/building-a-card-while-coughing-5dg3</guid>
      <description>&lt;p&gt;This blog post is brought to you by a lingering cough and frustration towards machines. &lt;/p&gt;

&lt;h1&gt;
  
  
  Cards
&lt;/h1&gt;

&lt;p&gt;We're going to be continuing our web components journey with making a multi-element card. Cards, while ambiguous, are bordered elements containing useful information or action links. By wanting to make a multi-part card, with a header banner, icon, and content, we need a multi-component project. Each piece will be it's own stand-alone web-component with the card wrangling them all together in the end. &lt;/p&gt;

&lt;h2&gt;
  
  
  Considerations
&lt;/h2&gt;

&lt;p&gt;Before delving any deeper, we are going to look at the steps I never take when tackling a programming project; low level planning. I do a lot of high level planning in general structure and ideal functionality, but for this one we're going to get more granular. We're copying some other card examples we've seen online, which were broken down into the icon, header, and content of the card. Sometimes, you just have to section off parts of a project to get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Icon
&lt;/h3&gt;

&lt;p&gt;Icons grab the user's attention and give them an idea of the subject without any words. Alignment in this project is going to be difficult when splicing all the components together, and the Icon may cause the most difficulty. Words are easy to work with, but images are a pain sometimes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Header Banner
&lt;/h3&gt;

&lt;p&gt;One of the easier components in the project, it consists of a main header and a possible sub-header. The main difficulties here lie in the variability and user input. We have to dynamically shift content around with page resizing, scrolling, and deal with whatever headers the designer wants to add. &lt;/p&gt;

&lt;h3&gt;
  
  
  Content
&lt;/h3&gt;

&lt;p&gt;The easiest component, but also the one with the greatest variability. Bulleted lists, different fonts, and a possible collapsable option are all possibilities in the component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Card
&lt;/h2&gt;

&lt;p&gt;The final element that wraps all the previous together. That wrapping graphically is going to be the worst part. But after baking a call to action button, handling action events and state changes should be a breeze. That's for one element though; for multiple elements, we may have to use bubbling events and event listeners to capture what we need for reactivity. That'll be a story for another day once we start implementing and testing unknown code.&lt;/p&gt;

&lt;p&gt;What fun.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Programming sucks</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 11 Oct 2021 00:30:49 +0000</pubDate>
      <link>https://dev.to/sparkedscience/programming-sucks-11d3</link>
      <guid>https://dev.to/sparkedscience/programming-sucks-11d3</guid>
      <description>&lt;p&gt;Programming is a pain. What works for one person can break for another, and code never works right until you're just about ready to sign out. It doesn't matter the language or the platform, programming is annoying. So why do we program? I'm having a real difficult time of seeing it tonight.&lt;/p&gt;

&lt;p&gt;It's for the love of creation. We crate with a purpose, we create for fun, we create to bring life to a machine. We create to make something bigger than us, something that can live on. We program cause we love it. &lt;/p&gt;

&lt;p&gt;Sometimes, I program out of spite. I have to beat the machine, or overcome my own thoughts. &lt;/p&gt;

&lt;p&gt;I wish I had more motivation most days to work on my projects. I wish I felt that love of creation when the same error is thrown the 15th time in a row. I wish it was more love and less anger and spite. Funny how that works sometimes.&lt;/p&gt;

&lt;p&gt;Program for love, not for hate. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>CTA Buttons...but with penguins</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 27 Sep 2021 04:06:51 +0000</pubDate>
      <link>https://dev.to/sparkedscience/cta-buttons-but-with-penguins-339n</link>
      <guid>https://dev.to/sparkedscience/cta-buttons-but-with-penguins-339n</guid>
      <description>&lt;h1&gt;
  
  
  What is a CTA?
&lt;/h1&gt;

&lt;p&gt;A CTA button, or Call to Action button, just tries to get the user to do something. An example would be the like button for this article, or the Spotify Listen Now button. These buttons aren't anything complex or asking someone to act to save the world, but they must ask the user to do something. &lt;/p&gt;

&lt;h1&gt;
  
  
  Our CTA
&lt;/h1&gt;

&lt;p&gt;So...we modeled our CTA off of the reprogrammed &lt;a href="https://play.cprewritten.net/"&gt;Club Penguin website&lt;/a&gt; We ripped the Create  a Penguin image and based our button to be an image button without a text tag. It's...something.&lt;/p&gt;

&lt;h1&gt;
  
  
  Issues
&lt;/h1&gt;

&lt;p&gt;Putting text on top of images is difficult, but not impossible. I used another web component, meme-maker, to overlay text on the image. It doesn't offer any text color change, but it does allow us to change the text size. We also included an icon in the button, but at the moment I have no idea what we are going to do with the icon. I also had some issues with tab-order. Since we have a meme-maker, a, and img tag, we have multiple tags that get tabbed through while it appears to sit on the same element. I had tried &lt;code&gt;tab-order: "-1"&lt;/code&gt;, but it was not working for a while. The fix was that Safari has a weird option by default that it doesn't tab through all of the elements on a page. &lt;/p&gt;

&lt;h1&gt;
  
  
  GitHub
&lt;/h1&gt;

&lt;p&gt;penguin-state-button&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/PenStat"&gt;
        PenStat
      &lt;/a&gt; / &lt;a href="https://github.com/PenStat/PenStat-CTA"&gt;
        PenStat-CTA
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Time for JS and the many confusing libraries and packages</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 13 Sep 2021 03:56:03 +0000</pubDate>
      <link>https://dev.to/sparkedscience/time-for-js-and-the-many-confusing-libraries-and-packages-2728</link>
      <guid>https://dev.to/sparkedscience/time-for-js-and-the-many-confusing-libraries-and-packages-2728</guid>
      <description>&lt;h1&gt;
  
  
  Hello-world
&lt;/h1&gt;

&lt;p&gt;Some JS frameworks are easy to use. Others don't make it easy to get started. We're looking at Vue, Angular, React, and StencilJS, and I am really floundering at this intro.&lt;/p&gt;

&lt;h1&gt;
  
  
  Similarities
&lt;/h1&gt;

&lt;p&gt;Right off the bat, all of the boilerplate projects have package.json files, since it is required. From there, the similarities become less apparent. They all are to create a component, but Vue is a bit vague on that front. &lt;/p&gt;

&lt;h2&gt;
  
  
  Vue
&lt;/h2&gt;

&lt;p&gt;Vue calls their web components just components, which can be a bit confusing at times. Vue is the only one to have a custom file type of .vue. It still uses JS, but Vue has some specific functions. It is also very reactive as it has special calls to handle any event in its lifecycle. I was able to create my starter project from the Vue-cli interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular
&lt;/h2&gt;

&lt;p&gt;Angular stands out as it is the only one to not use npm for building and testing. It instead uses the ng command, which is specific to Angular. Angular is also mean in that it uses typescript files, which are just annoying and borderline gatekeeping. &lt;/p&gt;

&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;p&gt;The React boilerplate we found is a mess of files, but it is very well documented (GitHub linked at the end). They boast a host of fast features and high coverage and compatibility. Not much to say on this one other than it is large and fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  StencilJS
&lt;/h2&gt;

&lt;p&gt;The outlier, StencilJS, is not a framework. StencilJS is a toolchain to generate projects. Sadly, StencilJS also uses TypeScript files, so it is not the best choice. But the fact that it isn't a framework that a programmer doesn't have to learn a new language is a huge improvement over the others.&lt;/p&gt;

&lt;h1&gt;
  
  
  My Personal Choice
&lt;/h1&gt;

&lt;p&gt;Out of the four, I would use Vue to build a website tomorrow. I might have a bit of bias because I already work with it, but being able to create an app or web-component from the command line instead of someone else's GitHub repo is amazing. Vue also works great with API calls and data. It is also highly reactive and has a large number of tools for analyzing and debugging. &lt;/p&gt;

&lt;h1&gt;
  
  
  GitHub
&lt;/h1&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/PenStat"&gt;
        PenStat
      &lt;/a&gt; / &lt;a href="https://github.com/PenStat/boilerplates"&gt;
        boilerplates
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Open-WC, but for Macs</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 30 Aug 2021 02:07:53 +0000</pubDate>
      <link>https://dev.to/sparkedscience/open-wc-but-for-macs-4aii</link>
      <guid>https://dev.to/sparkedscience/open-wc-but-for-macs-4aii</guid>
      <description>&lt;p&gt;People always ask why I use a Mac when I develop. Honestly, I'm so used to the Linux command line, Mac just makes sense for me. Also, I can have a virtual machine of a Windows computer or create a Windows desktop to remote into; it's not as easy to get an OS X ISO file, or I've just never had to try to know how difficult it is. &lt;a href="https://open-wc.org/"&gt;Open WC&lt;/a&gt; has some really good tutorials to get set up, but I'll give you the copy and paste commands needed to get up and running. &lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;You'll need Homebrew, or brew for short, to use yarn commands. You'll also need npm and node.js. Thanks to (this tutorial)[&lt;a href="https://tecadmin.net/install-homebrew-macos/"&gt;https://tecadmin.net/install-homebrew-macos/&lt;/a&gt;], I found the brew install command again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

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

&lt;/div&gt;



&lt;p&gt;And then yarn is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;within terminal.&lt;br&gt;
We also use brew to install npm and node. Node.js is also needed for our development. To get node, and by extension npm, paste&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;into the terminal. &lt;/p&gt;

&lt;h2&gt;
  
  
  Open-wc
&lt;/h2&gt;

&lt;p&gt;Surprisingly, there's only one more command to run,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init @open-wc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your current version of Node does not have open-wc, it will search for the required packages and install them. You'll then be prompted through menus to create a new project or update an old one. At this point, Open-wc's tooling is on your machine. I have run through my own tutorial on a fresh Linux image, which is identical except for brew, with positive results. So, I with you the best of luck with your own OS X development. I suggest VS Code for a free IDE, or Jet Brains' Web Storm if your university or work offers you a license. Please don't just use TextEdit or XCode.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Who I am, for the third time...</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 30 Aug 2021 01:48:47 +0000</pubDate>
      <link>https://dev.to/sparkedscience/who-i-am-for-the-third-time-11dp</link>
      <guid>https://dev.to/sparkedscience/who-i-am-for-the-third-time-11dp</guid>
      <description>&lt;p&gt;Because I've taken this class three times now, but some things have changed. Mainly, I am now a web developer for THON! I am a developer for our THON Weekend Dashboard, a system that is used by hundreds of volunteers for tracking and building entry for our events through the year. I also have created one joke of a web component (b-r) and a serious one (barcode-reader). b-r just inserts &lt;br&gt; tags for conditional rendering purposes. barcode-reader can read and interoperate qr codes and barcodes through a user's camera. That one was a challenge, but I am proud of the tag.&lt;/p&gt;

&lt;p&gt;I have been interested in web development ever since the Design to Make a Difference competition my senior year of high school. It was my first experience with web development, and I was the backend developer and system admin for a mental health chat website that two of us created from scratch. We used GitHub for all of our development and hosting needs, and Pusher Chatkit of the chat feature. Since then, I have been keeping my programming and web development skills sharp with online tutorials. I have primarily focused on Django, a Python web framework. Python is one of my favorite languages since I have a lot of Raspberry Pis. As for my current experience, as I mentioned I am a THON Tech captain. We use Django and Vue for our websites, so my Python and JavaScript skills are tested every day. I have also been continuing development with my mental health website, just under a new name and a new plan. Hopefully that's enough to understand my programming background, and maybe you get a sense of how much I yell at my computer when I work.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Making a web component that makes kittens cry, apparently</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Tue, 04 May 2021 18:36:46 +0000</pubDate>
      <link>https://dev.to/sparkedscience/making-a-web-component-that-makes-kittens-cry-apparently-fgm</link>
      <guid>https://dev.to/sparkedscience/making-a-web-component-that-makes-kittens-cry-apparently-fgm</guid>
      <description>&lt;p&gt;I like to find shortcuts for programming problems. While working on the ELMS:LN web components project, I noticed they like to copy-paste br tags to show off intersection observers. So, to make life easier, I made a simple b-r tag. It apparently makes kittens cry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intersection observers
&lt;/h2&gt;

&lt;p&gt;These are used for conditional rendering. An element on the page using intersection observers will not render until the viewable page is within a certain range of the element. For example, say at the end of a long webpage is a &lt;a href="https://github.com/elmsln/lrnwebcomponents/tree/master/elements/wikipedia-query"&gt;wikipedia element&lt;/a&gt;. The actual rendering of the wikipedia page, and the API calls to get the information, won't occur until the element is visible on the page. This is very helpful for slower or more taxed connections. &lt;/p&gt;

&lt;h2&gt;
  
  
  b-r
&lt;/h2&gt;

&lt;p&gt;The b-r tag does not use intersection observers, but it was created to show off the usage of it. &lt;a href="https://github.com/elmsln/lrnwebcomponents/tree/master/elements/b-r"&gt;b-r&lt;/a&gt; has two modes; numbered and automatic. The developer can supply an amount of br tags to insert, and the element will create the line breaks. If no input is supplied, the tag will get the height of the viewable window and insert br tags to push the rest of the content off of the screen. &lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback loops
&lt;/h2&gt;

&lt;p&gt;My first solution was not elegant, but it worked. (Shamefully, my mentality with most first iterations.) I had a simple for loop to add the tags to the page. During my IST 402 class, my professor used my tag to teach on tag properties and a different way to add tags to html code. He also helped us understand how to make a tag stateful. Honestly, the best help this tag needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The kittens
&lt;/h2&gt;

&lt;p&gt;b-r is a tag I made in less than a day for a specific use case. I know copy-pasting a br tag is easy, I'm guilty of that. While the first iteration of just user input was not extremely helpful, I believe the second iteration of conditional numbering based on window height can be useful when working across developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts on Web components
&lt;/h2&gt;

&lt;p&gt;This is by far not the last web component I will make or work on; My barcode-reader still has a ways to go. Maybe I'll get the chance to bring that project to THON. Either way, web components are here to stay, and I don't plan on going anywhere. Highly adaptable, very useful, and easily portable.&lt;br&gt;
Except with dev.to. Social media isn't really my thing, but I try to stay updated. So expect monthly(?) updates.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Burnout</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Thu, 25 Feb 2021 04:35:16 +0000</pubDate>
      <link>https://dev.to/sparkedscience/burnout-9dm</link>
      <guid>https://dev.to/sparkedscience/burnout-9dm</guid>
      <description>&lt;p&gt;I have stalled on major projects because of a lack of motivation. In this moment, I'm just burntout.&lt;/p&gt;

&lt;p&gt;This isn't going to be some well formatted, header filled post with a 5 minute youtube video at the end. I need to rant in hopes I'll regain motivation.&lt;/p&gt;

&lt;p&gt;Burnout in programming is the worst kind of burnout in my eyes. Burnout as a content creator sucks, but you can usually pick back up where you left off. If you walk away from a project, you have to relearn what your program does before working on it again. And that's the biggest issue. One reason programmers find it so difficult to go back to a project is that hurdle. Smaller projects it's not as bad. But multi file, multi language projects? I've been away from a Django site for months because of this hurdle.&lt;br&gt;
  And then there's the other issue. I'm afraid this project will fail, so why build it? Why spend the time in development for a project that I'll burn later. I don't have millions of dollars to throw at rockets that explode in the final moments. I am a single student, trying to take on a project that is too big for one professional developer alone. &lt;br&gt;
  Back to the topic at hand, burnout. What can we do about it?&lt;br&gt;
  Please let me know.&lt;br&gt;
  I would love to get back into programming.&lt;/p&gt;

&lt;p&gt;-JAlbert&lt;br&gt;
Current song: Miracle - Stripped; The Score&lt;/p&gt;

&lt;p&gt;Edit: Maybe finding that one piece of technology to overcome a hurdle is all we need.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git and the two abstractions</title>
      <dc:creator>SparkedScience</dc:creator>
      <pubDate>Mon, 22 Feb 2021 03:55:02 +0000</pubDate>
      <link>https://dev.to/sparkedscience/git-and-the-two-abstractions-164e</link>
      <guid>https://dev.to/sparkedscience/git-and-the-two-abstractions-164e</guid>
      <description>&lt;h1&gt;
  
  
  Git in a collaborative environment
&lt;/h1&gt;

&lt;p&gt;So...Git. &lt;br&gt;
  Might as well jump right in with Git and GitHub repos. The video goes in depth about the how, but we're going into the why and implications for teams here. Buckle up. (I'm tired)&lt;/p&gt;
&lt;h2&gt;
  
  
  Terminal
&lt;/h2&gt;

&lt;p&gt;Easily the most difficult way to use Git. The default commit message editor is Vim, and there is no help for a mistake. Probably favored by experienced programmers and automations, this allows better control over commits and pushes. I find the automation aspect to be helpful. In one of my repos for web development, I created a Cron job to download (pull) any new code from the repo every night at midnight. If my development studio was on the same machine as the server, this would be overkill. But, when the server is on a different machine than the development tools, this is useful, as in my case. My code runs in a shared hosting environment. Having the Cron job ensures any changes made locally are moved to the production environment. NOT RECOMMENDED FOR PUBLIC USE. Actually dangerous. If a change is made that breaks the program or creates a vulnerability, but the workday is over, then a team can push that code and create problems. For a development fork, this is a great idea, as there will always be a backup of the code. Frequent merge conflict will occur though. Rant aside, the command line is good for more experienced people. Moving right along&lt;/p&gt;
&lt;h2&gt;
  
  
  Abstraction #1: GitHub Desktop
&lt;/h2&gt;

&lt;p&gt;The desktop app provides an easy alternative to the browser version. Graphically superior to the command line, it is easier to use for beginners. I do not use it as often as I favor the next option, but we'll still talk about it. The desktop app is very similar to the browser version in almost every regard, except that you have to pull changes manually. I don't have a rant for this one. Just an all around decent option.&lt;/p&gt;
&lt;h2&gt;
  
  
  Abstraction #2: PyCharm or any IDE
&lt;/h2&gt;

&lt;p&gt;By far the most used abstraction on my machine. With the power of the IDE and the abstraction of GitHub Desktop, it is the best option in my mind. Any development happens in the IDE, and the GitHub plugin offers enough of the same abstractions as GitHub Desktop to push and pull code. It is build right into the editor, and basic commits can occur without leaving the application. My favorite out of the three, although it takes away many features outside of pushes, commits, and pulls from inside the editor.&lt;/p&gt;
&lt;h1&gt;
  
  
  Collaboration
&lt;/h1&gt;

&lt;p&gt;When working in a team, the Terminal version of Git is overkill and confusing for anyone. GitHub Desktop or the web version is perfect for project managers or non-technical employees who need to see the project. The graphical representation of many functions and settings is perfect for these roles. Developers would favor IDE plugins for ease of use and a simplified workflow. &lt;/p&gt;
&lt;h2&gt;
  
  
  Version control
&lt;/h2&gt;

&lt;p&gt;One last note about Git and collaboration. Each commit generates a new hash, which can track changes over time. This is viewed easiest on the web client. GitHub keeps detailed records of each commit over time, allowing companies to roll back versions if a server breaks from a commit or if old code was lost and is needed again.&lt;/p&gt;

&lt;p&gt;One final word, use Git. It'll. save your job.&lt;/p&gt;
&lt;h1&gt;
  
  
  YouTube video
&lt;/h1&gt;

&lt;p&gt;Just a simple video demonstrating three ways to push code to a repo.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oL50fjHT6tc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

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