First time soldering headers

First time soldering headers

The last time I tried to solder something, it was just a few pins and it gave me so much trouble and took hours. So, when I was thinking about how how I was going to redo my BBQ thermostat with Adafruit Circuit Python and Stemma QT, I was afraid to get the FeatherS2 since it wasn’t sold in a configuration that came with headers already soldered on. The idea of soldering some 28 pins filled me with fear of screwing up the board. After it arrived, I procrastinated. Finally, today I did it. I don’t know what changed from when I tried to solder last time, but it worked reasonably well. Yes, if you look at the picture, I need to fix the USB pin and pin 38 before I try inserting into any headers, but it just took me about 15 minutes and I didn’t have any feelings of giving up or intense frustration. So, I just wanted to celebrate this milestone. Hurray for me!

New Recipes Sept 2020 – Nov 2020

lamb and onion burger
lamb and onion burger

In September I made two new recipes. One was the Lamb and Grilled Onion burger from Weber’s Big Book of Burgers. I also tried a hot and fast recipe for pulled pork from Raichlen’s Project Fire. The taste was good, but the biggest hit was the recipe he had for a mustard sauce.

beef short rib ragu
beef short rib ragu

For October the only new recipe I made was America’s Test Kitchen’s recipe for beef short rib ragu. I really enjoyed a different take on a ragu than the more French and Cuban versions I’d had in the past. It is definitely a recipe I’d like to make again.

Braised Turkey
Braised Turkey

Unsurprisingly, my new recipe for November involves turkey. I’d been wanting to try Bon Apetite’s braised turkey recipe for a couple years now. I tried it out and I have to say that anyone who says this is the best turkey ever has never had awesome smoked turkey. Luckily, I also smoked a turkey so we didn’t have to only eat this. (It was OK, just didn’t live up to the hype)

While I did cook more thank just these three meals, these last few months didn’t have too many new recipes.

Trying out zsh (again, maybe?)

It’s been a very, very long time since I tried using a different shell than the bash shell. Back some 10-15 years ago I remember hearing about fish and trying it out. I think it broke some bash paradigms so I went back to bash. I could have sworn I tried zsh in the past, but I could be wrong. I know the last shell I tried out didn’t let me use ‘*’ during a dnf update to update all the packages that start with the same prefix, say all the 1500-ish texlive packages. That annoyed me so I went back to bash. If it was on this computer it was on a previous install or previous /home directory because I couldn’t find any evidence of zsh. No profiles or other such dot files that I could find. (Not that I looked too hard).

For comparison’s sake, this is how my bash shell looks:

I’ve cut off my username on the left

I’m using Powerline with the git extensions.

The setup was incredibly comprehensive. Here are a few screenshots showing the various menus of configuration options:

first time user. No idea how complex things will eventually get
The history configs after I’ve increased the save history
Completion system configs
Even deeper into the options

Big change I made was changing directories just by typing the directory name. In the end, things looked exactly the same.

zsh with powerline. Not a huge change.

I think the real benefit of zsh is the plugin system. And/or maybe some of the themes. Although I’m not sure how well it plays with powerline. It might be an either/or thing. I need to investigate further.

As I was changing my shell, I came across the command option display, which is AWESOME.

displaying command options!

Programming Update

C#

Back when I was doing GameDev.Tv‘s Unity 2D class, I really wanted to know how to do multiplayer games (I also wanted some better support on using Xbox/PS3 remotes in games). Well, this year they released their Multiplayer class. So, naturally, I bought it up. I started working on it, resulting in two Github Repos. In the first section we were learned the basics of the Mirror add-on. I’m currently working through the second section, where we will create a basic RTS. I haven’t reached a real differentiation point from the GameDev folks. That may come later after we get past the basics.

Scratch

This summer when I was doing Scratch projects with the kids, I’d bookmarked a couple and then I went back to work on a normal schedule. So I wanted to finally get to these. Since Scarlett really loves art, I chose to do the Pattern Pen project with her. It was a great project to do, as it taught me about lists in Scratch as well as the Pen module, which, essentially, add capabilities like the Turtle programming language. The final program looked like this:

