A Call to Action

I have been thinking a lot lately. I suppose I am a fairly contemplative guy most of the time. I try to glean meaning from the things that I observe in the world around me. I have been struggling with that of late. I just don’t understand why the people that are the nastiest rise to the top. I understand that we are living in a world where we have more access to news than has been the case in the entire history of the world. We know more about what is going on in Europe than our ancestors knew about what was going on in the next state.

Is this a good thing? I think so. It depends on how reliable the information is. If we don’t trust the information it is worthless. If someone manipulates the news, filters it, slants it, it becomes propaganda. When I was growing up propaganda was an emotionally charged word. It was what America’s enemies, the Communists, told their people to hide the atrocities they were committing. It never occurred to us that our own government was guilty of similar cover ups.

In the modern world the problem has evolved somewhat. Sure, governments still spin their news releases but the big culprits are the rich. Corporations hire armies of public relations staff to craft the story that puts them in the best light and then see that it is delivered as written. For the most part, our news channels have become entertainment channels that are more concerned with delivering eyeballs to advertisers than reporting the truth.

And we, the consumers of this mislabeled drivel are not free from blame. We don’t think critically about anything any more. We were schooled by an educational system that has been on a downward spiral for at least fifty years. Educational standards were adjusted to fit the bell curve of the performance of the classes instead of holding them to absolute standards of achievement. Then, when those students were turned out as the teachers of the next generation, they let the standards slip further.

We have tried several strategies to address this problem, with little success. We mandate universal testing only to find that the students are not being taught the fundamental principles of their subjects but rather how to pass the standardized tests on them. Such rote learning does not engender the kind of critical thinking necessary for a democracy.

Then there is the fact that we are so bombarded by information and entertainment we have become complacent. It’s too much trouble to go to the local city council meeting and take an active role in the community. I might miss the latest episode of The Big Bang Theory or Survivor. That is clearly more important than first hand civic involvement.

It is easy to point out what is wrong. It is hard, and becoming harder, to come up with viable solutions to these problems. Again the problem is, we haven’t been taught critical thinking skills. And those of us that have developed them are typically using them in a narrow scope, namely our professional endeavors.

I feel like the old man yelling at the neighborhood kids, “You kids stay off of my lawn!” I doubt that anyone will listen or if they do that they will do anything about it. I know that I haven’t done anything myself other than write this indictment. It isn’t that these problems haven’t been pointed out repeatedly over the years. It’s just that we still haven’t done anything about it.

Here’s my proposal. Everybody pick one thing that bothers them about the world. Think of some way that you can help make it better. And then do it. If it helps, good for you! But if it doesn’t immediately help, think of something else that you can try. Because in the final analysis, we’ve got to all pitch in and keep trying or just give up and lay down and die.

You Start at the End

I just watched a wonderful routine by Penn and Teller in which they teach us the seven principles of magic. They tell us what they are doing and yet the still manage to mystify and amaze us. In case you were wondering, the seven principles are, to palm, to ditch, to steal, to load, to simulate, to misdirect and to switch.

I can’t help but think the same principles are an integral part of writing a truly great mystery story. Or singing a good song, or painting a good painting. People love to be surprised. They love to find layer upon layer of meaning in just about anything that you show them. And now, I finally understand how you go about creating something of this sort. I’d like to say I figured it out myself but actually, people have been telling my this my whole life.

If you want to surprise people, you have to create the effect backwards, starting at the ending and working your way backwards to the beginning. It’s the way you write thrilling stories. It’s the way you make thrilling speeches. It’s the way you write compelling songs. And, it is the way you do magic tricks.

No Plan Survives…

Helmuth von Moltke, a nineteenth century German Field Marshall once said, “no plan survives contact with the enemy.” His point being that the act of executing a plan has immediate and often profound effects upon the assumptions upon which the plan was founded. Hence, to achieve the originally intended results, the plan must be continuously amended to account for the shifting state of affairs.

That about sums up the last several weeks of my life. It seems that every carefully laid plan that I have undertaken in the past several weeks has blown up in my face in fairly short order. For instance, I thought I had made a good plan for writing my book. I had a rough outline down and a plan for when and how I was going to write it.

As for when, I planned to sit down each evening at nine o’clock and spend an hour or so working on the book. I figured that I would split the time approximately equally between developing the example code and actually writing the body of the text.

Then I started my exercise program. The plan there is to average 13,000 steps per day for six weeks. The carrot at the end of that stick is a $100 Amazon gift card from my employer if I manage to do it. So far, I have managed to do it. I have come close to not meeting my daily goal several times. I found myself walking around at 11:45 finishing up my steps on more than one occasion.

