<?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 Grant Cummings on Medium]]></title>
        <description><![CDATA[Stories by Grant Cummings on Medium]]></description>
        <link>https://medium.com/@grantcummings4429?source=rss-c2e7f24c46b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X04kDO1Qil_SH07r5GMVEA.jpeg</url>
            <title>Stories by Grant Cummings on Medium</title>
            <link>https://medium.com/@grantcummings4429?source=rss-c2e7f24c46b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:45:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@grantcummings4429/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[The Paredo Principle and Accelerated Learning]]></title>
            <link>https://medium.com/@grantcummings4429/the-paredo-principle-and-accelerated-learning-8b83920b63c0?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b83920b63c0</guid>
            <category><![CDATA[study]]></category>
            <category><![CDATA[pareto-principle]]></category>
            <category><![CDATA[80-20-rule]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Sun, 11 Aug 2024 20:21:48 GMT</pubDate>
            <atom:updated>2024-08-11T20:21:48.788Z</atom:updated>
            <content:encoded><![CDATA[<p>Why do some people learn so quickly? Why can’t I learn at their pace? Why do I sometimes feel like I’m not smart enough to keep up? Notice how each of these questions starts with “why.” This is a tactic I’ve found essential in pursuing any kind of knowledge. Over the years, I’ve become skilled at consistently asking “why.” When you combine this habit with the 80/20 principle, you uncover the key to rapid learning: identifying the 20% of effort that produces 80% of the results.</p><p>This is the basic idea of the Paredo Principle which states that 80% of consequences usually come from 20% of the causes. This asserts an unequal relationship between inputs and outputs that can be seen across many relationships. Developed by Italian economist Vilfredo Pareto in 1906 when looking into the wealth and land distribution of Italy, he discovered that 80% of land and wealth was owned by 20% of the population. He expanded his studies and discovered that most other countries held the same distribution percentages. Since this discovery, scholars have identified this principle to be relevant in many areas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*RidSqIjWFdIhbK6r.jpg" /><figcaption>Vilfredo Pareto in the 1870&#39;s</figcaption></figure><p>After changing my career to software engineering some time ago, I developed a fascination of how I can learn faster. It stems from an inherent need to be efficient in everything I do and my need to know “why” in every situation. I am going to take you through how my brain works in identifying how to accelerate your learning.</p><p>The first step to accelerated learning is gathering knowledge. When I began learning web development, I reached out to every web developer I knew and engaged in online communities to discover the most effective ways to learn. I compiled this information to create a workflow that maximized productivity and accelerated my learning process. This approach aligns with the Pareto Principle — leveraging the experience of those who have already walked the path you’re on to identify what works best. In today’s world, you don’t need to reinvent the wheel; you just need to understand how it works and apply that knowledge effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*HWs5eOXnnHTIde9m" /></figure><p>The next step is developing a solid plan of action, as organization and predictability are crucial for efficiency. When things are predictable, your mind is less cluttered, allowing you to concentrate better on the task at hand. I’ve discovered that self-directed learning becomes significantly easier when you create a structured schedule. By setting aside specific times for particular tasks, it becomes easier to focus on each one individually, knowing that other tasks are accounted for and scheduled for later. All of the most high functioning and successful people I know are ones who have a day to day schedule within their calendar.</p><p>Let’s pause for a moment. While setting up a schedule and organizing your days can provide peace of mind, it’s essential to consistently ask yourself, <strong>“Does what I’m doing make sense, and why?” </strong>People often say that common sense can’t be taught, and there’s some truth to that. However, I believe that anyone can develop common sense by taking a moment to reflect on their situation, evaluating what makes sense versus what doesn’t. It’s this simple yet crucial step that can guide your actions and decisions, ensuring they align with your goals and the bigger picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*83TSRxkVwHgsyUZv.jpg" /><figcaption>Georgie didn’t have much common sense (from “It” 1990)</figcaption></figure><p>Consider a construction worker with a pile of wood that needs to be cut to specific lengths to build a wall. The wood is on the opposite side of the house from both the wall and the cutting machine. Some people might simply leave the wood where it is, making repeated trips across the house to retrieve one piece at a time. However, what truly makes sense is to move the entire pile closer to the cutting machine, streamlining the process and allowing for a smoother, more efficient workflow.</p><p>Once you have your plan of action that you’ve taken the time to organize and make sense and you’ve created your flow dojo to hammer out the work, what remains is the <strong>“after action report”</strong>. This is a military term commonly used by David Goggins that means dissecting what you did that day, identifying what worked great and what didn’t to always be manipulating your day for maximal production. This is similar to the pre-step of gathering information to maximize productivity but in this example, you are dissecting your own work day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XndbDL4PRqPX9Qxz.jpg" /><figcaption>David Goggins running at Badwater 135 in 2007</figcaption></figure><p>The most important point of learning is learning from your mistakes and the trial and error of the day to day in figuring out what your 20% is that yields 80% of the results! In order to do this week need to have a lot of feedback and data from your trials and errors.</p><p>This takes me to my next point, which is consistency to create rhythm and flow. Longevity with anything comes with consistency, a YouTube page will remain growing if you are consistent in posting quality content. A flower will continue to grow if you consistently give it water and sunlight. You will become a master if you remain consistent in your studies. To remain consistent on a task it requires concentration, which is something that some people do struggle with. In my experience, you must create a space within your house that is your “flow dojo” as cofounder of the Flow Genome Project<strong> </strong>Jamie Wheal has named it. I will leave a link to a very detailed YouTube video about this flow dojo to learn more. In a very basic sense, this space must be clean(no clutter of any kind), beautiful(makes you want to stay in this spot) and free of distraction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/0*gGgED0ac0PeWMeb-.png" /></figure><p>Link to the flow dojo video! <a href="https://www.youtube.com/watch?v=2h046Kgty9I">https://www.youtube.com/watch?v=2h046Kgty9I</a></p><p>As you settle into a strong rhythm, it’s vital not to fall into complacency. Continually seek out challenges and embrace discomfort, as these experiences often lead to the greatest growth. In today’s world, it’s tempting to remain in your comfort zone — with remote work, online deliveries, and other modern conveniences making it easy to avoid stepping outside. However, there’s a reason it’s called “growing pains.” True growth comes from pushing your boundaries and venturing into the unknown. The metaphor of the dragon guarding the gold illustrates this perfectly: by facing and conquering discomfort (the dragon), you gain the rewards (the gold) that lie beyond it.</p><p>The key to learning quickly, in my experience, stems from everything I’ve mentioned, plus one more crucial element: the ability to teach what I’ve learned. True mastery of any topic emerges when you can break down complex concepts into simple terms and convey them to others. My approach to learning code involved meticulously commenting on every single line, explaining exactly what each part did. This habit of always questioning “why” something worked and then digging deeper to find the answer was like teaching myself as I went along.</p><p>Let’s break all of this down into steps that are easy to digest.</p><p><strong>1.) Gather knowledge from people who have done it before:</strong></p><ul><li>Ask peers, scour your network and look online to initiate the best plan of attack to start learning.</li></ul><p><strong>2.) Make the plan and schedule out your day to day:</strong></p><ul><li>While making the plan, ask yourself if it makes sense.</li><li>Does studying leetcode questions before working on your project burn you out too much?</li><li>Where should you add some breaks?</li></ul><p><strong>3.) The after action report:</strong></p><ul><li>Once your hard days work is done, audit your day.</li><li>What worked well and what needs to be changed?</li><li>The most successful people constantly look for way to improve their day.</li><li>This is also where you can find your own 20% that yields 80% of results.</li></ul><p><strong>4.) Remain consistent:</strong></p><ul><li>You must remain consistent at all cost. Bricks are laid one by one, not all at the same time. Consistency also combats burnout, which is a nasty end to something that could have been incredible.</li></ul><p><strong>Side notes:</strong></p><ul><li>Challenge yourself! If something is working super well and efficient, it could get stagnant after a while. Know when it is time to push yourself a little more.</li><li>Learn to a point of being able to teach it. The highest level of learning is eventually being able to teach it to someone who does not know what they are doing.</li></ul><p>This overview has provided a glimpse into my approach to learning, emphasizing that with the right mindset and dedication, anyone can master new skills. The key lies in committing to a structured process that includes setting clear goals and consistently questioning the “why” behind everything. Goals provide the direction, but it’s the journey — filled with curiosity, reflection, and strategic focus — that ultimately leads to success. Whether it’s coding or any other discipline, embracing this methodical approach can transform how you learn and achieve your objectives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b83920b63c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding as an Art Form]]></title>
            <link>https://medium.com/@grantcummings4429/coding-as-an-art-form-d2edb7ec6996?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2edb7ec6996</guid>
            <category><![CDATA[beauty]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[reality]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 15:15:48 GMT</pubDate>
            <atom:updated>2024-07-10T15:20:49.337Z</atom:updated>
            <content:encoded><![CDATA[<p>Artwork is often valued for its aesthetic appeal, emotional resonance, cultural importance, and the artist’s skill or creativity. It can be displayed in galleries, museums, public spaces, or even on digital platforms, and it serves various purposes ranging from emotional expression to political activism or even commercial use. The act of creation itself is an art form, which is why coding is often considered an art. However, this idea goes beyond a simple statement.</p><p>Ultimately, how one perceives code or a program depends on their perspective. It’s true that most people aren’t emotionally moved by a piece of code. Admittedly, for someone who didn’t know how to code a short time ago, looking at code used to cause anxiety for me. This is why understanding the tech world and what you’re looking at can transform it into something beautiful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YG2wbzOaWoNcQx76.jpeg" /></figure><p>In the initial stages of computing, art emerged as a tool for expressing ideas without the need for written words. It allowed for the rapid communication of intricate concepts or narratives that would have required considerable effort to articulate through writing. Throughout history, coding has played an integral role in the realm of creative arts.</p><p>Donald Knuth, who won the 1974 ACM Turing Award, discussed in his lecture “The Art of Computer Programming” the similarities and differences between science and art — two fields that are now considered vastly different. Interestingly, the root words of both are quite similar. The Latin root of art is “ars” or “artes,” meaning skill, and the corresponding Greek word is “techni,” the root of both technology and technique. Knuth explains how the definitions of art and science have evolved over the years. Today, art is often associated with fine arts like paintings and sculptures, while science is linked with test tubes, rockets, and baking soda/vinegar volcanoes.</p><p>Knuth’s discussion highlights the importance of understanding the original meanings of words and how language can limit our perception. This reminds me of a talk by Alan Watts, who said, “nature is multi-dimensional, language is linear. Language is scrawny, and therefore, if you identify the world as it is with the world as described, it’s as if you were trying to eat dollar bills and expect a nutritious diet.” This profound critique underscores the limitations of language in capturing the full essence of reality. Language is a medium of communication, not the actual experience or reality itself. Just as dollar bills lack the nutrients needed for sustenance, language lacks the fullness needed to truly represent the entirety of reality. Based on this, I try not to categorize things solely by words but rather by the feelings they evoke.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*xyVlKn9WRJyFJToP.gif" /><figcaption>“Spinning Donut” created using programming language C++</figcaption></figure><p>This brings us to the question of how coding is considered an art form. Given our discussion, it’s clear that language is limited in describing anything, so interpretations can vary.</p><p>A straightforward way to connect art to code is by acknowledging that there is such a thing as ugly art and ugly code. Both are hard to look at, often need to be redone, and are likely to be discarded. Although only people who can code might understand what beautiful code is, the art world operates similarly. Take this art piece for example…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fRwtDBjP8UkLArSa.jpg" /><figcaption>“Onement VI,” a 1953 abstraction by Barnett Newman</figcaption></figure><p>This sold for $48.8 million dollars. While I appreciate art, I will never understand why this particular piece sold for so much money.</p><p>In my blog post “Coding for Beginners: 1,000 Ways to Do the Same Thing,” I explain that beautiful code is organizationally sound, easy to read, and adheres to the principle of DRY (Don’t Repeat Yourself). I have utilized these methods as as I’ve progressed in my journey and can say that I have written some beautiful code. I personally love to picture it as an art form since it is a medium of art that take countless hours of study and practice to learn. There is a real satisfaction when you can code programs to a level that is considered beautiful and appreciated by others. Creating things that are beautiful is always appreciated by others and should be taken into account when creating anything.</p><p>Consider the difference between living in Moscow, Russia, and Rome, Italy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*E7QTzRTq98KUqhnV.jpg" /><figcaption>Moscow, Russia</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NUyEZMCSqTbHV6t4.jpg" /><figcaption>Rome, Italy</figcaption></figure><p>Both pictures are of apartment buildings, but the appreciation for beauty is lost in Russia. As in the picture of Italian apartment&#39;s, nothing is straightforward and blocky like Russia’s are. It’s a perfect depiction of how life’s twists, turns and non-linear shapes make for a beautiful picture when you take a step back. It’s important to be mindful of the beauty of a creation before you make it. Coding is the same way. Creating a beautiful program involves preparation and organization to minimize bugs and ensure a smooth workflow. This is all part of the artful dance of creating a program that is appreciated by both coders and users alike.</p><p>The interplay between art, coding, and language highlights the multifaceted nature of human creativity and expression. Art, whether through traditional mediums or modern digital forms, serves as a bridge to convey complex ideas and emotions that words alone often fail to capture. Coding, much like art, demands creativity, precision, and a deep understanding of its medium, transforming logical structures into functional beauty. As Donald Knuth and Alan Watts suggest, the essence of our experiences and creations often transcends the linear constraints of language, inviting us to appreciate the underlying artistry in everything we create. Embracing this perspective not only enriches our appreciation of code as an art form but also deepens our connection to the diverse ways we communicate and interpret the world around us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2edb7ec6996" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flask-SQLAlchemy: a Look into a powerful Flask extension]]></title>
            <link>https://medium.com/@grantcummings4429/flask-sqlalchemy-a-look-into-a-powerful-flask-extension-88c3c4a53809?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/88c3c4a53809</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[flask-framework]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Tue, 11 Jun 2024 14:22:05 GMT</pubDate>
            <atom:updated>2024-06-11T14:22:05.229Z</atom:updated>
            <content:encoded><![CDATA[<p>In my last post I discussed the differences between relational databases and non-relational databases, but failed to mention which one is my favorite. I understand that each has different use cases and even if I like one over the other, it doesn’t mean I can use it anywhere. If I did have a choice though, I would choose relational databases because of the standardized order of them. When things are uniform they are predictable, and when things are predictable, you can think two steps ahead and catch bugs before they even happen. Today I will dive into Flask-SQLAlchemy, which is an extension that is created for the micro web framework known as Flask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AILOVdy__xHz1kA8.jpg" /><figcaption>Not this flask!!!</figcaption></figure><p>Flask is a popular Python web framework known for its simplicity and flexibility, it was actually created as an April fools joke but eventually became massively popular. When it comes to working with databases in Flask applications, Flask-SQLAlchemy is a powerful tool that provides an easy-to-use and high-level interface for interacting with relational databases.</p><h3><strong>What is Flask-SQLAlchemy?</strong></h3><p>Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy, a popular Object-Relational Mapping (ORM) library for Python. SQLAlchemy allows developers to work with databases using Python objects and methods, abstracting away the complexities of writing raw SQL queries. Flask-SQLAlchemy integrates seamlessly with Flask applications, providing a declarative way to define database models, query data, and manage database connections within your Flask project.</p><h3><strong>Key Features of Flask-SQLAlchemy:</strong></h3><ol><li><strong>Declarative Syntax:</strong> With Flask-SQLAlchemy, you can define database models using Python classes, making it easy to represent database tables as Python objects. This declarative syntax simplifies the creation and management of database schemas.</li><li><strong>Automatic Session Management:</strong> Flask-SQLAlchemy handles the creation and management of database sessions, allowing you to interact with the database in a transactional manner. This helps ensure data consistency and reliability.</li><li><strong>Query Building:</strong> Provides a powerful query interface that allows you to retrieve, filter, and manipulate data from the database using intuitive Pythonic syntax. You can perform complex database operations without writing raw SQL queries.</li><li><strong>Database Migration Support:</strong> Flask-SQLAlchemy integrates with Alembic, a lightweight database migration tool for SQLAlchemy. This makes it easy to manage database schema changes and migrations as your application evolves.</li></ol><p>Flask is a great place to start for beginner level programmers looking to dive into the world of backend servers and working with databases. Also, the documentation the developers have created are very extensive and easy to follow, which makes finding the things you need quite simple. After adding SQLAlchemy to your Flask application, things become much more orderly and streamlined, solely based on not needing to write raw SQL queries (on top of all the other things mentioned above).</p><p>Lets take a look at how easy this can be to set up a very simple Flask app that utilizes Flask-SQLAlchemy. We will create database models that will create instances to be put into the database as rows. Please see the documentation to set up a simple Flask app (I will only be going over how to use Flask-SQLAlchemy).</p><p>Set up Flask app →<a href="https://flask.palletsprojects.com/en/3.0.x/quickstart/">https://flask.palletsprojects.com/en/3.0.x/quickstart/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/0*wOVIi4bAT8s8WkYp.png" /></figure><p>Within your Flask app directory we first we must install and update using pip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*iUUQ9i2_YawRWVK6FrVePw.png" /></figure><p>Now you must import what you’ve just installed at the top of your Flask app file and create an instance of SQLAlchemy and pass in the Flask app instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xoouJYL3xriHXmRwua7RDQ.png" /></figure><p>Now you can define database models by creating Python classes that inherit from `db.Model`. As you can see, the raw sql is linked to the way we will write out and define these columns in a more concise and to the point manner that greatly improves readability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*KDJqCCtbTPx3FxMoAFCErg.png" /></figure><p>Now from within your shell environment (“flask shell” command within the terminal), you can now create the database by running the following command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*c2a16PNRxRCWNBV-Cj0xOw.png" /></figure><p>Now that your database is created, you can create some users within the flask shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9QsS4pN6pTr-eUGfMufLA.png" /></figure><p>These users are not saved to the database yet, we need to first add both users and then commit them. We do this with the following commands (still within the flask shell environment).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*zp8tDvS1Z8KP5ZxHXjtJbw.png" /></figure><p>Accessing the data is quite easy too, within your shell lets try the following commands and see if they will pull from the database. There are a lot more query commands that can be found within the documentation, I urge you to check them out → <a href="https://flask-sqlalchemy.palletsprojects.com/en/3.1.x/queries/">https://flasksqlalchemy.palletsprojects.com/en/3.1.x/queries/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*tAXRQrlOjZaWaHvz1_X2Jg.png" /></figure><p>From this short and simple tutorial I’m sure you can see the power this extension holds and how easy it is to understand. I loved learning this extension because it is short, concise and most importantly makes sense! The method I used to create the database ( db.create_all() ) to begin with is good but I recommend using a different flask extension called Flask-Migrate.</p><p>Flask-Migrate is an extension for Flask that integrates Alembic, a database migration tool for SQLAlchemy, with Flask applications. It allows us to manage database schema changes, version control, and apply migrations to keep the database schema in sync with the changes in the application’s models. As your database grows and you add things that make it more complex, you’ll need a uniform way to handle schema changes which is what Flask-Migrate is best for.</p><p>Flask-SQLAlchemy is a valuable tool for Flask developers looking to simplify database interactions in their applications. By leveraging the power of SQLAlchemy’s ORM capabilities, Flask-SQLAlchemy enables you to focus on building your application’s logic without getting bogged down in database management details. Whether you are building a small personal project or a large-scale web application, it can help you efficiently work with databases and create robust, data-driven Flask applications.</p><p>These reasons above are exactly why I like relational databases so much, they usually have a clean and organized schema. My brain loves organization and coding was a perfect route for me to take when it comes to a career that demands organization and logic. After learning this extension, I definitely fell in love with it based on the organization alone. Needless to say, Flask-SQLAlchemy is a must-have extension for any Flask developer looking to integrate a relational database into their Flask projects seamlessly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88c3c4a53809" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Relational vs Non-Relational Databases]]></title>
            <link>https://medium.com/@grantcummings4429/relational-vs-non-relational-databases-bcdcb0ebfb4a?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcdcb0ebfb4a</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[relational-databases]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[non-relational-database]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Tue, 28 May 2024 12:17:54 GMT</pubDate>
            <atom:updated>2024-05-28T12:17:54.708Z</atom:updated>
            <content:encoded><![CDATA[<p>Databases are critical components in modern information systems due to their ability to efficiently store, manage and retrieve large amounts of data. Databases help organize data systematically, ensuring that the data is easily accessible and structured logically. In general there are two main types of databases which are relational and non-relational, by the end of this post you should be able to understand the difference between the two.</p><h3><strong>Relational Databases</strong></h3><p>We will start with the most common type of database which is relational databases. The physical look of the data within is like a table that has columns and rows that represent different aspects of the data. This type of DB is very versatile and can be used to create and store many different kinds of information. The term “relational database” was coined in 1970 by computer scientist <strong>Edgar F. Codd</strong> in a research paper titled “A Relational Model of Data for Large Shared Data Banks.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*n_wxAjYCfR6z3Thf" /><figcaption>The father of relational databases Edgar F. Codd</figcaption></figure><p>Let’s use creating a profile on a social media website as an example. When you save the profile it gets stored in the database as one of the rows. Each column represents an aspect of the information you just put in, some examples could be first name, last name, email and date of birth. The columns are known as <strong>“keys”</strong> in database terms. When another profile is added, another row of information is added to the table. The table below is a representation of this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYO6GOnjBTY5xKsxiV_Hag.png" /></figure><p>If you have a way of visualizing what your database looks like using an extension in your code editor or otherwise, this is what a typical relational database would look like. The id of each row is unique and is also called the <strong>“primary key”</strong>. The primary key is a fundamental concept in database design that ensures that even if other fields have identical values, each record in a table can be uniquely identified. Using a unique id makes it easier and faster to query the database, as the database can directly access the row without scanning the entire table.</p><p>The way you can create a relationship between two database tables is using a <strong>“foreign key”</strong>, which is a primary key of a row in one table that is used as a table cell in a different table. This sounds confusing so lets look at an example of relating an author to an article they wrote. The authors table will be linked to the articles table in a one to many relationship since one author has probably wrote many articles. To show this relationship in the tables, a column will be added to the articles table that will hold the id of the author who wrote it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*YYO6GOnjBTY5xKsxiV_Hag.png" /><figcaption>Author table</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iV5MnXDGjRwn6B1NFOOTdg.png" /><figcaption>Articles table</figcaption></figure><p>In the example above you can see in the articles table that the author_id is used as a foreign key to represent who wrote the article. John Doe wrote the first two articles and Jane Smith wrote the third one.</p><p>You may now be asking how we “talk” to relational DBs? We can do so by using what is called a <strong>structured query language</strong> or SQL for short. Structured Query Language (SQL) is a standardized programming language designed for managing and manipulating relational databases. SQL is widely used for querying, updating, and managing data stored in a relational database management system (RDBMS).</p><p>SQL is governed by standards set by organizations such as ANSI (American National Standards Institute) and ISO (International Organization for Standardization). These standards ensure consistency and interoperability across different database systems. Since this is standardized, it gives developers a sigh of relief to know they don’t have to learn multiple languages to interact with different SQL databases.</p><h3><strong>Non-relational Databases</strong></h3><p>This type of database stores information in a different form since it does not use a table format with primary keys, columns, rows and foreign key. Instead, it uses a type of storage model that is optimized for the type of data you would like to store. The type of model obviously depends on the data but can be highly customizable in the creation process of building one. It’s important to point out that this type of DB does not use SQL, since these are not structured the same way that relational databases are structured.</p><p>There are seven different types of NRDBs typically used which are document database, key-value stores, column family stores, graph databases, time-series databases, object-oriented databases and multi-model databases.</p><p>Each type is unique in it of itself so here is a more detailed description of each:</p><h3>1. Document Databases</h3><ul><li>Description: Store data in documents similar to JSON (JavaScript Object Notation) objects. Each document contains a set of key-value pairs and can have a flexible schema.</li><li>Use Cases: Content management systems, user profiles, blogging platforms, and any application where the data model can change over time.</li><li>Examples: MongoDB, CouchDB, Amazon DocumentDB.</li></ul><h3>2. Key-Value Stores</h3><ul><li>Description: Store data as a collection of key-value pairs, where each key is unique. The value can be a simple data type or a complex object.</li><li>Use Cases: Caching, session management, real-time data processing, and applications with simple query requirements.</li><li>Examples: Redis, Amazon DynamoDB, Riak.</li></ul><h3>3. Column-Family Stores (Wide Column Stores)</h3><ul><li>Description: Store data in columns rather than rows. Each column family can contain a virtually unlimited number of columns that can be accessed independently.</li><li>Use Cases: Time-series data, data warehousing, and applications that require fast write and read operations.</li><li>Examples: Apache Cassandra, HBase, ScyllaDB.</li></ul><h3>4. Graph Databases</h3><ul><li>Description: Store data in nodes, edges, and properties. Nodes represent entities, edges represent relationships between entities, and properties store information about nodes and edges.</li><li>Use Cases: Social networks, recommendation engines, fraud detection, and any application that requires complex relationship traversals.</li><li>Examples: Neo4j, Amazon Neptune, ArangoDB.</li></ul><h3>5. Time-Series Databases</h3><ul><li>Description: Optimized for storing and querying time-stamped data. These databases are designed to handle large volumes of time-series data efficiently.</li><li>Use Cases: IoT data, financial data, log data, and monitoring systems.</li><li>Examples: InfluxDB, TimescaleDB, OpenTSDB.</li></ul><h3>6. Object-Oriented Databases</h3><ul><li>Description: Store data in the form of objects, as used in object-oriented programming. These databases align with object-oriented programming principles.</li><li>Use Cases: Applications requiring complex data representations closely aligned with their object-oriented codebase.</li><li>Examples: db4o, ObjectDB.</li></ul><h3>7. Multimodel Databases</h3><ul><li>Description: Support multiple data models (e.g., document, graph, key-value) within a single integrated backend.</li><li>Use Cases: Applications that require the flexibility of multiple data models without the need to use multiple databases.</li><li>Examples: ArangoDB, OrientDB, Cosmos DB.</li></ul><p>Choosing the right type of non-relational database depends on the specific requirements of your application, such as the nature of your data, the types of queries you need to perform, and your scalability needs.</p><p>So when would you use a relational database vs a non-relational db? Like I’ve said before, it depends on the data you’re working with. If it is a data type the is <strong>highly structured</strong> like financial records, inventory or customer information, you should probably use relational databases. If you need to perform <strong>complex queries</strong> and your data has <strong>multi-table relationships </strong>then you’d also want to use a relational database.</p><p>For data that is <strong>unstructured or semi-structured</strong>, you’d be better off with a non-relational database since your data does not fit well into tables and schemas, or it is highly variable. Examples include JSON documents, user-generated content, social media posts, and logs. You’d also use NRDBs for data that has <strong>high scalability and performance </strong>because you need to handle large volumes of data with high read/write throughput. Non-SQL databases are designed to scale horizontally, making them suitable for big data applications, real-time analytics, and high-traffic web applications.</p><p>The main point of knowing which type to use is understanding the data you’re working with and planning ahead of time to implement your database. One thing that stands out to me about programming is <strong>planning ahead is key</strong> when trying to reduce bugs and implement a system that works best for what the program entails. These types of DB’s have been used thousands of times across many different programs, so if you’re struggling with choosing what to use, there is a large chance someone had the same issue. So when it comes to actually choosing, the internet is a perfect place to get more information on how other people fixed their problems. Preparation is key because when things become predictable, many issues are resolved before they even become an issue. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcdcb0ebfb4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Flow: The Golden Apple for Beginner Programmers]]></title>
            <link>https://medium.com/@grantcummings4429/data-flow-the-golden-apple-for-beginner-programmers-bdb3e005d788?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdb3e005d788</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Thu, 25 Apr 2024 13:40:09 GMT</pubDate>
            <atom:updated>2024-04-25T13:40:09.724Z</atom:updated>
            <content:encoded><![CDATA[<p>In the multiverse of coding there lies plenty of ways to find a solution to a problem. The more complex your application is, the more there is to keep track of and the harder it is to picture how the data will be manipulated.</p><p>So for the sake of giving your brain a little love, let’s find a simpler way to think about it. This is my way of going about coding and it’s only a component to a larger scale but let’s keep it simple because we can only solve one problem at a time anyway!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*gdAasiQLjUPKhkIj.jpg" /></figure><p>This way of thinking involves picturing how to solve the problem at hand with separating what your data currently is and where it needs to be. Obviously getting the end result is easier said than done, but thinking of <strong>ONLY</strong> the next step helps me a ton. It’s a “slow coding” method that is almost relaxing because you know where you are and where you want to be, now you just have to take little steps to get there.</p><p>Yes this could be a beginner mindset and maybe it will change as time goes along. If there’s anything I have learned in my voyage of learning code so far, it’s that when you’re learning, just make the code work somehow. The refactoring comes naturally as you understand your language better!</p><h3>What is Data Flow?</h3><p>Data flow refers to the movement of data through various components of a software system. It encompasses how data is input, processed, and output within an application. Understanding data flow involves grasping how data is manipulated, transformed, and passed between different parts of a program, including functions, modules, and components.</p><p>One thing I mentioned in my last post, “Coding for Beginners: 1,000 ways to do the same thing”, is that variable naming is a very important because it allows you to understand how data is manipulated. Lets look at a simple example of how this works.</p><p>Lets say we want to combine the variable ‘string’ with the variable ‘array’ to created one string that says “I know my ABC’s up to H: a b c d e f g h” and console.log the message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIFiT5pKi_g18uN74MPmzQ.png" /></figure><p>We need to make our original array become a string of letters that is sorted A-H alphabetically. So we now know where we are starting and where we are ending, lets take it one step at a time to get there.</p><p>I created a variable called arraySortedAZ, which represents exactly what it says to make it easy to follow. Using the sort() method, I sorted them into a new array (arraySortedAZ), which re-arranged the array to be alphabetical order. I then used join(“ ”) to created a new variable (sortedAZJoined) that makes it one string with spaces between each letter. I used a naming strategy that takes a little bit of the previous name and adds onto it. This method lets you understand what the variable used to be and what it has currently been transformed into. <strong>A side note:</strong> make sure to console.log every step of the way to physically see how your data is transforming, remember to slow code!</p><p>Now we have what we want, we just need to combine them together in our console.log and print them to the console! This is a very simple example to get my point across but before we dive into a more complex example lets think about something first. The Importance of understanding Data Flow!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*lIMdTwVCgcvbR-Jv.jpg" /><figcaption>Which path is easier to follow?</figcaption></figure><p><strong>Code Understanding:</strong> By comprehending data flow, we gain a deeper understanding of how code operates. It allows us to reason about the behavior of the applications more effectively, leading to better problem-solving skills and more robust solutions.</p><p><strong>Debugging and Troubleshooting:</strong> When issues arise in a software system, having a clear understanding of data flow aids in debugging and troubleshooting. We can trace the path of data through the system, identify bottlenecks, and pinpoint the root cause of errors more efficiently.</p><p><strong>Performance Optimization:</strong> Optimizing data flow can significantly improve the performance of an application. By analyzing data flow patterns, we can identify opportunities for optimization, such as reducing unnecessary data transformations or minimizing redundant calculations.</p><p><strong>Scalability and Maintainability:</strong> Well-designed data flow patterns promote scalability and maintainability. By organizing code around clear data flow pathways, we can easily extend and modify our applications as requirements evolve, reducing the risk of introducing bugs or breaking existing functionality.</p><p>Although these concepts generate a bigger picture, this shows why each little step matters in the grand scheme of things!</p><p>Lets take on a more complex example, I will first introduce the code so you can read through it and try to see the path of data we want to happen. In this example we are working with React and have three components; App (parent), ArticleList(child) and Article(child of ArticleList). Our data is stored in a separate file that gets passed into App and looks like this….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*2P-Hd81LiEBMoFz4y9Sbxw.png" /></figure><p>Our App component looks like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*gYSgXz5jgaCFyDLNgPRfUg.png" /></figure><p>ArticleList…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*Q13d8w781Dm9SQtbQ8daUA.png" /></figure><p>And our Article…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*-u8QVFW5-yo2K1lQk1OVfg.png" /></figure><p>No need to pay attention to the Header and About sections for now, we will only focus on how the blogData is being passed from where it originates into becoming part of the DOM. Try to see the Data flow for yourself before I dive into it!</p><p>The first thing we do is export the data so we can then import it and put it into the the App component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*tsAV1F3R7zo93zoFhPI4Pw.png" /><figcaption>At the bottom of the blogData file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*rHQaZS-DzIcsIMAlJ1Vb0Q.png" /><figcaption>At the top of the App file</figcaption></figure><p>Now that we have the blogData in our App, we need to pass it into the ArticleList component as a prop. But notice how I passed it in as “blogData.posts”, this is because we only need the array of posts that is the value of the key “posts” within the blogData object. One step closer to getting what we want out of the data as it flows through our application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*d_mx7gV9iHMiRv8t2KgWHg.png" /><figcaption>I named the prop posts because that is what it litterally holds</figcaption></figure><p>Within our ArticleList you can see we imported Article because we will need it to pass in the the data from each post. I created a variable within ArticleList called articlesListed which uses the map method to pass each object within the posts array into an Article component. The variable will then hold an array of Article components for the data within each post (passed in as props to Article accordingly).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*gtSfXGKgteEQ1u7-D4Qxtg.png" /><figcaption>Note: when you use map in this context, you need a unique key for each Article. The id of the post is perfect in this case.</figcaption></figure><p>The articlesListed variable is then returned only as the variable name in curly brackets, React knows that it needs to list out each Article component inside.</p><p>Finally we are at our Article component where each prop that was passed in from the ArticleList file is placed accordingly and returned as JSX.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*sjVRVmfxG7ib-oK1h_ZRVQ.png" /><figcaption>The date prop has a default value in case a post does not have one</figcaption></figure><p>Lets wrap this up by looking at a diagram of how the data is being passed in and manipulated each step of the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F0dranqaaNq51o_Epy_oiw.png" /></figure><p>This clearly shows the flow of data from start to finish and this method of showing data is a good way to map out projects before you actually start.</p><h3><strong>Conclusion</strong></h3><p>We covered a lot in this post, I really hope you have found it useful along your journey to becoming a master at programming. The two examples used were mean’t to show the path of taking things one step at a time but manipulating your data in a way that is understandable and easy to follow. I highly recommend building diagrams of the project before you actually start, it really helps to see a clear picture of data flow from start to finish.</p><p>Understanding data flow is fundamental to building reliable and efficient software applications. By mastering data flow principles, we can write code that is easier to understand, debug, and maintain. Whether you’re working on a small personal project or a large-scale enterprise application, a solid understanding of data flow will serve you well throughout your coding journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdb3e005d788" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding for Beginners: 1,000 ways to do the same thing]]></title>
            <link>https://medium.com/@grantcummings4429/coding-for-beginners-1-000-ways-to-do-the-same-thing-d5cc0c5e2ad0?source=rss-c2e7f24c46b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5cc0c5e2ad0</guid>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Grant Cummings]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 16:16:15 GMT</pubDate>
            <atom:updated>2024-04-25T13:49:34.847Z</atom:updated>
            <content:encoded><![CDATA[<p>In the vast landscape of the internet, what lies at its core is binary code or a lot of ones and zeros that represent numbers, letters and other characters. As programmers we talk with these codes through using programming languages that eventually get compiled (transformed) into binary. These programming languages are easy for humans to read and have created some of the most beautiful and complex programs that people interact with every day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kURKTSjoA88Z-TXn.jpg" /><figcaption>You may recognize this from a movie!</figcaption></figure><p>The name of this post is fundamentally true in the coding world but it doesn’t mean that all of them are the most efficient or are easily readable. There are three levels in my mind when you are writing code and all programmers go through them. The first level is very simple; just write code that works and does what you want! Make the code work any way possible because getting your first programs to work correctly feels good and gives you the confidence to dive deeper! I won’t say anything else about the first level because it’s self explanatory but we’ll take a closer look at the following two levels soon.</p><p>As a beginner, I have already spent countless hours studying, writing and debugging code and have pondered these questions:</p><p><strong>What is considered the best code?</strong></p><p><strong>Is there certain frameworks and methods that are considered the best?</strong></p><p><strong>What kind of code is considered impressive?</strong></p><p>Being a perfectionist, these types of questions have manifested in different areas of my life and will continue to forever. Currently, these questions in the coding world need to be answered and I think I can answer them now.</p><p>The most annoying part is that the answers are pretty much common sense when you think about what coding entails. It involves writing instructions to tell the computer to do something you want it to do, while also keeping in mind that you want to be able to understand what you’re writing. The other thing that is imperative to remember is having your code be understandable to other programmers as well. This leads me to my first example; writing variables that give the little details that we need to know in order to <strong>fully</strong> understand what the variable holds as a value…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*lFMwmdi9qz2Rd0diYNe7qQ.png" /></figure><p>This code will work perfectly fine, but there is one thing that we can modify within this that will be easier to read and save time when coming back to the code later. The <strong>form </strong>variable pulls the form with the class of ‘add-toy-form’ from the document. But what if we had more than one form within the document? Are we going to name the second form <strong>form2</strong>?</p><p>We know the form pulls the ‘add-toy-form’ so why don’t we just name it <strong>addToyForm</strong>? This simple change makes it much easier to read and understand for coming back to (We would also have to change the name on the event listener it is attached to below it as well). This is a great habit to build even for level one programmers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*8UvyDYPidvEQ2Hb1.jpg" /></figure><p>It is a small change that when implemented throughout your code will make a <strong>huge</strong> difference to readability and comprehension.</p><p>When it comes to learning coding, it is important to begin with making a code work however you can, hence the name of this post. But as you learn and understand more about built in methods and frameworks, you will see there are many ways to make your code shorter. Lets take a look at a level two type of code now.</p><p>Tell me which one is better to look at…..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*i6aOA-cnjmuimyFpMnlgmw.png" /></figure><p>or</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvCfqoYZkfEzpQGxrRKsBg.png" /></figure><p>Both of these blocks of code do the exact same thing when looking at the value of <strong>foundDogToDisplay. </strong>But you can tell me which one will be better to use as you become a more efficient programmer.</p><p>Level two implies that you understand methods and frameworks of the language you are using to build your program. These “coding shortcuts” are built into the language you are working with and can easily trim the fat of the bulkier sections of your code as seen in the example. Google is an incredible resource for seeing the methods and frameworks for the language you’re using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*sLz0fecdDXX_t-f1.jpg" /></figure><p>Level three is not something you will have to worry about for a while as a beginner but its good to keep in mind for when you start writing very big programs. This level doesn’t have to do with how your code physically looks but rather the amount of memory it uses or the speed it runs based on Big O notation.</p><p>Full disclosure…even my understanding of this is not the greatest, so I will give a short explanation and then point you in the right direction to get a better one. :)</p><p>There are some aspects of code that hold more memory than others and some functionalities that take longer to complete than others. A small example is that strings hold more memory than numbers do. Or using a binary search method for an array in alphabetical order will take fewer steps than iterating through the entire array. Okay enough of me, here’s a great link to understand this level better….</p><p><a href="https://www.simplilearn.com/big-o-notation-in-data-structure-article">Big O Notation: Time Complexity &amp; Examples Explained</a></p><p>These three levels are the natural path of a beginner coder that eventually achieves a greater understanding of how code effects the entire program. Level one is for giving yourself the confidence of at least getting your code to do what you’d like it to do. Level two comes when you understand methods and frameworks better like the “find” method I used in the third code snippet. You will learn to implement them throughout your program so it is simpler, easier to read and not as “bulky”. Level three is hit when you know where to change your code to make it more efficient when taking the entire program capabilities into account.</p><p>Learning how to make your code more understandable is an easy fix to implement like the first example. Implementing the second example will have to come with time and repetition. When it comes down to it, the most impressive code in my mind is the easiest to read while maintaining simplicity. I will learn to think about program efficiency and taking Big O notation into account soon but for now, I’ll just make my code pretty. As you continue your learning journey, always ask yourself how you can make your code simpler and easier to read because you usually always can!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5cc0c5e2ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>