In order to get the values for the degrees and increase lists, there was an intermediate step where the program would ask the user for values. Then the programmer was supposed to take note of the ones they liked for use in the final version. Scarlett preferred the interactivity so we did save off a version of the program at that point in development so she could play with it some more in the future. I thought she’d like it because she’s art oriented, I had no idea how much she’d love it.

Here’s a video of it in action:

Python

Since the last time I wrote about my programming projects, I had mostly been focused on the C# Unity Multiplayer class and getting the footage ready for the End of the Year video game post. But it turned out that I still had a couple Python Morsels left in my free trial and then I happened to be on discord when the Python discord mentioned something called Advent of Code…

Python Morsels

This one turned out not to be too bad. Trey wanted us to “write a function that takes a nested list of numbers and adds up all the numbers”. I somewhat tried to outsmart myself trying to be Pythonic. After a while I gave up and went for recursion. I ended up with:

def sums(iterable):                    
    sum = 0       
    for number in iterable:       
        if isinstance(number, list):       
            if len(number) == 0:       
                sum = sum + 0       
            else:       
                sum = sums(number) + sum       
        else:       
            sum = number + sum       
    return sum       

def deep_add(iterable):       
    # print(f"The iterable {iterable}")       
    return sums(iterable)

Turns out I wasn’t too far off from one of Trey’s recommended solutions. The only thing he did to make it more efficient was to make it use a generator in the recursion. Bonus 1 had to take in any iterable, not just a list. Bonus 2 adds a start value. Basically an extra number to add in addition to the iterable. Bonus 3 had to work on anything “number-like”. That meant things like time deltas. My final code looked like:

from collections import Iterable
 def sums(iterable, start):
     sum = start
     for number in iterable:
         if isinstance(number, Iterable):
             if len(number) == 0:
                 sum = sum + 0
             else:
                 sum = sums(number, sum)
         else:
             sum = number + sum
     return sum
 def deep_add(iterable, start=0):
     # print(f"The iterable {iterable}")
     return sums(iterable, start)

Overall, thanks to all that I’d learned during my various Python Morsels lessons, it was an easy problem set and I only needed a small break during part 3 to get my brain to solve it for me.

Advent of Code

As I mentioned above, I heard about Advent of Code in the Python discord. It’s a series of brain teaser programming word problems with an over-arching story being told within the problems. This year, the programmer is going to take a vacation from helping Santa. Each day presents another aspect of his journey where programming helps him solve a problem and get on to the next task. As I write this, today is Day 9. So far, Day 7 has given me the most trouble. In fact, I still haven’t finished part 2 of the Day 7 task. Outside of Day 7 I’ve been having a blast. Some puzzles have been really hard while others (like Days 8 and 9) have been really easy. Day 9 was especially easy because I learned about deques in Python Morsels. Each day, accomplishing the teaser for that day fills me with a sense of joy akin to any other puzzle solving endeavor. I also love seeing how others are solving the problems, including someone who is coding each problem in Unreal Engine. Here’s an example:

I’ve got a Github repo where I’m keeping track of all of my solutions. I’ll certainly have more to say about this during the end of year wrapup blog post on programming.

CentOS Changes

On 8 Dec I saw the announcement that Red Hat (which had made CentOS an in-house distro a year or two ago) was changing CentOS from being a free clone of Red Hat Enterprise Linux, to focusing solely on CentOS Stream. (The CentOS press release; The Red Hat press release) This would make the progression of features and elements: Fedora -> CentOS Stream -> RHEL. At first, like many others, I felt hurt by this change. It will take place at the end of next year. Usually CentOS follows a support widow similar to that of RHEL, so I was expecting a decade or so for the servers I converted from CentOS 7 to CentOS 8. While I generally run Fedora on many of my computers, I prefer not to have to upgrade every 6 months for my servers. That’s a level of disruption I could do without. That said, after I read this blog post, I had a slightly more nuanced view of things. I still think it should have taken effect with CentOS 9, which I think is due in the next year or so (RH is accelerating releases of new RHELs). But it certainly makes a clearer upstream to downstream path for Red Hat.

