Some Early Memories

I grew up during the 6o’s. I was born in 1955 and by 1960 I was more or less aware of the world around me. I remember going to kindergarten in Springfield, Illinois. My father taught Junior High School English. My mother was a telephone operator. Every morning I was dropped off at day care. When it was time for school, the five year olds were marched across the street to the elementary school where we attended a half day of kindergarten.

The schools in Springfield were very progressive. I remember being taught basic mathematical concepts with Napier rods. Those were the square sticks that were painted bright primary colors indicative of their length. We learned that two unit rods were as long as one rod two units long. We learned that four rods that are three units long were the same length as three rods that are four units long. I loved math class.

We learned to read about Dick and Jane and Sally and Spot. I learned to read very fast. I was hungry to read. My house was full of books and I was tired of looking at pictures and guessing what the words said. My folks read to me but I was a very independent child, an only child.

The next year I went to first grade in Rochester, Illinois, the suburb outside of Springfield where we lived. I got up and had breakfast with mom and dad and then walked to school. In the afternoon I walked from school to a neighbors house where I stayed until my mom and dad got home from work. Around Christmas that year my mom quit working. In February she went to the hospital and brought home my baby brother. I was no longer an only child.

That year at school we watched on TV as Alan Sheppard rode his Mercury Redstone rocket into space. In the afternoons when I got home from school, I watched the Three Stooges on the local afternoon kid’s TV show. Right after my mom brought my brother home from the hospital I was in the studio audience of the show. When the host interviewed me I said hello to my mom and dad and my new little brother and Lucile. When the host asked if Lucile was my girlfriend I said, “No, she’s my grandmother’s housekeeper that’s come to stay with us and help my momma take care of the baby.”

My momma later told me that Lucile had said, “Bless that baby’s heart.” She was overwhelmed with emotion to have been acknowledged on television by her employer’s white grandson. It was the sixties and I was a member of a generation that grew up with less prejudice than our parents. We still grew up with the burden of white privilege but we saw people as people totally blind to the color of their skin. At least that was how it was in First grade.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Smalltalk Continues to Evolve

I have so many interests that I find myself rotating between them in order to give each some small share of my attention. I sometimes go for extended periods of time without spending any time at an activity. Then I rediscover it and am intensely engaged by it for a while. Then, as abruptly as I renewed my interest I am on to the next one.

This weekend I rediscovered my fascination for the Smalltalk language. There are a couple of popular free implementations of Smalltalk, Squeak and Pharo. Pharo announced a beta release of their new 64 bit implementation for Linux and MacOS. I downloaded it and had a look. I was impressed with the advances that have been made in the system utilities.

I am drawn to a language that uses a single paradigm throughout. In the case of small talk that paradigm is object orientation. The language is written in itself and although some of its primitives are often optimized to native implementations there are reference implementations in Smalltalk available for browsing.

Another attractive aspect of Smalltalk is the fact that the source code for the entire system is available for perusal in the built in code browser. This inspires developers to use existing implementations of features instead of reimplementing them. If there is a need to modify or extend their functionality it can easily be accomplished by subclassing the original implementation.

Smalltalk was the inspiration for the promise of code reusability that was associated with object orientation when it first became a popular programming paradigm. Other object oriented languages have fallen somewhat short of that promise. It is primarily because few other languages come with the source code for the entire system as an integral part of the delivery. Or if they do, the language is implemented in a different language other than itself. This places the burden of being conversant with two different languages to take understand the fundamental features of the language. Often the built in classes are closed so that if you want to modify or extend them you have to reimplement them yourself.

Often the benefits of a language go beyond just its syntactic structure. Fundamental issues of philosophy, community, central repository for libraries, and availability of free implementations with good documentation and lots of example code are often as important as the basic structure of the language.

Java, Perl, Python, Ruby, and PHP serve as examples of what I am talking about. Each have their strong points and weaknesses but all have received the widespread use that they have for reasons beyond any merits they might have as programming languages.

It is also true that the best of languages are often passed over if they are the proprietary vehicles of large corporations. Such languages are subject to the whim of their owners who have been known to change a language in a new release only to break existing code written by their customers. It doesn’t take more than once to learn that you are better off using an open source implementation of an industry standard language.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Keeping Your Focus on the Task at Hand

A friend of mine commented on the post about fiddling with formats that I wrote several days ago. He said that he just used HTML when he wanted to get a page to look the way he wanted. I understand that I always have that option but I view it kind of like I do writing a program.

