Permalink

Euler’s Method in Hidden Figures

201611-milwaukee-25Having thoroughly enjoyed seeing the movie Hidden Figures, I wondered about the “old math” breakthrough shown late in the story, when the Euler method is applied to aerospace calculations, after several scenes claiming that the math needed to do the calculations did not exist. While I remembered Leonhard Euler as the graph theory guy, I had to look up the referenced method.

It turns out that it is a method of doing numerical approximations of ordinary differential equations. But wait! Ordinary differential equations had been around since the days of Newton and Leibniz. We even saw differential equations written on chalkboards in the movie. Surely solving differential equations was not the mysterious new math that was needed?

The movie did not go into details, but perhaps the numerical approximation approach was key because the IBM 7090 Fortran programs that they were using to automate calculations was not able to handle symbolic differentiation and integration yet? Symbolic calculus on computers started becoming possible over the next decade, but a numeric approximation would clearly have been the best approach to feed into the computer they were using in the early 1960s.

This still doesn’t answer, though, why using Euler’s method would have been such a breakthrough. The method was written up in Hamming’s classic 1962 book on numerical methods, so while it was indeed “ancient” math as depicted in the film, it was hardly unknown. I guess we might have to presume that then (as now) a study of numerical approximations to symbolic calculations are not necessarily a mandatory part of a university mathematics education? I have worked with aerospace engineers for more than twelve years, and I would not be at all surprised if most of them have never studied numerical methods at all…  but hey, I didn’t take the class either… :-/

Fortunately, we have access today to unprecedented quantities of free and low-cost mathematics educational materials, and any movie that inspires us to take some time to study is surely a good thing.

Permalink

The Art of the Deal

19700004Wanting to learn more about our new president, I just finished reading The Art of the Deal.

The book recounts stories of several business projects he had worked on from the 1970s into the mid-1980s, ranging from low-income housing in Ohio to extremely-high-income housing in Manhattan, to renovating hotels, to building casinos, to finishing civic projects on the behalf of the city, to running a major sports team. There is little directly actionable advice for would-be business people in this book, but readers can pick up on the author’s attitude of success. Some takeaway points that I got include:

  • You can get help from someone else to finance a business project. It will be easiest if you can make a strong case for why your project will succeed, and what it will give back to the community, in the form of new jobs, increased sales for other area businesses, increased demand for housing, etc. It is best, then, if your project really will improve the community, and not just be a vehicle for you to do something fun. (Although nothing at all wrong with enjoying it too!)
  • You can get help from someone else to plan and to implement a business project. If you have a general idea for something that you think would be worth doing (see first point), but don’t know how to fully plan it, you should learn from experts in that field, or even better, find an expert that you get along with and have them help you plan it. Likewise, don’t feel compelled to do all of the implementation work yourself; hire the best people you can find to do part or all of the work for you.
  • Why seek the best experts and best implementers? One problem that routinely causes business ventures to fail is going exuberantly past budget and schedule. Working with people who have done similar things in the past, and who have done them well, significantly increases the possibility of completing work on budget and on schedule.
  • Don’t waste money. If you’re building a 1000-room hotel and can, without any structural or safety problems, save $10 on a widget that is used in every room, then you can save $10,000.
  • Don’t waste time. There’s nothing wrong with relaxing, but cultivate a lifestyle of productivity. Eating lunch at your desk (or as the author suggests, just a can of tomato juice) instead of going out for lunch can easily save a good chunk of time to be devoted to more useful things.

In light of recent current events, I found the last page or so of the book especially poignant:

I’ve spent the first twenty years of my working life building, accumulating, and accomplishing things that many said could not be done. The biggest challenge I see over the next twenty years is to figure out some creative ways to give back some of what I’ve gotten.

I don’t just mean money, although that’s part of it. It’s easy to be generous when you’ve got a lot, and anyone who does, should be. But what I admire most are people who put themselves directly on the line. I’ve never been terribly interested in why people give, because their motivation is rarely what it seems to be, and it’s almost never pure altruism. To me, what matters most is the doing, and giving time is far more valuable than just giving money.

In my life, there are two things I’ve found I’m very good at: overcoming obstacles and motivating good people to do their best work. One of the challenges ahead is how to use those skills successfully in the service of others as I’ve done, up to now, on my own behalf.

In the pages of this book, I saw someone extremely motivated to succeed, but not greedy. He seems genuinely interested in the well-being of others, and builds great things not so much for his own personal gain, but to enhance the lives of everyone around him.

Permalink

First Week with a Fitbit

IMG_8727I have been using a Fitbit Charge 2 over the past week, with the goal being to improve fitness through measurement and digital encouragement. My iPhone already tracks steps walked, though. What else does the Fitbit offer?

Some Fitbit devices, including the Charge 2, track heart rate. This is useful for recording a measurement of intensity of exercise. And in turn, that is useful for weight management. If you enter your weight, height, and age, and if you honestly record calories eaten, the Fitbit tracks your steps and heart rate, and tells you how many calories you should eat in the day, if you want to gain weight, maintain weight, or lose weight. Rather than having a static number of calories for the day, or even a flexible number based on vague notions of “light exercise” or “moderate exercise”, the Fitbit seems to do a decent job tracking how much exercise you actually get and adjusting remaining calories accordingly.

The outboard Fitbit software (on iOS or web or whatever) provides opportunities to connect with other Fitbit users for good-natured competition, alerting you that “Oscar has almost caught up with you!” or “Laura has completed her step goal for today!” and so on. Even when not connected with any other users, you get alerts and electronic “badges” for various fitness achievements. Both of these, while happening entirely in the digital realm, are surprisingly motivational.

