Thread Painting – Butterfly Tshirt

I’ve seen various iterations of needle painting (thread painting, needle shading) and am finally trying it. While the technique isn’t difficult, it is seriously time consuming. Fortunately, Anya loves the butterfly thus far. I’ll probably make another shirt or two using this technique … but start with a size 6 or 7 shirt so she gets years of wearing it (and most of the embroidered shirts will either become a t-shirt quilt or appliqué patches on a larger shirt)

Trump, Amazon, and USPS

May have figured out how Trump managed to lose so much money — he doesn’t know the difference between losing money, making money, and breaking even. The post office does not lose money on delivering packages. I don’t know this because I’ve got insider information on their contract with Amazon, but I do have access to the text of American legislation. The Postal Accountability and Enhancement Act disallows the Post Office from selling package delivery under its cost. Now you can debate the cost calculation – the real issue being disputed by FedEx and UPS is that the Post Office doesn’t have to include all of their delivery costs in package delivery “cost”. Why? Because they’d have carriers driving trucks all over the country even if there were on package delivery service. Of course this gives the Post Office a huge advantage in their package pricing model. And, yeah, that sucks for FedEx and UPS. But it’s sucked for FedEx and UPS for a LONG time.

The Post Office may just be breaking even on it’s Amazon contract – but as the package delivery “cost” does include some operational expenses … well, Amazon is saving American tax payers money because package delivery does include 5.5% of the fixed operating costs (I assume to cover additional cost created by package delivery service). Sure FedEx and UPS have to include 100% of their fixed operating costs in their pricing model, and if Trump wanted to talk about how providing package delivery services is unfair to private industry … that’s a discussion. But I doubt any commercial venture is going to delivery mail every day across the entire country so it’s up to the government. And providing package delivery and shipping services in urban areas (where it would be profitable for a private corporation to operate) subsidize delivery out to the cabin I stayed at in South Dakota. If the Post Office could be charging more for its services … that’s a discussion. Except do you want to pay more to ship packages and mail!?! And if we want to delve into the financial nuances of the Post Office, let’s look at their pension pre-funding requirements.

How does a guy who claims to be all about business deals think it’s bad for a corporation to use the service that provides them a cost advantage?!? Unless Trump thinks he can start tariffing the bloody post office (or, more accurately, have the legislature change the suppositions they are permitted in their pricing model) … Amazon would be outright silly to voluntarily pay more to another carrier.

And how does a guy who claims to be all about negotiating wins for American citizens think it’s a bad deal that the Post Office is making money off of Amazon instead of FedEx or UPS doing so? Say they *do* change the postal pricing model to make it “fair” to UPS/Fedex (or just outlaw package service from USPS). Our tax money is still paying for postal carriers to drive all over the country to delivery mail, Amazon Prime memberships cost more, but hey UPS is making bank. And … that’s what really matters?!?

What they’re really upset about is that the post office used to be a crap shot of getting something to “Point B” even without getting into SLA’s. You paid extra to FedEx or UPS to make sure it actually *got there*. Now the three services are equally reliable … which means government managed to provide a service as good as private industry.

Creating An OpenHAB 2.3.0 Snapshot Docker Container

We found quick instructions for creating a Docker container for the OpenHAB 2.3.0 snapshot. These instructions evidently presuppose some basic knowledge of building Docker containers, so I thought I’d write the “I don’t know what I am doing” version of the instructions. Beyond the obvious download & install Docker, then make sure it’s functional (service starts).

The linked Dockerfile is not the only thing you need. Go up a level — you need both the Dockerfile and entrypoint.sh files. Create a directory somewhere and grab these two files. Then build the container using

docker build -t oh2imagename .

I used a short, alpha-numeric only name for my image. When I used slashes as in the example, the container would not start. Then make the folders you want to map into OpenHAB2:

mkdir /some/path/to/openhab/addons
mkdir /some/path/to/openhab/conf
mkdir /some/path/to/openhab/userdata

