Chris X Edwards

I hope Buckethead is getting the last laugh with all this mask wearing. That guy is a genius!
2020-10-20 12:40
I have to thank scammers and robocalls. I never pick up on unknown callers and everybody is finally sympathetic to that now. Die phone, die!
2020-10-16 02:13
Saw a photo of Hermann Rorschach, creator of eponymous test, and thought, wow, he looks like Brad Pitt. But I could just be projecting that.
2020-10-13 15:40
I imagine the people who will miss movie theaters the most are the ones who are noisy and obnoxious. And have large bladders.
2020-10-13 06:26
I'm not ridiculing "Sleepy Donald", just drawing attention to one of C19's more debilitating symptoms that we should all be sympathetic to.
2020-10-06 02:35
Blah Blah
--------------------------

Unicon - A Unit Conversion Tool

2020-10-14 23:47

I recently had a crazy idea about how engineers should be educated. They should be coached until they have reimplemented from scratch the software inside the Hewlett Packard HP48 calculator. It’s that simple.

hp48.png

I discovered the HP48 just after graduating from engineering school and I was sickened. I couldn’t believe this device which very clearly was designed to help kids claw their way to an engineering diploma existed. Every topic in my engineering studies was in that machine ready to help. I had struggled through the entire ordeal unarmed, oblivious to the existence of this heavy weapon.

You might think that a rewrite of all of that device’s superb software would be especially heavy on the programming. Yes. That is precisely why it is the perfect exercise for a modern engineer. And at the end of it all, the graduate would have a magnificent collection of self-made technology with which any engineering problem could be tamed.

Ya… Funny story. So it turns out that’s kind of what I’m doing.

I loved that HP48’s architecture so much that it was one of the main inspirations for my programming language, Geogad, which I have used every day for about 15 years as my personal calculator and heavy hitting math tool. Recently I’ve been getting into electronics more than ever and I’ve also been hitting a lot of broad topics in other kinds of engineering. This all means that I’ve been doing a lot of conversions from, say, picoFarads to microFarads and knots to meters per second, etc. All of this has made me nostalgic for the superb units handling features of the HP48. Of course I could not resist the overly clever impulse to reimplement all of that functionality.

Yes, I do know about thousands of simplistic online conversion utilities (e.g. "hey Google"). I also know about GNU Units — it is an incredible tool and if you have unit conversion problems, you should know about it too. But I needed something that was going to ultimately be a better fit with my programming language and so I got started writing a quick study to see how feasible it was.

And wow, that was quite a rabbit hole. Eventually I got something I feel good about and I thought that maybe I should also make it a standalone program so that people can check it out. Maybe it will prove to be helpful for someone. I packaged it up and called it Unicon.

unicon_logo200.png

You can check out its project page here.

You never know quite how many problems you can run into until you get a computer to help you uncover them; the number of bugs I had to deal with on this project was impressively high. Just typing in the entire HP48 units catalog by hand is going to produce more bugs than an anthill. There were subtle weird problems all over the place. Finally as I was starting to feel more confident that it was going to start working pretty reliably, I stumbled across this question: what is an electronVolt converted into kilocalories?

Fortunately I found this example on some random website that was demonstrating how to use Google to do units conversions. I put that value in my test harness and Unicon came back… wrong. Nothing shocking there, but it was slightly wrong.

Unlike in the real world, in computer work when you’re wrong but close, that is often quite weird. Usually when you’ve made a computer mistake, you’re way off. But here I was getting a similar looking answer that was not at all the right one. I checked some other online resources. Google reaffirmed. Wolfram Alpha concurred.

eV_wolfram.png

For me, the last word on these questions is always my beloved HP48. What did the old master say?

eV_hp48.png

Amazingly, the HP48 and the new Unicon agreed! It’s fine if I am wrong but the HP48? No. The HP48 is immaculate! It is never wrong! So that was a puzzle.

Pause here if you’d like to contemplate the answer to this conundrum before I tell you what the source of the error was.

I don’t know how I ever figured this out but I suspect a good deal of internet research was going on when I happened upon this wikipedia article: 2019 redefinition of the SI base units. [Yes, sic, just like that with weird capitalization.]