Usually, I get a walk in after work and the rest of my evening is free. The problem then is, that when I do sit down to write, I am often so tired that I can barely keep my eyes open. So, I end up going to bed without getting any writing done.

What is worse, when I do manage to work on the book, I realize that I am going about it wrong. I can’t spend a little bit of each session developing example code and a little bit writing about it. I’m going to have to dig in and write the example code first so that I will know what I’m talking about when I do write about it.

Furthermore, my outline is going to have to be severely truncated and I am going to have to adjust my tone to better suit my target audience. The good news here is that the schedule to which I am working is self imposed. I have the flexibility to make these decisions. That is part of what I enjoy about working on a project without a boss.

These examples may seem trivial but they represent only the tip of the iceberg. Every aspect of my life lately, from work to hobby, from interpersonal relationships to my social life, such as it is, is experiencing the same sort of upheaval. I feel like I’m living the Chinese curse, “May you live in interesting times.”

If Writing Were Easy

If writing were easy, everybody would be writers. I suppose it’s true but it is frustrating when you have things that you want to say and you have trouble finding the right words to say them. That was the situation that I found myself in this morning.

After writing for most of an hour on a topic I feel strongly about, I looked back over what I’d written and realized that it wasn’t conveying what I wanted to say. I was going to have to spend some time researching and rewriting it before it would be ready to be a blog post.

This was frustrating for two reasons. The first and obvious one was that I would have to continue working on it another time. The other was that I would have to find another topic for my blog post. Little did I suspect at the time that the very situation causing my frustration would be the remedy for that second frustration.

I don’t like to write too much about the process of writing. It takes time away from actually writing about the things that motivate me to write in the first place. But, on the other hand, everything that I write helps me learn to write a little bit better. And, more to the point, this piece helps me keep my commitment to post to my blog daily. I’ll try to keep these “meta-posts” to a minimum though.

It’s a Beautiful Day

Indeed, it was a beautiful day. But I want to talk for just a minute about the band It’s a Beautiful Day. Their first album, named, strangely enough, It’s a Beautiful Day, was one of my favorites. David LaFlamme and his five string violin, his wife Linda on keyboards, their passionate vocals, all combined to mesmerize me for hours on end. Or it might have been what I was smoking. But seriously, I wondered what happened to them.

I was reminded of them when I looked up at the sky tonight and saw the clouds and the moon and the stars in a pattern so very much like the cover of that album. So, when I got back in from walking the dog, I looked them up on that modern oracle, Wikipedia.

It seems they narrowly missed being at Woodstock. Michael Lang, the Woodstock promoter was negotiating with Paul Graham to get the Grateful Dead to play at Woodstock. Paul offered him two other bands, It’s a Beautiful Day and Santana. Michael liked them both but only had room on the bill for one. He flipped a coin and Santana won.

I wish things had gone differently for them. I would have liked to have heard more of their music. I didn’t seek out their later albums though. I do still love that first album though. White Bird, Hot Summer Day, and Bombay Calling are still near the top of my all time favorites.

I’m So Thankful for My Health

It is disconcerting to hear stories of people having serious age related medical incidents and then realizing that they are the same age as you are or younger. It is at times like these that one realizes how blessed they are to be in as good a health as they are.

My employer conducts an annual fitness program where they give any employee that averages over 13,000 steps a day for six weeks a hundred dollar gift card from Amazon. This is remarkably motivating for me. It is not that $100 is that much money. I could set aside $100 for something without much hardship. The important thing from my perspective is that it is $100 that I can spend on something frivolous for myself without feeling like I’m being irresponsible.

I have managed to earn the card for two years running and I am on the last day of the first week of this year’s program. So far, I have walked 86,072 steps in the first six days for an average of 14,345 steps/day. I am trying to build up a reserve of steps walked so that if I have a day where I don’t manage to make the 13,000 step quota, I will have some extra steps “in the bank” so to speak.

One thing I notice this year, I am falling into the pattern more quickly. I sleep better and require less sleep to feel completely rested. I am losing weight again after being stuck on a plateau for most of the year. Actually, I have been gaining about a pound a month over the last year. I have managed to lose back to where I was at the end of last year’s event already.

I made the mistake of deciding to take a couple of weeks off at the end of the last event. It didn’t work out well. I had been walking every day and I fell back to walking two or three times a week. I went from an average of over 14000 steps/day to an average of ~6500 steps/day. It showed up both in my gradual weight gain and an overall reduction in my general health. For instance, my A1C, an indicator of long term blood sugar, went up from below 6.0 to 6.7. That is not phenomenally bad, especially for a diabetic, but it is an indication that the walking was helping.