The instructions conflate local users/groups with in-container users/groups. You do not need to create a local user. You do need to indicate the uidNumber and gidNumber for the openhab user and group. Even if you do create the local user and group, then change the /some/path/to/openhab permissions to provide full access to the user … you may well not be able to access the files. That is SELinux, not a file permission issue. The quick/dirty solution is to start the container with the privileged flag:

--privileged=true

Alternately, consult the Universal Archive of All IT Knowledge and figure out how to allow the docker service to write files where you want them. And how to access USB devices if you are trying to use something like a ZWave dongle. We went with the privileged route 🙂 The –name option is just the container name. The –net uses the host network for container communications instead of the bridge network. Saves mapping ports, although you could easily use the bridge network and map out the handful of OpenHab specific ports. The -d runs the container in detached mode. The -e sets some environment flags (used by the user/group creation script that runs upon container startup). The –tty (or -t) attaches a console. Not really used here.

docker run --privileged --name oh2containername --net=host --tty -d -e USER_ID=5555 \
 -e GROUP_ID=5555 oh2imagename

Ideally, your OpenHAB2 instance will be running. Use “docker ps” to list out the running containers. If you don’t see a container with the name supplied above … then something went wrong. You can use “docker history oh2containername” to view a quick history, but “docker logs oh2containername” will probably provide more useful information. We encountered file permission issues (as noted above, due to SELinux) which prevented the initial container setup from running. Once that was sorted, the container showed up in the running container list.

You’re ready to use it — you can access the web console using your computer’s IP address (assuming you set this container up in the host network and not the bridge — if you used the bridge, you can use “docker inspect oh2containername” and look for IPAddress under NetworkSettings) on the default port. You can ssh into the Karaf console with the default user/password on the default port. Or you can shell into the container.

docker exec -it oh2containername /bin/bash

This is a bash shell running on the OH2 container — you’ll find a lot of ‘stuff’ hasn’t been installed, and your normal command aliases won’t be present. But it’s a shell on the server and can be used to start/stop OH2.

Spinach Hemp Seed Pesto Recipe

Ingredients:

  • 1 cup of firmly packed spinach leaves
  • 1/3 cup of hemp seed
  • 1-2 cloves of garlic
  • 1 teaspoon of fresh lemon juice
  • Pinch of sea salt
  • 1/8 teaspoon of freshly ground pepper
  • 1/4 cup of grated Parmesan cheese (not powdery grated, long slivers)
  • 1/4 cup of olive oil

Method:

  1. In a food processor, combine spinach, hemp seeds, garlic, lemon juice, salt, and pepper. Run the processor until the spinach has been chopped into fine pieces.
  2. Add the Parmesan cheese, and run the processor for few seconds to incorporate.
  3. Add the olive oil; run the processor until you’ve got a thick paste.

This was really good. I will probably make a version with 1/2 cup of basil when basil is growing again.

Gathering Android Log Files

A friend has an Android application that isn’t functioning properly. On Windows or Unix, I know how to stack-trace and debug apps … so she figured I’d be all set up to do the same thing on Android too. Except I’ve never encountered a problem that required debugging Android apps. Consult the universal archive of all IT knowledge (a.k.a. Google).

I don’t have the Android developer kit installed, nor do I need it, so I elected to use “Minimal ADB and Fastboot” to grab the log data. My device did not show up without a Windows driver for the debug bridge. Once the driver was installed and the adb server restarted, my device appeared.

 

C:\Users\lisa>"c:\program files (x86)\Minimal ADB and Fastboot\adb.exe" kill-server

C:\Users\lisa>"c:\program files (x86)\Minimal ADB and Fastboot\adb.exe" start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

C:\Users\lisa>"c:\program files (x86)\Minimal ADB and Fastboot\adb.exe" devices
List of devices attached
g142ef0c        device

Something interesting about the adb log data – it can include an hour or more of history. Which is awesome if your app crashed a few minutes ago and you want to capture historic data, but for a reproducible error … well, there’s no need to slog through thousands of lines to find where the problem actually started. Clear the log buffers first then start capturing the adb log data:

"c:\program files (x86)\Minimal ADB and Fastboot\adb.exe" logcat -b main -b system ^
-b radio -b events -c&&"c:\program files (x86)\Minimal ADB and Fastboot\adb.exe" logcat ^
-v threadtime -f "C:\temp\SessionLog.txt"

 

Alternative Fact: Constitutional Amendments Are Easy

Alternative Fact: Courtesy of Mnuchin on Fox News Sunday:

MNUCHIN: Well, it doesn’t need to be reality. And I’m not going to comment on what the president will do. But as you heard him say, he’s not planning on doing this again. I think — I think they should give the president a line item veto. These things should be looked at —

WALLACE: But that’s been ruled unconstitutional by the Supreme Court, sir.

MNUCHIN: Well, again, Congress could pass a rule, OK, that allows them to do it. But —

WALLACE: No, no, sir, it would be a constitutional amendment.

MNUCHIN: Chris, we don’t — we don’t need to get into a debate in terms of — there’s different ways of doing this.

Real Fact: It actually is a Constitutional amendment, and while there may well be many ways of “doing this” … they shouldn’t fare any better. That’s the basic principal of the three branches of government. Sadly, I suspect many in Trump’s administration could use a civics refresher. While the principal of a line-item veto could be rewritten in an altered form, the decision in Clinton v. City of New York, 524 U.S. 417 (1998) wasn’t quibbling details. They found that the Executive branch altering legislation violates the Presentment Clause.

Green Springtime Muffins

Makes 18 muffins in standard sized cupcake liners

DRY INGREDIENTS:

  • 2 cup flour, whole wheat
  • 1/teaspoon cinnamon
  • 2 teaspoon baking powder
  • 1/teaspoon baking soda
  • 1/teaspoon salt

WET INGREDIENTS:

  • 3/cup milk
  • 1/cup honey (I use a combo of maple syrup and honey)
  • 1 large banana
  • 6 ounce spinach
  • 1/cup butter, unsalted
  • 1 large egg
  • 1 teaspoon vanilla extract

Directions

  1. Preheat oven to 350 F, and line a muffin pan with paper liners (or use silicone muffin cups sprayed with cooking spray).
  2. Combine all dry ingredients in a large mixing bowl.
  3. Melt butter. Blend the wet ingredients in a blender or food processor until completely pureed.
  4. Pour the puree into the dry ingredient bowl, and fold together gently until just combined. (Do not over-mix.)
  5. Spoon the batter into the muffin pan, and bake for 18-22 minutes, or until the muffins are firm to the touch on top, but not quite browning.
  6. Cool most or all of the way before serving.

What, me worry?

Steven Mnuchin, one of Trump’s best people, is not worried about mass worker displacement due to automation. Said so at an event hosted by Axios. I’d love some of whatever he’s been toking.

In the near term (and evidently that’s all business execs or government types care about these days), sure automation and AI will drastically increase profitability. But I foresee the trend following a similar path as off shoring … great for individual businesses, but at some point capitalism mandates people have some money to buy the stuff and neither offshoring or wide-scale automation is sustainable. Offshoring at least provided alternate jobs for enough people to float enough debt to sustain the market near-term. We’ve got “knowledge workers”. But what percentage of those can be turned into AI programs? A significant number. I automate 80% of IT work. Chat bots could provide at least half of legal and medical consultations — the routine stuff. Robots make products, load the truck/train/drone that drives itself. Right to your door, or even inside if you have the Amazon lock. There aren’t a lot of jobs where some portion couldn’t be automated today. And budget cuts and productivity demands essentially require it. Some lucky few own doomed companies and profit for some time, another really lucky few are AI programmers and electronics engineers (although self-building AI/robots are totally a thing too). Maybe automation will beget a whole new industry that will provide good jobs for billions of people. Maybe the capitalist system will collapse and everyone will have more than they need (the Star Trek series, I guess). But I don’t know that I wouldn’t worry about the impact automation has on employment and the economy.