For me, personally, I will probably just go to CentOS Stream. It’s going to depend on what the upgrade model looks like. Again, I have no problem with Fedora, I just don’t want to have to upgrade every 6 months. If CentOS Stream just becomes rolling updates, I can swing with that. Particularly if it has the same lifetime as RHEL. I think it’s mostly going to depend on EPEL packages, as I need some of those for some of the servers I run. 

It does give me pause on what to do with my wife. My fourth-most viewed Youtube video is:

In which I investigate whether my wife would do alright switching from Ubuntu to CentOS. I never made the switch because things were going OK with Kubuntu. Recently, however, her computer has been having issues making me think I might need to reinstall. I was thinking of doing CentOS 8, but now I’m not 100% sure.

Then again, there’s another possible option. Today I learned about Rocky Linux.Basically, the founder of CentOS wasn’t happy with this new CentOS direction. So he decided to start over again with Rocky Linux. Hopefully his experience running CentOS means it’s not a rocky start (pun intended). Whether I (and others) go for Rocky is going to really depend on 3 things:

  1. Is EPEL going to support it? Even though EPEL is a repo for CentOS and RHEL packages, it’s run by the Fedora Project. Fedora is *somewhat* independent from Red Hat, but I’m still not sure if they’d make packages that would work well with Rocky if they’re going to focus on making the packages work with CentOS Stream.
    1. Also, EPEL 8 hasn’t had nearly the amount of packages as EPEL 7. So, I’m unsure where that takes things going forward for either CentOS Stream or Rocky.
  2. Are Digital Ocean, Linode, and AWS going to support Rocky? For that matter, are they going to support CentOS Stream? Uncertain at this point. In Red Hat’s announcement they talk about potentially loosening up some of the restrictions on what devs can do with their free license for a RHEL machine. Yes, they offer free dev licenses for RHEL. I’m using it to run a RHEL VM to play around with. The goal is to provide a perfect RHEL for testing against before going to Production. I guess that means there were always some potential differences with CentOS? Otherwise why not just use that?
  3. How many folks are just going to jump ship to Debian/Ubuntu? Sure, if you’re doing that at the enterprise level, it’s not so easy. There may be packages you depend on that are slightly different or the locations of certain config files. At the same time, my experience in the CentOS/RHEL world has always been that there isn’t really an upgrade path. When CentOS/RHEL EOLs you’re expect to migrate. So if you’re migrating anyway, maybe you’ll go to the Debian world? Also, if you’re just a dude with a server in the cloud (AWS, Digital Ocean, Linode) then maybe it’s less important. And if you’re running Docker/Podman containers anyway, you may care even less.

Sam and Stella Birthday Portraits

Somewhat without intention, I’ve ended up alternating portraits for the twins between outdoor portraits and indoor portraits. This year was time for indoor portraits. (Although, to be fair, if it hadn’t been freezing, I might have ended up breaking the tradition) Here’s the setup I used:

It’s a variant on a setup that has been very successful for me with portraits of the kids. I went back to a white background for the first time in a few years. The last time I used it with Scarlett I had an uneven white that looked horrendous to my eye and was a real pain in the butt to try and correct in Photoshop (or was it GIMP?). I never got it quite right and ended up sticking to the black background for a while. But I wanted to do something different. So this time I grabbed my two studio strobes (I believe they’re 100W strobes that someone got me as a present some 8 or so years ago) and threw them into umbrellas to make sure the light would hit the background evenly. With these lights I had to go to somewhere around 80% power in order to get a pure white background according to the spectrograph in camera. Then I posed the twins in front of those lights, so they needed a light for themselves. I used my old Canon 580EX inside of my gigantic octagon (I think it’s somewhere around 3 feet or more in diameter). I wanted to shoot at F8 to try and get the best chance of ensuring the twins would be in focus, so I had to push the 580EX to full power. After this session, I ended up buying a bracket so that next time I can throw my 430EX in there, too.