This year I intend to keep walking after the event is over. I may set my expectations down to just making my 13,000 steps instead of trying to save up extra steps but maybe not. I will definitely keep the daily walk as a part of the regime.

This brings me back to where I started. I am so very thankful for my health. I have a lot of things that I still want to do and I need to take care of my health so that I will be around to do them. I didn’t mention my mostly vegetarian diet but I’ll save the details of that for another post.

Musings on the Evolution of Programming

When I started my career as a programmer things were a lot different than they are now. Computers were just becoming less expensive but they were still being designed and operated as if they were the expensive behemoths that required huge air conditioned data centers and a small army to operate. The era of the temple of the computer was waning.

For those of you too young to remember, the temple of the computer had an outer vestibule where the unwashed masses were allowed and an inner sanctum with a counter separating it from the outer vestibule. There was a kind of priesthood of operators that intervened for the mere mortals who brought their offerings of decks of punched cards to be submitted to the great and powerful machine.

Then, after some passage of time, you would learn whether the gods had smiled upon you and run your program or whether you had a mistake in your deck. In either case you received a printout that contained the results, be they the output from a successful run or the core dump from an unsuccessful run. You also typically received a report of how many seconds your run had taken that was directly related to how much your account would be charged for the run.

All this changed with the advent of the microcomputer. The problem was, most people that were programming these modern marvels had learned at the temple of the computer. Consequently, things were oriented to be more convenient for the computer than the user. This was particularly true when it came to how you entered your program into the computer.

Early microcomputers had two types of languages, compiled languages and interpreted languages. Compiled languages were rare at first because most of the early microcomputers did not have much if any secondary storage. They typically had paper tape readers or cassette tapes hooked up to load programs from. Consequently, interpreted languages like Basic were the norm.

Basic programming had two modes of operation. In immediate mode you would type in a command, hit return, and the computer would run the command immediately. In programming mode you would type a line number followed by a command, hit return and the computer would store that line for execution later.

The line numbers were used to sequence the program with the lowest number being the beginning of the program and proceeding upward until you reached the highest line number. When you were through entering the entire program you would type the immediate command “run” and the computer would start running the program that you had entered starting at the lowest line number.

This was what happened in the best of cases. What typically happened the first time that you ran a program is that the computer would print an error message like “Syntax error in line 2215”. Then you would type “list” to get the computer to display the program on the screen so that you could try to figure out what was wrong with line 2215.

To fix the problem you would have to retype the entire line in error, including the line number, with your corrected instruction. This was labor intensive but I loved it. I was making the computer do my bidding like a genie in a bottle. Somehow though, I knew there had to be an even better way to enter the program.

There was a better way. It was a program called a text editor. It allowed you to create a program that you then saved, either to tape, a floppy disk, or, if you were extremely lucky, a hard drive. The first text editors were line oriented and were little better than the Basic interpreter. They had commands that allowed you to make corrections to a line without having to retype the whole line. There were even some commands that would allow you to change every occurrence of a particular word or phrase to another word or phrase in the entire file.

The next innovation in programming was the screen editor. It was similar in operation to modern word processors except it didn’t allow bold facing or underlining or any other kind of styling. This wasn’t required for programming. Screen editors allowed you to use the cursor keys to move around in your program and correct it by deleting the errors and inserting the corrections directly.

Keep in mind that these innovations were taking years to come to pass. Life was getting better all the time for programmers. At this point we even had character based games that drew maps of dungeons on our screens using dashes and vertical bars and represented monsters with single letters that would move around the screen and attack the single letter that represented you in the game.

But life got better still with the introduction of the programmable editor. This allowed the user to create their own custom sequences of commands to reduce tedious repetitive corrections to a single command. For instance, suppose you had a file that contained a hundred lines that had all consisted of some arbitrary text with the unique string “$$” on each line followed by a number. You need to change the number so that it has a decimal point and two zeroes appended to it. A programmable editor would allow you to create a custom command that would look for the string “$$”, find the end of the number after that point and append “.00” to it. This saved countless tedious hours.

That was not the end of improvements in the programmers lot by a long shot. It is however the end of this blog post. I may revisit the topic and bring you up to date with the innovations that came after this point if there is any interest.

A Language to Build Languages

I’ve been fascinated by computers since before I graduated from high school. One of the early ideas that captured my imagination was the possibility of creating a program that could think like a person. Throughout my career I have pondered the possibility and I have come to the conclusion that while we may be able to write programs that provide the fundamental structures and operations upon which intelligence may emerge, we are far from understanding how intelligence works well enough that we can reproduce it constructively by design. That puts me in the camp that is sometimes labeled emergent AI, although I prefer the term digital intelligence to artificial intelligence.

