<?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: Eric Mesa</title>
    <description>The latest articles on DEV Community by Eric Mesa (@djotaku).</description>
    <link>https://dev.to/djotaku</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%2F529877%2F04c7f2b2-976a-4b39-bcf3-6beef771445b.jpeg</url>
      <title>DEV Community: Eric Mesa</title>
      <link>https://dev.to/djotaku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/djotaku"/>
    <language>en</language>
    <item>
      <title>Programming Update: March 2023</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Sun, 16 Apr 2023 20:08:17 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-march-2023-2a10</link>
      <guid>https://dev.to/djotaku/programming-update-march-2023-2a10</guid>
      <description>&lt;p&gt;In March I continued to work on my programming projects as well as a little more Advent of Code.  &lt;/p&gt;

&lt;p&gt;Things started off with me finishing up my dreamhostapi and Dreamhost_DNS_Go projects in Golang. I got the API working under all the conditions that I need and I worked on both the output of the program and the logging. It now functions quite well for me to keep my dynamic DNS URLs up to date. My next step is something I’m going to do in a few of my cron scripts – have a separate JSON log that could be interpreted so that I could either have a daily email to let me know that the scripts all ran correctly or so that I can load them into Prometheus/Grafana to see on a dashboard how all my scripts are doing.  &lt;/p&gt;

&lt;p&gt;As I was doing my Let’s Plays to raise money for Extra Life, I noticed some quality of life updates I wanted to make for the output. I added a new output to contain the latest milestone reached, stopped message-containing output from saying “None” if there wasn’t a message, and I added a space in the output when no donations have been made so that it would appear prettier if being scrolled.  &lt;/p&gt;

&lt;p&gt;Finally, for Advent of Code, I decided that I would try and do all years at once so that I could get all the stars for the easy days. This led to me attempting some of the easier days in Go and Ruby.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>adventofcode</category>
      <category>dns</category>
    </item>
    <item>
      <title>How Go Helped Save Healthcare.gov!</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Sat, 11 Mar 2023 01:56:52 +0000</pubDate>
      <link>https://dev.to/djotaku/how-go-helped-save-healthcaregov-19m8</link>
      <guid>https://dev.to/djotaku/how-go-helped-save-healthcaregov-19m8</guid>
      <description>&lt;p&gt;I recently used Mastodon to ask for recommendations for Go podcasts and one of the suggestions was &lt;a href="https://changelog.com/gotime"&gt;Go Time&lt;/a&gt;. One of the recent episodes in the feed was a rerun of an older episode about “&lt;a href="https://changelog.com/gotime/262"&gt;How Go helped saved HealthCare.Gov&lt;/a&gt;“. This was extra interesting to me since I wrote my &lt;a href="https://www.ericsbinaryworld.com/wp-content/uploads/2014/05/Eric-Mesa-SYS800-Fall-2014-Final-Paper.pdf"&gt;Master’s Special Project on Healthcare.gov&lt;/a&gt;. (I haven’t read it in nearly a decade, so I don’t know if it’s cringe-worthy at this point). The episode had on one of the programmers who helped get things back on track for the site. It was incredibly informative about the problems that led to the site not being responsive enough and how they were able to help fix it without scrapping the entire site. No matter what side of the political spectrum you’re on or if you’re even an American, the episode is fascinating for understanding how things can go wrong even when everyone has the best intentions and how to fix a large, complex code base.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;header image from go.dev/blog post &lt;a href="https://go.dev/blog/gopher"&gt;about the macot&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>go</category>
    </item>
    <item>
      <title>Programming Update: Jan 2023 and Feb 2023</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 03 Mar 2023 12:19:00 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-jan-2023-and-feb-2023-13l</link>
      <guid>https://dev.to/djotaku/programming-update-jan-2023-and-feb-2023-13l</guid>
      <description>&lt;h2&gt;
  
  
  January
&lt;/h2&gt;

&lt;p&gt;January was a relatively light programming month for me. I was focused on finishing up end of year blog posts and other tasks. Since &lt;a href="https://github.com/djotaku/lastfmeoystats"&gt;Lastfmeoystats&lt;/a&gt; is used to generate the stats I need for my &lt;a href="https://www.ericsbinaryworld.com/2023/01/02/2022-in-music-last-fm-and-spotify-listening-trends/"&gt;end of year music post&lt;/a&gt;, I worked on it a little to make some fixes.  The biggest fix was to change the chart titles not to be hardcoded. I didn’t realize it until I was reviewing my blog post, but I had hard-coded the year when I first wrote the code a couple years ago. I also changed the limits on some of the data I was collecting so that I could do more expansive trending for my overall stats.&lt;/p&gt;

&lt;h2&gt;
  
  
  February
&lt;/h2&gt;

&lt;p&gt;February unexpectedly picked up with programming. Even more surprisingly, I didn’t start off working on the project I thought I would – a refactor of my &lt;a href="https://github.com/djotaku/ELDonationTracker"&gt;Extra Life Donation Tracker&lt;/a&gt;. Instead I ended up first working on my &lt;a href="https://github.com/djotaku/Civilization_VI_Play_By_Cloud_Webhook_with_FastAPI"&gt;Civilization VI Play By Cloud webhook&lt;/a&gt; project. I realized I didn’t have an easy way to add in new users, so I added an “add user” endpoint. It wasn’t too hard, but did require taking a hard look at some of the assumptions I’d made in the software.  &lt;/p&gt;

&lt;p&gt;The BIGGEST surprise for me was resuming work on my &lt;a href="https://github.com/djotaku/dreamhost_dns_go"&gt;Go (golang) version of my Dreamhost DNS&lt;/a&gt; program and actually getting to a working solution in just a couple of hours; and so was born my first ever useful Go program. &lt;a href="https://dev.to/djotaku/programming-update-sept-2022-n4b"&gt;Back in September of last year&lt;/a&gt; I had tried to write this Go port of my program. The rationale was simple and two-pronged: First, I’d learned Go while doing Advent of Code and wanted to use a real program to exercise what I’d learned. Second, every time I upgrade the version of Python on my computer, the virtual environment would become invalidated and I wouldn’t realize my cronjob-based scripts weren’t working. So I wanted to take advantage of the fact that Go is a compiled language and wouldn’t need any virtual environments to run. I had been having issues understanding Go’s use of Structs to “unmarshall” (as they call it) JSON. (Definitely a place where Python is so DEAD SIMPLE!) For some reason it just clicked for me one weekend in February and I was able to create a working version. After posting to the /r/golang subreddit, I got some tips on how to make it more idiomatic Go and I spent the next couple weeks improving the code to take those tips into account.&lt;/p&gt;