When it comes right down to it, I can always write my programs in machine language. Then I can get the machine to do exactly what I want. Only I can’t really do that any more. The programs that I want to write have become too complicated for me to write them in machine language. It would make a task that I would spend an hour on in a high level language take days. And tasks that I might spend a week on in Python might take months to get right in machine language.

Not only is there the issue of sheer effort but there is also the fact that because it takes so long to solve a problem at all in machine language, I would be way less likely to spend the time on tweaking it and refining it than I would if it were written in a higher level language.

And finally, there is the heart of the matter. I’m not really looking for the most efficient solution, I’m looking for an adequate solution. I want to think about the problem domain not the intricacies of mapping the problem domain onto the bare metal of the computer. I like my abstractions, thank you.

What this means when it comes to the analogy with WordPress is concerned is that WordPress gives me a consistent layout and lets me concentrate on writing. I am as adept with HTML and CSS and jQuery and JavaScript and all the various mechanisms used to render the incredible web content that we have all come to take for granted. But developing web content that way is hard work. And when I sit down to write a blog post, I want to expend the bulk of my effort on writing.

Hence, I use WordPress. I could embed raw html to achieve my layout goals within WordPress. But then I would have to remember how I did it every time and I would, in all likeliness, not achieve the consistence of layout that I am striving for. I’d rather find a consistent solution that someone else has written that is 80% of what I’m looking for than to have to implement it myself.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

There’s No Such Thing as Done

I used to think there was a right way and a wrong way to write a program. I found myself on a quest for the elusive right way to implement whatever program I was attempting to write. I wrote and rewrote the code. I read articles and books on techniques and disciplines. Nothing seemed to make programming any easier.

Slowly I began to suspect that maybe there was a continuum from good to bad and most programs fell somewhere in the middle. I hadn’t given up on the idea that there was an absolutely right way to do things and an absolutely wrong way. I just had plenty of evidence at hand that there were lots of ways that were neither absolutely right or absolutely wrong.

I don’t know why it took me so long but I have finally figured out that there are no absolutes. There are only criteria against which any given solution can be judged. The key fact that I had been missing was that there is almost never a single criteria by which a program can be judged.

I have become a dyed in the wool pragmatist. If a program achieves its intended purpose, it is good. If you discover there is another attribute that you would like it to exhibit, you have added a criteria. Now the program may fall short of adequately achieving its purpose. This will require some thought and perhaps a rewrite of the original program.

This activity of rewriting became so common that it has been given a name. It is called refactoring. Refactoring is done by first implementing a test suite that exercises the features that are implemented in the program as it is. It is also good to check the program in to a source code management system such as Git or Mercurial or even Subversion. There are plenty of others but these three are popular right now. With your test suite and backup copy of your original program you can now confidently start refactoring your program.

There are a number of ways that a program can be refactored. Each one solves a particular problem with the code as it is at present. For instance, you may have output to a particular type of output device hard coded in your program. In order to continue to support your current favorite device while setting the application up for supporting different kinds of output devices you might refactor your program so that it calls a print method on an output abstraction class. Initially you would concentrate on implementing an output abstraction class that supports outputting to you current favorite device. You aren’t going to want to quit using it.

When you have written that code and tested it against your existing test suite to ensure that you haven’t broken something in the process of changing the way it works, it is now time to implement the code to write to the new device. You will want to make sure that the current test suite still passes and that the code that supports the new device works properly. After that you need to write tests specific to your new code and ensure that it passes those new tests. When they work, check the new code and the new tests into your source code management system. You’ve implemented your new feature and you are ready to start on the next one.

Oh and don’t worry. Someone will want the program to do something more or differently before you know it. You have job security for as long as you want it.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Memories of Grandmother and Granddaddy

I remember my maternal grandfather was a jolly fellow. He loved to joke and sing. Often, he would get up early in the morning and start a pot of soup before breakfast. Then he would cook a big breakfast for everyone. He was in the restaurant business for most of his life. He had a big family. My mother had a sister and three brothers. She told me about waitressing for my grandfather.

One time when I was thirteen I went on a trip with my grandparents. We went to Saint Louis to visit my grandmother’s sister, Helen.  We were sitting around the table after dinner. The conversation turned to which direction the Mississippi River flowed past a point where there was a crook in it so that it flowed north for a short stretch before it turned back to flow south. Aunt Helen had the idea that north was uphill and south was downhill. My grandmother was trying to explain that this wasn’t so.