Once I had my setup perfect, I invited Sam in for his shots. I didn’t try and direct either of the twins. I just let them do whatever came naturally. My only instructions were that every shot couldn’t be a silly one. Here’s my favorite Samuel shot – the one I’m printing for work:

Sam's portraits
Photo Time?

Here are some of the others poses he came up with:

  • Sam's portraits
  • Sam's portraits
  • Sam's portraits

Then it was Stella’s turn. Here’s my favorite Stella shot:

Stella portraits
Yes?

And a few Stella poses:

  • Stella portraits
  • Stella portraits
  • Stella portraits

Then it was time for some twin portraits. The only thing I did was put Sam’s arm on Stella’s shoulder. Everything else they did on their own. There weren’t that many good shots (you try keeping two five year olds from making every pose the “silly” pose), so here are the two that came out great. First, the one I’m printing out for work:

Sam and Stella portrait in black and white
Twin Life
Sam and Stella portrait
Hahahahaha, I have a sister.

Later on for their cake photos, I just aimed my 580EX up at the ceiling with a +1 correction.

Followup On Unity and JetBrains Rider on Fedora

As you recall from the previous blog post, I’d installed Unity and JetBrains on my Fedora 32 computer via Flatpaks. I was going to use them for the Unity Multiplayer course I was taking on Udemy. Unfortunately it was an immediate fail and in lesson one after they have me install a new inputs library and restart Unity, it would always crash upon loading the file. I’m currently installing Unity 2020.1 on my Windows computer where I don’t expect to have that issue. Assuming I don’t, then it’s a big fat nope on using Unity on Fedora via Flatpak (at least for this class). Which, to be fair, is not on their supported OS list – which is only Ubuntu and CentOS 7. (And the latter for movie-making)

Unity and JetBrains Rider on Fedora via Flathub

As I mentioned last year in my 2019 in Programming post, I created a bunch of 2D games in Unity by following along with the Gamedev.tv classes. I would watch the videos on Linux and jump over to my Windows computer for the programming, learning how to use SourceTree and Microsoft Video Studio in the process. But for some reason, going back and forth with the KVM when running Unity would sometimes freeze up the Windows computer. So when I saw someone on Fedora Planet running Unity Hub, I thought I’d see if there was a Flatpak – and there IS! Also, I’ve fallen in love with JetBrain’s Pycharm, so I thought I’d go ahead and use their game dev IDE, Rider. (There’s a Flatpak for that, too!) So, let’s see how well this works!

Unity Hub – need a license

Apparently if you go this route, you have to handle licensing first. Just clicked on manual activation. That led me to login to Unity.com with my already-extant Unity creds. After answering some questions about how much money I make with Unity, they gave me a license file that I attached to Unity hub. Then I went to the General section on the left there to tell it where to install Unity versions. Once that was done, the hub more or less looked like I remembered it on Windows.

Unity Hub without any projects
Unity Hub without any projects

I already knew, from my previous forays, that I would need to add a Unity install, so it was off to the Installs section. This is what the selection looked like:

I don’t know if this is how it is on Windows now, too, since it’s been a long time since I worked in Unity. But, having found myself with a new version of Unity every time I signed in – I’m glad they have LTS versions, now. The CentOS of Unity, if you will. I went and checked the next course I want to do, GameDev.tv’s Unity Multiplayer class (here on Udemy and here on Gamedev.tv), and they want 2020.1. So I’ll install that version. For some reason, it wouldn’t let me download that version – it complained it would take up too much space (even though I have 900ish GB free and it said it would take up 10GB). But it decided it could install the LTS version. So, in the interest of seeing if it could open and run the games I’d previously developed, I just went with the LTS version for now. It quit out and complained about a corrupted download. But I don’t know where it was downloading to, because nothing was in the folder I told it to download to. If it is downloading somewhere else first, like /tmp – maybe that would explain the issues.

