<?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>Forem: Brandon Michael Hunter</title>
    <description>The latest articles on Forem by Brandon Michael Hunter (@thecozytechie).</description>
    <link>https://forem.com/thecozytechie</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%2F985634%2F40d86ff8-1e9a-4ae4-a635-b7e5812da629.jpeg</url>
      <title>Forem: Brandon Michael Hunter</title>
      <link>https://forem.com/thecozytechie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/thecozytechie"/>
    <language>en</language>
    <item>
      <title>What I learned today 5.8.24</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Thu, 09 May 2024 00:08:00 +0000</pubDate>
      <link>https://forem.com/thecozytechie/what-i-learned-today-5824-1ppn</link>
      <guid>https://forem.com/thecozytechie/what-i-learned-today-5824-1ppn</guid>
      <description>&lt;p&gt;Here's what I learned today from studying Python.....&lt;/p&gt;

&lt;p&gt;I didn't know defining a class property with '__' in Python its referred as private. &lt;/p&gt;

&lt;p&gt;In this example the property '.__height', if you try to set it will throw an Attribute error.&lt;/p&gt;

&lt;p&gt;`class Square:&lt;br&gt;
      def &lt;strong&gt;init&lt;/strong&gt;(self):&lt;br&gt;
          self.&lt;strong&gt;height = 2&lt;br&gt;
          self.&lt;/strong&gt;width = 2&lt;br&gt;
    def set_side(self, new_side):&lt;br&gt;
          self.&lt;strong&gt;height = new_side&lt;br&gt;
          self.&lt;/strong&gt;width = new_side&lt;/p&gt;

&lt;p&gt;square = Square()&lt;br&gt;
  square.__height = 3 # raises AttributeError `&lt;/p&gt;

&lt;p&gt;There's a caveat...... You can still set the class property by using the following code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;square = Square()&lt;br&gt;
square._Square__height = 3 # is allowed&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The solution is uses decorators for our getters and setters methods. This allows us to validate the data before setting the internal __height property value. Check out the code below. &lt;/p&gt;

&lt;p&gt;`class Square:&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self, w, h):&lt;br&gt;
        self.&lt;strong&gt;height = h&lt;br&gt;
        self.&lt;/strong&gt;width = w&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def set_side(self, new_side):
    self.__height = new_side
    self.__width = new_side

**@property**
def height(self):
    return self.__height

**@height.setter**
def height(self, new_value):
    if new_value &amp;gt;= 0:
        self.__height = new_value
    else:
        raise Exception("Value must be larger than 0")`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Decorators are functions that take your function as input. This will allow you to decorate one function and then reuse and add the decorated function on different function to extend the new function's capabilities. Pretty cool. &lt;/p&gt;

&lt;p&gt;That's it. Let me know what you think and/or correct anything I missed.&lt;/p&gt;

&lt;p&gt;Thanks for stopping by,&lt;br&gt;
Cheers&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Problem: nginx problems redirecting non-www to my index.html page</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Sat, 09 Sep 2023 17:44:19 +0000</pubDate>
      <link>https://forem.com/thecozytechie/problem-nginx-problems-redirecting-non-www-to-my-indexhtml-page-8j3</link>
      <guid>https://forem.com/thecozytechie/problem-nginx-problems-redirecting-non-www-to-my-indexhtml-page-8j3</guid>
      <description>&lt;p&gt;Hey reader,&lt;br&gt;
Today I wanted to share with you an issue I recently resolved  regarding configuring server blocks on a nginx web server. &lt;/p&gt;
&lt;h3&gt;
  
  
  Problem:
&lt;/h3&gt;

&lt;p&gt;I wanted all of my non-www application url requests browsing to my custom index.html page. So I used the following server blocks configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {

    root /var/www/domain_name.docker.hub.registry/html;
    index index.html;

    listen 80;
    listen 443 ssl;
    server_name domain_name.docker.hub.registry domain_name.docker.hub.registry.domain_nameetc.com;

    location / {
     try_files $uri $uri/ =404;
    }

    #listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/domain_name.docker.hub.registry.domain_nameetc.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/domain_name.docker.hub.registry.domain_nameetc.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    return 301 https://www.domain_name.docker.hub.registry.domain_nameetc.com$request_uri;
}