When using the iPhone to track my steps, I would make sure to grab it before going on what I knew to be a long-ish walk, but I would routinely leave it charging at the computer when going on shorter excursions. The Fitbit is more conveniently always with me, taking the place of a wristwatch.

So far, the step counter seems reasonably accurate to me. Extreme arm movements can trigger a false step, but apparently I don’t do much of that when not actually walking (or at least exercising). It does, however, record arm movement when playing the piano as steps; a few days ago, it recorded about 2000 false steps before I took it off and put it in my pocket. Now I know to just take it off before playing the piano.

Curiously, there is no way to turn it off, and no easy way to get it to pause in recording steps. A simple on-device click for that would be a preferred solution, if I were about to engage in activity for which I knew it would record false steps.

A week in, I am finding the Fitbit a great tool for tracking and improving fitness. Now I would like a similar tool for tracking and improving at other things too!

Permalink

Inside of a Dog

19700025I just finished reading Alexandra Horowitz’s book, Inside of a Dog, an easy-going look at what behavioral and cognitive psychology can tell us about how dogs perceive the world. Many questions I had about the behavior of my own dog — including some that I hadn’t bothered to form very precisely because I wasn’t really expecting to ever find out — are answered here as convincingly as I could hope for.

Do dogs see in color? Despite longstanding myth to the contrary, dogs do see in color, but while humans generally see across a spectrum of red, green, and blue (with colors in between), dogs only see across green and blue. Different shades of red (or orange or yellow or other reddish colors) may appear distinct to them, but not as blatantly distinct as they do to us. Asking your dog to distinguish between an orange ball and a yellow ball could be more challenging than you might expect!

Can dogs see television? They can, but they probably aren’t very interested in it. While dog vision is in some ways less precise than ours (such as with color spectrum), they can perceive movement at a higher frame rate, if you will. We are convinced of seeing movement on a television or film projector if the pictures are changing at 30 frames per second, or even a little slower. Dogs, though, aren’t fooled, and instead can see the lack of continuous motion. It would take something more like 60 frames per second to look believable to a dog, so they would still be unimpressed even with some recent movies

But while we tend to be predominantly dependent upon vision to perceive the world around us, dogs predominantly exercise their sense of smell, which is vastly more advanced than our own. Dogs can smell where you’ve been; what you’ve eaten; who you’ve been with. They can perceive the intensity of odors such that if you were in the room five minutes ago, that smells different to them than if you were in the room an hour ago, or are in the room right now.

With our eyes, we see what is happening right now; with their nose, dogs smell what is happening right now, what has happened in the past, and, to a degree, what is about to happen in the future. When taking your dog on a walk, the author admonishes, don’t presume to drag him away from smelling something irrelevant to you. Those smells communicate knowledge to your dog! [I admit that I have been guilty of doing exactly that, but am lingering to let my dog smell more on walks now.]

(Their reliance on smelling probably also comes into play if they express disinterest at watching television; no smells are projected on the screen to accompany what they are supposed to believe they are seeing!)

It is well-known that dogs can hear much higher pitches than we can; thus, the inaudible-to-humans dog whistle. Considering the sonic world from the perspective of a dog requires us to take into account this wide spectrum of high pitches. Some common machines, even common lighting fixtures, make sounds which we are blissfully unaware of, but which dogs are constantly enduring. [I have wondered myself if my dog’s aversion to being photographed has any connection to the ultrasonic focusing mechanism in modern camera lenses?]

Dogs are believed to be unusually intelligent. The author shows disappointing intelligence test results, but suggests that dogs convey great intelligence in one regard in particular:

Dogs … see us as fine general-purpose tools, … useful for protection, acquiring food, providing companionship. We solve the puzzles of closed doors and empty water dishes. In the folk psychology of dogs, we humans are brilliant enough to extract hopelessly tangled leashes from around trees; we can magically transport them to higher or lower heights as needed; we can conjure up an endless bounty of foodstuffs and things to chew. How savvy we are in dogs’ eyes! It’s a clever strategy to turn to us after all. The question of the cognitive abilities of dogs is thereby transformed: dogs are terrific at using humans to solve problems, but not as good at solving problems when we’re not around.

Which is not to say that dogs do not also express aptitude for intelligence on their own, for they do. Even more remarkably, they exhibit, at least in measure, a theory of mind. They look at both humans and at other dogs as individuals with their own minds and their own intentions and behaviors. They express surprise when they witness things which appear to defy their sense of logical expectations. When they play with other dogs, they communicate with them that play is about to commence (and thus any nipping should be taken in fun, not as an attack), and more powerful dogs deliberately handicap themselves when roughhousing with less powerful dogs, so as to level the playing field of their game.

After reading this book, I see my own dog differently now. I am more conscious of how she must see me, and how she must see other people, and other dogs, and the world around her. The author shows us that dogs are, among all animals, those best suited to be with humans: to live with us, to be companions with us, and that they and us both are better off for it.

Permalink

Apple iOS 10 Voicemail Transcription

I don’t actually use my phone a whole lot for placing telephone calls. After getting an iPhone 7 about a month ago, this morning I received my first voicemail message on iOS 10. I was surprised to find the voicemail message audio auto-transcribed to text, and transcribed very well at that.

While an obviously useful technology, I presumed that the voicemail had been processed by Apple remotely at some server farm, as most current hip artificial intelligence applications run on servers rather than on clients or local computers, and that this was yet another affront to individual privacy.

Happily, I was mistaken. According to an Apple support article on using iOS 10 voicemail transcription, all transcription is done local on the iPhone device itself. If the transcription was done poorly, you can optionally send it to Apple for the purpose of them improving the transcription system, but otherwise, it appears that the transcribed text is in fact private to your phone!