Eventually I tell it not to do any runtimes and I keep trying to install a bunch of times. Like a reverse Murphy’s law – as soon as I start posting about the problem on the /r/unity3D subreddit it starts working.

Unity Hub with my Block Destroyer game open
Unity Hub with my Block Destroyer game open

Despite my inability to install Unity 2020 over two days (edit: after literally 10 tries, restarting Unity Hub and restarting my computer, I finally got Unity 2020 to install), at least it ran my code from last year’s class ok, including upgrading it to the LTS version (which came out after I last worked on it). When I hit play it also ran reasonably well – didn’t seem to be at some incredibly low FPS. (Of course, this is a 2D game without lots of resources, but that’s still encouraging). It wanted me to have VS Code running. I think I also saw that on Flathub, but I decided to see if I could somehow get it to work with Rider in Flatpak form.

I launched Rider for the first time and it started off by asking for my preferences. First off was the UI theme:

JetBrains Rider UI Theme Selection
JetBrains Rider UI Theme Selection

And what kind of hacker would I be if I didn’t go with dark? Then it was time for the color schemes:

JetBrains Rider Color Theme Selection
JetBrains Rider Color Theme Selection

If I’d used a bunch more Visual Studio, I’d go with the middle selection. I’m a big fan of the Dracula themes I’ve been using in various editors, but I don’t think that’s the same as their Darcula theme since that mentions Intellij. So I just went with Rider Dark.

JetBrains Rider Keymap Selection
JetBrains Rider Keymap Selection

I didn’t have any particular preference here, so I just went with Visual Studio since I figured that would probably match shortcuts that the GameDev.tv guys would use. I decided not to do a Desktop Entry since, a you can see at the top of the next screenshot, it already seemed to have an icon:

JetBrains Rider Desktop Entry Question
JetBrains Rider Desktop Entry Question

I don’t have the environment installed for C#.

JetBrains Rider Environments
JetBrains Rider Environments

A quick bit of Googling seems to imply that Unity is using Mono for their C#, so I will try and get that installed first. After a bit of searching, I installed the mono-complete package on Fedora.Then it was time to choose Plugins.

JetBrains Rider Plugins
JetBrains Rider Plugins

I didn’t do any featured plugins. Afterwards I chose the free 30 day evaluation (maybe there isn’t a community version like Pycharm?) and decided to open my Block Destroyer project.

JetBrains Rider with Block Destroyer code loaded
JetBrains Rider with Block Destroyer code loaded

It didn’t automatically install the Rider Unity plugin, but I blame that partially on flatpak and partially on Fedora. (Everyone assumes Linux Unity dev is on Ubuntu or Centos 7) In the end I couldn’t quite figure out how to connect the two, but I think it’ll be easy enough to just load the files after I create my project. I did test that editing it in Rider will eventually recompile it in Unity once it realizes that the file has changed on disk. So I’m going to give this a shot for that new GameDev.tv class. I’ll report back on whether it’s worth it or if you should just stick to Windows (or Ubuntu) if you’re doing Unity game development.

PyGame 2.0 is out!

I just found out today that PyGame 2.0 was released yesterday, on the 20th anniversary of the software. One of the first steps I took with Python was a series of games I made from tutorials in Linux Format Magazine. On Github I’ve got my shifter game and my Space Invaders clone. The shifter game is a little wonky since I haven’t touched the code in over a decade. But I was able to make the one shift needed to make the Space Invaders clone work on Python 3. So you can enjoy those and celebrate that PyGame development has picked up steam again.

Fedora 33 is out!

It came out this Tuesday and last night I updated my laptop. The only thing I had to do for the upgrade was remove a python3-test package. Since I’m using virtual environments, for the most part I don’t care which Python packages the system has. So that was a nice, easy upgrade! Good job Fedora packagers and testers! Speaking of Python, it’ll be nice to start upgrading my projects to Python 3.9. (Fedora 33 includes the latest programming language versions as part of its “First” values)

Probably the next upgrade will be Scarlett’s laptop since she has a school-provided Chromebook for school.