Monday, October 31, 2022

My (Almost) Self-Driving Car

Earlier in the year, I bought a new car, a Honda CR-V. It has two remarkable features that make me think the self-driving car is perhaps a bit closer than I thought.

The first feature is LKAS, which stands for Lane Keeping Assist System. It uses a windshield mounted camera to identify lane markers, and if the car drifts from the center, it applies some torque to the steering wheel to guide the driver to adjust the car.

When I first tested this on the highway, the steering wheel felt tight and somewhat locked. It took a few moments before I realized that LKAS was keeping the car centered by holding the steering wheel appropriately. When I got more comfortable I actually let go of the steering wheel, but after a few seconds the dashboard flashed a "steering required" warning. Still, the feature lets me keep a lighter touch on the steering wheel, making highway driving more bearable.

The second feature is ACC, which is Adaptive Cruise Control. I've always been a fan of cruise control but in my previous car the cruise control keeps the car at the selected speed. If you needed to slow down because the car ahead of you is going slightly slower, you had to disengage cruise control and drive. With ACC, the Honda modifies the speed based on the car ahead of you. If the car ahead slows down or even stops, the ACC controls the speed such that I never have to touch the brake!

The ACC feature has made long highway trips much more pleasant for me. In heavy traffic, I experienced the car slowing down to a full stop. After sitting idle, the car acts as if it was at a stop light and shuts off the engine. This is the Idle-Stop feature. When the car ahead moves, I tap the accelerator to take it out of Idle-Stop, and the car resumes driving.

Both features let me think that the car was driving me, instead of the other way around. Of course it's not entirely hands-free. I still have to navigate and steer! But both features made me think that self-driving cars are getting closer to reality. These two features coupled with anti-collision give me a strong sense of safety. (I only recommend these systems for highway driving only.)

Each iteration of the "smart car" is about the human helping the computer drive. One day, it'll be fully autonomous!

 



Friday, September 30, 2022

Procrastination

In a little over three weeks I have to give a presentation. It's about eBooks and how to make them. I haven't started preparing for it however. Since I made the commitment a week ago all I have done was mull over my topic and mildly groused about how I got into this.

I take solace in the fact that my presentation isn't tomorrow. That's happened before, usually with papers in high school and college. I'd have a some kind of draft but the evening before I'll bang out a final version in a feverish all-nighter that still makes me nervous thinking about it. I had a similar mindset with computer projects but staying up all night writing a program was "fun" to the younger version of myself. 

One of the things I learned is the simple power of just taking even the smallest step towards my assignment. I open up PowerPoint and make one or two slides. Just the title page. Maybe part of the agenda. A bullet point. Even a picture. Anything. Just starting is the hardest part but once I'm past the first few sentences it begins to build on itself. It starts to grow and the effort to add to it becomes easier. 

Putting things off make me think about process versus product. Maybe I like to think about the product and the reward of making that product, rather than embracing the process of making that product. Procrastinating doesn't help with either though. Wish me luck!


Wednesday, August 31, 2022

Heal Thyself

About three weeks ago, I cut my left index finger. I was drying a serrated knife and it slipped out of the towel I was using. The knife was in mid-air and like a fool I thought I would reach out and grab the handle. Instead, the knife cut into my finger then clattered on the floor.

I didn't feel anything initially, but when I picked up the knife I noticed a clammy wet feeling coming from my left finger. I looked down at it. The knife had sliced a small quarter-inch pad of skin off my finger tip. It looked like those round pieces of paper that you get from using a hole-punch, except the hole-punch didn't make a clean cut. This hung off my finger by a sliver of skin. I was strongly tempted to pull it off, but I thought that would hurt.

I pressed down on the now bleeding cut. I went to the sink, turned on the faucet and held my finger under running water. The cut wasn't deep. The bleeding slowed down in less than a minute. I turned off the faucet then walked to the medicine cabinet. I dabbed some bacitracin ointment on my cut then put a band-aid on it.

