<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>David&#39;s Blog</title>
    <link>https://davidstockton.dev/</link>
    <description>Recent content on David&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright David Stockton</copyright>
    <lastBuildDate>Tue, 10 Mar 2020 23:11:57 -0600</lastBuildDate>
    <atom:link href="https://davidstockton.dev/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Javascript 30 Day 11: Custom HTML 5 Video Player</title>
      <link>https://davidstockton.dev/posts/2020/03/javascript-30-day-11-custom-html-5-video-player/</link>
      <pubDate>Tue, 10 Mar 2020 23:11:57 -0600</pubDate>
      <guid>https://davidstockton.dev/posts/2020/03/javascript-30-day-11-custom-html-5-video-player/</guid>
      <description>&lt;p&gt;Oh wow!&lt;/p&gt;&#xA;&lt;p&gt;I had so much fun with this. I think what I&amp;rsquo;m enjoying best about this is just learning how not crazy hard some stuff is. I&amp;rsquo;ve been programming forever. Over 33 years. But there&amp;rsquo;s still stuff (ok, maybe a lot of stuff) that makes me just wonder how in the world it&amp;rsquo;s even possible. I know it&amp;rsquo;s possible. I&amp;rsquo;ve seen it done, but since I don&amp;rsquo;t know how it&amp;rsquo;s done, there&amp;rsquo;s still things that seem like magic. I think one thing I keep going back to is video games. I&amp;rsquo;ve been playing video games slightly longer than I&amp;rsquo;ve been programming, and many years ago I tried to make my own games. Now granted, hardware is thousands of times faster and just about everything is loads better, but some part of my brain is still stuck in tech from over 30 years ago. Back then having a screen of 320x240 pixels update quickly enough to look like something was moving seemed like an accomplishment. Now I feel being able to render millions of pixels and still have time to make decisions about what should happen that would cause the pixels to change seems crazy. I remember working like crazy just to get a little space ship on the screen to shoot lasers at something and how difficult that seemed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 10: Hold Shift to Check Multiple Checkboxes</title>
      <link>https://davidstockton.dev/posts/2020/03/javascript-30-day-10-hold-shift-to-check-multiple-checkboxes/</link>
      <pubDate>Sun, 01 Mar 2020 12:27:44 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/03/javascript-30-day-10-hold-shift-to-check-multiple-checkboxes/</guid>
      <description>&lt;p&gt;Today is day 10, one third of the way through &lt;a href=&#34;#ZgotmplZ&#34;&gt;Javascript 30&lt;/a&gt;. Today&amp;rsquo;s less is called &amp;ldquo;Hold Shift to Check Multiple Checkboxes&amp;rdquo; and in this one Wes encourages you to try out a solution on your own before coming back to the video. So that&amp;rsquo;s what I did, and surprise! They are a little different.&lt;/p&gt;&#xA;&lt;p&gt;The idea is that you&amp;rsquo;ve got a bunch of checkboxes, representing a todo list or an inbox or whatever and you want to click one of them, then hold shift and click another, and all of them in between should be checked. Here&amp;rsquo;s the approach I took.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 9: 14 Must Know Dev Tools Tricks</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-9-14-must-know-dev-tools-tricks/</link>
      <pubDate>Sat, 29 Feb 2020 17:47:33 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-9-14-must-know-dev-tools-tricks/</guid>
      <description>&lt;p&gt;On day 9 of Wes Bos&amp;rsquo; Javascript 30, we&amp;rsquo;re learning about different dev tools tricks and I was super excited after hearing the first one because not only was it not something I&amp;rsquo;d ever heard of before, but it&amp;rsquo;s super useful.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m a big fan of debuggers for helping get to the cause of a problem or figure out where things went sideways. In PHP, Go as well as Javascript, I use the debugger on a regular basis. For Javascript though, there&amp;rsquo;s many times where if I&amp;rsquo;m not super familiar with an application, I don&amp;rsquo;t even know where to start debugging. It turns out you can set breakpoints on elements in the DOM, telling the debugger to break when a DOM element is modified, when an element&amp;rsquo;s subtree is modified or when a node is removed. Then it will break on the javascript line that causes that to happen, even if you have no idea where to even start looking for the code that did the modification. Super cool and I&amp;rsquo;m sure this is something that will be super useful for me in the future.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 8: Fun with HTML5 Canvas</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-8-fun-with-html5-canvas/</link>
      <pubDate>Tue, 25 Feb 2020 20:01:56 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-8-fun-with-html5-canvas/</guid>
      <description>&lt;p&gt;Day 8 is all about mouse events and drawing on the canvas and it was fun! I&amp;rsquo;ve used the canvas before when teaching kids Javascript. We used it to make giant pixels for our own version of &lt;a href=&#34;https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&#34;&gt;Conway&amp;rsquo;s Game of Life&lt;/a&gt; and &lt;a href=&#34;https://en.wikipedia.org/wiki/Langton%27s_ant&#34;&gt;Langton&amp;rsquo;s Ant&lt;/a&gt;. But in there we were pretty much just drawing rectangles at a particular coordinate. There were no mouse interactions, or any of that.&lt;/p&gt;&#xA;&lt;p&gt;In this exercise you build a super primitive drawing tool that lets you draw with ever-changing colors and brush sizes on a canvas. Stuff I learned about here was different effects you can have when drawing by setting the &lt;code&gt;globalCompositeOperation&lt;/code&gt; on your drawing context. I didn&amp;rsquo;t know about that, but with enough patience and time you could probably get a lot of the layer effects you find in Photoshop to work when drawing on the HTML 5 canvas. Constantly changing the size and color of the line also make it a lot more visually interesting to play with than just a constant size or color, even if it would be near impossible to use to get some result that you were trying for. Setting the canvas to draw behind with &lt;code&gt;destination-over&lt;/code&gt; is pretty cool. It would be fun to experiment with adding in controls for the size of the line (keyboard maybe?) and letting the colors cycle or dynamically (with control perhaps) changing the &lt;code&gt;globalCompositeOperation&lt;/code&gt; value while drawing. I think you could come up with some pretty cool looking drawings.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 7: Array Cardio Part 2</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-7-array-cardio-part-2/</link>
      <pubDate>Tue, 25 Feb 2020 19:32:00 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-7-array-cardio-part-2/</guid>
      <description>&lt;p&gt;The second day of array stuff is here! Wes started out with &lt;code&gt;Array.prototype.some&lt;/code&gt; and &lt;code&gt;Array.prototype.every&lt;/code&gt; which are functions I&amp;rsquo;m familiar with, and he also introduces the trick of console logging variables when surrounding them with curly brackets. I think this is an ES6 thing, and I didn&amp;rsquo;t learn it from this course, but I have been showing it to a lot of people over the past few years, so it&amp;rsquo;s definitely worth sharing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 6: Ajax Type Ahead</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-6-ajax-type-ahead/</link>
      <pubDate>Fri, 21 Feb 2020 00:07:19 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-6-ajax-type-ahead/</guid>
      <description>&lt;p&gt;Day 6 is a good one. It introduces a bunch of concepts that are pretty important in a day-to-day life of a web developer. The idea is we&amp;rsquo;ve got a big list of cities from all over the world and you type into a box and the list limits itself based on what you type.&lt;/p&gt;&#xA;&lt;p&gt;First up is &lt;code&gt;fetch&lt;/code&gt; which is a pretty excellent API to making HTTP requests from javascript. The concept of promises is touched on which is pretty important, especially if you&amp;rsquo;ll be making API calls in javascript. I hope later days will go more into depth since so far I&amp;rsquo;ve been coming up with my own patterns in my work that I think are &amp;ldquo;ok&amp;rdquo; but could probably be better. The &lt;code&gt;fetch&lt;/code&gt; call gets set up to go out to a github gist containing the JSON structure with the array of objects representing the 1000 cities (clever use of something that gives back a response just like an API but without needing to develop it).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 5: Flex Panels Image Gallery</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-5-flex-panels-image-gallery/</link>
      <pubDate>Thu, 20 Feb 2020 21:00:26 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-5-flex-panels-image-gallery/</guid>
      <description>&lt;p&gt;Day 5 was about building a sort of flex panel gallery. The screen is split vertically into five panels that have an image background and a set of words in each panel spelling &amp;ldquo;Let&amp;rsquo;s Take It All In&amp;rdquo; across the center of the screen. When you click on any of the sections, it will expand with a sort of bouncing expand (bezier curve transitions) and open up and then another pair of words slides from the top and bottom revealing a different phrase in each panel.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 4: Array Cardio Day 1</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-4-array-cardio-day-1/</link>
      <pubDate>Wed, 19 Feb 2020 23:01:21 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-4-array-cardio-day-1/</guid>
      <description>&lt;p&gt;Today&amp;rsquo;s lesson was all about some really useful array functions in javascript: &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;sort&lt;/code&gt; and &lt;code&gt;reduce&lt;/code&gt;. It also introduced &lt;code&gt;console.table&lt;/code&gt; as a great alternative to console.log for tabular data. It&amp;rsquo;s one of those things in console that I learned about long ago and probably forgot, but it&amp;rsquo;s great to be reintroduced. It got me to go re-look at all the other cool stuff you can do with the javascript console. I may need to do a writeup on those things at some point because they are great and I think mostly developers rely on just &lt;code&gt;console.log&lt;/code&gt; when there&amp;rsquo;s a whole lot more they could do and learn using their browser&amp;rsquo;s console.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 3: CSS Variables</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-3-css-variables/</link>
      <pubDate>Tue, 18 Feb 2020 00:03:41 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-3-css-variables/</guid>
      <description>&lt;p&gt;On to day 3 of Javascript 30. This one is about CSS variables. Of course there have been variables and what-not available in SCSS and SASS and all those sort of pre-processor based CSS frameworks for quite some time, but I didn&amp;rsquo;t know there were variables available in CSS now. I also didn&amp;rsquo;t know about the html range input type. I&amp;rsquo;ve looked and there&amp;rsquo;s now a bunch of &amp;ldquo;new&amp;rdquo; types, although who knows how new. I&amp;rsquo;ve been concentrating more on the backend since back in the day with Javascript was more of a toy than much of something that could do useful things with a website.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript 30 Day 2: Clock</title>
      <link>https://davidstockton.dev/posts/2020/02/javascript-30-day-2-clock/</link>
      <pubDate>Tue, 04 Feb 2020 23:17:36 -0700</pubDate>
      <guid>https://davidstockton.dev/posts/2020/02/javascript-30-day-2-clock/</guid>
      <description>&lt;p&gt;I haven&amp;rsquo;t exactly been able to hit each exercise each day, but I&amp;rsquo;ll post whenever I do get a chance anyway.&lt;/p&gt;&#xA;&lt;p&gt;In the Day 2 &lt;a href=&#34;https://javascript30.com&#34;&gt;Javascript 30&lt;/a&gt; exercise, we implement a clock by converting data from a &lt;code&gt;new Date&lt;/code&gt; object. The math is pretty straight-forward, converting times to degrees and then using css transforms to rotate the hands. As with Day 1, I learned about &lt;code&gt;document.querySelector&lt;/code&gt; and &lt;code&gt;document.querySelectorAll&lt;/code&gt;. I&amp;rsquo;m not sure why I hadn&amp;rsquo;t run into this before now, but they&amp;rsquo;re great. I used them to extract the lesson titles from the &lt;a href=&#34;https://wesbos.com/courses/&#34;&gt;Wes Bos Courses&lt;/a&gt; I&amp;rsquo;ve signed up for and then dump them into a Trello checklist.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