server {

    root /var/www/domain_name.docker.hub.registry/html;
    index index.html index.htm;

    # listen to the standard http port 80
    #listen 80;
    listen 443 ssl;

    server_name domain_name.docker.hub.registry www.domain_name.docker.hub.registry.domain_nameetc.com;

    location / {
        try_files $uri $uri/ =404;
    }

    ssl_certificate /etc/letsencrypt/live/www.domain_name.docker.hub.registry.domain_nameetc.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/www.domain_name.docker.hub.registry.domain_nameetc.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As a result using the specific application urls and current server block configuration, produced the following results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://domain_name.docker.hub.registry.domain_nameetc.com" rel="noopener noreferrer"&gt;https://domain_name.docker.hub.registry.domain_nameetc.com&lt;/a&gt; -&amp;gt; browsed to the index.nginx-debian.html&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.domain_name.docker.hub.registiry.domain_nameetc.com" rel="noopener noreferrer"&gt;https://www.domain_name.docker.hub.registiry.domain_nameetc.com&lt;/a&gt; -&amp;gt; browsed to the index.html page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://domain_name.docker.hub.registry.domain_nameetc.com" rel="noopener noreferrer"&gt;http://domain_name.docker.hub.registry.domain_nameetc.com&lt;/a&gt; -&amp;gt;  browsed to the index.nginx-debian.html page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.domain_name.docker.hub.registiry.domain_nameetc.com" rel="noopener noreferrer"&gt;http://www.domain_name.docker.hub.registiry.domain_nameetc.com&lt;/a&gt; -&amp;gt; browsed to the index.html page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Solution:
&lt;/h3&gt;

&lt;p&gt;My solution was to create a server block for each application url. See below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
  root /var/www/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/html;
  index index.html;

  server_name &amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com;
  listen 80;
  listen [::]:80;

  location / {
   try_files $uri $uri/ =404;
  }
}

server {
  root /var/www/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/html;
  index index.html;

  server_name www.&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;com;
  listen 80;
  listen [::]:80;

  location / {
   try_files $uri $uri/ =404;
  }

}

server {

  root /var/www/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/html;
  index index.html;

  server_name &amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com;

  listen 443 ssl;
  listen [::]:443 ssl;

  ssl_certificate /etc/letsencrypt/live/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/privkey.pem; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

  location / {
    try_files $uri $uri/ =404;
  }

}

