<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matthew Clark</title>
    <description>The latest articles on DEV Community by Matthew Clark (@afromatt6288).</description>
    <link>https://dev.to/afromatt6288</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1027703%2F65ddf5f1-5720-45d8-ae1c-aa0e20577779.jpeg</url>
      <title>DEV Community: Matthew Clark</title>
      <link>https://dev.to/afromatt6288</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afromatt6288"/>
    <language>en</language>
    <item>
      <title>Validations and Constraints... Worth the Effort</title>
      <dc:creator>Matthew Clark</dc:creator>
      <pubDate>Fri, 21 Apr 2023 19:07:28 +0000</pubDate>
      <link>https://dev.to/afromatt6288/validations-and-constraints-worth-the-effort-1laf</link>
      <guid>https://dev.to/afromatt6288/validations-and-constraints-worth-the-effort-1laf</guid>
      <description>&lt;p&gt;Are you struggling with how to ensure that the data you're working with is valid? Don't worry, you're not alone. As a developer, validating data is a critical aspect of ensuring that an application is secure, stable, and predictable. In other words, validation is a way to make sure that the data we receive is the data we expect. &lt;/p&gt;

&lt;p&gt;Validations can be a tricky concept to wrap your head around, but they're an important part of coding. In this post, we'll explore how to use validations to ensure that your data is accurate and error-free.&lt;/p&gt;