I somehow became determined not to lose this piece of skin. I knew this meant wearing a band-aid on my finger for a while. The band-aid would get loose and mangy after a few days, since I showered and washed my hands and did the dishes with it on. That first week I changed it every night. Later on, I kept it on for two and even three days at a time.

Each time I changed the band-aid, I checked the cut. As the days wore on, the loose piece of skin began to reattach to my finger. The edges of the cut blended into my finger pad. I reapplied ointment with each new band-aid, but towards the end I stopped. I wish I had taken some photos or videos of this healing. It felt miraculous to me.

A week ago I stopped wearing the band-aid. The cut is gone. My finger's skin is smooth and restored. I am amazed and grateful that my body knows how to heal minor injuries like this.

Sunday, July 31, 2022

Math and Me

I used to pride myself at being excellent in math back in high school. That pride quickly disappeared in college, when I started taking truly hard math classes like advanced calculus, differential equations, and graph theory. My math struggles were demoralizing. I'm glad I'm no longer obliged to think about higher math. Plain math is enough for me.

Some might ask me, since I work in computers: Don't you have to know math to be a programmer? No, you do not. Of course, some programmers do need to be well-versed in math. Some of those include those who program 3-D games, or those who work in scientific simulations. I'm a garden-variety programmer, and I can assure you that math isn't required.

I thought about my past and present math prowess while looking at some FAANG job listings. I saw this sentence in a Facebook job post:

"Facebook's software test engineers can make $131237, which is 32% higher than the national average!"

The sentence was framed like a math problem from high school. What is the national average? To my surprise, it was a slight struggle to come up with this number. I pulled out pen and paper, defined my variable ("x"), then did some dividing and distributing, trying to recall basic algebra. After a few minutes I came up with the answer:

131237 / (1 + .32) = 99421.96

I threw this math problem at my wife, inviting her to figure out the national average. To my surprise and mild dismay she quickly said "it's around 99,000." She didn't even use a piece of paper! We had a lively conversation about how she got to the answer so quickly. (Her intuition involved calculating 30% of $100,000.)

As I said, it's a good thing I'm not required to do any math for my work. 

From Internet Archive Book Image

Thursday, June 30, 2022

Resolving the Rubik's Cube

On a recent trip to my parents, my brother told me he had relearned how to solve the Rubik's Cube. A few months before this moment he had noticed an unsolved Rubik's Cube in our parents' house. He picked it up and slowly became obsessed with solving it. I could only finish the top layer at the time. Luckily enough our parents kept the small fold-out solution guide for this toy.

When I first got the cube in the early 1980s I was stymied by how to solve it. The top layer is straightforward but how do you solve the whole thing? An old friend came over one afternoon and magically solved it right in front of me. He made believe that he was guessing and figuring out the moves on his own and I was completely fooled! 

It didn't take long before I realized you could just buy a book with the solution, which is what I did. After I had memorized the intricate steps for solving it, I began to time myself to see how fast I could do it. Somehow I learned that you could take the cube apart and oil its innards so you could spin the pieces faster. Yes I did this and I'm pretty certain I was able to solve the thing in a minute. All of this played out in the years before high school.

After seeing my brother solve it last month, I resolved to relearn how to solve it. I bought a Rubik's Cube and found the online solution guide from the cube manufacturer. After an hour of careful reading, I was able to solve my cube. The steps were complicated however, so I looked for an alternative solution. I happily found jperm.net by Dylan Wang. His page has a simple but slow method to solve the cube and I have recently memorized these steps.

For the moment I'm just happy being able to solve it again. I like the challenge of solving the cube using a different starting color. I've studied the moves from his website and on a solved cube you can see how the steps move the target edges or corners to the desired locations. The cube that I bought seems to spin fast, which is good if I decide to tackle speed cubing. For now, it's enough to have revisited this old obsession.



Tuesday, May 31, 2022

Review: Life in Code