Every time when she had just about convinced Aunt Helen that there was nothing untoward about the river flowing north for a bit and then curving back around to the south, my grandfather piped in and said something like, “but that would mean that it was flowing up hill.” This would get aunt Helen confused and she would start arguing with my grandmother and my grandfather would sit there and laugh quietly to himself. He did this three or four times before he got tired of it.

The next day we went to see the Gateway Arch. It was newly completed and we rode all the way to the top and looked out the windows. Later we stopped at a Radio Shack. Radio Shack didn’t have nearly as many stores in those days and I had never been in one of them. I got their catalogs in the mail all of the time though. I bought a small audio amplifier kit. When I got home I soldered it together but I must have overheated the transistor. It never worked.

My grandmother was a Superintendent of a school system in Tennessee. She always had text book samples. I loved to read them. I remember one time when I was on spring break and she let me go to work with her. I was impressed with her office.

I started thinking about my grandparents when I realized that I am as old now as they were when I knew them. I don’t feel old. I understand now that they probably didn’t feel old either. Time sneaks up on you. Of course I stand a good chance to live a good bit longer than they did. Our medical science is a good bit more advanced than it was back then. It still makes me ponder my mortality though.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Fiddling with Blog Formatting

WARNING: This post is primarily an experiment in how to format code in-line in a blog post. If you don’t understand this post, it’s probably because I’m doing a lousy job of explaining myself. I am concentrating on form instead of content. Tune in tomorrow and I’ll probably be back to making some kind of sense. And now, back to your regularly scheduled blog post, already in progress.

I found that there is a style pulldown in WordPress that lets me put preformatted source code in a blog post. Surprisingly enough, it is called ‘Preformatted’.  There is an example of how it looks in the box below.

def hello():
    print('Hello, world!')

if __name__ == '__main__':
    hello()

There are better looking ways to embed source code in a blog post but this is the simplest one. Some of the other ways provide syntax highlighting to make the keywords of the programming language stand out. Most of them provide line numbers to make it easier to talk about the various lines in the program. I will investigate those tools and report back on them as I learn how to use them.

Since I have a piece of Python code to talk about, I will attempt to explain what the program in the box above actually does. When loaded interactively into a Python interpreter, it defines a function called hello() that prints the string Hello,world! on the screen.

If the file containing this code is run from the command line, the variable name is given the value ‘main‘. The code after the if statement at the bottom of the box checks to see if name is equal to ‘main‘ and if so, the function hello() is called in the body of the if statement.

If the code is imported as a library, on the other hand, name will not be equal to ‘main‘, so the body of the if statement will not be executed. The code that imports the file can then call the hello() function at its own discretion.

If you know Python, this post has probably been boring. If you don’t know Python, it has probably been confusing. This post has been more of an exercise in how to format code in a blog post and less of an actual tutorial on Python.

If you are interested in a tutorial on Python, look here. I will probably write more about Python in the future. I will make the code prettier next time. I will make the prose more illuminating. But there is just so much time available to blog each night and I didn’t have time to experiment with formatting and write riveting content in the same post.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

A Pixie has Stolen My Heart

We have a little Maltipoo puppy. We named her Pixie Woo. I think she imprinted on me. When we were at the breeders to pick out a dog, she stood up on her hid legs and and begged me to pick her up. I did. She rode home on my lap and by the time we got home, I was her human.

My wife tells me that Pixie cries for half an hour every morning after I leave for work. When I get home in the evening, she barks with glee and dances around on her hind legs until I pick her up and give her a hug.

And the affection goes both ways. I have never had a pet that I loved like her. She is such a smart girl. She has a large vocabulary and it’s growing all the time. She knows steak, chicken, and fish. She knows carrot and greenie. She loves carrots and greenies.

My wife plays a game with her where she gets her nose while saying “Boop!” She decided to be the “booper” and jumps up and tags our nose when we are playing the game.

When I call my wife to make plans for dinner, she asks our dogs what they want to eat. She goes through a list of possibilities. When she says something that they want, they high-five her.

I have spent a good part of my life studying computer science with the goal of creating artificial intelligence. Part of the challenge is coming up with a test for determining whether a program is exhibiting intelligence behavior or is just doing what it has been programmed to do. By all criteria I can think of both my dogs are extremely intelligent. But Pixie more so than Belle our older Maltipoo. One thing is for sure, I am lucky to be the human of such an intelligent, affectionate little dog.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.