&lt;p&gt;Finally, in Feb I worked on my &lt;a href="https://github.com/djotaku/Snap-in-Time"&gt;Snap-in-Time&lt;/a&gt; project. I started doing more frequent pushes to the remote backup and so those folders started getting too full of backups so I implemented the weekly culling on the remote server as well.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>api</category>
      <category>btrfs</category>
      <category>dreamhost</category>
    </item>
    <item>
      <title>2022 In Programming</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 17 Feb 2023 01:30:55 +0000</pubDate>
      <link>https://dev.to/djotaku/2022-in-programming-21</link>
      <guid>https://dev.to/djotaku/2022-in-programming-21</guid>
      <description>&lt;p&gt;I started off the year mostly working on Python projects. For &lt;a href="https://dev.to/djotaku/programming-update-januaryfebruary-2022-3g41"&gt;January and February&lt;/a&gt; I finally started making some great progress with understanding modern web frameworks and use of CSS frameworks rather than rolling my own. This not only helped with the Prophecy Practicum project, but would form the backbone to a lot of coding this year. I also wrote a utility to tally up my videos for my end of year video game roundup, saving me literal hours of time. As you can read from following the link above, I also worked on my long-running Extra Life Donation Tracker code.&lt;/p&gt;

&lt;p&gt;I then took a break from coding during the months of &lt;a href="https://dev.to/djotaku/programming-update-marchapril-4h1k"&gt;March and April&lt;/a&gt;. I was running lots of races at the time and training for the Brooklyn Half-Marathon as well as focusing on my other hobbies. &lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/djotaku/programming-update-may-july-2022-1fgk"&gt;May, June, and July&lt;/a&gt; I came back to programming with a vengeance. It was pretty heavy in Circuit Python work as I did some quality of life improvements to my Adafruit MagTag weather project, fixed some connection disruptions with my Adafruit FunHouse, and restarted work on my &lt;a href="https://github.com/djotaku/CircuitPythonSmokerThermoStat"&gt;Smoker Thermostat&lt;/a&gt;. I also added a web UI to my &lt;a href="https://github.com/djotaku/Civilization_VI_Play_By_Cloud_Webhook_with_FastAPI"&gt;Civ VI Webhook&lt;/a&gt; program, added a UI for logging with my &lt;a href="http://djotaku.github.io/ELDonationTracker/"&gt;Extra Life Donation Tracker&lt;/a&gt;, added remote culling in my &lt;a href="https://github.com/djotaku/Snap-in-Time"&gt;btrfs snapshot program&lt;/a&gt;, and fixed my &lt;a href="https://github.com/djotaku/dreamhost_dns"&gt;Dreamhost DNS&lt;/a&gt; program to make it more robust. &lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/djotaku/programming-update-aug-3c5j"&gt;August&lt;/a&gt; I found out that I needed to modify my &lt;a href="https://github.com/djotaku/amortization"&gt;Amortization&lt;/a&gt; program because of changes to numpy. I also made the CLI output prettier thanks to using rich. I did some work on my Extra Life Donation Tracker again and tried to work on a fork of ClanGen (which ultimately led nowhere). But my biggest changes were once again with the Civ VI Webhook. I migrated from using JSON files to using MongoDB. This led to some greater efficiencies as well as allowing me to more easily jump between servers for better uptime. I also learned how to use HTMX which allows you to get some interactivity to your sites without having to learn Javascript.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/djotaku/programming-update-sept-2022-n4b"&gt;September&lt;/a&gt; I tried to rewrite my Dreamhost DNS program in Go and failed due to the way Go does JSON parsing. In &lt;a href="https://dev.to/djotaku/programming-update-october-2022-2mmd"&gt;October&lt;/a&gt; I mostly focused on a bunch of Quality of Life improvements to the &lt;a href="https://github.com/djotaku/prophecypracticum_django"&gt;Prophecy Practicum&lt;/a&gt; project. But I did also do some work on Advent of Code. &lt;a href="https://dev.to/djotaku/programming-update-nov-2022-35i4"&gt;November&lt;/a&gt;was light on programming, but I did make a script to &lt;a href="https://github.com/djotaku/lastfm-mastodon"&gt;post my top last.fm weekly listens to Mastodon&lt;/a&gt;. Finally, &lt;a href="https://dev.to/djotaku/programming-update-december-2022-1b22"&gt;December&lt;/a&gt; was all Advent of Code.&lt;/p&gt;

&lt;p&gt;Looking back over the year, it was mostly a year of refinements to long-running projects. I’ve got a suite of tools that I use pretty consistently or are used by others and this was a great year to add some spit and polish to those projects. I also learned a lot more than I thought I ever would about how modern web design works. I’m very curious to see what I work on in 2023.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>adventofcode</category>
      <category>circuitpython</category>
      <category>extralifedonationtra</category>
    </item>
    <item>
      <title>Programming Update: December 2022</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 13 Jan 2023 00:18:29 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-december-2022-1b22</link>
      <guid>https://dev.to/djotaku/programming-update-december-2022-1b22</guid>
      <description>&lt;p&gt;December was wholly dedicated to solving the &lt;a href="https://adventofcode.com/2022/" rel="noopener noreferrer"&gt;Advent of Code 2022 problem set&lt;/a&gt;. Our job was to help the elves trek through the jungle to get magical starfruit. It was a lot of fun to do it live once again! This year I also had experience from the previous years (both live and on my own pace) that gave me the skills to solve some of the puzzles, including some puzzles that were variations on themes I’d seen before. In the end, &lt;a href="https://github.com/djotaku/adventofcode/tree/main/2022" rel="noopener noreferrer"&gt;I collected 36 stars&lt;/a&gt;, near my average for number of stars collected during AoC. Between work, family commitments, my programming and problem solving skill levels, that’s about the most I can usually do during the live period in December.&lt;/p&gt;

