Tech Debt & Claude.ai

I’ve heard a lot of discussion about the concept of tech debt… postponing things you should do like OS upgrades on servers… lately. Particularly on the Security Now podcast, which I get through most weeks.

Over the last 3 weeks or so, I have taken a deep dive into my tech debt and it’s leaving me with a more satisfied feeling and a few best practices. So, what have I tackled?

  • Hosted Website Tech Debt
    This is the biggest debt I had. I host 4 websites on 4 Digital Ocean droplets. They are very reliable, and I haven’t really had a cause to touch them. Because, if it’s not broken, why fix it? Well, it ended up broken. The content management tool I use, WordPress, had a severe bug, so I HAD to upgrade. The problem was tech debt. All 4 of my servers were on Ubuntu 18, and I needed to be on Ubuntu 24.
    • For my this site, I chose a “create a new server and migrate” strategy. I was doing OK with that process but started struggling to make sure I had the databases moved to deliver the content. I tried to use Digital Ocean’s help system and it was giving conflicting info. So I got Claude.ai involved and that was amazing. It helped me get migrated, look at security issues. I was totally happy and had added confidence.
    • For the other 3 sites, I choose to upgrade the OS in place. That means going from 18-20-22-24. Because my versions were so old, and Digital Ocean had used custom binaries, I needed extra help. Long story short, Claude.ai helped me resolve the pointers to use the main Ubuntu distribution for the OS and mySQL, and then we rolled up and up until the sites were done.
  • Under attack
    While I was updating two of the sites, I found resource use was high. That was because a remote system was probing my sites, trying to login with known passwords. Claude.ai helped me there too. While I use secure passwords, I was able to add some geofencing, limiting the access to the login page to begin with. You can’t probe what you can’t access.
  • Stuff I built
    I did two big tech projects during Covid. One was building a Flip Dot Powered Clock. This was for me to enjoy. The other was a digital “Big Ben” for my mom that I was really proud of, because I had the hands moving on the display. Unfortunately, the guy who did these projects didn’t document a damn thing for future Jim. So I had to go back in and manage some things.
    • For the Flip Dot, it was about configuration of the equipment. It’s very dependent on dip switches for addressing. If you don’t have the switch right, the device ignores the data you sent. I didn’t write anything down, and so I didn’t have the right settings after something got flipped. Now, future Jim can easily find the settings:

On the Big Ben clock, it was more of a wholistic upgrade. I needed to make more of a vision-friendly high-contrast clock with just the digits, but retain the sound scheme of the quarterly and hourly chimes. I envisioned moving the Pi’s SD card to a new pi and enclosure and just tweaking some HTML. Because the new enclosure was very finicky about it’s handshake with the HDMI connection on the pi, there was a LOT of testing and troubleshooting. Ultimately, again thanks to some coaching from Claude.ai, I made it work.

  • A nice enhancement

    So, I know basic instructions on how to use Raspberry Pi’s and I have build some fun projects. One of them involves running an APRS igate using an SDR receiver. I built it with a little terminal screen so I could watch the data, but I was never happy with how it worked.
    I used Direwolf, which comes with a start up and keep alive script, but it didn’t fit with my small screen. This was an easy lift for Claude.ai. After a little interactive discussion about what I wanted, here’s the code we came up with to run in /home/pi/.bash_profile :
if [ "$(tty)" = "/dev/tty1" ]; then
    # Wait up to 60 seconds for the APRS-IS server port to be reachable
    for i in $(seq 1 30); do
        nc -z -w2 noam.aprs2.net 14580 >/dev/null 2>&1 && break
        sleep 2
    done

    LOGFILE=/home/pi/dw-start.log

    while true; do
        echo "$(date): Starting Direwolf" >> $LOGFILE
        bash -c 'rtl_fm -f 144.39M - | direwolf -c sdr.conf -r 24000 -D 1 -'
        echo "$(date): Direwolf exited, restarting in 60 seconds" >> $LOGFILE
        sleep 60
    done
fi

It’s not going to be for everyone, but it’s PERFECT for me. I think that’s what I like about using AI for these items. It’s bespoke to my application, and, so far, had allowed me to do the things I want with less complexity.

So, tech debt bad, AI helpful.

Building a Flip Dot Clock powered by a Raspberry Pi

Flip Dot clock as part of my clock wall.

It’s a nice confluence of my fandoms, I love old technology, I love clocks and I love Raspberry Pi’s, so when I found a Luminator 7×90 Flip Dot display on eBay in early January, I bought it. This is the fairly-detailed, well illustrated story of how I brought a 90’s sign together with a low cost but powerful computer.

Continue reading “Building a Flip Dot Clock powered by a Raspberry Pi”

Raspberry Pi with Chrony

I’ve been a fan of having a Stratum 1 time server on my LAN ever since I first read GM8ARV’s page. One of my first ones can be seen in the background on my YouTube video about Leap Second tracking.

I found an article last week where Facebook has been doing analysis on time server software and has come to the recommendation that the Chrony software is better than NTP for performance. I’ve actually been using NTPSEC for a couple of years now, but I am open to change so I’m setting up a Chrony server.

Tips on a Raspberry Pi Base Working Image

I thought it might be helpful to some to document how I go about taking the latest version of Raspbian (available at https://www.raspberrypi.org/downloads/raspbian/) and customize it for myself. This makes it easier for me to start a project and make sure all the Pi’s I work on have the same basic setup.

I tend to work from headless systems, so the first thing I do to the raw image file on my SD card is add a blank file named “ssh” to enable that functionality.  Next, add a file named “wpa_supplicant.conf” to your boot directory as well.   Include your WiFi information so you don’t have to connect to Ethernet if you choose not to.

Take that disk image you have on your SD card and connect it to the Pi.  Connect however you choose (I use PuTTY) and login if needed.

Enter “sudo raspi-config” and make the following changes:

  • Change your password (seriously!)
  • Change your host name (I use a convention like PiBWIJune18) so I can find it in my DHCP list if I need to discover the IP and so I know which version I am using.
  • Expand yout file system to use the whole disk
  • set your keyboard type
  • set your time zone
  • optionally decide if you want to boot to desktop or command line
  • optionally enable VNC  (though if you are just doing command line, there is no need to do this.)

After you exit and save all that, now is a good time to reboot. 

Starting up again, I remove Wolfram Alpha.  It takes up about 700 MB and it’s not something I use regularly.  I can always add it back if I need it for a project, but I haven’t yet.  That command is “sudo apt-get purge wolfram-engine”

Another reason to remove Wolfram is that it seems to have a ton of updates and takes forever.  Once it is gone, run your system updates with “sudo apt-get update”.

I run a home NTP server and quite a few of my projects are time related, so I always add NTP.  A great tutorial to do that is at: http://raspberrypi.tomasgreno.cz/ntp-client-and-server.html

Finally, I want an easy way to move files between Pi and my desktop as needed.  So I set up SAMBA sharing.  The tutorial I use it at: http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html

When that’s done, I shut down the pi and make a backup.  That’s the file I use to start my next project with, my “Base Working Image.”

Hope this helps.  If not, at least I can find my notes next time there is a new Raspian release!