server {

  root /var/www/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/html;
  index index.html;

  server_name www.&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com;

  listen 443 ssl;
  listen [::]:443 ssl;

  ssl_certificate /etc/letsencrypt/live/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/&amp;lt;domain&amp;gt;.docker.hub.registry.&amp;lt;domain&amp;gt;.com/privkey.pem; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

  location / {
    try_files $uri $uri/ =404;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have all application urls now browsing to the index.html page that I wanted. &lt;/p&gt;

&lt;p&gt;That's it. Since I'm new to nginx and configuring server blocks, please provide your feedback with any improvements.&lt;/p&gt;

&lt;p&gt;The original question was posted on &lt;a href="https://unix.stackexchange.com/questions/755844/nginx-problems-redirecting-non-www-to-my-index-html-page/756151#756151" rel="noopener noreferrer"&gt;stackoverflow&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Thanks for reading :)&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>linux</category>
      <category>security</category>
      <category>ssl</category>
    </item>
    <item>
      <title>Project Planning</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Sun, 18 Jun 2023 13:48:49 +0000</pubDate>
      <link>https://forem.com/thecozytechie/part-1-zidans-project-planning-k6g</link>
      <guid>https://forem.com/thecozytechie/part-1-zidans-project-planning-k6g</guid>
      <description>&lt;p&gt;Let's outline at a high level project plan for building out Zidan's. I'm using GitHub Projects to manage all my project work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmha51bq68c796jhb43dm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmha51bq68c796jhb43dm.jpg" alt="Zidan Project" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Research and Development&lt;/strong&gt;: The focus of this project is to research and test products and tools that I can use for building out Zidan and then come up with a system design to be used in the next project &lt;strong&gt;Product Development&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Product Development&lt;/strong&gt;: The focus for this project is to build out Zidan and release it to the public.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Product Branding&lt;/strong&gt;: I kind of feel that this should be combined with &lt;strong&gt;Product Development&lt;/strong&gt;, but I wanted to keep it separated because in the &lt;strong&gt;Product Development&lt;/strong&gt; project I'm going to create a task for an the initial product release and then this project will focus on the branding and marketing into multiple social media outlets. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. Let me know what you think.&lt;/p&gt;

</description>
      <category>pm</category>
      <category>github</category>
      <category>zidan</category>
    </item>
    <item>
      <title>Building a Mint clone</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Sun, 18 Jun 2023 00:56:11 +0000</pubDate>
      <link>https://forem.com/thecozytechie/building-a-mint-clone-no1</link>
      <guid>https://forem.com/thecozytechie/building-a-mint-clone-no1</guid>
      <description>&lt;p&gt;For a while I've been thinking about challenging myself to build a really big system. &lt;/p&gt;

&lt;p&gt;A system that's production ready, that scales both horizontally and vertically.&lt;/p&gt;

&lt;p&gt;A system that's built using an event-driven and distributed system architecture that leverages microservices.&lt;/p&gt;

&lt;p&gt;A system that can be consume on desktop, mobile and browser platforms. &lt;/p&gt;

&lt;p&gt;A system that uses artificial intelligence and machine learning.&lt;/p&gt;

&lt;p&gt;A system that uses DevOps principles and tools to run test automation, execute builds and deployments and provide operation monitoring perform automated testing, execute builds and deployments and provide system monitoring. &lt;/p&gt;

&lt;p&gt;A system that I perform the entire software development lifecycle process, from developing mockups, defining requirements, creating the system design down to providing a support documentation. &lt;/p&gt;

&lt;p&gt;And.....Create something that I would be proud of.....&lt;/p&gt;

&lt;p&gt;So over these next couple of months I’m going to learn all everything I listed above and build a Mint clone which I will call &lt;strong&gt;Zidan&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let me tell you why.....&lt;/p&gt;

&lt;p&gt;For years I’ve been managing my family bills, budgets and spending through excel and the #Mint app. I used #Excel to track bills and create budgets and then I used #Mint to tracking personal spending. &lt;/p&gt;

&lt;p&gt;Using #Excel and #Mint got the job done, but it came with its own headaches. With #Mint I hated having to periodically re-enter my bank credentials to view spending between my accounts and with #Excel I had a hard time with formatting, developing charts and at times the software would crash on my MacBook Pro. Eventually I had enough !!! I needed something that combines all the features that I used in both #Excel and #Mint into one single app. So I made the decision to build my own app. &lt;/p&gt;

&lt;p&gt;What is &lt;strong&gt;Zidan&lt;/strong&gt;? It means (at least one version) "growth and progress". &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zidan&lt;/strong&gt; will manage my cash flow, expenses, spending, revenue and provide insights into my finances so I can better manage my money. I'm also creating this app to expand my skill set as well :)&lt;/p&gt;

&lt;p&gt;For a while I've been looking for a project where I can leverage tools such as  ElasticSearch, Python, Docker, Kubernetes, Lindoe, Flutter, MySQL, GitHub and AI. Plus I've always wanted to challenge myself to do the planning and building of large scale system. &lt;/p&gt;

&lt;p&gt;So I'm going to commit myself to building &lt;strong&gt;Zidan&lt;/strong&gt; using the technologies I listed above in hope to learn something new and to build something I would be proud of.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwqgjcslenao8moxmbgr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwqgjcslenao8moxmbgr.jpg" alt="Zidan Main Screen" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Zidan app will be built upon these several key system components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vv4mwjlr1rxe4kd94gn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vv4mwjlr1rxe4kd94gn.jpeg" alt="High Level System Design" width="454" height="514"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;STORAGE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An application database that stores user profiles and application specific data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A secured file share to store user profile images and end user documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An monitoring database for collecting performance metrics, event data and more from each of the several system components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A message queue will be used by APIs to retrieve and save application data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redis will be used for data caching and improving application responsiveness. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API&lt;/strong&gt;&lt;br&gt;
A single API that will provide endpoints to manage data between all the system components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FRONT END&lt;/strong&gt;&lt;br&gt;
The Zidan app can will be provide a desktop, mobile and web apps.&lt;/p&gt;

&lt;p&gt;This is going to be a big project but I'm committed and I look forward to learning something new. &lt;/p&gt;

&lt;p&gt;Another part of this "journey" that I wanted to do is to blog the entire process. So I'm going to share with you all my thoughts, obstacles, battles, struggles, failures and successes that I will face. &lt;/p&gt;

&lt;p&gt;So I encourage you to follow along.&lt;/p&gt;

&lt;p&gt;And Please.....Feel free to ask any questions and\or provide your comments. All questions and comments are greatly appreciated. &lt;/p&gt;

&lt;p&gt;Let's get started. &lt;/p&gt;

</description>
      <category>api</category>
      <category>cloud</category>
      <category>webapp</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Software Engineer Tip #1 - Make sure you balance what you're reading</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Wed, 05 Apr 2023 13:45:39 +0000</pubDate>
      <link>https://forem.com/thecozytechie/software-engineer-tip-1-make-sure-you-balance-what-youre-reading-5cn0</link>
      <guid>https://forem.com/thecozytechie/software-engineer-tip-1-make-sure-you-balance-what-youre-reading-5cn0</guid>
      <description>&lt;p&gt;I've been in the IT industry for 18 years as a software engineering. I've built mostly web applications and some mobile applications. I highly recommend balancing your reading list. Make sure you have a healthy mix of technical content that you're interested and other subjects you're interested in as well. I've found reading only technical content has lead me to begin burn out and loosing interest in the things I really enjoyed reading.&lt;/p&gt;

&lt;p&gt;MAKE SURE YOU HAVE A WIDE VARIETY OF SUBJECTS INCLUED IN YOUR READING LIST. &lt;/p&gt;

&lt;p&gt;Thank you for taking time out of your day to read my post. Please feel free to share any books you like or recommend share.&lt;/p&gt;

</description>
      <category>database</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Linode + DEV Hackathon</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Tue, 21 Feb 2023 03:58:00 +0000</pubDate>
      <link>https://forem.com/thecozytechie/linode-dev-hackathon-2lg6</link>
      <guid>https://forem.com/thecozytechie/linode-dev-hackathon-2lg6</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I build a django application for baseball organizations who manages multiple teams. This website does the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Users can create and manage day to day operations for each team they support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each team is provided with a public website for end user to gather information for about team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Team Administrators can manage team players, games and practices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Team Administrators can manage access to the team portal using an approval system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;SaaS Superstars&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://143.42.134.217:8000/" rel="noopener noreferrer"&gt;http://143.42.134.217:8000/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynwrn2fzgdo67k1fwe6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynwrn2fzgdo67k1fwe6w.png" alt="One" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdc01ea095p43ic0vf5w4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdc01ea095p43ic0vf5w4.png" alt="2" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1ewyagl0ume3lsfyza1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1ewyagl0ume3lsfyza1.png" alt="3" width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xi0q8hf58sc50d8cwzh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xi0q8hf58sc50d8cwzh.png" alt="4" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fixju5dk5etjy319716b5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fixju5dk5etjy319716b5.png" alt="5" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgyl8vp0armhk980751qc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgyl8vp0armhk980751qc.png" alt="6" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vk83po125wlpfvnjhbj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vk83po125wlpfvnjhbj.png" alt="7" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;I build a django application for baseball organizations who manages multiple teams. This website does the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Users can create and manage day to day operations for each team they support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each team is provided with a public website for end user to gather information for about team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Team Administrators can manage team players, games and practices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Team Administrators can manage access to the team portal using an approval system. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/brandonmichaelhunter/DevToLindoChallenge" rel="noopener noreferrer"&gt;https://github.com/brandonmichaelhunter/DevToLindoChallenge&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;MIT&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;What made you decide to build this particular app? What inspired you?&lt;br&gt;
What inspired me to build this particular app was using  (&lt;a href="https://gc.com/" rel="noopener noreferrer"&gt;game changer&lt;/a&gt;) for my boys baseball game. I like the app, but I wanted to build something similar and free for end users.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;(How did you utilize Linode? Did you learn something new along the way? Pick up a new skill?)&lt;br&gt;
I build it using django, which I picked up fully two weeks ago and working with Linode. So the two new skills I picked up was setting up and deploying to Linode and building a django website. &lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

</description>
      <category>vibecoding</category>
    </item>
    <item>
      <title>ERROR: XXX.App: (models.E015) 'ordering' refers to the nonexistent field, related field, or lookup 'XXX'.</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Sat, 31 Dec 2022 01:46:44 +0000</pubDate>
      <link>https://forem.com/thecozytechie/error-xxxapp-modelse015-ordering-refers-to-the-nonexistent-field-related-field-or-lookup-xxx-34n3</link>
      <guid>https://forem.com/thecozytechie/error-xxxapp-modelse015-ordering-refers-to-the-nonexistent-field-related-field-or-lookup-xxx-34n3</guid>
      <description>&lt;p&gt;Hey readers,&lt;br&gt;
I wanted to share with you an issue that I ran into today and how I solved it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Problem:
&lt;/h3&gt;

&lt;p&gt;I'm working on creating a new model in my django app. All the fields were created, and I wanted my app to sort the model by   the 'name' field. Provided below is my code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db import models
from django.urls import reverse # Used to generate URLs by reversing the URL patterns
import uuid # Required for unique book instances

class Stock(models.Model):

      """Model representing a user's selected stock

      Args:
            models (_type_): _description_
      """
      id = models.UUIDField(primary_key=True, default=uuid.uuid4),
      name = models.TextField('Stock Name', max_length=1000, null=False),
      symbol = models.TextField('Ticker Symbol', max_length=100, null=False),
      tags = models.TextField('Search Tags', max_length=1000, help_text="Enter additional keywords to use in the search ('#XBox', 'IOS')"),
      active=models.BooleanField('Activate or Deactivate', default=True, help_text="Check to activate the stock or uncheck to deactivate the stock."),

      def __str__(self):
          return f'{self.name} - {self.symbol}'

      class Meta:
            ordering=['-name']

      def get_absolute_url(self):
          """Returns the URL to access a detail record for this stock."""
          return reverse('stock-detail', args=[str(self.id)])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I was done with developing the model, I saved my changes and started the migration process.&lt;/p&gt;

&lt;p&gt;In my terminal I typed in the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 manage.py makemigrations&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once I hit enter I got the following error:&lt;/p&gt;

&lt;p&gt;_SystemCheckError: System check identified some issues:&lt;/p&gt;

&lt;p&gt;ERRORS:&lt;br&gt;
StockTwitterApp.Stock: (models.E015) &lt;strong&gt;'ordering' refers to the nonexistent field, related field, or lookup 'name'&lt;/strong&gt;._&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88a0ip5wmozlpdlenvsv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88a0ip5wmozlpdlenvsv.gif" alt="What is going on here" width="220" height="220"&gt;&lt;/a&gt;&lt;br&gt;
Next I went to google to see if anyone had experience a similar issue. I went through a couple of stackoverflow results and nothing panned out.&lt;/p&gt;

&lt;p&gt;Next I decided to compare my code with the &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Models#defining_the_locallibrary_models" rel="noopener noreferrer"&gt;tutorial's example&lt;/a&gt; I was using to see if I had missed anything or added anything additional that was not needed. And then I found it.....&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xmcky5ms9f1zejmmcvv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xmcky5ms9f1zejmmcvv.gif" alt="I got it" width="498" height="331"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Solution:
&lt;/h3&gt;

&lt;p&gt;It was was the commas &lt;strong&gt;','&lt;/strong&gt; . The commas at the end of each field definition (see below):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;id = models.UUIDField(primary_key=True, default=uuid.uuid4)-&amp;gt;,&amp;lt;-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I had removed the commas from the end of each field definition, saved my changes, and then reran the makemigrations command (python3 manage.py makemigrations)....boom!!! The creation of the migration was a success.&lt;/p&gt;

&lt;h3&gt;
  
  
  What did I learn:
&lt;/h3&gt;

&lt;p&gt;Do not put commas where they do not belong :)&lt;/p&gt;