One of the aspects that I feel will be required for emergent digital intelligence (let’s abbreviate it EDI, shall we), is the ability to introspect, that is, to examine its own thought process. This is something that I have felt for a long time, in fact, for almost as long as I  have been interested in computers. I have always looked for ways that programs could examine themselves. For instance, I was fascinated by the fact that I could write code that examined its own representation in memory and even modify itself while running in Microsoft Basic as early as 1979.

Much of my early introduction to programming was due to a subscription to Byte magazine, an early journal aimed at amateur microcomputer enthusiasts. Every August, Byte published their annual computer language issue in which they explored the features of a different language. I suspect that this was my first exposure to the Lisp language. Lisp is the second oldest high level computer language, predated only by FORTRAN.

It is also the first computer language that focused on symbolic processing instead of being primarily concerned with numerical computation. That is to say, it was written to facilitate the manipulation of lists of symbols. A symbol, in this case, is an arbitrary label or name. For example, you might have a list:

(alice bob ralph sally)

The parenthesis denote the beginning and end of the list. The four names are symbols and make up the elements of the list and they are considered in the order that they are written between the parenthesis, that is alice is the first element of the list, bob is the second, ralph the third, and sally the fourth and final.

Further, Lisp code was represented by lists, just like its data. Consequently, program code could be manipulated by the language as easily as data could. This jumped out at me immediately as giving Lisp the ability to introspect over its own code. Another, more subtle capability of Lisp is the ability to take a list and rewrite it according to a template called a macro. This turns out to be incredibly useful in allowing repetitive operations to be condensed to their essence.

Lisp is typically implemented as an interpreter. It accepts a line of input, processes it and prints a result. This is called a Read, Eval, Print Loop or REPL for short. The reason that I bring this up at this point is to point out that the component that does the Read portion of the REPL is a very interesting piece of the picture. It takes a list of input characters and parses them into symbols and builds them into a small program. It is responsible for recognizing if there are any macros in the list and if so, expanding them into their translations. When it is finished, it has a complete, correct lisp expression to hand to the Eval portion of the REPL. Either that or it detects that something is wrong and prints an error message.

This Read operation is very powerful, even more so in the standard Common Lisp version of the language. In Common Lisp, the Read function is table driven. That means that by substituting a different read table, the reader can parse a language with a different syntax. The implication of this is that Lisp is not only a language, it is a framework for building new languages.

This has been a long story and you may be feeling a little lost by now but the point is that Lisp is exactly the kind of substrate upon which EDI can most easily be built. There are many modern computer languages that implement many, if not most, of the features of Lisp. The point is that Lisp implemented them first and best.

The idea that the structure of a Lisp program is similar to its syntax, a property called homoiconicity by the way, is at the heart of its power and responsible for its longevity. It also make it the prime candidate for building the environment in which EDI will emerge.

Update on Digital Super-Intelligence

One of my tech heroes, Ray Kurtzweil, has long been predicting the Singularity, that is, the point at which digital intelligence surpasses human intelligence. In an interview at a conference on Exponential Finance he discussed his views on preventing what he called existential threats. His position seems to be that since our generation has dealt with the nuclear existential threat we at least have an example that it can be done.

While I agree, to an extent, and applaud his optimism, I still think that the digital super-intelligence existential threat is different in magnitude if not in kind. As I said In my prior post, we need to raise awareness of the danger and actively pursue making contingency plans. We should assume that it is liable to happen and work to reduce the probability that it will while also thinking of ways to mitigate the danger when it does. It will do no good to ban AI research and think that we have dealt with the problem.

It Lives!

I watched the Carpool Karaoke episode on The Late Late Show the night before last. James Cordon had Lin-Manuel Miranda, Audra McDonald, Jesse Tyler Ferguson and Jane Krakowski in the car singing songs from Hamilton, Rent and Les Misérables. It was incredible.

I am not a big fan of rap music. In the case of Hamilton though it is absolutely brilliant. Perhaps the things that put me off of rap was the gangsta topics many rap songs focus on. I have no experience of the things they are talking about and I don’t like the glorification of violence that it seems to advocate. Hamilton on the other hand is a literate exploration of the life and times of one of the founding fathers of our country from a perspective rarely seen in main stream history books.

I have long been a fan of Broadway musicals but I felt they were in decline in recent years. Rent and Les Misérables were of course notable exceptions. But I think Hamilton is the tipping point. It has brought relevance back to the musical. Coming from a theatrical family, my parents were both Speech and English teachers that produced high school plays, it warms my heart to see the revival of the live theater experience as an integral part of our American culture.