&lt;p&gt;This year I made less use of unit tests and more use of a debug variable to run either the real input or the test input. I only used unit tests where I needed to find corner cases.&lt;/p&gt;

&lt;p&gt;In a reversal of what I mentioned above, some of the problems I solved this year taught me how to solve some problems I’d left undone in previous years and, when I had time, I went back and worked on some of those.&lt;/p&gt;

&lt;p&gt;After 25 Dec, I wanted to get to 200 stars before the end of the year, so I did some of the early 2017 problems as well in order to get there. &lt;/p&gt;

&lt;p&gt;I’ll leave you with my solutions for Day 1 in Go, Python, and Ruby:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"""Solution to Advent of Code 2022 Day 1: Counting Calories."""

def process_elves(calorie_file: str) -&amp;gt; list:
    """Go through our input to create a list of calorie sums."""
    elf_sum = 0
    calorie_list = []
    with open(calorie_file) as input_file:
        for this_line in input_file:
            if this_line != "\n":
                elf_sum += int(this_line)
            else:
                calorie_list.append(elf_sum)
                elf_sum = 0
    # account for the final elf
    calorie_list.append(elf_sum)
    return calorie_list

def find_top_3_calorie_sum(elf_cals: list) -&amp;gt; int:
    """Take in a list of elf calories, sort, and sum the top 3."""
    elf_cals.sort(reverse=True)
    return elf_cals[0] + elf_cals[1] + elf_cals[2]