wtf.png

And sure enough, it turns out that an electronVolt had changed value in May of last year. Apparently all kinds of major changes were going on in the standards of fundamental physics. I may have to stop making fun of the philosophical problems with Avogadro’s number now.

How’s that for very weird? And the lesson there I guess is that even if your software is so badass and perfect that it never needs any updates ever, the universe in general is not so stable. So when people wonder why I don’t just stick with my old HP48 (or a very clever emulator thereof), this is as good of an answer as any.

There are no doubt more such mysteries to be solved and if you’re an engineer or physics person, I’d love some help. Go to the Unicon project page and give it a whirl. You just need some late-ish Python (probably 3.7+) and it’s easy to play with. I’d love to hear about your serious units conversion problems. If you find anything interesting, especially interestingly stupid, definitely let me know!

Thermal Cameras Are Interesting

2020-09-30 10:15

Thermal imaging is interesting and potentially quite useful. Though working examples of it have been around since the 1920s, I think that it will become much more prevalent in the next decade. For example, for between $250 and $500, you can buy a neat accessory for telephones. Or you can even buy a $350 telephone with it built in these days.

On my autonomous boat, I’ve collected a lot of video from a thermographic camera designed for marine use. The fact that anything that produces heat is usually glaringly obvious makes this kind of sensor very compelling for boat use. Check out how well I stand out in a typical water scene.

kayaktherm.jpg

(Let’s save reflections for another discussion.)

Or how about this shot showing me tying up the boat at the dock.

tcamxed.jpg

If you’re in the business of rescuing people who are in the water, there is a 99% chance that this camera will be incredibly valuable and you should probably have one. But look again at the previous photo — that image shows a strange day where the sky, land, and water are all practically the same temperature. If you want to use this kind of imagery to choose where navigable water might be, there are plenty of difficult situations.

Check out the amazing ability of the camera to pick out ducks far away in the background.

duck.jpg

But in this cold water on a cold day, the contours of the terrain are completely lost. It’s not just cold days that can be problematic. Check out these images where the shore and the water have some ambiguous temperature readings.

thermalcam.jpg

As a general rule living things tend to glow pretty brightly but check out this shot of me on a day where swimming is cold but standing around in the wind and rain is colder.

hotwater.jpg

It’s easy for humans to tell what’s going on and not impossible for computers to make some sense out of it with some machine learning effort. But naively assuming that the sensor itself will make the underlying situation as black and white as the image itself is not a safe assumption.

Oscilloscope Madness

2020-08-29 21:09

Sometimes I get a wild idea in my head - actually, I specialize in that. This week’s wild idea was that I need to learn more about oscilloscopes. I’ve been working on my electrical engineering notes and my newly appreciated ignorance about oscilloscopes was irking me.

Looking online for interesting resources that could educate me about the topic, I wondered if electrical engineers ever acquire electronics equipment the most honorable way possible: by making it themselves. I always found that the best machinists had a lot of tooling that they had machined themselves.

That sounded awesome. I had to give it a try and I ordered one. My expectations were reasonable. I figured it had about even chances to (A) be defective or missing a part, (B) fail because of some ineptitude on my part, or (C) actually work. At the very least, I expected that I would get some soldering practice. When it arrived, I set to practicing!

According to the instructions, a completed unit should look like this.

oscope-complete.jpg

However what actually showed up was this.

oscope-parts.jpg

Gulp! Some extreme attention to detail was required to make sure all the values were thoroughly checked and all components sorted. I actually used all of the functions on my multimeter for this project, several for the first time. Just knowing how to test transistors with my meter was worth $22.

Finally, after a lot meticulous work, I was ready to power it up. I did the preliminary assembly power checks and they came out good! Wow! I attached the display and powered it up and it was… iffy. After playing with it, I had seen it boot properly and sort of work and I had also seen it act completely rubbish. Hmm.

Carefully studying every connection, I found some dodgy soldering. I actually did all the resistors and capacitors with my beloved 25 year old gas powered soldering iron. Unfortunately, its tip was so worn that it wasn’t doing a great job. After fixing up some of that with a newer iron I discovered a single lead that I had missed — no solder at all. Oops. I fixed that and when I subsequently booted it, it came up fine and worked flawlessly! It was a euphoric feeling to pull off a correct execution and be so damn lucky.