&lt;p&gt;I hope this was helpful. &lt;/p&gt;

&lt;p&gt;Please feel free to leave any feedback and\or questions you may have.&lt;/p&gt;

&lt;p&gt;Thanks for reading and have a wonderful day.&lt;/p&gt;

</description>
      <category>diversity</category>
      <category>wecoded</category>
      <category>inclusion</category>
      <category>community</category>
    </item>
    <item>
      <title>Python and Docker - an alternative to Virtual Environments</title>
      <dc:creator>Brandon Michael Hunter</dc:creator>
      <pubDate>Wed, 28 Dec 2022 00:21:07 +0000</pubDate>
      <link>https://forem.com/thecozytechie/python-and-docker-an-alternative-to-virtual-environments-2ahe</link>
      <guid>https://forem.com/thecozytechie/python-and-docker-an-alternative-to-virtual-environments-2ahe</guid>
      <description>&lt;p&gt;Hey Readers,&lt;br&gt;
I wanted to share with you an issue that I recently face and how I solved it. Also I would like to get your feedback as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;
I created a #Python app that will pull data from twitter and save it to a MongoDB. #Python 3.9 was used to create this app and I used #Anaconda Navigator as a package and environment manager. Once I completed the app, next I created an Azure Web Job to run app my on a set schedule.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Azure Web Jobs&lt;/th&gt;
&lt;th&gt;Anaconda&lt;/th&gt;
&lt;th&gt;Python&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31aa6pxbluit2xag2oag.jpg" alt="Azure Web Jobs" width="300" height="300"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7k0bukxb7lv2s4ghmk2.png" alt="Anaconda Navigator" width="200" height="200"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpjuqnju2rdu12ifqlpgh.png" alt="Python" width="360" height="180"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As I was going through the process of creating the necessary resources to create a web job, I noticed that Azure's python support goes up to 3.6.4. My next thought was "OK, I'll just downgrade my app to 3.6.4 using Anaconda Navigator and then deploy once completed."...Simple enough right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO, IT WAS NOT.&lt;/strong&gt; Next I decided to rewrite my app using virtual environments and the virtual environment setup on my machine bricked. Not sure what happened, but "venv" decided to stop working. At this point I was too tired and frustrated to uninstall and then reinstall everything, so I decided to take a break.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br&gt;
Breaks are always good, especially when writing code....&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjxwie9ie5t5f91jobkym.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjxwie9ie5t5f91jobkym.jpeg" alt="Take a break" width="612" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next day I came back and I stared at the docker icon on at the bottom of my screen. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86zfvwhcmxaibmi5rz7k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86zfvwhcmxaibmi5rz7k.png" alt="Docker Icon" width="225" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After 10 minutes of deep thought and debate, I said to myself....."Let's use a docker image to create a Python 3.6.4 environment where you can develop and test your app on."&lt;/p&gt;

