<?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 Ian Austin on Medium]]></title>
        <description><![CDATA[Stories by Ian Austin on Medium]]></description>
        <link>https://medium.com/@iandaustin?source=rss-8b45f87e0ad3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UTcqck54RzM1Kdbe</url>
            <title>Stories by Ian Austin on Medium</title>
            <link>https://medium.com/@iandaustin?source=rss-8b45f87e0ad3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:52:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iandaustin/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 the Internet Works OR There and Back Again]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/launch-school/how-the-internet-works-or-there-and-back-again-c30351f6383?source=rss-8b45f87e0ad3------2"><img src="https://cdn-images-1.medium.com/max/2600/0*dsdOSna_f2UZVWvz" width="5184"></a></p><p class="medium-feed-snippet">An Ode to the Request/Response Cycle</p><p class="medium-feed-link"><a href="https://medium.com/launch-school/how-the-internet-works-or-there-and-back-again-c30351f6383?source=rss-8b45f87e0ad3------2">Continue reading on Launch School »</a></p></div>]]></description>
            <link>https://medium.com/launch-school/how-the-internet-works-or-there-and-back-again-c30351f6383?source=rss-8b45f87e0ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c30351f6383</guid>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ian Austin]]></dc:creator>
            <pubDate>Thu, 11 Nov 2021 04:53:45 GMT</pubDate>
            <atom:updated>2021-11-13T19:32:59.591Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Accelerating the Slow Path to Mastery]]></title>
            <link>https://medium.com/launch-school/accelerating-the-slow-path-to-mastery-9ec8f72b0080?source=rss-8b45f87e0ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ec8f72b0080</guid>
            <category><![CDATA[how-to-study]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ian Austin]]></dc:creator>
            <pubDate>Thu, 28 Oct 2021 01:54:25 GMT</pubDate>
            <atom:updated>2021-10-28T02:39:48.365Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 2 — The Sequel to <a href="https://medium.com/launch-school/coping-with-the-slow-path-to-mastery-3fe9c47358e8">Coping with the Slow Path to Mastery</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2_Cv0iDpKy50uOGZ" /><figcaption>Photo by <a href="https://unsplash.com/@paolocandelo?utm_source=medium&amp;utm_medium=referral">paolo candelo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In part one of this series, I discussed some of my thoughts on how to work slowly and patiently on the slow path to mastery. In that article I also promised that I’d write this article about how to speed things up. Both articles are primarily catered to software engineering students at Launch School, although the former article might appeal to a larger audience, while this article deals with navigating the Launch School curriculum more specifically. Much of the discussion is relevant to students of any subject, although I have written this article specifically with success at Launch School in mind.</p><p>Learning is a highly personal endeavor, and what works for me may not work for you. We all have unique minds, personalities, and circumstances, and we must discover what works best for each of us. In this article, I will lay out what I have discovered works for me, and I hope that you will discover something which also works for you.</p><h3>Consistency</h3><p><strong>Consistency over a long period of time is the most important element in attaining mastery.</strong> When I began studying at Launch School, my approach was all-or-nothing. As a part-time student, I’d study for the whole weekend, but minimally during the week, or I’d study hard everyday for a month or two and then take some weeks off. I soon discovered that studying this way felt as though I was moving 2 steps forward and 1 step back<em>. </em>Progressing that way is very slow, even though it feels like a lot of work. The amount of time that I made no progress or negative progress was crippling my studies. The better way is to consistently take one step forward, and then another step forward, and so on, and so forth.</p><p><strong>The first move toward developing a consistent study habit is negotiating time to study. </strong>We all have different circumstances, so this could mean many different things. I made the switch to full time study and it has made everything much smoother, but it’s not the only solution. Asking for fewer hours at work, trimming an exercise regimen from two hours to one, temporarily sacrificing some hobbies, meal-prepping, paying for certain conveniences, cancelling certain subscriptions, waking up earlier, eating nothing but carrots… You get the picture. With a little creativity and a bit of sacrifice, there should be plenty of time to study.</p><p><strong>We should consider that <em>homeostasis </em>might be sabotaging our pursuit of change. </strong>If you’re a Launch School student and don’t know what I’m talking about, shame on you! Go back and read <em>Mastery </em>by George Leonard and you’ll know what I mean. As a brief review, homeostasis is the principle that systems in nature tend to maintain the present conditions and resist change. This is true as much in the populations of lions and wildebeests as it is in human social structures. When we seek change, we may find more roadblocks than we expect. Unconsciously, our bosses may assign us more work to keep us busy or less work to keep us around, or our friends and family may be less supportive of our goals than we expected. Understanding this principle empowers us to remain a little more steadfast in our efforts to create the change we seek.</p><p><strong>A consistent study habit is useless unless the study is of good quality.</strong> To succeed at Launch School, it is suggested to study a <em>minimum </em>of 15 hours per week. In my experience, this is a very good suggestion, and speaks to the importance of a consistent study habit, but I would emphasize that each of those hours must be <em>intentional and focused. </em>Without proper focus, that number should be adjusted to 20 or 30.</p><h3>Focus</h3><p>Gone are the days of cramming material 3 hours before an exam and ‘succeeding’. ‘C’s get degrees is <em>not</em> the Launch School motto. What this means is that procrastination is not an option, and consistent <em>focused </em>study is imperative. This was a big wake up call and I was forced to adapt. Here is what I have learned.</p><p><strong>The absolute game-changer was the (re)discovery of the Pomodoro Technique. </strong>This technique is presented to every Launch School student in the preparation course, and I would just like to say that you should not be like me, and instead give it a try as soon as possible. What I mean specifically by the Pomodoro Technique is structuring study as four 25-minute deeply focused work sessions, separated by 5-minute breaks, and a longer break between each group of four. I don’t get into all of the planning and analysis that is suggested by the true Pomodoro Technique. I also don’t use this technique for every aspect of study, but do use the technique when I need to get through a large amount of dry, semi-painful, procrastination-inducing work.</p><p>The main things that I have noticed about the Pomodoro Technique that work wonders are:</p><ul><li>It gets the ball rolling and builds momentum. Once I begin a cycle, there is no turning back. I am dedicated for the next 2 hours at least.</li><li>Short breaks are energizing and ease the pain that causes procrastination. Diving deep into complex topics for hours on end can be exhausting. Those short breaks help with diffuse learning, consolidating memory, rejuvenating the mind, and making it easier to push hard during the next work session. I take these breaks quite seriously. No infinite scrolling is allowed. I sit, close my eyes, breathe deeply, and relax as well I can for the full 5 minutes. When the break is over, I’m energized and excited to get back to work.</li><li>It limits distractions and facilitates deep productive work. When I am in the middle of a session, I simply do not stray off topic. I don’t allow myself to check my phone, or research some random unrelated topic that popped into my head. If I need to respond to a message or phone call, I wait until the session is over, pause the timer and do so.</li><li>It gamifies the process and serves as a good measure of productivity. It feels like a big win if I can accomplish 12 or more deeply focused sessions in a day. Comparing this with my previous method of setting aside a number of hours and getting as much done as possible, where those hours might have been focused, or might have been full of distractions, I consider the Pomodoro Technique the clear winner.</li></ul><p>I have also found that a good Pomodoro app helps with the process. When I tried to do it manually by setting timers on my phone for each session and break, the process didn’t work nearly as well and fell to pieces in a short time. The app that I like best so far is the <em>Focus Keeper</em> app, but I’m sure there are others which work just as well. The <em>Forest </em>app is another option which blocks other apps on your phone and lets you grow a virtual tree for each session. Some people also swear by a physical timer, such as the official Pomodoro tomato timer.</p><p><strong>Study spaces must be conducive to focused studying. </strong>This tip may seem obvious, but it’s easy to make the mistake of studying in spaces which are highly distracting and steal our energy and focus. The biggest mistake that I made in this regard was to try to study in the staff room at the school where I was teaching. I thought that if I just put on some headphones and tuned everyone out that I would be fine. But people would constantly enter and exit the room. And my friends were often in the room. And they had fascinating conversations. And I could see them laughing and smiling. And I could not resist joining in the fun.</p><p>In short, it was almost impossible to do any deep and meaningful study in that room. It was also difficult to work there, but that’s beside the point. Again, learning is personal and plenty of people argue that a cafe is an energizing place to get things done. However, I do wonder, when that cutie enters the room, how deeply can anyone really think about prototypal inheritance?</p><h3>Routine</h3><p><strong>A finely tuned study system can make the process much more efficient. </strong>When I started at Launch School, I had been out of an academic setting for many years and the struggle was real. My system was definitely not finely tuned and consequently I did way more work than I needed to. The biggest time saver was cutting my passes through the material from about three to about two. As mentioned before, learning is highly personal, and we each need to figure out what works for us. Even so, I will outline below the approach that I have slowly developed and which I believe has been highly effective.</p><p><strong>The first pass of the material is about <em>quick exposure. </em></strong>The goal is to move through all of the material quickly, absorb as much as possible, and to avoid getting hung up on things which are confusing. Often, by just moving forward, some of the difficult concepts are revisited and begin to make sense. This is not the time to go down rabbit holes. The process is as follows:</p><p>Read each assignment and highlight any information which seems worthy of dedicating to memory. For this step I use a google chrome highlighter extension which can be found <a href="https://chrome.google.com/webstore/detail/highlighter/fdfcjfoifbjplmificlkdfneafllkgmn">here</a>.</p><p>After reading an assignment all the way through, review all of the highlights and convert the most important ones into Anki flash cards. David, a fellow Launch School student wrote a fantastic article about how to use Anki more effectively and I use a lot of his tips (read it <a href="https://medium.com/nerd-for-tech/a-few-tips-on-using-anki-for-learning-to-code-4ad01f2080a3">here</a>). One of the game-changers was using cloze-deletion to create as well as review flash cards efficiently.</p><p>Before each study session, open up Anki and review some flashcards to solidify knowledge, get the wheels spinning, and enhance circular learning.</p><p><strong>The second pass of the material is about <em>solidifying knowledge. </em></strong>Since the first pass moves forward so quickly, it’s natural that the most critical information is retained, but some of the more subtle, secondary, or confusing topics tend to be glossed over. This pass is about getting detailed, diving deep, and working out the kinks in our mental models. Rabbit holes are encouraged. The process is as follows:</p><p>Copy and paste each topic from the study guide into a Notion document as toggle headers.</p><p>Then, begin crafting a <em>highly </em>detailed set of notes for each topic. Using toggles to create question-and-answer type notes is excellent for forcing recall and also forces you to rephrase the material in your own words, which is ideal.</p><p><em>Bonus for Notion users!</em><strong> </strong>Some useful shortcuts that I love are Ctrl+Shift+(5, 6, 7, or 8)<strong>. </strong>5 turns the item into a bullet point. 6 Turns the item into a numbered list. 7 turns the item into a toggle. And 8 turns the item into a code block. Ctrl+Enter<strong> </strong>is also handy to open and close toggles.</p><p>Use the Pomodoro Technique to make the process more efficient and more fun. Going through the material the first time is exciting and interesting, but the second time can sometimes feel monotonous. This step is mostly about getting the work done, and the Pomodoro Technique can be your best friend for such work. I have also found that the Pomodoro Technique is great during this phase as it helps to maintain the energy and critical thinking that is needed to grapple with confusing or difficult topics.</p><p><strong>The final step is to systematically find any remaining blind spots and build ‘muscle memory’. </strong>The best way to do this is through group study. Each course is packed with information, and it’s almost impossible to retain everything. However, we all focus on different things and understand things in different ways. Therefore, we can use the two-heads-are-better-than-one approach to discover the things that others have focused on that have somehow passed us by, as well as to correct faulty mental models. The other critical component of this phase is to redo all of the quizzes and as many exercises as possible. There is often subtle but critical information contained here which should be added to our notes. This step also builds up our muscle memory to the point where things should feel easy.</p><h3>Confidence</h3><p>One of the unique aspects of mastery based learning at Launch School is that there is no schedule. We have to determine for ourselves when are ready to take the assessment and prove ourselves. This is where confidence comes into play and can either slow things down or speed things up significantly.</p><p><strong>Having courage and taking assessments sooner can save a lot of time. </strong>I’m sure that I’ve spent many weeks over-preparing for exams. I know this for a couple reasons. The first is that I’ve done well on each one. The second is that I tried to set personal deadlines in the past that I’ve pushed off week after week by telling myself that I wasn’t quite ready. I probably could have studied a bit less, taken the assessment sooner, and either received a conditional pass or a not-yet and some feedback about where I needed to improve. If that happened once, I’d take that as a sign for future exams that I’d need to prepare more. I also might have passed anyway. Instead, doing well on assessments has encouraged me to take subsequent assessments sooner, and that has saved a lot of time.</p><p><strong>Circular learning should be emphasized to keep things moving. </strong>There is such a thing as <em>too much mastery</em>, and that happens when we find ourselves getting stuck in the same place for too long. Worrying too much about mastery at each step of the way can be a hindrance to actual mastery, because the skills learned at each step are useful throughout the entire journey and become more and more solid as we continually return to them. As an example, spending a lot of time in the beginning memorizing every single Ruby or JavaScript method may not be the best use of time, since those methods will eventually reappear later in the journey and become more deeply entrenched with each reappearance. Launch School does a very good job of informing us of what me must know, as well as what we don’t need to know just yet. Trust the process. Attaining an appropriate level of proficiency, and then having the confidence to move on can get you farther faster.</p><h3>Conclusion</h3><p>I have learned a lot during my journey at Launch School, but possibly the most important thing I’ve learned is <em>how to learn</em>. The Learning How to Learn course that every Launch School student takes is a great starting point, but it also takes a fair amount of practice, experimentation, and experience to really dial in the skill of learning. Although I have presented a lot in this article, I am not yet finished with developing my skill at learning and will continue to seek ways to improve. In fact, if you have any thoughts on this topic, I’d love to hear them!</p><p>This article has grown much larger than I anticipated, and if you have made it here to the end of my ramblings, I salute you! This article has also consumed a lot more time than I expected, and that fact has inspired my final piece of advice…</p><p>If you want to move faster at Launch School, <em>don’t spend all of your time writing long-winded articles!</em></p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ec8f72b0080" width="1" height="1" alt=""><hr><p><a href="https://medium.com/launch-school/accelerating-the-slow-path-to-mastery-9ec8f72b0080">Accelerating the Slow Path to Mastery</a> was originally published in <a href="https://medium.com/launch-school">Launch School</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Grokking GROUP BY]]></title>
            <link>https://medium.com/launch-school/grokking-group-by-bd0bfd7082ea?source=rss-8b45f87e0ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd0bfd7082ea</guid>
            <category><![CDATA[aggregate-function]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[group-by]]></category>
            <dc:creator><![CDATA[Ian Austin]]></dc:creator>
            <pubDate>Sat, 02 Oct 2021 20:13:14 GMT</pubDate>
            <atom:updated>2021-10-02T20:13:14.459Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding the SQL GROUP BY Clause and Aggregate Functions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L2HZdC-_hxMxGfFc" /><figcaption>Photo by <a href="https://unsplash.com/@olegixanovpht?utm_source=medium&amp;utm_medium=referral">Oleg Ivanov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Please note: the examples in this article were created with PostgreSQL, and other varieties of SQL may produce slightly different results.</em></p><h4>Introduction</h4><p>Upon first encountering the SQL GROUP BY clause, it appears simple enough. It’s easy to understand that GROUP BY forms groups of rows based on columns which share a common value. It’s also easy to understand that those groups can be used to refine our queries and produce more meaningful results based on those groups. However, when we begin using GROUP BY, we may find that it is also very easy to produce errors. There are certain requirements when using GROUP BY and if these are not sufficiently understood (or grokked) errors become likely occurrences. In this article, I will attempt to demonstrate what these requirements are, why they are necessary, and how GROUP BY can be used with ease to attain powerful results. Let’s begin!</p><h4>What does GROUP BY do?</h4><p>Most simply put, the GROUP BY clause makes groups of rows where values in the specified columns are the same. Those groups are then used in the final output of the query.</p><p>In the results, a row can contain values from grouped columns and ungrouped columns which belong to the same group. It is important to note that the output can only contain one value for each column in the group. The value for a grouped column will be the shared value of each row in the group. The value for an ungrouped column will be the single value that is the result of <em>aggregating </em>all of the values in the column within the group.</p><p>If this is already starting to get confusing, then let’s see how it works in action.</p><p>For the rest of this article, we will be working with the following data set about a number of pets which have various traits and belong to various categories. Right now, the data is quite messy, but we will see how GROUP BY can be used to make sense of our data in many ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*hsyaKNGrFyLs0koSFhnmcg.png" /></figure><p>Let’s start with a very simple example and return a list of all the species:</p><pre><strong>SELECT species FROM pets GROUP BY species;<br></strong>  species  <br>-----------<br> chameleon<br> dog<br> cat<br> parrot<br> tortoise<br> iguana<br> owl<br>(7 rows)</pre><p>We know that our data set has 10 rows, and the results of our query returned 7 rows. That’s because the query produced 7 groups in which the value in the species column is the same. We can see this more clearly with the following visualization of the grouped data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*49Ps2EwdB4PLncKl8Jk42Q.png" /></figure><p>Notice how the values in the grouped column are condensed to a single value in the output, e.g. ‘dog’ occurs twice in the species column, but only once in the output.</p><p>Let’s also take a look at what happens if we group the data set by class:</p><pre><strong>SELECT class FROM pets GROUP BY class;</strong><br> class <br> — — — — -<br> mammal<br> reptile<br> bird</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*wuHAx_5cIGCEmcJlpM-W5Q.png" /></figure><p>So far so good. Let’s try to return the names of all of the pets grouped by class:</p><pre><strong>SELECT class, name FROM pets GROUP BY class;</strong></pre><pre>ERROR: column “pets.name” must appear in the GROUP BY clause or be used in an aggregate function<br>LINE 1: SELECT class, name FROM pets GROUP BY class;<br>                      ^</pre><p>This is where we start to run into trouble. Our error message reveals that the name column needs to be included in the GROUP BY clause, or be used in an aggregate function. The reason for this is that each column in the output must only contain one value per group. Since there are multiple names, we get an error. To understand this better, lets compare the situation with a real world example.</p><h4>A Simple Analogy</h4><p>Let’s say that a teacher divides their class into groups of students based on their eye colors.</p><p>The teacher then says, ‘Ok, brown-eyed kids, how old are you?’</p><p>‘…’</p><p>The kids freeze. Some kids are 8, and some are 9. They don’t know how to respond. It’s impossible for them to choose a single age for all of the kids in the group.</p><p>However, one brave and clever student does respond, ‘Teacher, we need more information. Do you mean the average of our ages, or all of our ages in a list?’</p><p>You can probably see where I’m going with this. SQL runs into the same problem that the students did. If the data is not grouped, or aggregated, an error will be thrown, just like the brave and clever student asking for better instructions.When there are multiple values in a group, SQL can not choose a single value to represent, and needs to be told in exactly what way the values should be combined together to produce one value. This is precisely what <em>aggregate functions </em>do.</p><h4>Aggregate Functions</h4><p>An aggregate function is simply a function which takes multiple values, performs some operation on them, and then produces a single value as a result. This is exactly what is needed if we want to include some information from an ungrouped column in the output of a data set that has been grouped with GROUP BY. That way, wherever there is a group of rows, and some rows have multiple different values in a column, those different values can be combined in some way to form a single value for that group.</p><p>There are many different aggregate functions, which can be explored <a href="https://www.postgresql.org/docs/12/functions-aggregate.html">here</a>, but a few very useful aggregate functions include:</p><ul><li><strong>count(column_name)</strong> — This will return the number of rows in the group.</li><li><strong>sum(column_name)</strong> — This will add up the numeric values of all the rows in the specified column in the group.</li><li><strong>string_agg(column_name, delimiter)</strong> — This will concatenate all of the string values separated by the delimiter of all of the rows in the specified column in the group.</li></ul><p>With this understanding of aggregate functions, let’s try again to return all of the names of the pets grouped by class. Since we know we must combine them as a single value, let’s use the <em>string_agg</em> function to do just that.</p><pre><strong>SELECT class, string_agg(name, ‘, ‘) FROM pets GROUP BY class;</strong></pre><pre>    class | string_agg <br> — — — — -+ — — — — — — — — — — — — — — — — -<br>   mammal | coco, cinderella, django, donut<br>  reptile | tim, charlie, ivan<br>     bird | polly, olly, oswald</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3fakAHxdMmUiEqUon1rUw.png" /><figcaption>Multiple separate values aggregated with the string_agg function.</figcaption></figure><p>This time we are successful. The values in the name column have been aggregated into a single value (as shown by the highlighted blocks above) and can now be included in the results. The diagram above also shows how the grouped column <em>class</em> is also essentially aggregated from many identical values to a single value.</p><p>Let’s entrench our understanding with another quick example. This time, we want to discover the total weight of each class of animals. This time, we’ll use the <em>sum</em> function.</p><pre><strong>SELECT class, sum(weight) FROM pets GROUP BY class;</strong></pre><pre>    class | sum <br> — — — — -+ — — -<br>   mammal | 93<br>  reptile | 258<br>     bird | 12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHAcFQLYOJ1ZB-kyEoSBaQ.png" /><figcaption>Multiple separate values aggregated with the <em>sum </em>function.</figcaption></figure><h4>The HAVING Clause</h4><p>Let’s dive a little deeper and say that we want to find out all of the species of animals of which there are more than one pet. For this we’re going to need to filter out all of the species groups which have one or less pets. The WHERE clause won’t work because we need a way to count the animals in each group and aggregate functions are not valid in a WHERE clause. Luckily, there is another clause which is meant for just this purpose, the HAVING clause. The HAVING clause filters groups by comparing them to a conditional statement. If the comparison returns <em>true</em>, the group is included in the results, otherwise the group is not included. Let’s try it out.</p><pre><strong>SELECT species, count(id) FROM pets GROUP BY species HAVING count(id) &gt; 1;</strong></pre><pre> species | count <br>— — — — -+ — — — <br>     dog | 2<br>     cat | 2<br>     owl | 2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4RU20JLqyGvoQzF8dBA0Q.png" /></figure><p>In the diagram above, we can see that rows are first grouped by species, then filtered by the HAVING clause. the HAVING clause selects only groups which have a count of more than 1 row. All others are eliminated from the results.</p><h4>Functional Dependency</h4><p>Before this article comes to a close, there is one more subject to explore, the concept of <em>functional dependency</em>. The <a href="https://www.postgresql.org/docs/9.5/sql-select.html">PostgreSQL documentation</a> has this to say:</p><blockquote>When GROUP BY is present, or any aggregate functions are present, it is not valid for the SELECT list expressions to refer to ungrouped columns except within aggregate functions or when the ungrouped column is functionally dependent on the grouped columns, since there would otherwise be more than one possible value to return for an ungrouped column. A functional dependency exists if the grouped columns (or a subset thereof) are the primary key of the table containing the ungrouped column.</blockquote><p>We have already explored the first condition in the above statement, namely that ungrouped columns cannot be included in the SELECT list except within aggregate functions. We have not yet looked at the second valid condition for an ungrouped column, that it may exist in the SELECT list if it is <em>functionally dependent </em>on one of the grouped columns. The above statement declares that ‘a functional dependency exists if one of the grouped columns is the primary key of the table containing the ungrouped column.’ That is likely not too hard to understand, but let’s make it even more clear with a quick example. Let’s select the names of the pets grouped by their id (the primary key of the table).</p><pre><strong>SELECT name FROM pets GROUP BY id;</strong><br> name <br> — — — — — — <br> cinderella<br> oswald<br> charlie<br> polly<br> donut<br> tim<br> django<br> ivan<br> coco<br> olly<br>(10 rows)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*cSeAnNzVM0oLd-w4CFGE5g.png" /></figure><p>That worked well. One thing that is important to note here is that the name column was included in the SELECT list without using an aggregate function or including it in the GROUP BY clause. This is possible because the name column (and all of the other columns in the table) is <em>functionally dependent </em>on the id column which was explicitly set as a primary key. Every primary key requires that it’s values be unique and not null, which means that if the table is grouped by these values, each group will be comprised of only one row as there cannot by definition be multiple rows in the table with the same value. If multiple tables are joined together, there can be multiple rows with the same primary key value, but all of the values in the original table will belong to only one primary key, which is another way to say that those values are <em>functionally dependent </em>on the primary key.</p><p>Let’s look at one final example before closing. This time we will try to select the id values of the pets table grouped by name. All of the names are different, so there should be only one id value per name. Will this work? Let’s try it out.</p><pre><strong>SELECT id FROM pets GROUP BY name;</strong></pre><pre>ERROR: column “pets.id” must appear in the GROUP BY clause or be used in an aggregate function<br>LINE 1: SELECT id FROM pets GROUP BY name;<br>               ^</pre><p>This doesn’t work. Even though we satisfy the condition that there can only be one value per group, the id column is not <em>functionally dependent </em>on the name column. The technical reason for this is that the name<em> </em>column is not the primary key of the table. Another reason is that the name column <em>could</em> have multiple values which are the same and then form groups of multiple rows. However, even if UNIQUE and NOT NULL constraints were set on the name column, it would not be the primary key and would not technically satisfy the definition of <em>functional dependency.</em></p><h4>Conclusion</h4><p>In this article, I have tried to clarify some of the confusion that can arise when using the GROUP BY clause. The main thing to remember is that GROUP BY forms groups and each group can only contain a single value per column in the results. Grouped columns are automatically condensed into a single value, while ungrouped columns must either be aggregated into a single value or be functionally dependent on one of the grouped columns.</p><p>I hope this article enhanced your understanding of the GROUP BY statement and will help you to avoid some of those frustrating errors.</p><p>Thanks for reading and happy programming!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd0bfd7082ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/launch-school/grokking-group-by-bd0bfd7082ea">Grokking GROUP BY</a> was originally published in <a href="https://medium.com/launch-school">Launch School</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coping with the Slow Path to Mastery]]></title>
            <link>https://medium.com/launch-school/coping-with-the-slow-path-to-mastery-3fe9c47358e8?source=rss-8b45f87e0ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fe9c47358e8</guid>
            <category><![CDATA[mastery]]></category>
            <category><![CDATA[positivity]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[discipline]]></category>
            <category><![CDATA[how-to-study]]></category>
            <dc:creator><![CDATA[Ian Austin]]></dc:creator>
            <pubDate>Sun, 15 Aug 2021 21:59:33 GMT</pubDate>
            <atom:updated>2021-10-20T16:58:56.126Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 1 — Staying on the Path</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BbTJ20JhRQosHWv-" /><figcaption>Photo by <a href="https://unsplash.com/@yokeboy?utm_source=medium&amp;utm_medium=referral">Yeo Khee</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Who This Article is for, and What it’s All About</h3><p>This article is catered primarily to fellow Launch School students, but could be valuable for anyone that is studying in a long, self-paced, mastery-based program in which there are no official deadlines, and you can only progress after you’ve demonstrated mastery of a topic. This article is particularly for those that are moving at a slow pace and feel frustrated with the process. The content of this article stems from my personal experience of moving through the Launch School curriculum, at quite a glacial pace, and discusses some of the insights that I have gained about how to stay on the path, no matter how slow.</p><h3>My Journey So Far</h3><p>I was once told a joke by an older gentleman with a silly sense of humor. ‘What did the snail say who sat on the turtle’s back?’, he asked. ‘Hmmm, I don’t know’, I replied. And after a brief pause for effect, he exclaimed, ‘Weeeeeee!’ It was a lame joke, but we both chuckled and for some reason it stuck. This story relates to my journey, as in the beginning, I was the snail having a grand time riding on the turtle’s back. The turtle was the community of Launch School students that were moving faster, yet still slowly and patiently toward mastery, and that had much to teach me. I have read countless student articles about study habits and strategies and I have been constantly tweaking my own process. I’ve even made dramatic life changes to speed up my studies, as you’ll soon see.</p><p>My journey through Launch School has been undeniably and almost fatally slow with many bumps in the road. I began with the Prep course in March 2020 and I am now currently studying the LS180 course, a total of 6 courses completed including the prep course. One may ask, ‘why even bother to continue?’ There are many answers to that question, but the greatest is that I am determined to finish what I started and begin an exciting new career. Another answer is that I greatly value the knowledge and skill that I have gained and trust the Launch School process. Yet another answer is that I have identified many of the causes and I have implemented their solutions (to be revealed in part 2). I am now moving significantly faster and I am certain that I will be finished soon enough. Suffice it to say that in the first year or so, there were many factors (working overtime, social outings, etc.) which kept me away from a consistent study habit. On top of that, I had not developed an efficient study system, and it was always 3 steps forward, and 2 steps back.</p><p>So it was that in March of 2021, I decided to resign from my job as a teacher, move back to the US, and study full time. About two months had to be dedicated to getting all of my ducks in a row, both abroad and at home, but since I have made the change, I am making real progress in quite good time. My goal is ideally to finish the next 5 courses in the next 5 months. At the pace I’ve been moving recently I think this will certainly be doable.</p><h3>Staying on the Path</h3><p>As I’m sure you can see, my path has been very, very long, and I still have a long way to go. With such a long path it is easy to get discouraged and to feel that one should just give up and move on to something easier. It is hard to work for a reward that is many months, if not years, in the future. This section discusses a few ways that I have found to stay determined, motivated, and positive, and to enjoy the path itself.</p><h4><strong>Visualize the Long Term Reward</strong></h4><p><strong>Research and discover jobs and opportunities that excite you. </strong>Think about what interests you, whether that is video games, photography, sports, health and wellness, languages, music, etc. and then research some of the companies in those industries to see what jobs are available. For example, I was an English teacher internationally for the last 5 years and have a lot of interest in teaching and learning languages. I then identified that I would love to work for a language learning company. I then started researching language apps and found that Duolingo has some really exciting opportunities (and some insane benefits). This has rekindled the fire and has reminded me what I’m working so hard to achieve. It now seems so obvious and I don’t know why I haven’t started this process earlier. If you haven’t already, try this out. You won’t regret it.</p><p><strong>Engage with the experiences of the program’s graduates. </strong>At Launch School, there is a treasure trove of articles, podcasts, and presentations regarding the experiences and results of graduates from both the core and capstone programs. Engaging with these materials helps to keep the goal in clear perspective and to realize what is possible if you just keep moving forward and stay on the path.</p><h4><strong>Emphasize the Short Term Goals and Celebrate Every Success</strong></h4><p><strong>Break down the long term goal into manageable pieces. </strong>It is essential to keep your eye on the prize and remember why you are working hard, but if the ultimate goal is the only focus, it is easy to despair in the length of the journey. Therefore, keep putting one foot in front of the other, achieve each small goal, and realize that consistently doing so will one day bring you to the finish line.</p><p><strong>Understand the true value of each short term goal.</strong> With every assignment completed and every exam passed, at least two incredibly valuable things have happened. Firstly, you have made it that little bit closer to the ultimate goal and the fruit of your labor is ever nearer. Secondly, you have acquired knowledge and mastery of a skill, which is a true treasure that can always be relied upon. Money and wealth come and go, but a valuable skill can provide the framework for a good life. In the wise words of the hip-hop group Hieroglyphics from their song <em>At the Helm</em>:</p><blockquote>Life is a blast when you know what you’re doin’<br>Best to know what you’re doin’ ‘fore your life get ruined<br>Life is a thrill when your skill is developed<br>If you ain’t got a skill or trade, then shut the h*ll up</blockquote><p><strong>Celebrate every success. </strong>They always say that its about the journey, and not the destination. This principle speaks to that idea. Whenever you succeed, it is a great idea to celebrate that success and reward yourself in some way. In doing so, the success will be that much more meaningful and the journey will be that much more fun and exciting.</p><h4><strong>Utilize the Community</strong></h4><p><strong>Launch School students are high caliber people and should not be overlooked.</strong> I admit that I have not reached out to the community as much as I ought to, but without fail, every time I have engaged with the Launch School community, the experience has been incredibly valuable. The students at Launch School are naturally very intelligent, thorough, and serious people with a focus on mastering fundamentals and have a wealth of knowledge, experience, and wisdom to offer. It is foolish not to engage with this community. Additionally, we are all on this same path together. Some move faster, and some move slower, but we all have insight on how to navigate this path. Those that move faster can usually offer advice on how to study more efficiently and productively. Those that move slower can often offer advice on how to master concepts fully, or how to find a balance between study and a busy life.</p><p><strong>‘Happiness is only real when shared.’ </strong>The origin of this famous quote is a bit morbid, so I’ll spare you the story and let you look it up for yourself if you please. However, I believe there is a lot of truth in it and we can use this truth to make our long and difficult journey happier and more meaningful. There is a lot of buzz around the Launch School community about finding study buddies and moving through the curriculum together. It may be hard to find a good one that moves at the same pace, but it is an invaluable asset if one, or more, is found. And this is for good reason. The benefits are manifold. A good study buddy is a source of inspiration, motivation, accountability, pace-keeping, commiseration, competition, challenge, wisdom, constructive criticism, perspective, and last but not least, shared happiness. When you succeed and you have someone to share your success with, that success is more significant. You will feel more pride and excitement at being able to showcase your accomplishments to a friend that is interested in and understands those accomplishments. You will also feel pride and excitement when you’ve helped your partner succeed.</p><h3>In Conclusion</h3><p>Many of us are taking a very slow path to our goal of mastery and it can be exceedingly frustrating at times how slow that path is. However, with the right perspective and attitude, we can ease that frustration and see the journey in a much more positive light. We can utilize visualization tricks to keep us motivated and excited about our goal, we can celebrate our short term successes and have fun, and we can find meaning and joy in helping each other succeed. I’ve said a lot of words to explain a simple and tired cliche. “Life is a journey, not a destination”.</p><p>I hope you enjoyed these thoughts and found some value out of them and I thank you for reading!</p><p><em>(P.S. I’ll reveal a few things that I’ve learned about studying faster and more effectively in Part 2. Coming soon!)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fe9c47358e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/launch-school/coping-with-the-slow-path-to-mastery-3fe9c47358e8">Coping with the Slow Path to Mastery</a> was originally published in <a href="https://medium.com/launch-school">Launch School</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>