<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by crashdaddy on Medium]]></title>
        <description><![CDATA[Stories by crashdaddy on Medium]]></description>
        <link>https://medium.com/@kennethscoggins?source=rss-40faffebb05d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*_kTgBqz8Zi8cbDTY2-vibA.png</url>
            <title>Stories by crashdaddy on Medium</title>
            <link>https://medium.com/@kennethscoggins?source=rss-40faffebb05d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:48:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kennethscoggins/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Play Guitar Modally Using only the Minor Pentatonic Scale]]></title>
            <link>https://kennethscoggins.medium.com/how-to-play-guitar-modally-using-only-the-minor-pentatonic-scale-b5c245bbe843?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5c245bbe843</guid>
            <category><![CDATA[guitar]]></category>
            <category><![CDATA[guitar-lessons]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[rock-and-roll]]></category>
            <category><![CDATA[music-theory]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Sat, 03 Aug 2024 14:55:10 GMT</pubDate>
            <atom:updated>2024-08-04T01:33:56.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*YDZdOl-1RNS8ve9UgZqXyg.jpeg" /><figcaption>Image Courtesy of Freepik</figcaption></figure><p>We’re going to get a little carried away today, but it’s going to be a fun ride, and you’ll end up with something terrific you can use to really turn some heads down at the ‘ol coffee shop (<em>or lumberyard or whatever, idk, I am not a hipster)</em>.</p><p>This article is written for the intermediate/advanced guitar levels, but if you consider yourself a beginner, I encourage you to stick it out, because immersing yourself in the lingo is really the best way to pick it up for yourself.</p><p>But first, allow me to scare the cr@p out of you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*jlp4Ydw8miULfr1lLpiuyQ.jpeg" /><figcaption>I knew that would do it</figcaption></figure><p>Put simply, a “mode” is just the act of starting and ending any scale on a note other than the root note.</p><p>The alignment of the strings on a guitar presents a special situation when working with modes.</p><p>I mean, you don’t want to keep saying to yourself, “Oh, I’m playing in A-Dorian, so I need to find the G-Major scale and then start at the second note” all the time. No, of course not. You’re already spinning a dozen plates at once — why add more?</p><p>What happens is that when you start and end the major scale on a different note than the root note, it basically becomes a whole new scale, complete with its own patterns and chords.</p><p>Let’s look at an example. Here’s the G-Major scale:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*kcuoIm7C0bE3vCzA5e04FQ.png" /><figcaption>So far, so good</figcaption></figure><p>As you can see, I added a few notes from the next octave. Those will help demonstrate the next step. Which is this:</p><p>Say we were to start playing that scale from the “perfect 5th” — or the “D” note in this case. Then the same scale would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*avpIk1Is1BwIoWuAhYrg0w.png" /><figcaption>Because all we did was change the root-note</figcaption></figure><p>Notice it’s exactly the same notes as before, just now different ones are red.</p><p>Then what if we cleaned it up a little and only focused on the notes from the new root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*1wbvAaHcWSEafffGCPDrWg.png" /><figcaption>Gettin’ a little weird now</figcaption></figure><p>That may look a little funny to you, because you already know your major scales, and everybody knows the D-major scale looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*8umkjBdH7DHgR66WE2yY1w.png" /><figcaption>I know it, you know it — we all know it</figcaption></figure><p>So what have we done?!</p><p>Well, if you compare our new collection of notes with the existing D-Major scale that you already know, we’ve just done this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*bO3_DmDUg8LnV8axzXIizw.jpeg" /><figcaption>Nothing to it</figcaption></figure><p>That’s right, it’s just the regular old D-Major scale, but we’ve taken the 7th note, and <em>flatted</em> it by moving it back one fret.</p><p>“Why?” you ask?</p><p>That flatted seventh note changes the overall tonality of the D-Major scale, giving it a more bluesy, rock-n-roll kind of sound.</p><p><em>We like that</em></p><p><strong>But how do we use it?</strong></p><p>That’s a great question, and it comes up a lot. You’ll notice from that example that now, instead of being diminished like a normal 7th chord would be — our new 7th chord will be a <em>major</em> chord.</p><p>What that means, is that if you’re playing in a jam, and your root chord is D-major, and you accompany it with a C-major chord (<em>instead of C-diminished</em>), you’re playing in the “D-Mixolydian” mode!</p><p>And you can take advantage of that.</p><p><em>Technical Note: There’s a little more to it than that. The Mixolydian mode also has a major-third instead of a minor third. But we’re not tryna get bogged down in all that right now.</em></p><p>I’ve taken the opportunity to make you a roadmap of the entire D-Mixolydian scale across the first 12 frets of the neck:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*b_B2OycuAwxkzQC6tZagBg.png" /><figcaption>This is where it starts getting crazy</figcaption></figure><p>You can play your D-C chord progression, and accompany it with just notes and chords from this configuration and it’s going to sound great.</p><p><em>But “great” isn’t good enough — we want “AWESOME”</em></p><p>Well, here comes the goods.</p><p>If you’ve made it this far, then I can pretty much guarantee that you’re already familiar with the “Minor Pentatonic” scale.</p><p>Let me refresh your memory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*rjrLu-4749QU8nJ4ynVo1w.jpeg" /><figcaption>I mean, it’s probably the first thing you learned</figcaption></figure><p>What if I was to tell you that, quietly embedded in the D-Mixolydian scale we were looking at is not one, not two, but <em>three</em> separate instances of this exact pattern?</p><p>Would it blow your mind? If it doesn’t, then that’s how you know you’re still at the “beginner” level, because this is a pretty big deal.</p><p>Let me highlight them for you. Here it is starting at the fifth fret:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*KDB2Q_0_bHPdWjK6rUEoSw.jpeg" /><figcaption>Howbowdah</figcaption></figure><p>And here’s another one starting two frets over at the seventh fret:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*vbmFfDRSNZj53KpCeGvvfw.jpeg" /><figcaption>I’m freaking out over here already</figcaption></figure><p>And this next one can be played from either the 0-fret (<em>the top of the neck</em>) or starting at the 12-th fret (<em>the Yummy Zone</em>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*AgkFFpV9e22CIIMJtQpu1Q.jpeg" /><figcaption>Gas up the car, Martha — we’re goin’ for a drive!</figcaption></figure><p><strong><em>“But good ol’ u/crashdaddy, how is this the big ‘ol game-changer you promised us?!”</em></strong></p><p>First, I never promised that. Second, I do promise that.</p><p>Here’s how this knowledge can make you up to 100x better than you are now:</p><p>You can already just noodle around aimlessly on the D-Mixolydian scale over, say, a D-C chord progression. Or any chord progression that uses chords from D-Mixolydian for that matter.</p><p>What you can do now is <em>revitalize all those tired old pentatonic licks and phrases</em> you’ve been leaning on all this time into some spicy new goodness. You can melt a whole new generation of faces.</p><p>Because now you can use existing tools in your guitar toolbox in exciting new ways. You can even play <em>the same lick</em> in each of those locations, and it will have a pleasant new tonality in each one.</p><p>And on top of that, eagle-eyed readers will have already noticed by now that the pentatonic extensions are also available. Not to mention the other pentatonic positions, for those who’ve learned it past the first one.</p><p>That’s right, for you advanced cats out there, you can also use your sophisticated stylings from all up and down the fretboard in various new and useful locations.</p><p>With tremendous effect.</p><p><strong>What’s Happening Here</strong></p><p>What’s going on is — by playing them this way, you’re adding spicy extensions to the existing chords in your progression — while not doing anything any differently than you’ve already been doing, just in different places.</p><p>For example, the extra “B” note is the 7th of the C-chord, that “G” note is the 4th of the D-chord and so on.</p><p>Using them the way you’ve already been playing them, but in this new context will open up vibrant and exciting new musical avenues for you to explore.</p><p><strong>How Deep Does This Rabbit-Hole Go</strong></p><p>This technique can be used when playing with any sort of modal chord progression. Just look up patterns that you are already familiar and comfortable with, and use them the way you already do, but in their new locations.</p><p>It’s just <em>that</em> simple.</p><p>Thank you for coming to my Shred Talk™ — now go melt some faces.</p><p><em>All fretboard diagrams courtesy of </em><a href="https://www.editor.guitarscientist.com/new"><em>guitarscientist.com</em></a></p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*wOFk-CzzRpd_yCX4wWdfog.png" /></a><figcaption>PS: Enlightening you plebs is thirsty work</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5c245bbe843" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Add Country Tones to Your Blues Guitar Using “Memphis 6ths”]]></title>
            <link>https://kennethscoggins.medium.com/how-to-add-country-tones-to-your-blues-guitar-using-memphis-6ths-eba8bb0688ff?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba8bb0688ff</guid>
            <category><![CDATA[guitar-lessons]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[blues]]></category>
            <category><![CDATA[guitar]]></category>
            <category><![CDATA[guitar-chords]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 10:23:20 GMT</pubDate>
            <atom:updated>2024-07-06T10:55:13.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*g_IrBlSE3doQwWyOvfr3Lw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@nezadolmo?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Neža Dolmo</a> on <a href="https://unsplash.com/photos/a-man-sitting-on-the-floor-playing-a-guitar-DQjNzBDR_0w?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p>If you’ve explored much rock-n-roll or Blues music on the guitar, then you probably already know that the minor-pentatonic scale has long been the go-to pattern for all sorts of wildly popular music.</p><p>You probably learned early on that using that simple scale can help you fake people out into thinking you’re this amazing artist, when you’re really only playing five notes in different ways.</p><p>You may have also noticed that many of the really famous musical artists <em>seem</em> to be using that minor-pentatonic scale, but are also doing “something else” that you often can’t quite put your finger on.</p><p>There’s a term for that: “Playing Outside”</p><p>Put simply, it means using the minor-pentatonic scale as the basis of your riffs and licks, but occasionally incorporating other elements from either the major-scale, minor-scale or other related modes or extensions.</p><p>If that part’s losing you, don’t let it, because we’re only going to be talking about one “outside element” in this article. Which, if you remember the title, is to incorporate what’s known as the “Memphis Scale” or “Memphis Sixths” into your playing.</p><p>There’s a lot of sciency nonsense involved in the concept — which we’ll dive into here in a minute — but in its most basic terms, it’s when you see a musician playing two notes on two different strings while not playing the string between them. Like playing on the E and G string at the same time — or the B and D string.</p><p>You can do it on all the strings, but the higher strings are the most common. We’ll be talking about those in this example, and by the time we’re through, you’ll be able to incorporate the technique anywhere you want to use it; in any scale, mode and chord progression.</p><p><strong><em>Important Note:</em></strong><em> The “M” key on y coputer is going out. I try to catch it when it happens, but if you see the occasional weirdly isspelled word — that’s what’s going on. Please feel free to let e know if I iss any.</em></p><p>So let’s get started!</p><p>Since most players try to just learn a few simple things to fake people into thinking they’re better players than they are, we’re going to use the standard A7-D7-E7 Blues chord progression, with which just about every player is already somewhat familiar.</p><p><em>The best part is that the more you learn about what it is you’re actually doing, the easier it becomes to fake people out about how good you are.</em></p><p>So let’s begin with why the A7 chord is based on the Mixolydian scale. You know the A7 chord is made of the notes A,C#,E,G</p><p>You may remember the formula to create a scale from a root note, but in case you don’t, then here’s a refresher: W,W,H,W,W,W,H</p><p>Starting from the root note, “A”, the other notes in the scale can be found by applying the following intervals; whole-note, whole-note, half-note, whole-note, whole-note, whole-note, half note.</p><p>Or, as many people like to think of it: W,W,H,W,W,W,H</p><p>Which gives you these notes to make the scale: A, B, C#, D, E, F#, G#, A</p><p>But since an A7 chord doesn’t <em>have</em> a “G#” note in it, but a “G” note, we’re just going to slide that G# note back a semitone (<em>half-note)</em>.</p><p>Allow me to demonstrate with a visual representation of all this crazy goodness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*owCedVef12bdF2CwS-Pd5g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*C9FGLm63ALTBD_7d3T0gSA.jpeg" /></figure><p>It’s just that simple. And, like most every hobby, of course there’s a specialized name for everything. Performing this process turns your normal, run-of-the-mill “Major” scale into what’s called the “Mixolydian” scale.</p><p>Technically it’s the Mixolydian <em>mode</em> of the <em>D</em>-Major <em>scale</em>. But I’m not going to get into all the various debates about scales and modes here, or this article would run about 200 pages, and the comment section would be on fire from people arguing about it. The war could last years and cost millions of lives.</p><p>We both have other things we could be doing, so we’re going to stipulate that and just get on to the <em>Memphis Sixths</em> we’re so excited about.</p><p>Now that we know how the scale is built, let’s map it out on only two strings. For our first adventure, let’s do it on the B and D strings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ttjefAYezxnLtUQIdUkOiQ.png" /></figure><p>You can probably already see where this is going. We’ve mapped out the A-Mixolydian scale horizontally along both strings, then I’ve added those cool little red lines to show you the notes that we’re going to connect together to make our sweet, sweet country sounds.</p><p>You can play both notes simultaneously, or alternate between them. You can slide into them, bend to them or whatever creative madness you can get up to with it.</p><p>The “trick” is to ignore the string between them. You can mute it with one of your fingers and just play all three strings, you can pick one string and pluck the other, or you can just pick over the top of it without touching it. It’s really up to you how you want to do it.</p><p>Now let’s look at the E and G strings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OK84NzvD-nzhZ3VlWO3tDQ.png" /></figure><p>Just like before, we started with the “A” note on each string and mapped out the Mixolydian scale horizontally. Remembering that the Mixolydian scale is the same as the major scale, but has a “G” and no “G#”.</p><h3><strong>Science!</strong></h3><p>That’s great. But how do we <em>use</em> it?</p><p>I’m so glad I asked! Let’s take a look</p><p>When the A7 chord is usually playing in your tasty Blues jam, you’re probably already used to mindlessly noodling around the A-minor pentatonic scale.</p><p>Let’s get a quick peek to refresh our memories:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9c3EjVFnDzAfnnqhT2Uaqw.png" /><figcaption>What on Earth is all THAT?!</figcaption></figure><p>If that fills you with shock and awe, then it’s probably because you haven’t gotten to the full scale yet.</p><p>What if we zoom in just a little. See if this makes more sense to you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*rjrLu-4749QU8nJ4ynVo1w.jpeg" /><figcaption>Okay, now I get it</figcaption></figure><p>If the first picture is horrifying, but the second one makes sense, that just means it’s time to start expanding your pentatonic scale outward a little more. It’s just the same five notes, but the pattern appears staggered because of the various locations of the notes.</p><p>But it’s just the same five notes, over and over again.</p><p>And that’s where the beauty of the “Memphis Scale” comes in!</p><p>You may have noticed that there are <em>seven</em> distinct notes in the Memphis Scale, but only <em>five</em> in the minor-pentatonic. That’s the beauty of this method.</p><p>When you’re playing the A-minor pentatonic scale over an A7-D7-E7 Blues chord progression it has a real nice bluesy sound to it. But when you add in the “Memphis Sixths,” what you’re really doing is incorporating the various chord extensions that are neglected when only using the minor pentatonic.</p><p>Let’s take another look:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ttjefAYezxnLtUQIdUkOiQ.png" /><figcaption>It’s like Deja Vu all over again</figcaption></figure><p>The extra notes also have functions over the chord being played. In this case, we’re talking about the A7 chord, so like that “B” note would be what’s called the “ninth”, that F# is the “sixth” and the C# is the major third — while in the minor pentatonic there’s only a natural “C” note, so this gives it some extra spice when you have both.</p><p>I guess this is as good a time as any to point out <em>why</em> it’s called Memphis <em>Sixths</em>. And that’s only because the two-note pairs that we’re playing on the alternate strings are six scale-tones apart from each other.</p><p>Here’s the scale again, so you can see for yourself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*TJZnOdDtT_yp-8OKoKXmlg.jpeg" /><figcaption>Pick any note and count to six</figcaption></figure><p>You can see that if you pick the root note “A” and count to six notes, you’ll land on the F# note. If you start at B you’ll end on the G note, and so one.</p><p>Those are the same pairs we lined up to find our “Memphis Scale” pattern.</p><p>So what you do is, maybe slide into a couple of the Memphis scale pairs, and then since the minor pentatonic scale lies pretty much directly on top of it, you can just casually segue into that pattern.</p><p>It adds a lot of color to your playing, and you’ll really be faking those n00bs out about how great you are now!</p><p><em>“Well, why can’t I just play the whole A-Mixolydian scale over the chord progression?”</em></p><p>Well, now you’re thinking creatively, and you absolutely can. But that’s not what this article is about. It’s about the “Memphis Sixths”. But props for expanding your mind.</p><p><em>Am I talking to myself? No, you’re fine.</em></p><h3><strong>Let’s start wrapping this up</strong></h3><p>At this point you may be wondering what to do when the A7 chord changed to the D7 chord — because chord progressions <em>progress</em>, don’t they.</p><p>Well, you do the same thing. You figure up the D-Mixolydian scale, mentally envision it across two alternate strings, and then superimpose the whole thing over the A-minor pentatonic scale. Or better yet, over the <em>D</em>-minor pentatonic scale.</p><p><strong><em>Sounds simple, right?</em></strong></p><p>Believe it or not, there are many players who <em>can</em> do that; all in their mind, all in real-time, even while they’re playing.</p><p>You and me? Maybe not so much.</p><p>We may have to map out the notes and relationships before we start playing, just to get the lay of the musical terrain, so to speak.</p><p>Let’s just map out the D-Mixolydian pattern for giggles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qm4-FTR5Sj47pAdATRwqNw.png" /><figcaption>Look familiar?</figcaption></figure><p>You may notice it’s the exact same pattern as the A-mixolydian scale, but just with different root notes. Well, isn’t that great.</p><p>Once you’ve got the basic idea down, it’s pretty much a breeze to transpose the concept to the different chords, or even other keys.</p><p>You’ll quickly notice the E-Mixolydian scale also follows the same pattern, just moved up a couple frets. That also makes for fun turnarounds, because you can change the scales quickly but still be in the same spot.</p><p>The more you learn about what you’re doing, the easier it becomes to fake people into thinking you know what you’re doing. And this technique is great for that. It’ll put you miles ahead of those other n00bs.</p><p>Forget faking people out, they’re going to think you’re <em>magic</em>.</p><p>Thank you for coming to my Shred Talk™.</p><p><a href="https://www.editor.guitarscientist.com/new"><em>All fretboard maps were made using the editor at Guitarscientist dot com.</em></a></p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*wOFk-CzzRpd_yCX4wWdfog.png" /></a><figcaption>I think you know what to do</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba8bb0688ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“As Long As You Don’t Eat Them”]]></title>
            <link>https://kennethscoggins.medium.com/as-long-as-you-dont-eat-them-fe498e409e51?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe498e409e51</guid>
            <category><![CDATA[food]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[diet]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[nutrition]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 12:11:12 GMT</pubDate>
            <atom:updated>2024-07-05T12:11:12.853Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*5Ak8FlFa47ZXLJcfvYxo1w.png" /><figcaption>ScIeNcE!</figcaption></figure><h3>Source</h3><h3>Ultra-processed foods do NOT cause obesity, says US government’s top diet advisors in bombshell review of current evidence: ‘Studies have been biased’</h3><p><a href="https://www.dailymail.co.uk/health/article-13480569/ultra-processed-foods-weight-gain-new-report.html">https://www.dailymail.co.uk/health/article-13480569/ultra-processed-foods-weight-gain-new-report.html</a></p><h3><strong>From the Article</strong></h3><blockquote><strong><em>The US government’s top dietitians</em></strong><em> found ‘limited’ evidence these foods cause people to gain weight faster than any other food, after reviewing more than a dozen studies dating back to the 1990s.</em></blockquote><p>Top. Men.</p><p>Here’s the part that makes me think the editors are counting on people only reading the title:</p><blockquote><em>Ultra processed foods </em><strong><em>have been linked to Type 2 diabetes, heart disease and mental health issues</em></strong><em>, a 2024 review from Australian researchers Deakin University found.</em></blockquote><p>Basically, all that article really does is give the discerning reader a full-frontal view of exactly how these institutions and rEsEaRcHeRs use vague language, misdirection and iniquity to barricade any sort of objection to their “results” behind a firewall of obfuscation.</p><p>I mean, they aren’t even releasing the actual report — just sections of it:</p><blockquote><em>The report has not been released in full and </em><strong><em>only segments have been uploaded online</em></strong><em>.</em></blockquote><blockquote><em>But </em><strong><em>the snippets suggest there is nothing intrinsic about processed food that causes obesity and that the amount of calories one eats</em></strong><em> is the most important factor for weight gain.</em></blockquote><p><em>HowbowDAH</em></p><p>Use the headline to misdirect the masses, the article to confuse the curious, and maybe in a year or two release the actual research to satisfy (<em>and vindicate</em>) the persistent.</p><p>Sound familiar?</p><h3>Personal Anecdote Dept:</h3><p>I have a huge pantry that’s jam-packed full of that stuff. I call it my “bomb shelter reserves” and never go near it. Canned chili, raviolis, beans, vegetables, soups, fruits, crackers, “health” bars, etc…</p><p>What I found from years of eating that cr@p is that all it does is keep you hungry. So you eat a ton more of it than you should need. Just look at the label. There’s basically nothing in it but sodium and chemicals with maybe a hint of whatever the intended “food” is supposed to be. You’re really just consuming the syrup.</p><p>You can put beef broth on rice, but calling it “roast beef” is the exact type of disingenuous chicanery these manufacturers are manufacturing.</p><p>I quit eating any of that “microwave” nonsense a long time ago. Nowadays I don’t shop for “food”, I shop for <em>ingredients</em> to make food.</p><p>Consequently, I’m slim, jacked and feel pretty terrific for being like 60 years old. Because I’m eating pot-roasts and pork chops, eggs and bacon, rice and fish. And that sort of diet saves a ton of money. Like you wouldn’t believe. Plus, it’s just fun to cook.</p><p>So I only have to eat about two small meals of that a day to be full and satisfied the whole time. About once a week I fast for a day, and once a month I fast for two or three just to spring-clean myself.</p><p>But what do I know, I’m not a nutritionologist. ¯\(º_o)/¯</p><p><em>I’m just the end-result of the practical application of common sense.</em></p><h3>Science!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe498e409e51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Get the Rock-n-Roll Sound from the “Cowboy Chord” Zone]]></title>
            <link>https://kennethscoggins.medium.com/how-to-get-the-rock-n-roll-sound-from-the-cowboy-chord-zone-e82bbe14b839?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e82bbe14b839</guid>
            <category><![CDATA[guitar-chords]]></category>
            <category><![CDATA[rock-and-roll]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[guitar-lessons]]></category>
            <category><![CDATA[guitar]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 18:03:43 GMT</pubDate>
            <atom:updated>2024-06-25T02:37:21.259Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*vmNRy-xgsqLtObsVZ-6rcw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sammoghadamkhamseh?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Sam Moghadam Khamseh</a> on <a href="https://unsplash.com/photos/man-in-black-leather-jacket-playing-guitar-TmbMLAvXrZQ?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p>The skill-level covered in this article will be the transition from beginner to intermediate.</p><p>By now you’ve probably already “mastered” the minor-pentatonic scale; meaning you’ve learned the first position and have only become mildly aware that it’s only 20% of the actual FULL minor pentatonic scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*4wPv2T2fxfoBAcgJ454qRQ.jpeg" /><figcaption>Look at me, Mom! Look! Mom! Mommy! You’re not looking! MOOOM!</figcaption></figure><p>You keep telling yourself you’ll learn the other positions when you “have time” or whatever — but the fact is, you probably won’t, because you only have time to think about yourself.</p><p>Srsly, though, if you’ve read this far, you already know you’re going to be playing the guitar for the rest of your life.</p><p>So why wouldn’t you want to keep getting just a little better at it every day? You’re on your way to the grave, anyway, and music is one of the few things in Life that you <em>can</em> take with you. Because it lives in your soul, man.</p><p><em>groooovy</em></p><p>So if you want to get to the root of the problem — go find the closest mirror, and punch that dude right in the face. Because he’s literally the sole cause of your pathological lack of progress.</p><p>The good news is, by the time you’ve finished this little tutorial, you’ll have gained a deeper understanding of what the minor-pentatonic scale is, and how its power can be leveraged in much more creative ways than mindlessly noodling up and down it like some kind of robot.</p><p><strong>ICYMI</strong>: <em>the red dots in the image above represent the “root” notes. You’re looking at the A-minor pentatonic scale, so those are the “A” notes.</em></p><p>To achieve our ambitious goal, we’re going to start out at the very easiest chord you’ve ever played:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*cBDik1PHThjqvzhjJC7tFQ.png" /><figcaption>You remember the first time you picked up a guitar, right?</figcaption></figure><p>Now I’m not going to remind you how many times you listlessly strummed or violently pounded on this chord, hoping to turn some little hottie’s head your way — only to have her yawn and turn back to her phone. But if you remember it on your own, that’s on you.</p><p>If she acts like she’s seen it all before, it’s because she <em>has</em> — in middle school, on the bus to summer camp, the first time some kid with an acoustic guitar tried to woo her. And she also remembers her own embarrassment over the fact that, back then that trick <em>worked</em>.</p><p>Nope, you’re grown now, and dealing with a much more sophisticated hottie crowd. The same ‘ol same ‘ol is not going to impress them. And if it does, just quietly move on, because you don’t need “that one” holding you back any more than the man in the mirror already holds you back.</p><p>So let’s look at what’s going on <em>around</em> that “A chord.” Some of it might be useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*6P3m_S1DXoCwZhNWSnuPnQ.png" /><figcaption>It’s called “pattern recognition” AKA the schizophrenic’s super-power</figcaption></figure><p>Would you look at that! It’s all the same notes from your A-minor pentatonic scale, but they’re in a different place.</p><p>You may notice I neglected to highlight one of the root notes in red. That’s on me. I’ll do better. If you didn’t notice, then that’s on you.</p><p>You see there’s still the A-chord, but now there are all those other notes nearby. What that means is that you can use those notes to embellish your A-chord, or as fills or licks between your strumming.</p><p>Try it out. Strum the A chord a couple times, then hit a few of those notes. It doesn’t matter at this point which ones or in what order, it’s just enough to show that it’s not going to suck.</p><p>We don’t want you to be “pretty good,” do we? We want you to be a <strong><em>star</em></strong>.</p><p>So let’s up the ante a little bit.</p><p>What if we zoom in on just one part of that situation so we can get a clearer idea of what’s going on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*D5wIf-CwlWTx2JfFOnn5KA.png" /><figcaption>Well, that’s … something</figcaption></figure><p>“What am I looking at?” you’re probably wondering.</p><p><strong><em>“FREEDOM!”</em></strong></p><p>Try it out one time. Play that A-chord by fretting all three strings with your index finger, while simultaneously using your middle- and ring-finger to pluck at those other notes.</p><p>And don’t be afraid to bend them, too. That’s where the <em>twang</em> comes from, dontchaknow.</p><p>Do it a few times. And pluck ’em good and hard. You’re quickly going to discover two things:</p><p>Thing 1: it hurts like a sum-b until you get used to it</p><p>Thing 2: it sounds fantastic.</p><p>I’m not going to get into the whos and whats of all the big-name rock bands successfully using this technique <em>all the steenkeen time.</em> But I will point out that, when they’re doing it, the little hotties they’re trying to impress <em>aren’t</em> turning back to their phones.</p><p>No, our next step is going to be to talk about <em>why</em> it works to produce such tasty noises.</p><p>Let’s look at that same little roadmap in another way:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*ooOZQ4_s9VqojlVs1T7Lhg.png" /><figcaption>Nobody told me there’d be math involved</figcaption></figure><p>One scary element that has to be overcome in the transition from beginner- to intermediate-level guitarist is the use of the numbering system. If you feel the need to scream or sob quietly for a few minutes, then go ahead.</p><p>Ok, we’re back.</p><p>By now you know a scale consists of seven notes. We’re using the A-major scale, so we just apply our handy major-scale formula (<em>W-W-H-W-W-W-H</em>) and count them:</p><p>A, B, C#, D, E, F#, G#</p><p>Or, to put it in number terms: 1, 2, 3, 4, 5, 6, 7.</p><p>Get it? It’s done that way as what’s called an “abstraction.” It’s a common term in computer science, and applies to music as well. It’s a way to define the particular notes of a scale — no matter which key it is to which you’re referring.</p><p>And it’s a good thing. Without the numbering system, you would have an insane time trying to talk about anything, because you would always have to provide qualifiers for whatever “key” or “mode” you’re referencing.</p><p>Nope, the “1” is <em>always</em> the root note. The “2” is always the second note of the scale, the “3” is the third note of the scale, the “4” is the fourth note of the scale, the “5” is the fifth note of the scale, the “6” is the sixth note of the scale, and the “7” is the seventh note of the scale.</p><p>Why did I bother to type all that out? For you. Because it’s important for you to understand how important this concept is — not to mention how simple it really is to understand — if you just stop letting that man in the mirror keep you ignorant.</p><p><em>go ahead and give him another whack, so he doesn’t forget</em></p><p>So looking again at that map:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*ooOZQ4_s9VqojlVs1T7Lhg.png" /></figure><p>You can probably already see that the A-major chord that you’re so used to already consists of the root note “1”, the third note “C#” and the fifth note “E”.</p><p>So what are those other notes?</p><p>Well, there’s a “flat” 3 on the fifth string there. Meaning that from the numbering system we tediously wrote out earlier, that means “find the third note of the scale, and drop it one semitone.”</p><p>On a guitar, one “semitone” is one fret. So instead of the C# that’s in the scale, this <em>flat</em> third is a C-note.</p><p>That’s why we <em>bend</em> it. It starts out sounding like a minor tone, but then when we bend it, it becomes a <em>major</em> tone. That’s a huge plus in rock music.</p><p>There’s also a flat-7th on the 6th string. What’s going on there?!</p><p>You saw from earlier when we numbered all the notes of the scale, that the “7” note was a “G#”. To “flat” that note means to instead play a “G” note .</p><p>That is the sound that makes blues music bluesy, and also translates really well when played in a rock context.</p><p>That “6th note” on the D-string is a fun one. When you play it by itself — in the context of an A-chord — it gives a nice little country twang to what you’re doing. Then when you bend it a little, it turns into that same flat-7th tone we were just talking about.</p><p>Tie all that together, and play it real fast and you’ll learn two things:</p><p>Thing 1) how little it really takes to make your fingers bleed</p><p>Thing 2) that little hottie’s not looking at her phone any more.</p><p><strong><em>And isn’t that really what it’s all about?</em></strong> ¯\(º_o)/¯</p><p>I’m going to call it here. That’s a lot to take in, but if you can shut mirror-boy up for about five minutes, you’ll start to notice it’s really about the easiest thing. But it sounds great and we love it.</p><p>All the diagrams used in this tutorial are <a href="https://www.editor.guitarscientist.com/new">courtesy of guitarscientist.com</a>.</p><p>Thank you for coming to my Shred Talk.</p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*wOFk-CzzRpd_yCX4wWdfog.png" /></a><figcaption>Will Educate for Food</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e82bbe14b839" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Shred Your Guitar Like a Big ‘ol Rock Star]]></title>
            <link>https://kennethscoggins.medium.com/how-to-shred-your-guitar-like-a-big-ol-rock-star-89c73ac042dc?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/89c73ac042dc</guid>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[guitar]]></category>
            <category><![CDATA[guitar-lessons]]></category>
            <category><![CDATA[guitar-chords]]></category>
            <category><![CDATA[rock]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 10:37:24 GMT</pubDate>
            <atom:updated>2024-06-20T13:46:49.412Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Shred Your Guitar on Three Strings Like a Big ‘ol Rock Star</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*gdwvjllyYRO3uqLKGqdNmg.jpeg" /><figcaption>Note: You will NOT be learning this technique in the article (Photo by <a href="https://unsplash.com/@alxstls?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Alexandre St-Louis</a> on <a href="https://unsplash.com/photos/man-playing-guitar-on-his-back-IlfpKwRMln0?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a>)</figcaption></figure><p>This article is written for the beginner-level guitarist — or maybe an insecure, self-doubting intermediate player. You know who you are. You’re me.</p><p>You know how little kids learn their alphabet by going home after school and “teaching” it to their parents? That’s what we’re doing here. I’m learning it myself, and just showing it to you.</p><p>I’m sure at some point or other, you’ve seen a guitar player just shred the daylights out of only the three thinnest strings on the guitar, sounding competent, relevant and in-key the whole time.</p><p>If you haven’t, that’s not my problem. Maybe you can be the change you want to see in the world, idk. But they do that. Like all the time. In fact, it’s the major difference between how they play and how you play.</p><p>So let’s <em>steal</em> it!</p><p>For this example, we’re going to use the key of C major. There’s no special reason for that. The technique works exactly the same for every scale and mode.</p><p><strong>Plus an extra bonus!</strong> During the course of this article, you will also be shown how to incorporate the dreaded, elusive <strong><em>DIMINISHED CHORD</em></strong> into your playing. At no extra charge. Maybe you can click the little “clap” button or buy me a ko-fi…that would be nice.</p><p><em>Let’s get on with the mayhem!</em></p><p>You may remember the formula to figure what notes are in a scale, but in case you don’t, here’s a little refresher:</p><p>Starting with the root note — in our case the “C” note — the formula for the Major Scale is as follows: <strong>W — W — H — W — W — W — H</strong></p><p>Where the “W” stands for “Whole Note” — move down two frets — and the “H” stands for “Half Note — move down one fret.</p><p>It’s just that simple. Here’s a handy graphic for you on the second string:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bNK8uWt2xj8Blu7EanCz7w.png" /></figure><p>As a refresher, the three-note chords that can be made from those particular notes are as follows:</p><p>C-<strong>major</strong></p><p>D-<em>minor</em></p><p>E-<em>minor</em></p><p>F-<strong>major</strong></p><p>G-<strong>major</strong></p><p>A-<em>minor</em></p><p>B-”diminished”</p><p>and back to a C-major chord, but this one is an octave up from where we started. “Octave” is a fancy way of saying that it’s 8 chord tones above the original root.</p><p>To start off, let’s review how to form those chords on just the top three strings.</p><p>First, a major chord is made by playing the root note, the “major third” of the scale, and the “perfect fifth” of the scale all at the same time.</p><p>Using the handy formula from earlier, here’s the notes of our scale: C — D — E — F — G — A — B</p><p>The root of course is “C”, so the third would be “E” and the fifth would be “G” (<em>count them up and you’ll see I’m right</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*snvm6oj77BHiRJwXFKZPAA.png" /><figcaption>If you play all those notes TOGETHER, it’s a “C Chord”</figcaption></figure><p>A minor chord is made of a root-note, the <em>minor</em> (<em>or “flat”</em>) third, and a perfect fifth.</p><p>Like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*IJhqmJAQO70eol4gBYHiVg.png" /></figure><p>And the third type of chord in the scale is the “diminished” chord. It consists of a root note, the minor third note, and the <em>flat</em> five note:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*XvOWUdJwrdzALffOcDu1gQ.png" /><figcaption>Can you dig it?</figcaption></figure><p>Coincidentally — and this is a special extra treat — all the notes of all the chords are also notes that are in the scale. In this case they’re always going to be one of the following notes — C,D,E,F,G,A,B — just in different configurations. Ain’t it great.</p><p>So those are how to play whole chords, and that was probably an insane amount of build-up for the more advanced intermediate players, but we came here to shred maniacally, didn’t we.</p><p><strong>Narrator</strong>: <em>Yes. Yes, we did.</em></p><p>Here’s how the shredding works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rR4MOAZB7TbfuotWBbzzhg.png" /><figcaption>Now we’re getting somewhere</figcaption></figure><p>ICYMI:<br><strong>diatonic</strong>/dī″ə-tŏn′ĭk/ <em>adjective</em></p><ol><li><em>based on or using the five tones and two semitones of the major or minor scales of western music</em></li></ol><p>That’s just a fancy way of saying, “The chords that you can make with the notes of the scale.”</p><p>To double-check the veracity of that claim, just find the root note “C” on the first and third strings, then follow the Major-Scale formula on each of those strings. You’ll quickly see that all three strings contain those exact same notes — just in different positions.</p><p>Which is what makes it fun.</p><p>At this point, you could stop, and know that if your rhythm-guitar player is performing a chord progression in the key of C, you can play any of those notes over any of the chords in his progression and sound pretty good.</p><p>But “pretty good” is just pretty good, isn’t it? We came here to <em>shred</em>.</p><p>To get to that state, there are some ergonomic concerns. You can see by the chord shapes, that just arpeggiating the notes of each chord is a clunky and cumbersome proposition.</p><p><em>For the beginner-beginner, “arpeggiate” means to play each note of the chord one-by-one, as opposed to playing all the notes together.</em></p><p>So let’s learn how to arpeggiate those chords in a more comfortable and fluid manner:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*9pRGwNWNNtY7ddSXUK-p6g.png" /></figure><p>We’re still using notes from the same scale, but now we’re following a more fluid pattern. This still represents the root, major third and perfect fifth, but by cascading them in this manner, you can base your index finger on one note as kind of an “anchor,” and using your other fingers to play each of the notes of the chord.</p><p>Try it, you’ll like it.</p><p>The minor and diminished chords can be arpeggiated in a similar manner:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*M8gGQsCBVo03RunTg8qEKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*iEAMeAfhYIMrvDugHtmq2w.png" /></figure><p>And that’s it.</p><p><strong>Narrator:</strong> <em>that’s not, in fact, “it”.</em></p><p>Of course, there’s a lot more to expand on. For instance, since earlier when you noticed that all the same notes are also available on the first and the third strings, you can arpeggiate the <em>same chords</em> in different inversions <em>all up and down the fretboard</em>.</p><p>That’s what those rock stars are really doing; they can arpeggiate a 2nd-string-root c-chord, then a first-string-root c-chord, followed by a third-string-root c-chord, and they’ll have shredded their way <strong><em>on one chord</em></strong> all the way from the 13th fret down to the first fret, or vice-versa, even. Just arpeggiating the various chord shapes that can made from a C-note as they move.</p><p>Without getting too far ahead of ourselves, here’s an example of how that would be played:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnE9gi_h0kveRyx3s2d3NQ.png" /><figcaption>Play these notes in any crazy order you want, and it’s going to sound terrific over a C-Chord</figcaption></figure><p>For now, just try it out the way it’s presented. Play any of those arpeggios — or even just the scale notes — over a C — F — G chord progression, and you will immediately see what I mean. Then we’ll take it further.</p><p>My point here isn’t to overwhelm, but to enlighten. Learning just this simple technique will be more than enough to get you moving horizontally. And really, isn’t that what makes you look at those guys and say, “cooool” in the first place?</p><p><strong>Narrator:</strong> <em>cooool</em></p><p>If you can provide other tips and suggestions, helpful advice, or find a misspelling, by all means, please let everybody know in the replies.</p><p>The diagrams in this article were made courtesy of <a href="https://www.editor.guitarscientist.com/new">the amazing tool at Guitar Scientist</a>.</p><p>Thank you for coming to my Shred Talk.</p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*wOFk-CzzRpd_yCX4wWdfog.png" /></a><figcaption>Hook a brutha up</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89c73ac042dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Incorporate “Shell Voicings” into Your Groovy Blues Guitar]]></title>
            <link>https://kennethscoggins.medium.com/how-to-incorporate-shell-voicings-into-your-groovy-blues-guitar-607f2629ccdb?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/607f2629ccdb</guid>
            <category><![CDATA[guitar-chords]]></category>
            <category><![CDATA[guitar-lessons]]></category>
            <category><![CDATA[shredding-services]]></category>
            <category><![CDATA[blues-rock]]></category>
            <category><![CDATA[rock-guitar]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Sat, 09 Dec 2023 16:41:08 GMT</pubDate>
            <atom:updated>2024-01-03T14:28:17.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*Ydwvj7Kl-mhRm4RLrnDM0A.jpeg" /><figcaption>Learning guitar is easy. Being GOOD at it…<em>weeelllll</em></figcaption></figure><p>You may be thinking, “Shell voicings?! What jazzy nonsense are you trying to sneak in, here? <em>Ahm a BLUES player!</em>”</p><p>Don’t blow a string, there, my bluesy-buddy, good ‘ol pentatonic-pal, my arpeggiating-amigo — you’re gonna love this.</p><p>Yes, “shell voicings” is a concept that’s very popular with … 🤢…jazz musicians. But we’re <em>rock</em> stars. And what do rock stars do best?</p><p><em>Party? Puke? Primp?</em></p><p><strong>Rock stars <em>steal</em>!</strong></p><p>That’s right. When we’re not out there blowing minds, melting faces and shredding axes, we like to amuse ourselves with nefarious acts of petty pilfering. Mostly from other rock stars…<em>but maybe I’ve said too much</em>.</p><p>So while the jazz crowd was off adjusting their berets or snapping their fingers to slam poets or <em>playing every. single. note. at the same time,</em> I’ve been quietly plundering their technical toolbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*cWO-Y-Hpb9Fs0mZiftIupg.jpeg" /><figcaption>RIP Meatloaf</figcaption></figure><p>I was in a music group the other day, and good ‘ol David (<em>y’all know David, right?</em>), well David said the simplest thing ever:</p><p>“A shell voicing is just a regular chord with no 5th.”</p><p><a href="https://people.uncw.edu/russellr/ShellVoicings.html">Let’s see what the scientists have to say about it</a>:</p><blockquote>A “shell voicing” is a voicing of a chord which leaves out one or more notes, usually the fifth and/or the root. This is useful information for guitarists, as we’re often called upon to play chords which, in their full voicings, would have more tones than we have strings or left-hand fingers — or which would be difficult or impossible to reach. Leaving out the less “colorful” chord tones like the fifth and root frees up fingers for more interesting choices like extensions (9th, 11th, 13th) or alterations (b5, #5, b9, #9).</blockquote><p>The same thing, only a bit more pretentious.</p><p>You’ll be happy to know, that when played in a blues context, shell voicings can provide a gritty rock sound, almost like the famous “double-stop,” but with the addition of the heavy blues quality of that flat-7th. Not to mention the devilishly creepy “tritone” that’s formed from the 3rd and flat 7th.</p><p>So I made you these little roadmaps to elaborate on the technique, and to maybe help open up more of the fretboard for you.</p><p>We’ll start with the most important map for our purposes, since we play A-major Blues very often:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*zLEleA3U61kfv2wBnsw3KA.png" /></figure><p>For this next one, the D7 and E7 shell voicings have the exact same configurations and patterns — just move D7 down 2 frets and you’re playing in E7. So I’m only providing D7.</p><p>You may recognize that the chord shape with the root on the 5th string at the 5th fret is the same chord we use <em>all the time already — </em>along with its neighbor, the E7 shell voicing, made by sliding that shape a mere two frets to the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*S0JfASVY0jcyw_v0MojxLQ.png" /></figure><p>Which, those are great for <em>rhythm guitar</em>, but what if you want to play <em>lead guitar</em>?!</p><p>In that case, you would just arpeggiate those same chords, so you can shred up and down the fretboard like the big ‘ol rock star <strong><em>you know you can be</em></strong>!</p><p>Here’s the A7 roadmap for you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*YYdl4jY5w2RUJI4dd6_VMw.png" /></figure><p>And since you probably don’t want to play A7 shreds over the D7 and E7 chords, here is a pattern for D7. Which, again, can be moved to the right two frets to play over E7 chords:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*KsGal3_TKIoyAXzMuS--Yg.png" /></figure><p>And I don’t want to forget <strong><em>the best one!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*s8Zs0AsWeaZKoIHPsQwS7Q.jpeg" /><figcaption>No.</figcaption></figure><p>This here is a superimposed diagram showing the proximity of each of the different chord shapes in our chord progression to one another:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*9Lu6M07lnpmGz7KnY6TKiA.png" /><figcaption>Fun for the Whole Finger Family!</figcaption></figure><p>Playing them in this configuration, in this position is not only very satisfying, it’s also very <em>easy</em>. There’s a similar situation just past the 12th fret, but this here is plenty to jam out to some good ‘ol Blues.</p><p><strong>Pro-Tip</strong>: You can play any of these patterns and shapes, and then segue smoothly into the A-minor pentatonic scale that corresponds to that location for extra flavor.</p><p><em>MMM-mmm good!</em></p><p><em>=-=-=-=-=-=-=-=-=-=-</em></p><p>As you can see, I’m quite captivated with the concept, both for its utility and the delectable sound it produces. I remember covering it briefly years ago in relation to the piano, but thought it was stupid and boring at the time. But <em>for the guitar</em> it’s <strong><em>terrific and useful</em></strong>!</p><p>So I hope these materials are able to help you as much as making them helped me!</p><p>=-=-=-=-=-=-=-=-=-=-</p><p>As always, the tool used for creating these diagrams <a href="https://deref-mail.com/mail/client/7oDUHzQJwuU/dereferrer/?redirectUrl=https%3A%2F%2Fwww.editor.guitarscientist.com%2Fnew">can be found at guitarscientist.com</a></p><p><em>And if you like this nifty tutorial…</em></p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/430/1*y_C13xztop7fi4jOmqxZYg@2x.jpeg" /></a><figcaption>You know what to do</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=607f2629ccdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Major Scale Anywhere on the Guitar without Memorizing Patterns]]></title>
            <link>https://kennethscoggins.medium.com/how-to-build-a-major-scale-anywhere-on-the-guitar-without-memorizing-patterns-8c76a557f9bf?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c76a557f9bf</guid>
            <category><![CDATA[guitar]]></category>
            <category><![CDATA[guitar-lessons]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Thu, 24 Feb 2022 21:03:26 GMT</pubDate>
            <atom:updated>2022-03-02T15:31:07.542Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*JRcCrNCrMKlPdyUgIBu1zg.jpeg" /><figcaption>Photo by: <a href="https://unsplash.com/@danieltafjord"><strong>Daniel Tafjord</strong></a></figcaption></figure><p>Many times, guitar beginners somehow get it stuck in their heads that in order to be proficient at soloing, they have to memorize scores of different “maps” of the fretboard.</p><p><em>I’m not saying that was me…but that was me</em></p><p>Tell me if this looks familiar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*reIupgm7Fwtj0H9tsUMsbg.jpeg" /><figcaption>Ain’t nobody got time for that</figcaption></figure><p>How many hours did you spend staring at fretboard maps like this one, trying to remember each and every note so you could play a scale in just one key? And then to transpose that to all other keys — madness.</p><p>Let me show you how to be able to start with just one note anywhere and build your scales from just that note.</p><p>We’ll be using the Major scale, but this method works for any other type of scale as well.</p><h3><strong>Your Formula for Success</strong></h3><p>Instead of trying to memorize individual notes, all you need to know is this:</p><p><strong>W-W-H-W-W-W-H</strong></p><p>The Ws stand for “Whole Note” and the Hs stand for “Half Note”. A whole note is made when you move down two frets and a half note is made when you move down one.</p><p>Here’s an example for you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaI39sYb05j_adlTxhmq6A.jpeg" /></figure><p>If you play those notes in that order, you will be playing the G-major scale. Isn’t that amazing! You don’t have to memorize every note of the scale, even though eventually you’ll become very familiar with them, but just <em>how the scale is built</em>.</p><p>And it’s built like this: W-W-H-W-W-W-H</p><h3><strong>That’s Too Easy</strong></h3><p>What if you don’t feel like just playing along one string every time? Maybe you want your fingers moving up and down like some sort of rock-n-roll spider from Mars.</p><p>Here’s how to adapt the use of that formula to work in any direction.</p><p>Whenever you’re on a note and you want to find the next note on the string above it, it always follows the same rule.</p><p>Here it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*xWtNWdasgJ5SWGTK8k-0BA.png" /><figcaption>Notice the difference when the next string is the “B” string</figcaption></figure><p>Whenever you’re on a note and want to go to the next whole note on the string above where you are, you simply go up one string and back three frets. So if you’re on “A” on the 6th string, you’ll end up on the “B” note on the 5th string.</p><p>Exactly what you wanted!</p><p>But if you want to go a HALF step on the next string, just remember to go back FOUR frets.</p><h3><strong>Crazy Random Roadblock</strong></h3><p>Just remember that when the next string above where you are is the SECOND string “B”, that you’ll need to go back two frets to move to the next whole note and THREE frets to find the next half note.</p><p>Look again at that image above — where you’re moving from the F-note on the third string to the G-note on the second string — and it will make more sense. See F-&gt;G in the picture above.</p><p><em>Just one of those little nuances that makes guitar-playing something that you can be good at, but regular people will think there’s too many “rules” for.</em></p><h3><strong>Let’s Get Local</strong></h3><p>Now that you know how to get from one string to the next, how can we bring our scale closer to something we can do without sliding our left hand all up and down the neck?</p><p>We just use our same formula, W-W-H-W-W-W-H, but moving up a string after every few notes.</p><p>Like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*eUnDxLoW3gSNDDekmHFWHw.png" /><figcaption>Now we’re gettin’ groovy</figcaption></figure><p>If you compare that to the linear scale we did in the first picture, you’ll see that we’re playing all the same notes. This time they’re closer together and easier to get to without moving your hand all around.</p><p>Let’s break it down:</p><p>1. We started on the G note</p><p>2. We move one whole note (W) to the A note</p><p>3. We then moved up one string and back three frets to find the next whole note (W) and arrived on the B note. So far so good.</p><p>4. Next is a half-note (H), so we just go to the C note on the next fret.</p><p>5. Followed by another whole note (W) which lands us on the D note on the 5th string.</p><p>6. Now we want to move up again, and the next note in our scale will be another whole note (W). So we go up a string and back three frets until we land on E.</p><p>7. Following our formula (W-W-H-W-W-W-H) there’s one more whole note (W), so we move down two frets and land on F♯ (<em>sometimes called G♭, like in the picture</em>).</p><p>8. The last step in the formula is a half note (H), and that brings us right back to another G, thus completing the scale!</p><p><em>Yer gonna be a star, kid!</em></p><h3><strong>Let’s Get a Little Crazy with It</strong></h3><p>Now that you know how to find your scale without having to memorize each note, let’s apply that same formula to go backward on the fretboard. Are we outta control? Maybe, but let’s indulge our madness a little:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*9BO6h-HmF2Tqb2evTnmd0Q.png" /><figcaption>I can’t believe it’s the same scale</figcaption></figure><p>It’s the same scale! It uses all the same notes as the linear G scale we did on one string and the nice boxy G scale we just did a minute ago, with one small difference.</p><p>Using the pattern we learned instead of memorizing the location of every. single. one. of those notes, we can just start at the same G note and go up a string and three frets back (W), then forward two frets (W), then one little fret (H), then we can go up another string and back three frets (W) followed by another two frets (W) and this is where things get flexible.</p><p>We’re sitting on the E-note on the 4th string (2nd fret). If we go up a string now, we can’t go back three frets because there’s only two frets there.</p><p>So we go to the next step in our formula (W) on the same string. That puts us on F♯ (<em>or G♭ — you’re totally getting this</em>).</p><p>Now the final step in our formula is a half note (H).</p><p>There’s not one, but <em>two</em> options we have here. We can simply slide forward another half note and land on a G or we can go up to the next string and find a G there. Flexibility! But since we’re going “backward” in this example, let’s go up to the next string.</p><p>Remembering that when we want to go to the next <em>half </em>note on the next string up we have to go back four frets instead of three, that puts us — -what?! — on fret ZERO?!</p><p>I’m just messing with you. That’s just an open note, because we’re playing the G scale and we’ve landed on the G-string, so we just play that string by itself.</p><p>Outstanding.</p><h3><strong>You Can’t See Yourself Grow</strong></h3><p>Now you know how to pick any spot on the fretboard, any note whatsoever, and if you apply this formula (W-W-H-W-W-W-H) you will immediately be rocking out the major scale of whatever note you started with. Without having to memorize a bunch of dots on a map. Yay, you.</p><p>Just always remember to adjust for the 2nd string (B) when you’re going to land on it. Because we don’t want those non-guitarists to figure out all our tricks, do we?</p><p>Looking to the future, there are many other types of scales you can learn; minor (W-H-W-W-H-W-W), Dorian Mode (W-H-W-W-W-H-W) and many more!</p><p>Pretty soon you won’t even have to remember the formulas anymore, but just the relationship of the scale you want to the scale you already know and simply make adjustments on the fly.</p><p>But we’ll get there. No need to rush yourself. For now, just have some fun jamming those major scales all up and down the neck and don’t worry about finding a map…because it’s already in your head: W-W-H-W-W-W-H</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*Ey929rQXLnPRo47aZyjuSw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c76a557f9bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build “Wordle” Using ReactJS and About 200 Lines of Sloppy Code]]></title>
            <link>https://kennethscoggins.medium.com/how-to-build-wordle-using-reactjs-and-about-200-lines-of-sloppy-code-3da3ef47013f?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3da3ef47013f</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[wordle]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Mon, 21 Feb 2022 18:00:09 GMT</pubDate>
            <atom:updated>2022-12-16T16:24:55.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*SyyyQHeNlxgWsiQTQBtopA.png" /><figcaption>It’s easier than you may think</figcaption></figure><p>For the last couple of weeks, my news feed has been cluttered full of headlines gushing about this “new” game called <em>Wordle</em>. I just checked, and it’s still making news headlines as recently as <em>six minutes ago</em>. Go figure.</p><p>Programmers will recognize it immediately as a clone of the game <em>Mastermind, </em>after however many years of recreating that game as an exercise in different languages.</p><p>So let’s do it again! This time, instead of colored blocks or numbers, we’ll be building ̶M̶a̶s̶t̶e̶r̶m̶i̶n̶d̶ , I mean <em>Wordle </em>using words<em>.</em></p><p>First, scamper over to <a href="https://wordlier.netlify.app/">https://wordlier.netlify.app/</a> and take a look at a working demo of this game, and then let’s get started!</p><h3><strong>Step 1: Imagine the App</strong></h3><p>What do we want our game to do?</p><p>Let’s start by choosing the length of the word the player has to figure out. Most people go with 5-letter words. I’ve seen some versions where the user can adjust the word length in order to increase or decrease difficulty.</p><p>Then we’ll want to give the player, say, six turns to figure out the word. How they do that is by picking a word to start with. The app will then tell them how many letters in the word they picked correspond to letters in the actual word they’re trying to figure out.</p><p>Here’s an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*1tV-SzbifpLCU_NQUptQgw.png" /><figcaption>I even lose at game I wrote myself</figcaption></figure><p>As you can see in the above image, the first word the player chose was “arise” (<em>lots of vowels — smart</em>). It had a letter “A” in it, which does occur in the app’s chosen word, but not at the same place in the word. That’s why it’s colored blue.</p><p>If it was the right letter and in the right place it would be colored green.</p><p>When all the letters are green, the player wins. If the player takes six turns and can’t figure out the word, the player loses.</p><p>Get it? It’s pretty fun, ngl. That’s why I built it.</p><p>You can also decide if you want to assign some sort of scoring protocol. For example, a player who solves the word in one or two guesses may get a higher score than if it took them five or six guesses.</p><p>For now, our example will be win/lose, but here’s a nice idea if you’re so inclined:</p><p>First guess: 1000pts</p><p>Second guess: 200pts</p><p>Third guess: 100pts</p><p>Fourth guess: 60pts</p><p>Fifth guess: 45 points</p><p>Sixth guess: 15points</p><p>Talk about incentive.</p><p>Now we have our idea, let’s build our app.</p><h3>Step 2: Build the App</h3><p>Next, we want to create the framework for our app. We’ll be doing our editing in VSCode. So let’s just sashay over to git and setup a react app like this:</p><pre>npx create-react-app Wordle</pre><p>Disclaimer: you’re probably going to have to come up with some different name, and I have to warn you, there’s about 11-thousand versions of this game, all having some ‘word’ name. Get creative.</p><p>Now we want to go in and gut out all the stuff we don’t need. For this purpose I usually go right in and delete the images that come with the app; logo, favicon, etc. You’ll find them in the ‘public’ folder.</p><p>I’m assuming you have some experience with ReactJS, so I’m not going to dumb this tutorial down too much, but here’s something like what you should see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L7j0L-F9j3o8HETOUO8FSg.png" /><figcaption>A ReactJS App Framework</figcaption></figure><p>Yours won’t look exactly like this, because this screenshot was taken after I had already messed with it some, but those two ‘.png’ images in the public folder can get cut right out. You’ll also want to remove references to them in the code, but the beauty is that it won’t compile if you don’t — and will take you right to them.</p><p>The favicon is my favorite. That’s the little picture on the tab when you’re looking at a webpage. It’s also the icon used when many other sites refer to your app. I like to make my own and save it under the same name “favicon.ico” in the public folder. That’s literally all you have to do with that.</p><p>You can also see a file called “5LetterWords.txt” in that same folder. That’s the database (it’s a text file) we’ll be using.</p><p>You didn’t think we were going to sit here and make up 5000 words, did you? Nope. We look around online until we find a dictionary that contains only 5-letter words, and lots of them. <a href="https://github.com/charlesreid1/five-letter-words/blob/master/sgb-words.txt">I found this one at Github</a>.</p><p>Simply save that file to the public directory. We put it there so that we can access it by using a <em>fetch </em>command later.</p><p><strong>Consideration: </strong><em>while you might be inclined to build an ExpressJS backend with an API that you can call to retrieve a word and to check the player’s words for correctness, since we’ll be hosting this app at heroku.com, it’s much easier just to store the file locally instead of having to “wake up” a whole nother app for the API.</em></p><p><em>If later you want to add login functionality, recordkeeping and maybe leaderboards and such, an ExpressJS API would be the way to go.</em></p><h3><strong>Step 3: Code the App</strong></h3><p><strong>Setting Our State Variables</strong></p><p>Most of our figuring is going to be done in the App.js file. This is a really simple app, so it won’t even be 200 lines of code — or not many more, if that.</p><p>Let’s start by setting up our state variables. Here are the ones I chose, and we’ll talk about them in a minute:</p><pre>this.state = {</pre><pre>words:[],</pre><pre>board:[</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}],</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}],</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}],</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}],</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}],</pre><pre>[{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;},{letter:&quot;&quot;,status:&quot;white&quot;}]</pre><pre>],</pre><pre>currentRow:0,</pre><pre>currentWord: &#39;&#39;,</pre><pre>currentGuess: &#39;&#39;,</pre><pre>errorMessage: String.fromCharCode(160),</pre><pre>gameOver: false</pre><pre>};</pre><pre>}</pre><p>The “words” array will hold the entire dictionary. It’s only 5,000 words, so pretty negligible as far as resource management goes. Like I said, given better hosting options, all that would be done through an API, so you’d only ever have one word in memory at a time.</p><p>Next is the board itself. It’s an array of six arrays. Each of the six arrays is a row of the board, and will simply hold the letter chosen and the “status” of that letter (found, found but in the wrong spot, or just completely wrong).</p><p>Of course you could abstract all that in a hundred different ways, but it’s a simple, non-changing playing board that’s very small, so it’s way easier to just draw it right out.</p><p>Of course, the next variable “currentRow” tells the app which turn the player is taking. In this case it starts at 0 and goes to 5 — so six turns.</p><p>The following variables, “currentWord” and “currentGuess” will hold the word the app chose as the target word, and whatever word the player is currently trying to play.</p><p>We use the “errorMessage” variable as a string to send messages to the player; ie: “that word’s too long,” “there’s no such word in the dictionary” (<em>for when they try to cheat by just mashing random letters</em>), “You Win!”, “You lose” and whatever else we want to communicate to the player.</p><p>You might notice this default value for “errorMessage”:</p><pre>String.fromCharCode(160)</pre><p>That’s a hard space, so that whenever there’s no message being displayed, the layout will still accommodate the position of the message on the screen. That’s just so that when we do output a message there, it won’t cause all the other display elements to move around.</p><p>In this image, it’s the words in red:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*SyyyQHeNlxgWsiQTQBtopA.png" /><figcaption>If that was usually blank, everything would move around when there were words there.</figcaption></figure><p>And finally, we have our “gameOver” variable. That’s to tell the game whether or not to accept more input from the player.</p><p><strong>Loading Our Dictionary</strong></p><p>Now we want to load our dictionary into the “words” array. Then we can choose a random word for our target word, and also use that array to compare the player’s guess to see if it’s a valid word or just random keypresses.</p><pre>async downloadDictionary() {</pre><pre>let response = await fetch(&quot;5LetterWords.txt&quot;);</pre><pre>if(response.status !== 200) {</pre><pre>throw new Error(&quot;Server Error&quot;);</pre><pre>}</pre><pre>// read response stream as text</pre><pre>let text_data = await response.text();</pre><pre>let wordList = text_data.split(&quot;\n&quot;);</pre><pre>let maxWords = wordList.length;</pre><pre>let wordNumber = getRandomInt(0,maxWords);</pre><pre>this.setState({</pre><pre>words: wordList,</pre><pre>currentWord:wordList[wordNumber].toUpperCase()</pre><pre>});</pre><pre>}</pre><p>That’s the whole function. First, we fetch the word list, then we split it into an array with this line:</p><pre>let wordList = text_data.split(&quot;\n&quot;);</pre><p>That divides the text file up between each line of the file and makes each line an element of the array, “wordlist.” Then we’re going to pick a random number somewhere between 0 and however many words are in the dictionary like this:</p><pre>let maxWords = wordList.length;</pre><pre>let wordNumber = getRandomInt(0,maxWords);</pre><p>Which, of course by now we’ve already visited stackoverflow and gotten our handy random-number generator:</p><pre>function getRandomInt(min, max) {</pre><pre>min = Math.ceil(min);</pre><pre>max = Math.floor(max);</pre><pre>return Math.floor(Math.random() * (max - min + 1)) + min;</pre><pre>}</pre><p>I put that outside the App class, so it can be called from anywhere, even though it won’t be.</p><p>Now that we’ve chosen our random word, we’re going to store the entire wordlist, and that chosen word into our state variable:</p><pre>this.setState({</pre><pre>words: wordList,</pre><pre>currentWord:wordList[wordNumber].toUpperCase()</pre><pre>});</pre><p><strong>Here’s the important part</strong> — when do we call this function?</p><p>We call it when the App component first mounts, like this:</p><pre>componentDidMount = () =&gt; {</pre><pre>this.downloadDictionary();</pre><pre>}</pre><p><strong>Let’s Draw Our Board!</strong></p><p>Finally, we get to see some output. Let’s build the empty playing board, so we can get to see some action happening on the screen.</p><p>Here’s the “render” portion of the App component. We’ll talk about it after:</p><pre>render(){</pre><pre>console.log(this.state.currentWord);</pre><pre>return (</pre><pre>&lt;div className=&quot;App&quot;&gt;</pre><pre>&lt;header className=&quot;App-header&quot;&gt;</pre><pre>&lt;Header errorMessage={this.state.errorMessage}/&gt;</pre><pre>&lt;div style={{width:&#39;180px&#39;}}&gt;</pre><pre>{this.state.board.map((board,idx)=&gt;{</pre><pre>return (</pre><pre>&lt;div key = {idx}&gt;</pre><pre>{board.map((row,idx)=&gt;{</pre><pre>return(</pre><pre>&lt;div&gt;&lt;Tile letter={row.letter} color={row.status} key={idx}/&gt;&lt;/div&gt;</pre><pre>)</pre><pre>})</pre><pre>}</pre><pre>&lt;/div&gt;</pre><pre>)</pre><pre>})}</pre><pre>&lt;/div&gt;</pre><pre>&lt;input type=&quot;text&quot; id=&quot;guessWordBox&quot; value={this.state.currentGuess} maxlength=&quot;5&quot; className=&#39;inputBox&#39; /&gt;</pre><pre>&lt;Keyboard keyboardType={this.keyboardType} /&gt;</pre><pre>&lt;/header&gt;</pre><pre>&lt;/div&gt;</pre><pre>);</pre><pre>}</pre><p>The first thing you’ll notice is our secret hidden Easter egg, the console.log(this.state.currentWord) part.</p><p>If at any time in the game you start feeling really dumb, you can just press f12 to open the console, and the App’s chosen word will be sitting right there to make you feel good and inferior for not figuring it out yourself.</p><p><em>I’ve looked through that dictionary, and you’d be amazed how many valid 5-letter words just look like a random string of letters. I mean, “taros” — -really?</em></p><p>We’re just sticking with the default app and header styles:</p><pre>&lt;div className=&quot;App&quot;&gt;</pre><pre>&lt;header className=&quot;App-header&quot;&gt;</pre><p>but then we’ll be adding our own header component to show the game title and error message.</p><p>For this we’ll start a components folder and add a file called “Header.js”, so your folder structure should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*fUOoGysCrm3S1lEZFpTS-w.png" /><figcaption>We haven’t added Keyboard or Tile yet, but we will</figcaption></figure><p>The Header component is super-simple, so here’s the whole file:</p><pre>import React, { Component } from &#39;react&#39;;</pre><pre>class Header extends Component {</pre><pre>render() {</pre><pre>return (</pre><pre>&lt;div&gt;</pre><pre>&lt;div style={{fontSize:&#39;2.5em&#39;}}&gt; 🆆 🅾 🆁 🅳 🅻 🅴 🆁 &lt;br/&gt;&lt;/div&gt;</pre><pre>&lt;div style={{color:&#39;red&#39;}}&gt;{this.props.errorMessage}&lt;/div&gt;</pre><pre>&lt;/div&gt;</pre><pre>)</pre><pre>}</pre><pre>}</pre><pre>export default Header;</pre><p>Literally all it does is display the name of the game and the errorMessage variable, which is sent to it as a prop from App.js:</p><pre>&lt;Header errorMessage={this.state.errorMessage}/&gt;</pre><p>This way, whenever we change the error message in the state variable in App.js, it will automatically propagate to the Header component.</p><p><strong>Now we’re getting to some fun</strong></p><p>In our App component, we’re going to map through the board array, which contains six other arrays that we also have to map through. So we’re going to need to nest our mapping functions, like this:</p><pre>{this.state.board.map((board,idx)=&gt;{</pre><pre>return (</pre><pre>&lt;div key = {idx}&gt;</pre><pre>{board.map((row,idx)=&gt;{</pre><pre>return(</pre><pre>&lt;div&gt;&lt;Tile letter={row.letter} color={row.status} key={idx}/&gt;&lt;/div&gt;</pre><pre>)</pre><pre>})</pre><pre>}</pre><p>What we’re doing there is <em>map</em>ping through each of the six rows that make up the board, and for each row, we’re going to map every tile in that row. Remember the tiles contain just whatever letter the player typed and the color the tile is supposed to be.</p><p>When we first start the game, of course, all the variables in that array show just a blank space for the letter and “white” for the color. So we should just display six rows of five blank tiles.</p><p><strong>Now let’s define the tiles</strong></p><p>We need a new file in our components folder, which we’ll call “Tile.js” that will describe each tile of the game board. This is also a really simple component, so once again, here’s the whole file:</p><pre>import React, { Component } from &#39;react&#39;;</pre><pre>class Tile extends Component {</pre><pre>render() {</pre><pre>let bgStyle= {width:&#39;30px&#39;,</pre><pre>backgroundColor:this.props.color,</pre><pre>height:&#39;30px&#39;,</pre><pre>fontSize:&#39;x-large&#39;,</pre><pre>float:&#39;left&#39;,</pre><pre>border:&#39;1px solid white&#39;,</pre><pre>marginRight:&#39;4px&#39;,</pre><pre>marginTop:&#39;4px&#39;,</pre><pre>paddingBottom:&#39;4px&#39;,</pre><pre>color:&quot;black&quot;,</pre><pre>borderRadius:&#39;5px&#39;,</pre><pre>verticalAlign:&#39;middle&#39;}</pre><pre>return (</pre><pre>&lt;div style={bgStyle}&gt;{this.props.letter}&lt;/div&gt;</pre><pre>)}</pre><pre>}</pre><pre>export default Tile;</pre><p>All we’re doing here is describing the css style of each tile, but keeping the “backgoundColor” setting as a variable, which will be passed through as the prop “color” in this line:</p><pre>&lt;Tile letter={row.letter} color={row.status} key={idx}/&gt;</pre><p>Remember, those props come from the “board” array in our App.js state variable.</p><p><strong>Let’s build our own keyboard, too!</strong></p><p>You may have noticed from the dimensions of our playing board that this app is supposed to be playable on a mobile phone, not just on a PC. That’s why everything’s kept in such a narrow area in the center of the screen.</p><p>So we’re also going to build a little keyboard for the player, so they don’t have to keep popping their phone keyboard on and off every time.</p><p>The next two lines in App.js show what I mean. We need an input box to display the word as we type it and a keyboard to type it on:</p><pre>&lt;input type=&quot;text&quot; id=&quot;guessWordBox&quot; value={this.state.currentGuess} maxlength=&quot;5&quot; className=&#39;inputBox&#39; /&gt;</pre><pre>&lt;Keyboard keyboardType={this.keyboardType} usedList={this.state.usedList} foundList={this.state.foundList} correctList={this.state.correctList} /&gt;</pre><p>The input box will be called “guessWordBox” and will hold the “currentGuess” variable from the App’s state. So it starts out empty.</p><p>Then comes the keyboard. Once again, really simple, so here’s the whole file:</p><pre>import React, { Component } from &#39;react&#39;;</pre><pre>import &#39;../App.css&#39;;</pre><pre>class Keyboard extends Component {</pre><pre>constructor(props) {</pre><pre>super(props);</pre><pre>this.state = {</pre><pre>topRow:[&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;],</pre><pre>middleRow:[&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;],</pre><pre>bottomRow:[&quot;Z&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;,&quot;←&quot;,&quot;Enter&quot;]</pre><pre>};</pre><pre>}</pre><pre>handleClick = (event) =&gt; {</pre><pre>this.props.keyboardType(event.currentTarget.textContent);</pre><pre>};<br></pre><pre>render() {</pre><pre>return (</pre><pre>&lt;div style={{display: &quot;flex&quot;,flexWrap:&quot;wrap&quot;,justifyContent:&quot;center&quot;,width:&quot;330px&quot;,textAlign:&quot;center&quot;}}&gt;</pre><pre>&lt;div style={{display: &quot;flex&quot;,flexWrap:&quot;wrap&quot;,justifyContent:&quot;center&quot;,width:&quot;100%&quot;}}&gt;</pre><pre>{this.state.topRow.map((letter,idx)=&gt; </pre><pre>&lt;div className=&#39;keyStyle&#39; key={letter} onClick={this.handleClick} &gt;{letter}&lt;/div&gt;</pre><pre>)})}&lt;/div&gt;  &lt;br/&gt;</pre><pre>&lt;div style={{display: &quot;flex&quot;,flexWrap:&quot;wrap&quot;,justifyContent:&quot;center&quot;,width:&quot;100%&quot;}}&gt;</pre><pre>{this.state.middleRow.map((letter,idx)=&gt; {</pre><pre>return(</pre><pre>&lt;div className=&#39;keyStyle&#39; key={letter} onClick={this.handleClick} &gt;{letter}&lt;/div&gt;</pre><pre>)})}&lt;/div&gt;&lt;br/&gt;</pre><pre>&lt;div style={{display: &quot;flex&quot;,flexWrap:&quot;wrap&quot;,justifyContent:&quot;center&quot;,width:&quot;100%&quot;}}&gt;</pre><pre>{this.state.bottomRow.map((letter,idx)=&gt; </pre><pre>&lt;div className=&#39;keyStyle&#39; key={letter} onClick={this.handleClick} &gt;{letter}&lt;/div&gt;</pre><pre>)})}</pre><pre>&lt;/div&gt;</pre><pre>&lt;/div&gt;</pre><pre>)</pre><pre>}</pre><pre>}</pre><pre>export default Keyboard;</pre><p>You can see in our state variable that we define the keyboard as three rows, to match the rows on a standard typewriter (<em>are those still a thing?</em>).</p><pre>this.state = {</pre><pre>topRow:[&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;],</pre><pre>middleRow:[&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;],</pre><pre>bottomRow:[&quot;Z&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;,&quot;←&quot;,&quot;Enter&quot;]</pre><pre>};</pre><pre>}</pre><p><strong>Here’s the important part:</strong></p><pre>handleClick = (event) =&gt; {</pre><pre>this.props.keyboardType(event.currentTarget.textContent);</pre><pre>};</pre><p>When we call the Keyboard component from our app, we send it a prop to the function to trigger whenever someone types on it. Since the function is in the App component, we will pass the typed key back to App to be processed there.</p><p>The value of the key being pressed is found in event.currentTarget.textContent, because the “event” being referenced is the “onClick” event, and that letter is what we’re sending back to App.js is the content of the DIV on the keyboard.</p><p>Here’s a reminder of how we called it from our App:</p><pre>&lt;Keyboard keyboardType={this.keyboardType} } /&gt;</pre><p>The “keyboardType” prop is a reference to the keyboardType function (<em>that we haven’t written yet, but will soon</em>).</p><p>All we’re doing next is to draw each row of the keyboard. To do that, we just map through the array in the state variable, like this:</p><pre>{this.state.topRow.map((letter,idx)=&gt;</pre><pre>&lt;div className=&#39;keyStyle&#39; key={letter} onClick={this.handleClick} &gt;{letter}&lt;/div&gt;</pre><pre>)})}&lt;/div&gt;</pre><p>It’s just a bunch of DIVs that are clickable (onClick), with each one containing the letter assigned to it in the array: {letter}.</p><p>The onClick function calls the handleClick function we defined earlier, whose sole purpose is to just send the clicked letter back to our App.js component for processing.</p><p><strong>So let’s get to processing them clicks</strong></p><p>In our App.js file we rendered the keyBoard component with a prop called:</p><pre>&lt;Keyboard keyboardType={this.keyboardType} /&gt;</pre><p>This refers to a function called “keyboardType”, which is right here:</p><pre>keyboardType = (keyClicked) =&gt; {</pre><pre>this.setState({</pre><pre>errorMessage:String.fromCharCode(160)</pre><pre>})</pre><pre>let errorMessage = String.fromCharCode(160);</pre><pre>let currentGuess= &#39;&#39;;</pre><pre>let guessBox = document.getElementById(&quot;guessWordBox&quot;);</pre><pre>if(guessBox) {</pre><pre>if(keyClicked===&quot;Enter&quot; &amp;&amp; guessBox.value.length&gt;=5){</pre><pre>this.submitWord(guessBox.value);</pre><pre>} else {</pre><pre>if(guessBox.value.length&lt;=5){</pre><pre>if(keyClicked===&quot;←&quot;){</pre><pre>guessBox.value = guessBox.value.substring(0, guessBox.value.length - 1);</pre><pre>currentGuess=guessBox.value;</pre><pre>}else</pre><pre>guessBox.value+=keyClicked;</pre><pre>currentGuess=guessBox.value;</pre><pre>}</pre><pre>else {</pre><pre>errorMessage=&quot;We&#39;re only looking for 5-digit words&quot;;</pre><pre>currentGuess=&#39;&#39;</pre><pre>this.setState({</pre><pre>errorMessage:errorMessage</pre><pre>})</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>You’ll remember “keyClicked” is the letter we sent back from the Keyboard component when the player presses one of the keys:</p><pre>keyboardType = (keyClicked) =&gt; {</pre><p>The first thing we do here is to clear out whatever previous message was being displayed to the user:</p><pre>this.setState({</pre><pre>errorMessage:String.fromCharCode(160)</pre><pre>})</pre><p>This makes it so they won’t still be seeing “that’s not a word” or something when typing a new word.</p><p>We also set our local default variables that will only be used in this function:</p><pre>let errorMessage = String.fromCharCode(160);</pre><pre>let currentGuess= &#39;&#39;;</pre><p>Next we’re going to check the input box to see what word is there, if there is one:</p><pre>let guessBox = document.getElementById(&quot;guessWordBox&quot;);</pre><pre>if(guessBox) {</pre><p>We check to see if the person has pressed the “Enter” button and if they‘ve typed a word that’s long enough or not. If it’s legit, then we’re going to call the “submitWord” function:</p><pre>if(keyClicked===&quot;Enter&quot; &amp;&amp; guessBox.value.length&gt;=5){</pre><pre>this.submitWord(guessBox.value);</pre><pre>}</pre><p><em>We haven’t written “submitWord” yet, but that’ll be the function that compares the player’s guess to the App’s target word. Basically, checking to see if they won.</em></p><p>Otherwise, if they’re just pressing the left-arrow (backspace) button, we’ll get rid of whatever letter they typed last:</p><pre>else {</pre><pre>if(guessBox.value.length&lt;=5){</pre><pre>if(keyClicked===&quot;←&quot;){</pre><pre>guessBox.value = guessBox.value.substring(0, guessBox.value.length - 1);</pre><pre>currentGuess=guessBox.value;</pre><pre>}</pre><p>And if they’re still typing, and have gone over five letters, we’ll send them a reminder:</p><pre>else {</pre><pre>errorMessage=&quot;We&#39;re only looking for 5-digit words&quot;;</pre><pre>currentGuess=&#39;&#39;</pre><pre>this.setState({</pre><pre>errorMessage:errorMessage</pre><pre>})</pre><pre>}</pre><p>That can be tidied up and streamlined a lot. That’s a technique called “refactoring,” where we get code that works and then make it more efficient and comprehensive after.</p><p><strong>Let’s see if they won</strong></p><p>The “submitWord” function has a lot going on. Here it is:</p><pre>submitWord = (wordSubmitted) =&gt; {</pre><pre>if(!this.state.gameOver){</pre><pre>if (this.checkword(wordSubmitted)){</pre><pre>let currentBoard = [...this.state.board];</pre><pre>let currentWord = this.state.currentWord;</pre><pre>let boardRow = this.state.currentRow;</pre><pre>let errorMessage= this.state.errorMessage;</pre><pre>let tileColor=&quot;white&quot;;</pre><pre>let newRow = [];</pre><pre>for(let i =0; i&lt;wordSubmitted.length;i++){</pre><pre>if(currentWord.includes(wordSubmitted[i])){</pre><pre>tileColor=&quot;blue&quot;;</pre><pre>if(currentWord[i]===wordSubmitted[i]){</pre><pre>tileColor=&quot;lightgreen&quot;;</pre><pre>}</pre><pre>}</pre><pre>newRow[i]={</pre><pre>letter: wordSubmitted[i],</pre><pre>status: tileColor</pre><pre>}</pre><pre>tileColor=&quot;white&quot;;</pre><pre>}</pre><pre>currentBoard[boardRow]=newRow;</pre><pre>boardRow++;</pre><pre>let gameOver = false</pre><pre>if(boardRow&gt;5) {</pre><pre>gameOver=true;</pre><pre>errorMessage=&quot;Bad Luck. The word was &quot;+ currentWord + &quot;. Play again!&quot;;</pre><pre>}</pre><pre>if(wordSubmitted===currentWord){</pre><pre>errorMessage=&quot;You WIN!&quot;</pre><pre>gameOver=true;</pre><pre>}</pre><pre>this.setState({</pre><pre>board:currentBoard,</pre><pre>currentRow:boardRow,</pre><pre>gameOver:gameOver,</pre><pre>errorMessage: errorMessage</pre><pre>})}</pre><pre>}</pre><pre>}</pre><p>The very first thing we do is see if the game is over or not:</p><pre>submitWord = (wordSubmitted) =&gt; {</pre><pre>if(!this.state.gameOver){</pre><p>If it’s not over, then we check to see if our dictionary even contains the word the player entered:</p><pre>if (this.checkword(wordSubmitted)){</pre><p>Here’s the checkWord function:</p><pre>checkword = (wordToCheck) =&gt; {</pre><pre>let wordList = this.state.words;</pre><pre>let word = wordToCheck.toLowerCase();</pre><pre>if (wordList.includes(word)){</pre><pre>return(true);</pre><pre>}</pre><pre>else {</pre><pre>this.setState({</pre><pre>errorMessage:&quot;That word is not in my dictionary&quot;</pre><pre>})</pre><pre>}</pre><pre>}</pre><p>All we’re doing here is checking the “words” array in our state variable to see if whatever they typed in the box is a valid word.</p><p><em>Note: it’s possible the word they typed is a real word, but if it’s not in our dictionary it couldn’t possibly be the target word anyway.</em></p><p>If the word turns out to be valid, then we can continue on with the function. First, we’re going to set up our local variables:</p><pre>let currentBoard = [...this.state.board];</pre><pre>let currentWord = this.state.currentWord;</pre><pre>let boardRow = this.state.currentRow;</pre><pre>let errorMessage= this.state.errorMessage;</pre><pre>let tileColor=&quot;white&quot;;</pre><pre>let newRow = [];</pre><p>What we’re doing here is getting all the relevant state variables and storing them in local variables.</p><p>We do this because our state variable is “immutable,” meaning it can’t be changed on the fly, but rather the variables must be set to the specific value you want them to be.</p><p>So you can’t do something like</p><pre>this.setState({</pre><pre>variable: variable + 1;</pre><pre>})</pre><p>Instead, you would do something like:</p><pre>let tempVariable = this.state.variable + 1</pre><pre>this.setState({</pre><pre>variable: tempVariable</pre><pre>})</pre><p>It’s a whole big thing, but not that difficult. The compiler won’t let you forget, either.</p><p>The only thing in that variable list that is new is “newRow.” That will be the row on the board that will contain whatever word the player typed.</p><p>What we’re going to do is go through each letter in the word the player typed, one-by-one.</p><p>We’ll check to see if it exists in the target word, and if it does, highlight it in blue. We’ll also check to see if it exists in the <em>same spot</em> in the target word relative to the position in the player’s word. If so, we’ll highlight it in green, which will override the blue.</p><pre>for(let i =0; i&lt;wordSubmitted.length;i++){</pre><pre>if(currentWord.includes(wordSubmitted[i])){</pre><pre>tileColor=&quot;blue&quot;;</pre><pre>if(currentWord[i]===wordSubmitted[i]){</pre><pre>tileColor=&quot;lightgreen&quot;;</pre><pre>}</pre><pre>}</pre><pre>newRow[i]={</pre><pre>letter: wordSubmitted[i],</pre><pre>status: tileColor</pre><pre>}</pre><pre>}</pre><p>You see there at the end where we put the letter and its color into the “newRow” array. That will later be the current row on the board.</p><p>Next we replace the row in our “board” state variable with the row that the player just typed:</p><pre>currentBoard[boardRow]=newRow;</pre><pre>boardRow++;</pre><pre>let gameOver = false</pre><p>We increment the “boardRow” variable to show that we’re moving to the next turn, and set a variable to represent whether the game’s ended or not. Which we’ll address now. It’s pretty straightforward:</p><pre>if(boardRow&gt;5) {</pre><pre>gameOver=true;</pre><pre>errorMessage=&quot;Bad Luck. The word was &quot;+ currentWord + &quot;. Play again!&quot;;</pre><pre>}</pre><pre>if(wordSubmitted===currentWord){</pre><pre>errorMessage=&quot;You WIN!&quot;</pre><pre>gameOver=true;</pre><pre>}</pre><p>If the player’s used more than six rows (row 0 to row 5), they lost. But if they guessed the word correctly, then they’ve <em>WON</em>! And here we set the variables appropriately for those conditions.</p><p>Keep in mind, we’ve been juggling a lot of variables in this function, but we haven’t done anything with the <em>state</em> yet. Thus, all those changes are only imaginary, until we manifest them in the App’s state variable, which we do now:</p><pre>this.setState({</pre><pre>board:currentBoard,</pre><pre>currentRow:boardRow,</pre><pre>gameOver:gameOver,</pre><pre>errorMessage: errorMessage</pre><pre>})}</pre><p>We set the “board” variable to the local “currentBoard” array — in which we’ve just set the “newRow” array to replace whatever row the player’s currently playing.</p><p>We increment the “currentRow” variable to tell that it’s coming up on a new turn (<em>or end of game if they’ve played all their turns already</em>).</p><p>We update both our “gameOver” and “errorMessage” variables with their new values, or the default values we assigned them at the beginning of the function.</p><p>And go on to our next turn.</p><p>That’s it. That’s the whole game. I know it can seem confusing looking at all these functions and components as snippets — not to mention all the jumping back and forth. Don’t worry, I’m going to add a link to the github repo, the dictionary file, and a live version of the game at the end here, so you can see them all working together for real.</p><h3><strong>Step 5: Upgrades, People, Upgrades</strong></h3><p>Now it’s all yours to play with as you like. Feel free to fork my repo if you want a head start.</p><p>You can create a database for player records so they can track their progress, you can build an API to deliver words from the dictionary and check the validity of other words. You can design a leaderboard to show the top players.</p><p>Or you can just change the colors and the layout. It’s all up to you.</p><p>Happy Hacking!</p><p>=======================</p><p>The Live Version: <a href="https://wordlier.netlify.app/">https://wordlier.netlify.app/</a></p><p>Dictionary file: <a href="https://github.com/charlesreid1/five-letter-words/blob/master/sgb-words.txt">https://github.com/charlesreid1/five-letter-words/blob/master/sgb-words.txt</a></p><p>The Github Repo: <a href="https://github.com/crashdaddy/wordlier">https://github.com/crashdaddy/wordlier</a></p><figure><a href="https://ko-fi.com/crashdaddy"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*wOFk-CzzRpd_yCX4wWdfog.png" /></a><figcaption>Plus, I like coffee</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3da3ef47013f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Mysql Password Encryption with NodeJS, Express and Bcrypt]]></title>
            <link>https://kennethscoggins.medium.com/how-to-use-mysql-password-encryption-with-nodejs-express-and-bcrypt-ad9ede661109?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad9ede661109</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[bcrypt]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Thu, 10 Dec 2020 15:42:01 GMT</pubDate>
            <atom:updated>2020-12-10T22:35:57.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*kiITQMlJWcYjc9jdJLs57w.jpeg" /><figcaption>Dave’s not here, man</figcaption></figure><p><strong>Note: this article begins after you’ve setup and coded an Express Router on a NodeJS server and written an API that connects to a mysql database</strong></p><p>Now that we’ve got our sexy app up and running, we want to make it a little more sophisticated. We didn’t bother to include user-password encryption before, because who cares about hacking my demo app for school, right?</p><p><em>Everrryyyyyybbboooodddddddyyyyyy!!!!</em></p><p>We’re going to be using a package called bcrypt to encrypt our password and for the validation. Here’s what <a href="https://en.wikipedia.org/wiki/Bcrypt">wikipedia has to say about bcrypt</a>:</p><blockquote><strong>bcrypt</strong> is a <a href="https://en.wikipedia.org/wiki/Password-hashing_function">password-hashing function</a> designed by <a href="https://en.wikipedia.org/wiki/Niels_Provos">Niels Provos</a> and David Mazières, based on the <a href="https://en.wikipedia.org/wiki/Blowfish_(cipher)">Blowfish</a> cipher and presented at <a href="https://en.wikipedia.org/wiki/USENIX">USENIX</a> in 1999.<a href="https://en.wikipedia.org/wiki/Bcrypt#cite_note-provos-1">[1]</a> Besides incorporating a <a href="https://en.wikipedia.org/wiki/Salt_(cryptography)">salt</a> to protect against <a href="https://en.wikipedia.org/wiki/Rainbow_table">rainbow table</a> attacks, bcrypt is an adaptive function: over time, the iteration count can be increased to make it slower, so it remains resistant to <a href="https://en.wikipedia.org/wiki/Brute-force_search">brute-force search</a> attacks even with increasing computation power.</blockquote><p>So it’s been around a lot longer than you might figure, but the algorithm is still available to you in React by <a href="https://www.npmjs.com/package/bcrypt">including the bcrypt package in your project</a>:</p><pre>npm install bcrypt</pre><p>Now in our controllers, where we keep the sql queries for the API, we’re going to edit whatever file our login functions exist in and add the following at the top:</p><pre>const bcrypt = require(&#39;bcrypt&#39;);<br>const saltRounds = 10;</pre><p>A saltRound is</p><blockquote>With “salt round” they actually mean the <em>cost factor</em>. The cost factor controls how much time is needed to calculate a single BCrypt hash. The higher the cost factor, the more hashing rounds are done. Increasing the cost factor by 1 doubles the necessary time. The more time is necessary, the more difficult is brute-forcing.</blockquote><p>So we chose 10, which is a pretty big number for a small app, but it’s also not big enough to cause any noticeable lag. Play around with it if you want, but unless you’re building an enterprise app with millions of users, you don’t have to go much further.</p><p><em>Important: This implementation will not affect any passwords that are already stored in the database as plain text. In fact, any passwords that already exist will not work any more!</em></p><p>One thing you may have to do is to change the datatype of the password column in your mysql table. For instance, if you just set it up as char(25) to hold a text password, you may have to alter it to hold the hashed password variable.</p><p>Here’s <a href="https://www.w3schools.com/sql/sql_alter.asp">an excellent resource to remind you how to alter a column’s datatype in a mysql table</a> if you need it.</p><p><strong>Encrypting a Password</strong></p><p>We want to use our encryption when the person first registers their account, so just find whatever function you wrote to register a new user and here’s how you include encryption:</p><pre>const register = async function(req,res){    </pre><pre>const password = req.body.password;    <br>const encryptedPassword = await bcrypt.hash(password, saltRounds)</pre><pre>let users={       <br>&quot;user_name&quot;:req.body.userName,       <br>&quot;email_address&quot;:req.body.email,       <br>&quot;password&quot;:encryptedPassword<br>}        </pre><pre>pool.query(&#39;INSERT INTO players SET ?&#39;,users, function (error, results, fields) {      </pre><pre>if (error) {        <br>res.send({          <br>&quot;code&quot;:400,          <br>&quot;failed&quot;:&quot;error occurred&quot;,          <br>&quot;error&quot; : error})      <br>} else {        <br>res.send({          <br>&quot;code&quot;:200,          <br>&quot;success&quot;:&quot;user registered sucessfully&quot;            <br>});        <br>}    <br>});  <br>}</pre><p>As you can see, all we did was instead of using the exact text the user typed, we take the password the user chose and ran it through bcrypt into a new password called encryptedPassword with this:</p><pre>const password = req.body.password;    <br>const encryptedPassword = await bcrypt.hash(password, saltRounds)</pre><p>Now, instead of “hunter2” the user’s password in the database is going to look something like “e38ad214943daad1d64c102faec29de4afe9da3d”</p><p>The user will never see that password and your database administrator (you) will never see anything else.</p><p><strong>Retrieving the Password</strong></p><p>Now when the user wants to login to your app, they’re still going to want to type “hunter2” in the password field. And who can blame them? That’s the password they chose.</p><p>So in your function that logs the user in to the database we’re going to do something like this:</p><pre>const login = async function(req,res){    <br>var email= req.body.email;    <br>var password = req.body.password;    </pre><pre>pool.query(&#39;SELECT players.*, count(history.userId) AS gamesPlayed FROM players LEFT JOIN history ON history.userId=players.id WHERE email_address = ?&#39;,[email], async function (error, results, fields) {      </pre><pre>if (error) {        </pre><pre>res.send({          <br>&quot;code&quot;:400,          <br>&quot;failed&quot;:&quot;error occurred&quot;,          <br>&quot;error&quot; : error        <br>})      <br>}else{        <br>if(results.length &gt;0){          </pre><pre>const comparison = await bcrypt.compare(password, results[0].password)          </pre><pre>if(comparison){              <br>res.send({                <br>&quot;code&quot;:200,                <br>&quot;success&quot;:&quot;login successful&quot;,                <br>&quot;id&quot;: results[0].id,                <br>&quot;userName&quot;: results[0].user_name,                <br>&quot;score&quot;: results[0].score,                <br>&quot;gamesPlayed&quot;: results[0].gamesPlayed,                <br>&quot;boardPref&quot;: results[0].boardPref              <br>})          <br>}else{            <br>res.send({                 <br>&quot;code&quot;:204,                 <br>&quot;error&quot;:&quot;Email and password does not match&quot;            <br>})          <br>}        <br>} else{          <br>res.send({            <br>&quot;code&quot;:206,            <br>&quot;error&quot;:&quot;Email does not exist&quot;              <br>});        <br>}      <br>}      <br>});  <br>}</pre><p>We’re using the email address and password to identify the user, so we pull the record with a matching email address. We could have just as easily used the username instead, but this app we’re building only allows each email address to be used once also, so that’s why we’re using email.</p><p>This call retrieves the encrypted password associated with that email.</p><p>Then what we do is encrypt the password they entered when logging in</p><pre>const comparison = await bcrypt.compare(password, results[0].password)</pre><p>Where the “password” variable comes from taking the password the user entered:</p><pre>var password = req.body.password;</pre><p>and <em>results[0].password</em> just refers to the record returned from the database.</p><p>And all we’re doing is hashing that password they used when logging in and then checking to see if it matches the already hashed password we’ve stored when they registered. If it does match, that’s great, and we send back a success message and the user’s info.</p><pre>if(comparison){              <br>res.send({                <br>&quot;code&quot;:200,                <br>&quot;success&quot;:&quot;login successful&quot;,                <br>&quot;id&quot;: results[0].id,                <br>&quot;userName&quot;: results[0].user_name,                <br>&quot;score&quot;: results[0].score,                <br>&quot;gamesPlayed&quot;: results[0].gamesPlayed,                <br>&quot;boardPref&quot;: results[0].boardPref              <br>})          <br>}</pre><p>If not, we just send back an error message and they can try again.</p><pre>else{            // if &#39;comparison&#39; is false<br>res.send({                 <br>&quot;code&quot;:204,                 <br>&quot;error&quot;:&quot;Email and password does not match&quot;            <br>})          <br>}        <br>} else{          <br>res.send({            <br>&quot;code&quot;:206,            <br>&quot;error&quot;:&quot;Email does not exist&quot;              <br>});        <br>}      <br>}      <br>});</pre><p><strong>Done and Done</strong></p><p>That’s all there is to it — for our immediate purposes anyway. Later when your app blows up you’ll want to make it even <em>more</em> sophisticated, like allowing a user to have several accounts with the same email and just checking by username, encrypting their email address and other personal info, etc…</p><p>Now if someone hacks your database, all they’ll get is a bunch of “e38ad214943daad1d64c102faec29de4afe9da3d” looking nonsense, and good luck trying to figure out exactly what word and how many salt rounds you have to go through to get to that mess. And your users can still use “password” as their password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*2vDxwAwVmrFRlwlFnrUzMw.jpeg" /><figcaption>Because you know they’re gonna</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad9ede661109" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Love “Interview Questions”]]></title>
            <link>https://kennethscoggins.medium.com/why-you-should-love-interview-questions-7b32d8aa2254?source=rss-40faffebb05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b32d8aa2254</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[austin-coding-academy]]></category>
            <dc:creator><![CDATA[crashdaddy]]></dc:creator>
            <pubDate>Thu, 16 Jul 2020 05:02:16 GMT</pubDate>
            <atom:updated>2020-07-16T13:28:05.419Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why You Should Love (Not Fear) “Interview Questions”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*dNzzbPYKYCT7TEY_WCfXYQ.jpeg" /><figcaption>It’s funny because it’s true!</figcaption></figure><h3><strong>Yay, Me!</strong></h3><p>This will be my last blog post for my enrollment at good ‘ol Austin Coding Academy. I submitted my final project, <a href="http://puzlr.herokuapp.com/">a puzzle game called Puzlr</a> yesterday and this post is the last assignment.</p><p>Later they’ll make a video of its functionality for the graduation ceremony and I’ll get me a certificate certifying myself as a <em>Full-Stack Web Developer</em>. Which I was already, in php and mysql, but I wasn’t <em>certified </em>and I had never run into the tools they taught us how to use.</p><p>Now they’re preparing us for the job hunt. That’s what this article’s about.</p><h3><strong>Welcome to Your Nightmare</strong></h3><p>By now I’m sure you’ve had people trying to spook you up with horror stories about interview questions like</p><pre>You have 1000 bottles of soda, and exactly one is poisoned. You have 10 test strips which can be used to detect poison. A single drop of poison will turn the test strip positive permanently. You can put any number of drops on a test strip at once and you can reuse a test strip as many times as you&#39;d like (as long as the results are negative.) However, you can only run tests once per day and it takes seven days to return a result. How would you figure out the poisoned bottle in as few days as possible?</pre><p>It’s been a thing for job hunters to hassle other job hunters with tales of malicious hiring managers and their “List of Questions” that you <em>can’t imagine!</em></p><p><em>which isn’t any secret because all the hiring managers have been telling you that’s the kind of stuff they want you to be prepared to talk about</em></p><p>But it can be unsettling when people start pulling all these “brain teasers” at you and telling you that you have to be ready to whip them all out on a dime.</p><h3><strong>Welcome Out of Your Nightmare</strong></h3><p>It’s all just a matter of perspective, and I’ll share with you the perspective they gave me in the Army; “An inspection is your chance to show off how great you are without being prideful”</p><p>And that’s what these questions are. Possible (<em>and not too extreme from what I saw</em>) problems that you as a programmer may be tasked to teach a computer how to resolve.</p><p>I’m not Mr Worldly, I’ve only ever had one professional programming gig (<em>6 years at Safeway</em>). But I can tell you that my boss came up with more intricate nonsensery on the weekly than that interview question.</p><p>And that’s the advice I can give you — dive right in!</p><p>Most of what you’ll need is given to you in the description; bottles and test strips are objects, so start defining objects. Here’s what I did:</p><pre>let foundBottle = false;<br>let poisonedBottle;<br>let testStrips =[];<br>let bottles = [];<br>let day = 0;<br>let minBottle=0;<br>let maxBottle=1000;</pre><pre>// initialize 10 test strips, all white, all ready to use<br>// (dayLeft:0) means days waiting for test result<br>// rangeMin, rangeMax are where that strip will be used</pre><pre>const initTestStrips = () =&gt; {</pre><pre>for(let i=0; i&lt;10;i++) {</pre><pre>testStrips.push({<br>testStripNumber: i,<br>testStripColor: &quot;white&quot;,<br>daysLeft: 0,<br>rangeMin: 0,<br>rangeMax: 0})<br>  }<br>}</pre><pre>// figure up which bottle has the poison in it</pre><pre>const initPoison =() =&gt; {</pre><pre>poisonedBottle = getRandomInt(1,1000);<br>}</pre><pre>// count how many test strips are not waiting for<br>// test results</pre><pre>const testStripsLeft = () =&gt; {</pre><pre>let testStripsLeft = 0;<br>testStrips.forEach(testStrip =&gt; {<br>if(testStrip.daysLeft===0) {<br>testStripsLeft++;<br>    }<br>  })</pre><pre>return testStripsLeft;<br>}</pre><p>That’s not the only way, either. You can also make a 10-digit binary number allotting each digit to a test strip, or split it into rows, or subdivide it into fractions, or any other approaches that are so crazy they just might work.</p><p>But then I also figured why not just make it an app!</p><p>So I started this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KULtHn5XJfuRlXtrB8wBsg.png" /><figcaption>Just do what the interviewer asks</figcaption></figure><p>Because isn’t that really all they’re looking for? Your ability to take complex problems and translate them into something a computer can understand?</p><p>Once you’ve gotten this far, they’ve had a full-frontal eyeful of your problem solving approach and are probably ready to hire you at twice what they were offering just so you’ll stop looking.</p><p>But on the off chance that you get an interviewer that wants to keep you chained to one whiteboard brain teaser until you’ve resolved the whole thing (<em>preferably while shining a glaring lightbulb in your face and with something of yours shackled to the table</em>) I’ve got you there, too…</p><h3><strong>The Real Nightmare Was the Friends We Made Along the Way!</strong></h3><p>About the time you’ve designed your objects and maybe a mock-up of an app to solve their problem is about the time all the weird brain-teasery logic comes in.</p><p>You can try to muddle through it, but watching someone else program a computer is about as much fun as watching them watch tv, so you can offer a graceful exit with,</p><p><em>“This here’s the part where we should apply some teamwork for the best solution.”</em></p><p>Thus answering with a demonstration one of the questions about “teamwork” that they were going to ask later.</p><p>At that point, if they still want you to finish an algorithm to find one contaminated bottle of wine out of a thousand, that’s probably what they really wanted you to do, and just offered the job as a ruse to get you to solve it for them.</p><h3>Bonus: The Number One Character Trait of Good Programmers</h3><p>I’m going to tell you the number one character trait of all good programmers and you can tell yourself if you have it or not.</p><p>Have you ever heard that joke they say sometimes about how “lazy people make the best programmers because they automate everything?”</p><p>…<em>I’m in that joke, and I like it…</em></p><p>There’s a lot of truth to that statement, but it’s still not the number 1 character trait. That’s “fortitude.” The ability to know you’re never outmatched, there’s no problem you can’t solve and that with teamwork you can accomplish goals you couldn’t achieve on your own.</p><p>Fortitude. Dontgiveupedness. Tenacity. === Algorithmic acrobatics.</p><p>And those interview questions? They’re your opportunity to show off just how great you really are without being prideful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b32d8aa2254" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>