&lt;p&gt;Next I created an docker image that created my environment, installed the required libraries my app needed, and deployed and executed my code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM python:3.6.4
WORKDIR /app
COPY requirements.txt requirements.txt
COPY AppConfig.py AppConfig.py
COPY Stock.py Stock.py
COPY StockTweet.py StockTweet.py
COPY StockTwitterFeeder.py StockTwitterFeeder.py 
RUN  python -m pip install --upgrade pip
RUN  pip install tweepy
RUN  pip install pymongo
RUN  pip install azure-keyvault-secrets azure-identity
CMD ["python", "/app/StockerTwitterFeeder.py"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Success!!! My code compiled and executed without any issues within a Python 3.6.4 environment. After a little code clean up, I deployed my app to my newly created Azure Web Job and now things are working as I expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
I know now Anaconda and Python virtual environment solutions are great for setting up multiple environments using different versions of Python, but sometimes in life, you just have to figure out how to push through and get things done. In my case, I decided to use Docker. Was it overkill? Maybe, but it worked for me and I'm happy with the final solution.&lt;/p&gt;

&lt;p&gt;Please feel free to provide your feedback and\or any questions you may have.&lt;/p&gt;

&lt;p&gt;Thank you for reading, and I hope you have a wonderful day.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>learning</category>
      <category>watercooler</category>
      <category>developer</category>
    </item>
  </channel>
</rss>