&lt;p&gt;To start, let's take a look at the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Mission(db.Model, SerializerMixin):
    __tablename__ = 'missions'
    __table_args__ = (
        db.CheckConstraint('length(content) &amp;gt;= 250', name='max_content_length'),
    )

    serialize_rules = ('-scientist.missions', '-planet.missions', '-created_at', '-updated_at',)


    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String, nullable=False)
    year = db.Column(db.Integer)
    parameter = db.Column(db.String)
    summary = db.Column(db.String, db.CheckConstraint('len(summary) &amp;lt;= 250', name='min_summary_length'))
    content = db.Column(db.String, db.CheckConstraint('len(content) &amp;gt; 250', name='max_content_length2'))

    scientist_id = db.Column(db.Integer, db.ForeignKey('scientists.id'))
    planet_id = db.Column(db.Integer, db.ForeignKey('planets.id'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code uses an example of a Mission, Planet, and Scientist. Our Mission class has various attributes, including a name, year, parameter, summary, content, as well as relationships to both a Scientist and Planet Class. To validate these attributes it has to include several validation methods.&lt;/p&gt;

&lt;p&gt;Each validation method in this code will use the &lt;strong&gt;@validates&lt;/strong&gt; decorator to specify which attribute it is validating. This decorator allows you to specify a function that is called whenever the attribute is set or updated, allowing you to ensure that the data is valid at all times.&lt;/p&gt;

&lt;p&gt;For instance, to validate the name attribute, we use a validate_name method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@validates('name')
def validate_name(self, key, name):
    if not name:
        raise ValueError("Mission must have a name")
    return name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, we check if the name attribute exists and if it doesn't, we raise a &lt;strong&gt;ValueError&lt;/strong&gt;. Otherwise, we return the name attribute.&lt;/p&gt;

&lt;p&gt;We also use the &lt;strong&gt;@validates&lt;/strong&gt; decorator to validate the year, parameter, content, summary, scientist_id, and planet_id attributes. In each case, we use conditional statements and raise a &lt;strong&gt;ValueError&lt;/strong&gt; if the validation fails.&lt;/p&gt;

&lt;p&gt;For example, to validate the year attribute, we can use a validate_year method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@validates('year')
def validate_year(self, key, year):
    if len(str(year)) != 4:
        raise ValueError("Mission Year must be 4 digits.")
    return year
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, we check if the year attribute is a 4-digit number. If it's not, we raise a &lt;strong&gt;ValueError&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are many methods in validation, and it will sometimes require some tricky and logical thinking to create ones that fit your exact circumstances. Validations ensure that the data we store is clean and consistent, which helps to prevent errors and unexpected behavior in our application. However, validations alone are not enough to guarantee data integrity. We also need to use constraints to ensure that our data meets specific requirements. Enter constraints.&lt;/p&gt;

&lt;p&gt;If you scroll back up and look at the initial Mission code, you will see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name = db.Column(db.String, nullable=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;strong&gt;nullable=False&lt;/strong&gt; is a constraint. And there are many different ones, including &lt;strong&gt;unique=True&lt;/strong&gt;, &lt;strong&gt;default=Value&lt;/strong&gt;, and &lt;strong&gt;max_length=Value&lt;/strong&gt;. However these may not fit all circumstances. So there is another kind of restraint I will introduce you too. &lt;strong&gt;CheckConstraint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a &lt;strong&gt;CheckConstraint&lt;/strong&gt; is defined within a column definition, it is tied to that column only. On the other hand, when a &lt;strong&gt;CheckConstraint&lt;/strong&gt; is defined in the &lt;strong&gt;&lt;strong&gt;table_args&lt;/strong&gt;&lt;/strong&gt; of a table, it is applied to the entire table. We can use the &lt;strong&gt;db.CheckConstraint&lt;/strong&gt; both specifically and table-wide to specify the minimum and maximum length for the content and summary attributes. This is how that might look:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;__table_args__ = (
    db.CheckConstraint('length(content) &amp;gt;= 250', name='max_content_length'),
)

summary = db.Column(db.String, db.CheckConstraint('len(summary) &amp;lt;= 250', name='min_summary_length'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both of the above &lt;strong&gt;CheckConstraint&lt;/strong&gt;s are valid and can be used as circumstances dictate. Important note: You must give a CheckConstraint a unique name, or it will not function properly. It must also all be contained with (' '), which makes the constraint a string. Don't worry, it will read it as if it was not forced to be a string. &lt;/p&gt;

&lt;p&gt;So, why are validations and constraints so important? Well, in short, they help ensure that your code works correctly. Without validations, it's easy to accidentally introduce errors into your data, which can cause problems down the line. And constraints provide an additional layer of data protection by preventing data that doesn't meet specific criteria from being stored in the database. By validating your data, you can catch errors early and ensure that your code is working as intended.&lt;/p&gt;

&lt;p&gt;In summary, validation and constraints are essential tools in ensuring that our application data is secure and consistent. And they help prevent errors and unexpected behavior in our application, which ultimately benefits the end-users, and is essential for any successful project. They are a critical part of coding. Of course, like any coding concept, validations and constraints can be challenging to master. But with persistence and determination, you can learn anything. When you're first starting out, it's natural to feel overwhelmed or unsure of yourself. By reading and experimenting, you can start to get a better understanding of how validations work and how to use them effectively. So, keep pushing yourself to learn more. Remember, learning to code may be difficult, but everyone has to start from somewhere. By being diligent and purposeful, and never giving up, you can overcome any obstacle that comes your way. With time and practice, you can master even the most complex coding concepts.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>flask</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Python to SQL and back again... an Object-Relational Mapping tale.</title>
      <dc:creator>Matthew Clark</dc:creator>
      <pubDate>Fri, 31 Mar 2023 22:15:55 +0000</pubDate>
      <link>https://dev.to/afromatt6288/python-to-sql-and-back-again-an-object-relational-mapping-tale-2nmh</link>
      <guid>https://dev.to/afromatt6288/python-to-sql-and-back-again-an-object-relational-mapping-tale-2nmh</guid>
      <description>&lt;p&gt;Howdy there everyone. It's me again, and today I am going to talk about how to work with databases and Python? Luckily Object-Relational Mapping (ORM) can help you do just that. ORM is a technique that allows you to interact with a database using Python code, which is much more convenient than writing SQL commands manually. In this tutorial, we'll take a look at how you can use ORM to interact with a SQLite database.&lt;/p&gt;

&lt;p&gt;First, let's start with Python to SQL. We'll be using SQLite for this tutorial, but the same concepts apply to other databases as well. Here is a sample code to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import sqlite3

db_connection = sqlite3.connect('my_database.db')
db_cursor = db_connection.cursor()

class ClassName:
    def __init__(self, var1, var2, id=None):
        self.id = id
        self.var1 = var1
        self.var2 = var2

    @classmethod
    def create_table(cls):
        sql = """
            CREATE TABLE IF NOT EXISTS table_name (
                id INTEGER PRIMARY KEY,
                var1 TEXT,
                var2 TEXT
            )
        """
        db_cursor.execute(sql)

    def save(self):
        sql = """
            INSERT INTO table_name (var1, var2)
            VALUES (?, ?)
        """
        db_cursor.execute(sql, (self.var1, self.var2))
        db_connection.commit()
        self.id = db_cursor.lastrowid

    @classmethod
    def create(cls, var1, var2):
        classname_instance = ClassName(var1, var2)
        classname_instance.save()
        return classname_instance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, we first import the SQLite module, then establish a connection to the database using sqlite3.connect(). Next, we define a class called ClassName with some instance variables, a class method for creating a table, a save method for inserting records, and a create method for creating new instances of the class and saving them to the database. The var1 and var2 parameters in the methods refer to the two columns in our table_name table.&lt;/p&gt;

&lt;p&gt;To create the table in the database, you can call the create_table() method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ClassName.create_table()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create a new instance of ClassName and save it to the database, you can call the create() method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;classname_instance = ClassName.create('value1', 'value2')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's move on to SQL to Python. Here's the sample code to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ClassName:
    all = []

    def __init__(self, var1, var2, id=None):
        self.id = id
        self.var1 = var1
        self.var2 = var2

    @classmethod
    def new_from_db(cls, row):
        classname_instance = cls(
            var1=row[1],
            var2=row[2],
            id=row[0]
        )
        return classname_instance

    @classmethod
    def get_all(cls):
        sql = """
            SELECT *
            FROM table_name
        """
        results = db_cursor.execute(sql).fetchall()
        cls.all = [cls.new_from_db(row) for row in results]
        return cls.all

    @classmethod
    def find_by_var1(cls, var1):
        sql = """
            SELECT *
            FROM table_name
            WHERE var1 = ?
            LIMIT 1
        """
        classname_instance = db_cursor.execute(sql, (var1,)).fetchone()
        if not classname_instance:
            return None
        return cls.new_from_db(classname_instance)

    @classmethod
    def find_or_create_by(cls, var1=None, var2=None):
        sql = """
            SELECT * FROM table_name
            WHERE (var1, var2) = (?, ?)
            LIMIT 1
        """
        classname_instance = db_cursor.execute(sql, (var1, var2)).fetchone()
        if not classname_instance:
            sql = """
                INSERT INTO table_name (var1, var2)
                VALUES (?, ?)
            """
            db_cursor.execute(sql, (var1, var2))
            return ClassName(
                var1=var1,
                var2=var2,
                id=db_cursor.lastrowid
            )
        return cls.new_from_db(classname_instance)

    def update(self):
        sql = """
            UPDATE table_name
            SET var1 = ?,
                var2 = ?
            WHERE id = ?
        """
        db_cursor.execute(sql, (self.var1, self.var2, self.id))

    @classmethod
    def drop_table(cls):
        sql = """
            DROP TABLE IF EXISTS table_name
        """
        db_cursor.execute(sql)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we define the same ClassName class as before, but with some additional methods for fetching data from the database. We have a class variable called all to store all instances of ClassName, a new_from_db() method to create new instances of ClassName from database rows, and several class methods for fetching and creating instances.&lt;/p&gt;

&lt;p&gt;The get_all() method selects all rows from the table_name table and returns them as a list of ClassName instances. The find_by_var1() method selects a row from the table_name table where var1 matches the given value and returns the corresponding ClassName instance.&lt;/p&gt;

&lt;p&gt;The find_or_create_by() method tries to find an existing row with matching var1 and var2 values. If it finds one, it returns the corresponding ClassName instance. If it doesn't find one, it creates a new row with the given var1 and var2 values and returns a new ClassName instance.&lt;/p&gt;

&lt;p&gt;Finally, we have an update() method that updates the var1 and var2 values of an existing row with the instance's id. And a drop_table() method to drop the table_name table.&lt;/p&gt;

&lt;p&gt;I know there are several Automated ORM Managers (like SQLAlchemy or mySQL), so it can be challenging to see the value in knowing how to do it manually. However, your next job might not (most likely won't) be using the Automated ORM Manager that you already know. So knowing how to do it manually will come in handy until you can learn their specific software. Plus, it is faster to learn those when you understand what is happening behind the scenes. &lt;/p&gt;

&lt;p&gt;Overall, ORM is a powerful tool that allows you to interact with databases in a more convenient way. Although it might seem intimidating at first, it's definitely worth the effort to learn. So keep pushing through, and remember that every small success is worth celebrating! &lt;/p&gt;

</description>
      <category>python</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>React: Create a Popup Form for Login and then Style it</title>
      <dc:creator>Matthew Clark</dc:creator>
      <pubDate>Fri, 10 Mar 2023 22:25:09 +0000</pubDate>
      <link>https://dev.to/afromatt6288/create-a-popup-form-for-login-and-then-style-it-37jl</link>
      <guid>https://dev.to/afromatt6288/create-a-popup-form-for-login-and-then-style-it-37jl</guid>
      <description>&lt;p&gt;If you are building a web application that requires user authentication or registration, you'll need a way to display login and registration forms to your users. One popular approach is to use a popup form that appears when the user clicks a button. In this blog post, I will walk you through how to create a popup form for login and user creation using React.&lt;/p&gt;

&lt;p&gt;Before we get started, let me introduce myself. I am a beginner in coding, just like many of you. I have been learning to code for a short while and I am writing in very general terms. I want to share my learning journey with you all and hopefully inspire others who are just starting out.&lt;/p&gt;

&lt;p&gt;To create a popup form, we will use React hooks to manage the state of the form. We'll also use some CSS to style the form and make it look like a popup. Let's start with the login form.&lt;/p&gt;

&lt;p&gt;The Login Form&lt;/p&gt;

&lt;p&gt;To create the login form, we'll need to add some state to our App component. We'll use a Boolean state variable called seen to toggle the visibility of the popup form. We'll also add a function called togglePop to handle the toggle. Here's what our updated App component looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
    const [seen, setSeen] = useState(false)

    function togglePop () {
        setSeen(!seen);
    };

    return (
        &amp;lt;div&amp;gt;
            &amp;lt;button onClick={togglePop}&amp;gt;Login&amp;lt;/button&amp;gt;
            {seen ? &amp;lt;Login toggle={togglePop} /&amp;gt; : null}
        &amp;lt;/div&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, we've added a button to our component that calls the togglePop function when clicked. We've also added some logic to conditionally render the login form based on the state of the seen variable. If seen is true, we'll render the Login component, otherwise, we'll render nothing.&lt;/p&gt;

&lt;p&gt;Now, let's create the Login component. Here's what it looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Login(props) {
    const [username, setUsername] = useState('')
    const [password, setPassword] = useState('')

    function handleLogin(e) {
        e.preventDefault()
        // Code to handle login goes here
        props.toggle()
    }

    return (
        &amp;lt;div className="popup"&amp;gt;
            &amp;lt;div className="popup-inner"&amp;gt;
                &amp;lt;h2&amp;gt;Login&amp;lt;/h2&amp;gt;
                &amp;lt;form onSubmit={handleLogin}&amp;gt;
                    &amp;lt;label&amp;gt;
                        Username:
                        &amp;lt;input type="text" value={username} onChange={e =&amp;gt; setUsername(e.target.value)} /&amp;gt;
                    &amp;lt;/label&amp;gt;
                    &amp;lt;label&amp;gt;
                        Password:
                        &amp;lt;input type="password" value={password} onChange={e =&amp;gt; setPassword(e.target.value)} /&amp;gt;
                    &amp;lt;/label&amp;gt;
                    &amp;lt;button type="submit"&amp;gt;Login&amp;lt;/button&amp;gt;
                &amp;lt;/form&amp;gt;
                &amp;lt;button onClick={props.toggle}&amp;gt;Close&amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Login component has two state variables: username and password. We've also added a function called handleLogin that will handle the login when the user submits the form. When the form is submitted, we'll prevent the default behavior, call the function to handle the login, and close the popup form.&lt;/p&gt;

&lt;p&gt;To style the popup form, we'll create a new CSS file and import it into our App component. Here's the CSS code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.popup {
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.4);
}

.popup-inner {
background-color: white;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
width: 40%;
}

.popup-inner h2 {
margin-top: 0;
}

.popup-inner label {
display: block;
margin-bottom: 10px;
}

.popup-inner input {
width: 100%;
padding: 5px;
border-radius: 5px;
border: 1px solid #ccc;
margin-bottom: 10px;
}

.popup-inner button[type="submit"],
.popup-inner button[type="button"] {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin-right: 10px;
cursor: pointer;
border-radius: 5px;
}

.popup-inner button[type="submit"]:hover,
.popup-inner button[type="button"]:hover {
background-color: #45a049;
}

.popup-inner button[type="submit"] {
margin-top: 20px;
}

.popup-inner button[type="button"] {
margin-top: 20px;
background-color: #f44336;
}

.popup-inner button[type="button"]:hover {
background-color: #da190b;
}

.popup-inner button[type="submit"]:disabled {
background-color: #bfbfbf;
color: #ffffff;
cursor: not-allowed;
}

.popup-inner button[type="button"]:disabled {
background-color: #bfbfbf;
color: #ffffff;
cursor: not-allowed;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CSS code styles the popup form using the .popup and .popup-inner classes. The .popup class positions the form in the center of the screen with a semi-transparent black background. The .popup-inner class styles the form itself with a white background, a box shadow, and rounded corners.&lt;/p&gt;

&lt;p&gt;We've also added some styles for the form elements, such as the input fields, buttons, and labels. The styles give the form a clean and modern look and feel.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;In this blog post, we've shown you how to create a popup form for login and user creation using React. We've used React hooks to manage the state of the form, and we've added some CSS to style the form and make it look like a popup.&lt;/p&gt;

&lt;p&gt;If you're building a web application that requires user authentication or registration, a popup form is a great way to present the login and registration forms to your users. It's a simple and effective way to keep the forms out of the way until the user needs them, and it's easy to implement with React.&lt;/p&gt;

&lt;p&gt;I hope you found this blog post helpful. If you have any questions or feedback, feel free to leave a comment below.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learning to code is hard! But if I can do it, so can you! Here's how I am pushing through...</title>
      <dc:creator>Matthew Clark</dc:creator>
      <pubDate>Thu, 16 Feb 2023 19:25:45 +0000</pubDate>
      <link>https://dev.to/afromatt6288/learning-to-code-is-hard-but-if-i-can-do-it-so-can-you-heres-how-i-am-pushing-through-3mla</link>
      <guid>https://dev.to/afromatt6288/learning-to-code-is-hard-but-if-i-can-do-it-so-can-you-heres-how-i-am-pushing-through-3mla</guid>
      <description>&lt;p&gt;This is for the true beginners who are not sure if you can do this. This is my first time writing about coding, and I will be writing in very general terms. Largely because I have just started learning code a short while ago. I learned for about a month on my own (not my best learning style), and I have recently started attending the Flatiron School bootcamp. I am only two weeks in... and it has been a huge struggle for me. But it is a worthwhile one.  &lt;/p&gt;

&lt;p&gt;One of the things I have already learned is how much there is to learn. Whether you pick up the information swiftly, or are struggling with it, there will always still be more to learn. If you are like me, then you may have already hit some roadblocks that make you wonder if you can actually do this. I want to tell you, yes you can. &lt;/p&gt;

&lt;p&gt;Why do I know this? Because I am currently managing to do it. Let me say, I am not all that smart, and I am a bit older, and I have lingering effects of chemo which leave my brain in a perpetual fog, and I take other meds that enhance that fog further... Basically, I am not innately good at learning anymore. But, what I am, is stubborn. I'll tell you my new learning process.&lt;/p&gt;

&lt;p&gt;When I get new material, first I read it. After reading it that first time I quickly realize... that I don't get it. So, I read it again. And then again. By the third reading, I am starting to get an inkling of what they are talking about. So, I then try to use it. There are labs and code challenges available in lots of places that I use to try out what I just learned. Inevitably, it doesn't work the first time. So, I read the material again to find out why. Sometimes I look up a tutorial or blog post from one of you lovely people to help me out. Rinse and repeat until it works. Eventually, it WILL work! Then... I start on the next bit of material to learn. &lt;/p&gt;

&lt;p&gt;That might sound miserable to you. It certainly isn't easy. And it isn't particularly fast. But, let me tell you a secret. After pushing through it for awhile, that process starts to get faster and faster. It starts taking one less read-through to understand. The material starts to build on stuff you learned before, which helps that prior topic make even more sense. Until you are two weeks in, and you realize that the thing that you were struggling with last week now comes semi-naturally while you are struggling with something new. &lt;/p&gt;

&lt;p&gt;The small successes when material starts to make sense, and the moments of realization when you notice that you are using something you didn't understand before... those are worth struggling for. It won't make the learning easier, or the occasional doubt go away. But, it will prove that you CAN learn. I have some completed code challenges and a project started that show that some of it is starting to stick. You will too! &lt;/p&gt;

&lt;p&gt;The long and short of it is this, if you want to learn to code, then you can do it. Just be diligent and purposeful (ie. a stubborn cuss), and keep going... Most of all, be patient and kind with yourself. It will come. I don't know if that is helpful for anyone. But, hopefully knowing that others are struggling with it, but are still going might help you decide to do the same. That is all. &lt;/p&gt;

</description>
      <category>search</category>
      <category>inclusion</category>
      <category>blacklivesmatter</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