if __name__ == " __main__":
    elf_calories = process_elves("../input.txt")
    max_calorie_elf = max(elf_calories)
    print(f"The elf with the most calories is carrying {max_calorie_elf} calories.")
    top_three_cals = find_top_3_calorie_sum(elf_calories)
    print(f"The top 3 elves are carrying {top_three_cals} calories.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Go and Ruby solutions benefit from the fact that I’ve now already seen parts 1 and 2 of the problem and can code with that in mind.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Solution to Advent of Code 2022 Day 01 - Calorie Counting

package main

import (
    "bufio"
    "fmt"
    "os"
    "strconv"
)

// ParseElves returns the input file if it contains multiple lines of text
func ParseElves(fileName string) ([]int, error) {
    inputSlice := make([]int, 0)
    file, err := os.Open(fileName)
    if err != nil {
        return inputSlice, err
    }
    scanner := bufio.NewScanner(file)
    calorieSum := 0
    for scanner.Scan() {
        thisNumber, _ := strconv.Atoi(scanner.Text())
        // fmt.Printf("Number in loop: %d\n", thisNumber)
        if thisNumber != 0 {
            // fmt.Printf("not a 0!")
            calorieSum += thisNumber
            // fmt.Printf("calorieSum %d\n", calorieSum)
        } else {
            inputSlice = append(inputSlice, calorieSum)
            calorieSum = 0
        }
    }
    err = file.Close()
    if err != nil {
        return inputSlice, err
    }
    return inputSlice, nil
}

func main() {
    elfCalories, err := ParseElves("../input.txt")
    if err != nil {
        // fmt.Printf("Error%v\n", err)
    }
    // fmt.Printf("Elf Calories: %v\n", elfCalories)
    maxCalories := [3]int{0, 0, 0}
    for _, elfCalorieTotal := range elfCalories {
        if elfCalorieTotal &amp;gt; maxCalories[0] {
            temp := maxCalories[0]
            maxCalories[0] = elfCalorieTotal
            tempTwo := maxCalories[1]
            maxCalories[1] = temp
            maxCalories[2] = tempTwo
        } else if elfCalorieTotal &amp;gt; maxCalories[1] {
            temp := maxCalories[1]
            maxCalories[1] = elfCalorieTotal
            maxCalories[2] = temp
        } else if elfCalorieTotal &amp;gt; maxCalories[2] {
            maxCalories[2] = elfCalorieTotal
        }
    }
    fmt.Printf("The elf with the most calories has food worth %d calories\n", maxCalories[0])
    partTwoTotal := maxCalories[0] + maxCalories[1] + maxCalories[2]
    fmt.Printf("The elves with the top 3 most calories have food worth %d calories", partTwoTotal)

}

# Solution to 2022 Day 01 - Calorie Counting

def input_per_line(file)
  File.readlines(file, chomp:true)
end

elf_calorie_list = input_per_line("../input.txt")
calorie_per_elf = elf_calorie_list.map(&amp;amp;:to_i).slice_when {|i, j| j==0}.to_a
elf_sum = []
calorie_per_elf.each do |item|
  elf_sum.append(item.sum)
end
elf_sum.sort!.reverse!

puts "The elf with the highest amount of calories is carrying #{elf_sum[0]} calories. "

puts "The top 3 elves with the highest amount of calories are carrying #{elf_sum[0]+elf_sum[1]+elf_sum[2]} calories. "
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>programming</category>
      <category>python</category>
      <category>go</category>
    </item>
    <item>
      <title>Software I used for Programming in 2022</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 23 Dec 2022 00:12:58 +0000</pubDate>
      <link>https://dev.to/djotaku/software-i-used-for-programming-in-2022-112k</link>
      <guid>https://dev.to/djotaku/software-i-used-for-programming-in-2022-112k</guid>
      <description>&lt;h3&gt;
  
  
  Python
&lt;/h3&gt;

&lt;p&gt;This year I really worked a lot on Python web technologies so I came to appreciate all the work that the JetBrains team does to make all the little things (like running Django test server commands) incredibly easy. I essentially did all my Python development in Pycharm.  I’ve had access to the paid JetBrains suite because of the work I’ve done for my open source project: Extra Life Donation Tracker. Since development has slowed a bit on there, I may not be able to renew the subscription. If that’s the case, there’s a big chance that I’ll start saving up some money for a Pycharm Professional license. The only real exception to using Pycharm for programming was when I was editing code on a server. There I would use vim or nvim (more on that later).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nuKNk22c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.ericsbinaryworld.com/wp-content/uploads/2020/03/Pycharm-semantic-highlighting.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nuKNk22c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.ericsbinaryworld.com/wp-content/uploads/2020/03/Pycharm-semantic-highlighting.png" alt="PyCharm Semantic highlighting" width="880" height="411"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;PyCharm Semantic highlighting&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Ruby
&lt;/h3&gt;

&lt;p&gt;Just as last year, all my Ruby code was for Advent of Code. I used Rubymine. I, therefore, get a lot less out of Rubymine than I might if I were developing real projects in Ruby.&lt;/p&gt;

&lt;h3&gt;
  
  
  Go
&lt;/h3&gt;

&lt;p&gt;While a good chunk of my Go programming was for Advent of Go, I did give a shot at programming my DNS updating project in Go. Things didn’t go well since it JSON is a lot harder with Go than Python. I really love how Goland, which I used for AoC and the DNS project, knows about the standard libraries and will add imports for me if I use it within the code. If I lose access to the JetBrains toolbox, I hope I can configure VS Code, Kate, or Nvim to do something similar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Programming Language independent
&lt;/h3&gt;

&lt;p&gt;I actually didn’t use Kate much this year. Most of my Python code was part of a project large enough to involve Pycharm or small enough to do in vim or nvim. I believe I did use it a bit early in the year for Perl and Haskell in Advent of Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vxuCOu-u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/Kate-editor-2022.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vxuCOu-u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/Kate-editor-2022.png" alt="Kate editor" width="880" height="514"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Kate Editor in 2022&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’d previously been using Mu to program CircuitPython for the various Adafruit boards I own. But it was pretty barebones and not a joy to use. Then I saw John Parks (of Adafruit) using Atom on an Adafruit video. I found out that it had plugins to connect to the Adafruit boards and work just as well with CircuitPython as Mu did, but in a more modern interface. I used it to work with my MagTag and Funhouse boards and all was well. (But hold that thought!)&lt;/p&gt;

&lt;p&gt;Then in June I decided to finally give VS Code a try. Whenever Michael Kennedy (of Talk Python and Python Bytes) asks folks what editor they use, it seems to be a tie between Pycharm and VS Code. After using it for a while, I was a bit on the fence about whether I preferred it to Kate for small projects. &lt;/p&gt;

&lt;p&gt;But then in June I found out that &lt;a href="https://github.blog/2022-06-08-sunsetting-atom/"&gt;Github was sunsetting Atom&lt;/a&gt;. In retrospect, this was not surprising since Microsoft owns Github. Microsoft had developed VS Code as a follow-on (a fork?) of Atom, so why maintain two codebases? (&lt;a href="https://news.itsfoss.com/atom-being-discontinued/"&gt;Another article about the transition&lt;/a&gt;) Luckily for me, there’s a &lt;a href="https://marketplace.visualstudio.com/items?itemName=joedevivo.vscode-circuitpython"&gt;VS Code Circuit Python add-on&lt;/a&gt;. I have used it a few times. It’s not as easy to reconnect a board to the serial terminal window as it was in Atom, but overall it works very well for developing CircuitPython. I would *love* to see Adafruit throw some developers at this, but I think both they and Arduino see the future in web-based IDEs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wEkvGD42--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/VS-Code-with-Circuit-Python.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wEkvGD42--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/VS-Code-with-Circuit-Python.png" alt="VS Code with Circuit Python" width="880" height="519"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;VS Code with Circuit Python&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I got into JetBrains’ Fleet beta preview. Fleet is their answer to VS Code and the interface looks more like VS Code than a typical JetBrains IDE. I made a video where I took a look at Fleet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;JetBrains Fleet&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Even though this blog post is more about what I used, than about news, here’s some more interesting stuff in the Atom/VS Code realm:&lt;/p&gt;

&lt;p&gt;If VS Code is not your thing, some of the folks who were mad that Atom was discontinued decided to work on a new IDE called &lt;a href="https://zed.dev/"&gt;Zed&lt;/a&gt;. Up until recently, you couldn’t use it. It’s currently on a wait-listed beta. It looks like the devs are going to go with an open core model which is not my favorite. But I guess that’s probably not so different than Pycharm Community and Pycharm Professional. &lt;/p&gt;

&lt;p&gt;Also, VS Code is apparently developed somewhat like Google’s Chrome. It’s mostly open source and then there’s some proprietary Microsoft stuff added on top. So, if you want the VS Code equivalent of Chromium, check out: &lt;a href="https://vscodium.com/"&gt;https://vscodium.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last year I mentioned an issue I was having when launching vim, especially when I had a Python virtual environment enabled. Turns out that was due to using powerline (or at least because I had it installed at the system level?). I switched to using vim-airline and that fixed the issue. It also made neovim stop complaining every time I launched it. This allowed me to start using neovim in favor of vim. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e_zX44uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/neovim-2022.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e_zX44uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/12/neovim-2022.png" alt="Neovim 2022" width="880" height="462"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Neovim 2022&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My next steps are to setup LSP (language server protocol) (maybe with &lt;a href="https://github.com/autozimu/LanguageClient-neovim"&gt;https://github.com/autozimu/LanguageClient-neovim&lt;/a&gt; or maybe it’s built in with the last nvim releases?), and  &lt;a href="https://github.com/nvim-lualine/lualine.nvim"&gt;https://github.com/nvim-lualine/lualine.nvim&lt;/a&gt;. And once I get that configured, I want to use Ansible to propagate it out to all my computers, servers, and laptops.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git
&lt;/h3&gt;

&lt;p&gt;When it comes to git-related utilities and sites, there was only one new thing I started using – pre-commit. I set it up for some of my repos to check things like Python import sorting, yaml file syntax, and so on. It helps to minimize the diffs in commits to only what has truly changed.&lt;/p&gt;

&lt;p&gt;I admit that I mostly forgot about the existence of gh this year. I only remembered it when I ran an update and saw that it was one of the packages updated. When interacting with Github, I mostly used the site. &lt;/p&gt;

&lt;p&gt;I continued to use Github Actions to automate aspects of repository maintenance, including generating release notes for some of my repos. &lt;/p&gt;

&lt;p&gt;I continued to use a local instance of Gitea to maintain my private git repos.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mentioned in prior years, but not used this year
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;MS Visual Studio for C#/Unity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This year I didn’t do any video game development, so I had no need for MS Studio or Unity. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Drone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since I mostly use Github Actions and I didn’t work on the package that I do use Drone for, I didn’t really make any use of it this year.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mu&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;As I mentioned above, I switched over first to Atom and then to VS Code for my Circuit Python coding needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitQlient&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m not even sure if this project is still in development, but until I stop using JetBrains software, I won’t really have a need for it anymore. I may take it off the list next year.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitKraken&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since I use GitKraken when I’m programming Unity on Windows and I didn’t do any video game programming, GitKraken didn’t really get any use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arduino&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I generally prefer to program in CircuitPython so I didn’t really use the Arduino IDE this year. I’m excited that the new UI is finally out of Beta, but I don’t know when I’ll next use it.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>arduino</category>
      <category>atom</category>
    </item>
    <item>
      <title>Programming Update: Nov 2022</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Thu, 01 Dec 2022 00:21:34 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-nov-2022-35i4</link>
      <guid>https://dev.to/djotaku/programming-update-nov-2022-35i4</guid>
      <description>&lt;p&gt;November was not a huge programming month for me. On the weekends I was a little more focused with family stuff and videogames. But I did manage work on a couple projects.&lt;/p&gt;

&lt;p&gt;Ever since 2010,&lt;a href="https://www.ericsbinaryworld.com/2010/12/20/automatically-posting-your-top-3-artists-from-last-fm-onto-twitter-with-python/"&gt;I’ve been been using Python to automatically post my top 3 artists to Twitter&lt;/a&gt;. In 2020, &lt;a href="https://www.ericsbinaryworld.com/2020/02/23/my-first-pypi-package/"&gt;it even became my first package on Pypi&lt;/a&gt;. With activity picking up on Mastodon, I &lt;a href="https://github.com/djotaku/lastfm-mastodon"&gt;ported the code over to that site&lt;/a&gt;. I also used the opportunity to clean up the code bit to my more modern coding standards. I haven’t created a package yet, but may soon enough.&lt;br&gt;&lt;br&gt;
I also did some work on my &lt;a href="https://github.com/djotaku/ELDonationTracker"&gt;Extra Life Donation Tracker&lt;/a&gt;. I’d pulled out the API so that others could build on it, but, as a result, I was creating a Team object from the API rather than the inheritance version. I did a workaround to make it work, but I’m going to have to work at the code a bit more to make it less clunky.&lt;/p&gt;

&lt;p&gt;Next month – Advent of Code!!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>extralifedonationtra</category>
      <category>lastfm</category>
    </item>
    <item>
      <title>Review: Data Visualization with Python and JavaScript: Scrape, Clean, Explore &amp; Transform Your Data</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 11 Nov 2022 00:19:00 +0000</pubDate>
      <link>https://dev.to/djotaku/review-data-visualization-with-python-and-javascript-scrape-clean-explore-transform-your-data-epc</link>
      <guid>https://dev.to/djotaku/review-data-visualization-with-python-and-javascript-scrape-clean-explore-transform-your-data-epc</guid>
      <description>&lt;p&gt;&lt;a href="https://www.goodreads.com/book/show/26544391-data-visualization-with-python-and-javascript"&gt;Data Visualization with Python and JavaScript: Scrape, Clean, Explore &amp;amp; Transform Your Data&lt;/a&gt; by &lt;a href="https://www.goodreads.com/author/show/14348047.Kyran_Dale"&gt;Kyran Dale&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;My rating: &lt;a href="https://www.goodreads.com/review/show/4072335589"&gt;4 of 5 stars&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;While a book about web technologies is undoubtablely going to get out of date (especially when Javascript is involved), I would definitely recommend this book if you want to do some data visualization either as part of your job or for an undergrad, grad, or PhD project. While I would probably use FastAPI rather than Flask, I heard recently that the Javascript library the author uses, D3, is still one of the best in class libraries for this kind of work.  &lt;/p&gt;

&lt;p&gt;The author guides you through the process by building a website to visualize Nobel Prize winners. The early steps where the author teaches you how to obtain and how to clean data are very important and, to some extent, will never go out of style. The same can be said of the author’s section explaining how to select the best visualizations.  &lt;/p&gt;

&lt;p&gt;It’s very well written and I highly recommend.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.goodreads.com/review/list/4737124-eric-mesa"&gt;View all my reviews&lt;/a&gt;&lt;/p&gt;

</description>
      <category>books</category>
      <category>programming</category>
      <category>python</category>
      <category>flask</category>
    </item>
    <item>
      <title>Review: Flask Web Development: Developing Web Applications with Python</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Thu, 10 Nov 2022 00:18:00 +0000</pubDate>
      <link>https://dev.to/djotaku/review-flask-web-development-developing-web-applications-with-python-ipg</link>
      <guid>https://dev.to/djotaku/review-flask-web-development-developing-web-applications-with-python-ipg</guid>
      <description>&lt;p&gt;&lt;a href="https://www.goodreads.com/book/show/18774655-flask-web-development"&gt;Flask Web Development: Developing Web Applications with Python&lt;/a&gt; by &lt;a href="https://www.goodreads.com/author/show/95290.Miguel_Grinberg"&gt;Miguel Grinberg&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;My rating: &lt;a href="https://www.goodreads.com/review/show/5022611525"&gt;5 of 5 stars&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;I read the second edition of the book&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;I’ve read lots of books covering web frameworks or GUI programming (both involve UI design and a different workflow where you’re often waiting for user input), but this one is one of the best I’ve ever read. While it’s traditional for a book to culminate in a blog or social media app (and this one does it too) there’s something about the way Grinberg writes that makes it so much more approachable. Also, something only more modern books can do, he has a github repo with all the code with commits that match different sections of the book.  &lt;/p&gt;

&lt;p&gt;I feel incredibly confident that I’ll be able to write and debug flask applications after having read this book. Highly recommend if you’re a web programmer who is doing to work with the flask web framework.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.goodreads.com/review/list/4737124-eric-mesa"&gt;View all my reviews&lt;/a&gt;&lt;/p&gt;

</description>
      <category>books</category>
      <category>programming</category>
      <category>python</category>
      <category>flask</category>
    </item>
    <item>
      <title>Programming Update: October 2022</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Fri, 04 Nov 2022 01:29:20 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-october-2022-2mmd</link>
      <guid>https://dev.to/djotaku/programming-update-october-2022-2mmd</guid>
      <description>&lt;p&gt;As October came around, it was time to get ready for Hacktoberfest. I’ve been participating for the past few years and I love the fact that DigitalOcean supports this project which gets more people to contribute to free and open source software. &lt;/p&gt;

&lt;p&gt;In the past, I’ve often contributed to my &lt;a href="https://github.com/djotaku/ELDonationTracker"&gt;Extra Life Donation Tracker&lt;/a&gt;. Since the program is pretty mature at this point, most of the issues I have would have taken me too long, especially with how busy I’ve been with non-programming projects lately. So I dedicated my efforts to helping with some quality of life issues for the &lt;a href="https://github.com/djotaku/prophecypracticum_django"&gt;Prophecy Practicum (Django Version)&lt;/a&gt; that I’ve coded up for my friend. &lt;/p&gt;

&lt;p&gt;As a refresher, this is a project I made for a friend to automate a bunch of tasks for his spiritual practice. &lt;a href="https://encounterschool.org/esmo-prophetic-practicum-megan/"&gt;These folks seem to be doing the same thing&lt;/a&gt;, based on how he described it to me when we were figuring out how the Django project would work. Part of the way he runs it (and maybe this is key to the practice in general) is that each pair is randomized weekly. I created two random lists and used zip to create pairs, but unfortunately, in some cases (especially with an odd pair) the way I’d programmed it led to the person being paired with themselves. So that was my first important fix during this month.&lt;/p&gt;

&lt;p&gt;Next was figuring out how to add in rich text support (bold, italics, underline, etc). I ended up using the ckeditor, as that seemed to require the least involved changes to the code. Then was a request to bring back the ability to save a draft to work on later.&lt;/p&gt;

&lt;p&gt;Finally came something that I’d learned about while reading &lt;em&gt;Flask Web Development&lt;/em&gt; – flash messages. Known in Django as the Message Framework, those are those messages that show up when you’ve succeeded at creating a post on a social media website, for example. It’s the web version of OS messages (OSX’s Growl, for example). Next up for that feature is figuring out how to make the “X” buttom make it disappear. &lt;/p&gt;

&lt;p&gt;I found time during an evening, while watching a comedy special with Danielle, to do the Advent of Code 2016 &lt;a href="https://github.com/djotaku/adventofcode/tree/main/2016/Day_14"&gt;Day 14&lt;/a&gt; in Python. I’ve gotten pretty good at hash-based problems and this one wasn’t too bad once I sorted out the regular expressions. It was fast enough in Python (even with a naive implementation for part 2. When I get back to this for the other languages I’m using for 2016 I’ll take another look and see if there’s anything I can optimize with the algorithm. However, overnight I began to wonder if it was more optimized in Python to use a regex or the &lt;a href="https://github.com/djotaku/adventofcode/blob/d297f1edf5b058f6638a863f04082dedd8ea0c73/2016/Day_14/Python/solution_x_in_y.py"&gt;built-in x in y syntax&lt;/a&gt;. So I used cProfile to check and found that it was seven times faster than the regex! For part 1 it was 7 seconds vs 1 second.&lt;/p&gt;

&lt;p&gt;As often happens, this got the Advent of Code bug to bite me again and I did a few more days before the end of October. &lt;a href="https://github.com/djotaku/adventofcode/tree/d297f1edf5b058f6638a863f04082dedd8ea0c73/2016/Day_15"&gt;Day 15&lt;/a&gt; had us simulating a carnival game – a kind of rotating pachinko. I spent at least an hour trying to figure out how to do it mathematically, but eventually gave up and just simulated the game. I tried putting a capsule in each second until I reached a time where the capsule went all the way through. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/djotaku/adventofcode/tree/d297f1edf5b058f6638a863f04082dedd8ea0c73/2016/Day_16"&gt;Day 16&lt;/a&gt; involved creating a checksum for data. I remembered having to figure out how to work with bits in a prior Advent of Code, but for this problem it was easier to just treat it as text and implement a text version of an XOR.&lt;/p&gt;

&lt;p&gt;I skipped Day 17 as it was another puzzle where I had to move around the room and I am still not sure how to work on those. &lt;a href="https://github.com/djotaku/adventofcode/tree/d297f1edf5b058f6638a863f04082dedd8ea0c73/2016/Day_18"&gt;Day 18&lt;/a&gt; was a very simple algorithm that kind of reminded me of a simplified Conway’s Game of Life where you’re only considering one row for your next evolution step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/djotaku/adventofcode/tree/d297f1edf5b058f6638a863f04082dedd8ea0c73/2016/Day_19"&gt;Day 19&lt;/a&gt; took me a few tries to get the setup and algorithm working for part 1. But part 2 introduces a circle that’s constantly changing shape and, while I got a hint on Reddit for how to think about the circle, I wanted to keep moving rather than getting stuck trying to figure out part 2.&lt;/p&gt;

&lt;p&gt;Just a couple nights before the end of October I started on Day 20. However, I implemented an overly inefficient algorithm that crashes Python when I run it. I’ll need to revisit the code to figure out where I went wrong.&lt;/p&gt;

&lt;p&gt;I also finished a few programming books this month. As I mentioned before, I finished &lt;em&gt;Flask Web Development, 2nd Edition&lt;/em&gt;. I like reading various books about Python web technologies because each one seems to inform my knowledge of the other and strengthen my ability to code. I’ve blogged before about how there’s been a back-and-forth for me between Django, FastAPI, and Flask. That was one of the best well-written programming books I’ve ever read. It flowed very well and I intend to use it for a future flask project. I also finished &lt;em&gt;Data Visualizaiton with Python and Javascript.&lt;/em&gt; I want to use what I learned there to create a dynamic website for viewing some of my end of year stats – such as with the music I listen to. We’ll see, but it might come some time in 2023. &lt;/p&gt;

&lt;p&gt;Finally, of all the programming articles I read in October, the one that stuck in my head was about the &lt;a href="https://www.zdnet.com/article/rust-programming-language-outlines-plan-for-updates-to-style-guide/"&gt;Rust developers updating the style guide&lt;/a&gt;. I am a frontline supervisor for programmers now, but I used to be a programmer before. Style guides never gelled with me until I really started to get into Python and trying to make sure my code was all &lt;a href="https://peps.python.org/pep-0008/"&gt;PEP-8 compliant&lt;/a&gt;. Now that I see the value of a style guide (especially one that can be applied via a pre-commit hook, it was interesting to read about how the Rust developers were evolving their guide to go along with the evolution of their language.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>adventofcode</category>
      <category>django</category>
    </item>
    <item>
      <title>Programming Update: Sept 2022</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Sun, 02 Oct 2022 21:08:51 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-sept-2022-n4b</link>
      <guid>https://dev.to/djotaku/programming-update-sept-2022-n4b</guid>
      <description>&lt;p&gt;This month I wanted to practice Go outside of Advent of Code puzzles. So I decided I would port over my &lt;a href="https://github.com/djotaku/dreamhost_dns"&gt;Dreamhost DNS updating script from Python&lt;/a&gt; to Go. This would have the advantage of being a compiled program. Every time I update Python on my system, the virtual environment points to the wrong Python version and my program breaks. But, boy is parsing JSON in Go (at least with the built-in JSON tools) a real pain in the butt. I have to make a struct to hold and parse the data, but it comes back from Dreamhost as a 1-key dictionary holding an array of dictionaries. After a few hours of trying to figure out how to get Go to parse the JSON I was still unable to get the struct right. I may do a little debugging to see if I can figure it out before searching for any simpler JSON libraries.&lt;/p&gt;

&lt;p&gt;That’s all the programming I did in September since I was a bit busy with some other hobbies and family stuff. But with Hacktoberfest in full swing in October, I fully expect to do a decent amount of programming in that month.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>go</category>
    </item>
    <item>
      <title>Programming Update: Aug</title>
      <dc:creator>Eric Mesa</dc:creator>
      <pubDate>Wed, 31 Aug 2022 23:42:58 +0000</pubDate>
      <link>https://dev.to/djotaku/programming-update-aug-3c5j</link>
      <guid>https://dev.to/djotaku/programming-update-aug-3c5j</guid>
      <description>&lt;p&gt;August was a programming-filled month for me. It focused entirely on Python and I mostly continued working on established projects. Let’s jump in!&lt;/p&gt;

&lt;h3&gt;
  
  
  Amortization
&lt;/h3&gt;

&lt;p&gt;I wanted to re-calculate the amortization table for my home loan for the first time in about a year. As a refresher, I created this program (vs using Excel or an online form) because we are not consistent in the amount of extra principal payments we make. For example, if I get a bonus at work, I might throw all of that bonus into the loan payment. So this program takes variable extra payments into account when creating the amortization table. &lt;/p&gt;

&lt;p&gt;Since I hadn’t worked on it in a year, I had a new Python version and needed to recreate my virtual environment. This led me to learn that numpy had removed their financial methods from their module. I use the numpy financial methods to calculate a straight-ahead amortization table in order to calculate the interest saved by paying extra. So I had to change my imports to fix that.&lt;/p&gt;

&lt;p&gt;I also finally used the rich module to create a new, pretty table for the CLI output. It really is MUCH nicer than my previous attempt at using the “\t” escape to make a table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YXzXTgxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/08/amortization-CLI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YXzXTgxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.ericsbinaryworld.com/wp-content/uploads/2022/08/amortization-CLI.png" alt="" width="822" height="1226"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Part of the CLI amortization table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Finally, I made a few minor refactors suggested by the Sourcery plugin.&lt;/p&gt;
&lt;h3&gt;
  
  
  Advent of Code 2016 Day 12
&lt;/h3&gt;

&lt;p&gt;I skipped ahead to the &lt;a href="https://adventofcode.com/2016/day/12"&gt;Aoc Day 12&lt;/a&gt; problem and solved it with &lt;a href="https://github.com/djotaku/adventofcode/blob/main/2016/Day_12/Python/solution.py"&gt;Python&lt;/a&gt;. I usually do very well with these assembly language emulator problems. This one was slightly more difficult than usual. At first I tried to use functions (better for testing) but the way it was setup made it easier to just do it all in main. I did get some practice with Python 3.10’s new match-case statement, making it much nicer to read than an if/else chain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"""Solution to Advent of Code 2016 Day 12: Leonardo's Monorail."""

def input_per_line(file: str):
    """This is for when each line is an input to the puzzle. The newline character is stripped."""
    with open(file, 'r') as input_file:
        return [line.rstrip() for line in input_file.readlines()]

if __name__ == " __main__":
    our_input = input_per_line('../input.txt')
    a, b, c, d, = (0, 0, 0, 0)
    counter = 0
    while counter &amp;lt; len(our_input):
        # print(f"{counter=}")
        # print(f"{a=}, {b=}, {c=}, {d=}, ")
        components = our_input[counter].split()
        # print(components)
        instruction = components[0]
        x = components[1]
        y = 0
        if len(components) == 3:
            y = components[2]
        match instruction:
            case "cpy":
                match x:
                    case "a":
                        left_side = a
                    case "b":
                        left_side = b
                    case "c":
                        left_side = c
                    case "d":
                        left_side = d
                    case _:
                        left_side = int(x)
                match y:
                    case "a":
                        a = left_side
                    case "b":
                        b = left_side
                    case "c":
                        c = left_side
                    case "d":
                        d = left_side
                counter += 1
            case "inc":
                match x:
                    case "a":
                        a += 1
                    case "b":
                        b += 1
                    case "c":
                        c += 1
                    case "d":
                        d += 1
                counter += 1
            case "dec":
                match x:
                    case "a":
                        a -= 1
                    case "b":
                        b -= 1
                    case "c":
                        c -= 1
                    case "d":
                        d -= 1
                counter += 1
            case "jnz":
                match x:
                    case "a":
                        number = a
                    case "b":
                        number = b
                    case "c":
                        number = c
                    case "d":
                        number = d
                    case _:
                        number = int(x)
                if number != 0:
                    counter += int(y)
                else:
                    counter += 1
    print("Part 1:")
    print(f"{a=}, {b=}, {c=}, {d=}")
    a, b, c, d, = (0, 0, 1, 0)
    counter = 0
    while counter &amp;lt; len(our_input):
        # print(f"{counter=}")
        # print(f"{a=}, {b=}, {c=}, {d=}, ")
        components = our_input[counter].split()
        # print(components)
        instruction = components[0]
        x = components[1]
        y = 0
        if len(components) == 3:
            y = components[2]
        match instruction:
            case "cpy":
                match x:
                    case "a":
                        left_side = a
                    case "b":
                        left_side = b
                    case "c":
                        left_side = c
                    case "d":
                        left_side = d
                    case _:
                        left_side = int(x)
                match y:
                    case "a":
                        a = left_side
                    case "b":
                        b = left_side
                    case "c":
                        c = left_side
                    case "d":
                        d = left_side
                counter += 1
            case "inc":
                match x:
                    case "a":
                        a += 1
                    case "b":
                        b += 1
                    case "c":
                        c += 1
                    case "d":
                        d += 1
                counter += 1
            case "dec":
                match x:
                    case "a":
                        a -= 1
                    case "b":
                        b -= 1
                    case "c":
                        c -= 1
                    case "d":
                        d -= 1
                counter += 1
            case "jnz":
                match x:
                    case "a":
                        number = a
                    case "b":
                        number = b
                    case "c":
                        number = c
                    case "d":
                        number = d
                    case _:
                        number = int(x)
                if number != 0:
                    counter += int(y)
                else:
                    counter += 1
    print("Part 2:")
    print(f"{a=}, {b=}, {c=}, {d=}")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ELDonationTracker
&lt;/h3&gt;

&lt;p&gt;A while back I broke out the &lt;a href="https://github.com/djotaku/DonorDrivePython"&gt;Donor Drive API code&lt;/a&gt; in case someone wanted to access the &lt;a href="https://github.com/DonorDrive/PublicAPI"&gt;Donor Drive API&lt;/a&gt; without the burden of my Extra Life code or GUI. I ran into a dependency hell issue between the two projects and it took me a few weekends to get thing working correctly. Now I can finally continue innovating on the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  ClanGen
&lt;/h3&gt;

&lt;p&gt;My oldest child got obsessed with the &lt;a href="https://en.wikipedia.org/wiki/Warriors_(novel_series)"&gt;Warriors series&lt;/a&gt; after her teacher introduced her to it near the end of the last school year. From what she’s described, it’s basically Game of Thrones, but cats and written for a Middle Grade reading level. On YouTube she found out about the &lt;a href="https://github.com/djotaku/clangen"&gt;ClanGen&lt;/a&gt; program which is basically a simulator that takes place in the Warriors universe. I wanted to make some improvements to the way the data is stored – moving it from CSV to JSON-based. The project is fast-moving which makes it hard to get that PR request in, but I’m trying to get these updates in.&lt;/p&gt;

&lt;h3&gt;
  
  
  FastAPI and MongoDB Class
&lt;/h3&gt;

&lt;p&gt;I took an awesome class (and &lt;a href="https://dev.to/djotaku/course-review-modern-apis-with-fastapi-mongodb-and-python-1mo1-temp-slug-510548"&gt;wrote up a review&lt;/a&gt;) where I learned a lot about how to work with MongoDB and the beanie ODM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Civ VI Play by Cloud Webhook
&lt;/h3&gt;

&lt;p&gt;The greatest amount of work and the most passion I had for coding was with this project. First, I wrote code to sort the table on the index page so that it would go from oldest to newest games, making it easy to see which games were the most delinquent. Then I decided it would be fun to also calculate the average turn length and display this on the index page. I suspect it will be fun to see the contrast there when Kaira goes back to school and Dan and Dave potentially play dozens of turns per game per day as they were doing last year. As I continued to think about interesting things I could do with the user-facing aspect of the page, I decided to make it so that a winner could be set. &lt;/p&gt;

&lt;p&gt;As part of the user-facing pages and trying to make them more AJAX-y, I learned a lot about HTMX. I like it a lot as a way to do interactive pages without needing to learn Javascript or a JS Framework. It allows me to just focus on Python for all the logic and a little Jinja2 and HTMX for interactivity. &lt;/p&gt;

&lt;p&gt;I also decided, as I was thinking about my endpoints more critically, that I would change the Matrix blame command to only consider active games, so I made the changes to implement that. &lt;/p&gt;

&lt;p&gt;Finally, as a consequence of the class I took this month, I moved the data storage from a few JSON files on disk to MongoDB via the free Atlas Cloud MongoDB tier. I had a lot to learn about how MongoDB works in relation (no database pun intended) to what I was doing before. In a lot of ways it has simplified my endpoint code. And, via the database services I’ve written, has helped make a lot of the organization of data more explicit. I’m having some slight growing pains around the fact that changing fields is a little more problematic than when it’s just JSON following whatever random structure I want to use, but I think it will lead to a more responsive site, particularly if the number of games grows. As a result of using beanie for MongoDB, I also started using async all over my code. I’m not sure if I’m being inefficient with it, but it’s making the Matrix code make a bit more sense. Also, the library I’m planning on using for Discord is async, so it’s good to get used to it now.&lt;/p&gt;

</description>
      <category>python</category>
      <category>adventofcode</category>
      <category>amortization</category>
      <category>civilizationvi</category>
    </item>
  </channel>
</rss>