I finished Ellen Ullman's book "Life in Code" (2017) last week. It's a marvelous collection of essays primarily concerned with computer programming. Her essays touch on the actual act of programming, but also the impetus of coding: what motivated her to want to learn to program a computer? She also tackles hoary subjects like computer privacy, the gentrification of San Francisco and artificial intellegence. Despite the title, the book is very accessible.

Ms Ullman explains her compulsion for coding by relaying her experiences with the Sony Portapak. As a college student, she reveled in the Portapak's utility as a video recorder. Released in 1967, the Portapak's size and cost instantly made video production easier and more accessible for the masses. She became an expert in how to use this machine to its fullest. She saw it as analogous to the appearance of the personal computer: a revolution in the old world order.

"I learned I had no fear of machines," she declared. Her ability to engage with the Portapak propelled her past videography and directly into a purchase of the TRS-80, an early personal computer. From this, she leapt into a computer career that spanned twenty years. She speaks fondly of her computers as "fine machines." She reminisces about talking her way into computer jobs, but she proved a durable ability to work on and solve computer problems.

She comments on the taciturn qualities exhibited by most programmers. "People imagine that programmers don't like to talk because they prefer machines to people. This is not completely true. Programmers don't talk because they must not be interrupted." She accurately distinguishes between low-level programmers versus high-level programmers. ("High is bad. If you want any money and prestige, you need to write code that only machines or other programmers understand.")

She knocks down the common analogy that computer algorithms are like cookbook recipes. Nothing could be further from the truth and she makes compelling cases for her argument. "For example, try to think of everything you know about something as simple as an invoice. Now try to tell an alien how to prepare one. That is programming." She imagines a hypothetical robot being asked to follow a recipe, and she wondered how we humans would translate for its computer mind the instructions "[sauté] quickly to a nice brown outside and a rosy center."

I read this book as an audio book while driving to and from New Jersey (from Boston). Ms Ullman was the narrator. Her voice over my car speakers made the book more personal. As she read her passages about the challenges of a varied programming career, she wove in stories of love, loneliness, her old cat and (yes) making dinner. I marveled at how seamlessly she brought in these subjects. Her writing is exquisite: refined, direct, yet evocative. I highly recommend "Life in Code" and I look forward to reading it again!


 

Saturday, April 30, 2022

Fun Facts About Me

At work the other day, we all went around the virtual table to introduce ourselves to a new co-worker. The first few speakers added "fun facts" about themselves, so I knew to be prepared to offer a fun fact about myself, but when it came to my turn, I froze.

"Well, I'm a parent of a college-aged kid, so most of my fun was before that," I said. The joke fell flat, and then I offered this: I binged watched five seasons of Homeland last Winter. "Binge watching TV," our host said. "That's always fun!"

The rest of the meeting went well, but I stewed about the lack of fun facts I could offer. My co-workers offered awesome-sounding fun facts: world traveling, high school athletic accomplishments, career changes, gaming. I had fun facts about myself too, I just couldn't be sure what they were.

Part of the problem was getting stuck on the word "fun". My ideas of fun have changed. I think I could have gotten past the word 'fun' by replacing it with 'interesting', but then they may as well be random facts. Fun is enjoyment and amusement. That helped crystallize the list: these were all things I enjoyed.

So, here are some fun facts about me:

  1. I attended a kids' soccer camp with Carlos Alberto as a featured guest (he was a player on Brazil's 1970 World Cup team) (circa 1980s).
  2. I have done a cross-country road trip across America with my family (1983).
  3. I did a tandem skydive (1989). It's not something I would do today!
  4. I met and shook hands with an astronaut during an internship (1989). (Joke: we were on Earth.)
  5. I met my wife through a personal ad in the Boston Phoenix newspaper (1991).
  6. I played ice hockey with a local recreational league (1993-1996), fulfilling a childhood ambition.
  7. I worked at a company that had an IPO (Open Market) (1996).
  8. I produced a cooking show (two episodes) for local community access TV (2001).
  9. I wrote a version of Tetris in C++ (for MS Windows) (2011). Remarkably, it still runs!
  10. I have read Ulysses (2012).
Tandem Skydive (credit: Joe Jennings)