Ok, cool. I built an oscilloscope. Uh, what now? What do I do with it? After playing around with it I got the very good idea to hook it up to a guitar. I just put the probes on one end of a 1/4" patch cable plug — other end on the guitar. Then I was able to see the sound waves. Amazing! So cool.

oscope-guitar.jpg

In this image you can see I’m holding down the 5th fret (note dot) on the E string which is an A (E - open, F - 1st fret, F# - 2nd, G - 3rd, G# - 4th, A - 5th). That A is actually the A440 pitch standard described in ISO 16:1975 used to standardize all of music to a certain pitch. Obviously if my guitar is in tune, the frequency of the sound wave should be 440. And you can see on the top left that it is reading Freq: 441.707Hz. You can also get a sense for the amount of voltage produced by a guitar pickup. Actually I have an unusual Yamaha SLG Series and I have no idea how its invisible magic pickups work — with nylon strings no less. But we can see that the voltage while this note rings goes between 16mV and -20mV, for (presumably) the Vpp (peak to peak?) of 36mV.

Although this would have been even more fun back when I had enviable eyesight, I’m still absolutely delighted with this project. I have learned a lot about a lot of different topics and have added a very powerful tool to my collection. What a cool little device!

UPDATE 2020-09-20

Having enjoyed that, I looked around for more such fun and found this signal generator kit. For only $12, I got to build this thing.

signal_gen.jpg

As you can see it does a nice job of giving my oscilloscope something to do. I think one of the main use cases for a signal generator (conceptually) is comparing this oscilloscope with a fancier, more accurate (?) one. But for now I’m just content that it generates square waves, sine waves, and the triangle waveform shown.

Real Progress In Autonomous Vehicles

2020-08-14 12:44

Regular readers may notice a decline in posts about autonomous vehicles. Rest assured, I’m bringing to light everything interesting in the field. The problem has been a conspicuous lack of anything interesting. There are only so many times I can say "They’re doing it wrong and will fail." But today some PR hype crossed my path that is actually on the correct trajectory so I wanted to highlight it.

Apparently the company behind this is the same one that recently canceled a giant project reimagining Toronto. They have some access to Alphabet and beaucoup Googlebucks which could be good or bad.

What’s somewhat unnerving to me is that I wonder if any of the people involved in this project understand why it is the correct approach. That sounds like a strange and pretentious thing to say, but note how all the press releases stress the connected aspect of this project; apparently CAVenue, their marketing name, stands for "connected autonomous vehicle". Here is their own press release saying that.

They seem utterly fixated on the wrong thing. They claim they are trying to "develop the world’s most sophisticated roadway" but that can not be true. What they hope to build will ideally be less sophisticated than any random road. No, I don’t care about the V2V distractions and great network coverage so people can adore their phones better. I’m talking about the brains here. Do you think their roads will match the sophistication of the sum total of human minds currently required to function on normal roadways? No. They will most certainly not do that.

But that’s just it. What we need isn’t a more sophisticated road. We need a less sophisticated road. Look at any of the PR shots of this thing. What is really going on that is profound and useful is what I call "idiot driver insulation".

idiotinsulation.png

That is the necessary and sufficient requirement to end human driving completely. We are not waiting on technology. We are waiting to do the simple things necessary to make the real problem not a problem.

I suspect that this move is shrouded in "connectedness" to distract the Silicon Valley people while real progress is made. The connectedness of vehicles is utterly irrelevant. Weather sensors, a perfectly good idea, are not essential. Platooning (as shown in the image) may one day be helpful for many reasons but so might teleportation. No, the real breakthrough here is simply clearing the road of idiot drivers.

If you’re following my logic here, then one question should come up: why not just build a light rail (like the kind my neighbors rightly complain about for the wrong reasons)? It is a good question and I think that the value proposition works today because the physics benefits of commuter rail are not as heavily leveraged as freight rail where steel on steel is important to energy budgeting.

I believe that autonomous cars running on a closed single corrider would still have some advantages. First is better on demand scheduling; with rail the granularity is an entire passenger car. Starting and stopping disadvantages rail but is easier for smaller shuttles and even very small transportation pods. It is also easier to integrate small freight shipments into the closed corridor. For example, how would Amazon send a couple of delivery vans down a light rail corridor? They can’t.

But the huge advantage and why I very much hope this project doesn’t hype-fizzle away is that this arrangement provides the launch pad for mixed mode cars. The reason you can’t sleep (alone) in your moving Tesla (or Cadillac for that matter) is because it is not on one of these roads. There are no other impediments. When people can choose a road where they can stop driving completely, I believe they will.

Sure, 99.999% of all other roads require the dangerous and tedious chore of driving, but if there’s one shining example of how it could be, maybe people will start to think differently about how every road might be organized. I certainly hope this will spark some discussion and thinking about the correct way forward.

If you really want to understand this news you can go back and revisit my 2016 post where I predict this exact development. Indeed, although we have finally managed to claw our way back to exactly where we were in 1997, in the world of autonomous vehicles, that is immense progress. Let us hope we don’t retrogress again.

The Good News, The Bad News, And The Ugly News

2020-08-08 15:50

The bad news is obvious, right? It’s everywhere. Plague! House arrest for everybody! Great Depression or Greatest Depression Ever?! Riots! A president who once savagely beat a puppy to death with a golf club. (Actually, I just made that last one up — but what is worse, that false "fact" or a president who doesn’t mind citing such flagrantly false facts? Feel free to make up your own "facts" about the president — he doesn’t care!)

Enough has been said about the bad news. I want to focus on the good news. Before that can make sense, however, we need to consider the ugly news — the news that makes no sense and is a muddled mess. Unfortunately, that has been literally all news about the details of this pandemic.

It starts with this.

The current coronavirus disease, Covid-19, has been called a once-in-a-century pandemic. But it may also be a once-in-a-century evidence fiasco.

At a time when everyone needs better information, from disease modelers and governments to people quarantined or just social distancing, we lack reliable evidence on how many people have been infected with SARS-CoV-2 or who continue to become infected. Better information is needed to guide decisions and actions of monumental significance and to monitor their impact.

That was back in March. Plenty of time for everybody to start to figure out what sensible data looks like. And yet, it never came! Every day there would be some fatuous headlines like these:

The Johns Hopkins Coronavirus Resource Center interactive map is a complete joke, gormlessly hinting that Germany is twice as dangerous as Indonesia.

jh.png

Another grand example of terrible data is the CDC. Check out their CDC COVID Data Tracker.

cdc.png

The default that comes up is "Total Cases". What is so stupid about this? Imagine a prolific creator of false facts using this "data" to "manage" the pandemic. First of all one can have fewer "total cases" by simply nerfing testing. But a really accomplished false fact artiste would say something like, "COVID-19 cures most natural causes of death! Just look at how the population is thriving under the therapeutic influence of this wonderful virus. Which was my idea by the way." Go on, look at that "data" in the CDC chart and tell me how that claim can be refuted. It can’t.

That’s the ugly news. I feel like I have been watching an endless game of Numberwang.

But I have seen a glimmer of hope! Let’s turn now to the good news.

Back in March, some rando on the internet — who also happens to be a faculty member of the University of Cambridge’s Risk and Evidence Communications unit — wrote a sensible article about How much normal risk does Covid represent? The answer, summarized, was that your risk of dying pretty much doubled.

The way I would explain that is to imagine playing Russian roulette with a six-shooter that had two bullets instead of one. If your gun had 800 chambers (equivalent odds for a normal person in their 30s), going from 1 bullet to 2 wouldn’t be quite so problematic. Note that everybody’s gun gets smaller as they age.

My real point there was that article way back in March was the last example of good data considered sensibly that I have seen during this entire mess — until today.

I feel too financially insecure to afford The Economist, but I do get their email newsletter and sometimes their content is not paywalled. Today they tipped me off to this unusually clear and cogent resource.

Stare at this and soak it in and you’ll understand what is wrong with all other sources.

The first thing to notice is they’ve cut through the bullshit of bullshit testing. The last time I saw such a muddled testing situation was either standardized academic testing or maybe even IQ. Testing sensibly for Covid pathologies and dangers is even worse than normal CYA medical diagnostics. This data from The Economist understands that and moves on to what can be sensibly inferred about the situation.

If we stop and ask ourselves what we care about, number one on the list is not getting killed. So The Economist asks the simple question, are we getting killed more than normal? Don’t worry about why. It could be people dying of asbestosis because masks are hard to acquire for construction work. Doesn’t matter. Step one is to answer the question - is there a problem? And The Economist’s methodology is so simple that it’s actually plausible. They simply look at how many people used to die and how many people are dying now and see how/if that has changed.

That’s so simple, but really it is a relief to me that someone is looking at this in a way that is not deeply flawed to the point of being meaningless. They even have a nice Github repo with all their data and scripts if you’d like to quibble with their methodological details. (For example, I would make minor adjustments based on natural changes of population, but really, not strictly necessary to appreciate these numbers as better than anything we’ve seen thus far.)

It is "good" news in the sense that it is of good quality. It is also good in the sense that it looks pretty good. I am not terrified by this data.

At first I misunderstood the "Absolute" setting on the graphs to mean they were like the fatuous CDC data. But really this data is much more useful. It is not showing absolute deaths - which no one really cares about. It is highlighting the validity of testing statistics. The difference in Covid-19 attributed deaths and real deaths is directly measuring the effectiveness of the testing programs. They are frankly not as abysmal as I thought — though I live in NY where, like NJ, Spain, Holland, Italy, and non-WEIRD nations, it is pretty abysmal.

It’s interesting to note the negative rates after the spike. The article cautions that some of this more recent data may just reflect reporting lag. My intuition is that many victims were probably close to death anyway and there were less people to die in June if they had their exit schedule moved up to May.

neg.png

Reports of a "second wave" seem pretty overblown. Again, could be reporting lag, but this data isn’t terrifying me. It’s looking like people got sick, like they do when something is going around. All the vulnerable and unlucky people got it, and it doesn’t really have much more room to cause trouble. That could be a very wrong guess, but this data, real actual data that is not meaningless, is in no way contradicting that assessment.

I’m actually pretty impressed that a lot of states really are not seeing anything like what New York and New Jersey saw. Look at Wisconsin or Idaho or Missouri.

wiidmo.png

I would actually say that the danger for them is greater. It’s greater because to my thinking they have not had the full force of the pandemic come and hit their vulnerable populations yet.

One could make the case that this shows that protective measures, lockdowns, and hygiene theater are working. I’m not sure if there is enough data for that by, say, comparing Sweden with Switzerland. But this kind of data could tell us exactly what works. It’s not testing as I had previously imagined. Testing is almost as elusive as a vaccine; let’s just rule sensible tests out and focus on real and obvious effects.

What really works is simply tracking deaths promptly and accurately like any 21st century society should be doing anyway. With sensibly tracked deaths, accurate studies to gauge the efficacy of various measures are actually plausible, even using "natural" experiments with different sides of the state line doing different things. It would be really helpful to see these plots with the same plots superimposed from other flu seasons and outbreaks.

As one of the early adopters of Covid-19 I can tell you that if you get it, it’s no picnic. (I am feeling a bit better than last month, thanks.) But this data is not only good in the sense of not being stupid; it’s good because it doesn’t show an impending apocalypse. It’s exactly data like this that we need.

UPDATE 2020-08-10

A perceptive reader sent me this NYT article from late May: Putting The Risk Of Covid-19 In Perspective. It tries to focus on the comparative risk side of things. That would be valuable and correct if there was sufficient data to support such aspirations. Note what this article uses for data.

Using data from the [CDC], New York City experienced approximately 24,000 excess deaths from March 15 to May 9, when the pandemic was peaking. … …using the C.D.C. data, Michigan had approximately 6,200 excess deaths during this same time period.

Note he’s not comparing those directly but using excess deaths — the only metric we really have right now — to go on to put the risks into perspective. Excess deaths is finally some data that makes sense.

--------------------------

For older posts and RSS feed see the blog archives.
Chris X Edwards © 1999-2020