Changing Dynamic DNS providers

Years ago, partly out of curiosity, I started self-hosting web sites on a server located at my house. As I was doing consulting, this allowed me to set up client visible sites for testing and demonstration.

This presented a bit of a problem as I wasn’t willing to foot the cost of a fixed IP address and a “business” account. So, I had to find a way to make my DHCP assigned IP address public. Dyndns.com to the rescue. At the time, they were about the only option available. And for a basic set up, free.

Back then, I was running on Windows Server 2003 (32 bit) and the machine was set up as a web server, a file server and our internet proxy.

This configuration served well enough for several years, but several things happened to change that. The hardware started to become unstable, Server 2003 was sunsetted and new .NET versions no longer supported it, and I started to add video and other technologies to my development portfolio.
Continue reading “Changing Dynamic DNS providers”

Coffee and laptops

About 3 weeks ago, I tried to share a cup of coffee with my laptop. It wasn’t happy.

We have a bunch of coffee mugs from a set of dishes made by Pfaltzgraff. They are probably close to 10 years old now and the handles keep breaking off. Literally, the handle detaches from the mug. The set started with 8 mugs and I’ve superglued 4 of them back on now.

So, 3 weeks ago, I sat down at my desk with a cup of coffee, opened up my laptop, lifted the mug to take a drink and about 6 inches above the desk the handle detached and the mug dropped back to the desk. I was poised with only the handle in my hand as coffee flooded the keyboard (Murphy’s law).
Continue reading “Coffee and laptops”

Refugees

One of my coworkers is a refugee from one of Trump’s shithole countries. He is college educated with a degree in business economics, speaks 5 languages fluently and was an instructor in one of them. He currently holds down a full time job and a part time job and is starting his own business. All while sending 3 daughters to college.

I can certainly see why we wouldn’t want his kind here.

Python: unexpected behavior with static initializer

I’ve been working on an IOT project using a Raspberry PI Zero W. I fully intend to document it here in a future post, so I won’t go into details about it now.

This post came about because I was troubleshooting a problem and the root cause surprised me.

I come from the world of C#/Java/Swift and part of the reason for taking on this project was learning a new language. The code for this device is written in Python.

Python has OOP structures like the aforementioned languages and I expected similar behavior. The OOP mantra, of course is, Encapsulation, Inheritance, Polymorphism.

From my reading it seems that Python doesn’t have the same idea of private/public as other languages making the first principle a bit fuzzy.

I have a class with quite a few class variables. This class is instantiated multiple times and I fully expected that the variables from each instantiation would be distinct. However, in this case, one of them was not.

I have code that looks like this:

class myClass:
    myData = [0] * 100

Later I fill the array with data.

What I discovered was that apparently all of the arrays were mapped to the same address space. I only had one copy of the data and was overwriting it in each class instance. As I was expecting each to be unique, this was not the desired behavior.

The solution was simple, I moved the initialization into the class __init:

def __init(self, vars...):
    self.myData = [0] * 100

It now works as expected, but it took quite a while to drill down to the root cause.

StackOverflow question here.

Reflections of a Domino’s Delivery Driver

Right upfront I would be remiss if I didn’t say that I do enjoy this job despite everything below.  Except for the hours, it’s an easy gig that pays quite well.

About the pay:
I get minimum wage. In my state, that’s about $10.50/hour. Well, that’s my base pay.  I also work for tips.  In the current economic environment, tips are about $3.50 per delivery.  So if I can manage 3 deliveries/hour, that’s usually an additional $12.  Making my take home around $20/hour.
Continue reading “Reflections of a Domino’s Delivery Driver”