Choosing a Programming Language

I have come to a realization today. Actually it has been gradually dawning on me but it came clearly into focus today. I consider myself somewhat of a connoisseur of programming languages. It started when I was first learning about computers. I read every issue of Byte magazine. But my favorite issue of Byte was always the August issue.

Every August Byte featured a different computer language. This is how I first learned about Lisp, Smalltalk, APL, Forth, C, and several others. The language issue always featured several articles that illustrated the breadth of each language and described the innovations that it brought to the table. Byte magazine eventually faded into the sunset but my hunger for new languages only grew.

I was on a quest to find the most eloquent computing language so that I could write beautiful programs. On my journey I learned a lot about design, organization, communication, methodologies, and process. I also learned to program. I slowly began to realize that although some languages were more eloquent and expressive than others there were other factors that were more important in choosing a programming language.

First, you want to pick a language that is widely used and has a strong community. This is important so that other people will be able to read your code and maintain it. It also ensures that there are a lot of community developed libraries to leverage when you are coding your application. It also means that there will be people around to help you figure out what you are doing wrong when you are at wits end.

Second, you want to pick a language that has a clear understanding of its philosophy. This usually happens when a language is shepherded by a “benevolent dictator for life” as Guido van Rossum, the creator of Python, calls himself. Another example of this is Ruby’s Yukihiro “Matz” Matsumoto. This kind of strong vision helps keep the language focused on solving problems in a particular fashion. The consistent flavor of a language is often more important than any other measure of technical quality.

Finally, pick a language that you like. If you are going to spend large chunks of time reading and writing code in a language, don’t choose one that frustrates you or causes you to have to struggle with it to solve your problem. There are way too many choices of language out there to spend any time at all being miserable.

When you find a language that is good enough, quit looking, at least for the time being. There will always be a newer, better language. These languages will take years, even decades to develop a community and the resultant libraries and infrastructure that make a language ecosystem great. Revisit your choice periodically. Don’t discount the investment that you make in the language that you have been using.

Of course you will often be told what language you must use, especially if you are working on a large project. In that case, cheer up. There are always ways you can improve the experience of using a language, if no other way than using a disciplined approach that lets you capitalize on your successes and minimize your struggling. And there is always the ultimate consolation of learning features to avoid in choosing future languages.


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

The Future’s So Bright We’ll Have to Wear Shades

We live in exciting times. Earlier tonight I was sitting on the couch with my iPhone laying on the tray in front of me. I was watching a YouTube video. I was listening to the audio through a pair of Bluetooth headphones so that I wouldn’t disturb my wife. All of a sudden I remembered the scene in 2001: A Space Odyssey where Frank Poole and Dave Bowman were eating and they each had a pad that was displaying video.

We are living the science fiction stories of our youth. And it’s happening because engineers are taking them not as fantasies but as specifications. They are using them to fuel the engines of creation that our modern consumer society has become.

One person that is working these miracles of engineering is Elon Musk. He has figured out how to take a vision for a future product and distill it into steps that can be achieved with technology just beyond our grasp. As he pulls together the team of innovative entrepreneurs to realize his vision he uses the returns from the initial product to fund the evolution of it into the original product he envisioned.

He has done that with Tesla and SpaceX and is embarking on a new venture to do the same type of thing with a company called Neuralink. Neuralink is out to develop the brain machine interface that will turn us all into omnipotent geniuses.

Don’t get me wrong. I’m ready to sign up tomorrow if he had the product built and ready to go. Unfortunately, there is a long development road ahead. The first beneficiaries of Neuralink’s technology will be people profoundly handicapped by such conditions as a stroke or a spinal chord injury. This will start a positive feedback loop where the more we are able to enhance the mind machine interface, the better we will understand how the brain really works and the better we understand how the brain works, the better we’ll be able to make the interface.

Eventually we will merge, first with the machines that will have become our mental appliances, and eventually with each other. When there is no room for misunderstanding in the interface, we will have a practically infallible channel for communication.

No, I’m not that naive. We will figure out some way to have misunderstandings. Or perhaps they will be disagreements more than misunderstandings. The important thing is that they will be on a much higher level of shared understanding than our mere verbal and body language can communicate.

That, in a nutshell, is my hope for the future of the technology that Neuralink is working on even as I write this. I hope they get it right. The future is bright if they do, and a nightmare if they stumble. I am the eternal optimist. I have faith that they will get it right. Mostly.


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

Getting to the Point, Finally

When I started writing about my experiences in the sixties I didn’t plan to go into quite as much depth. The point that I was out to make was that at the beginning of the sixties I was a child and by the end of the sixties I was an adolescent. Adolescence is a strange time in a persons life. We suddenly have the body of an adult with a mind that hasn’t quite caught up. We are feeling emotions and thinking thoughts that we have no experience with.

What’s worse is that in our society there is profound discomfort on the part of many parents when it comes to the task of talking with their children about sensitive topics like sex and career choices and how to choose a life partner. And, to add to the problem, the discomfort is passed down from generation to generation.

I find myself at sixty one, just beginning to appreciate what I want to do with my life, how I should have raised my children, what is important and what is not. This could have happened forty or fifty years ago if my parents had been taught how help me with these issues. What’s worse, my children and grandchildren face similar delayed epiphanies.

I look at the generation that is just getting out of college and I see how so many parents have failed their children. We have taught them that they should get a trophy for just participating. We have taught them that they can live at home as long as they like. It was made clear to me that when I got married, I was on my own.

The world is different. College costs more. College or some other form of post secondary education is expected of anyone who wants to pursue a good job that pays a living wage with benefits like health insurance and a retirement plan. And modern retirement plans aren’t the pensions that were common when we started working. They are typically deals where the employer matches employee contributions to a 401K up to a certain percentage of their salary.

We’re faced with the fear of many more jobs being done by machines in the very near future. This should be good news. We should all be reaping the benefit of a more productive society. After all, in order to make money selling goods and services you have to have customers to buy them. And those customers have to have income available to spend on those goods and services.

Is it any wonder that the world is in such chaos? The fundamental economic model is being invalidated and no one knows what we are going to replace it with. But in spite of all this uncertainty I’m convinced that the only way through this is to face our fears and love one another. I’m not sure of much but I am sure that love is the answer. Pure, unconditional, brotherly love. Namaste.


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

A Star is Born

Before second grade, we moved to Paducah, Kentucky where I would spend the rest of the sixties. I went to Andrew Jackson elementary. It has since been renamed in memory of the woman who was principle when I attended there, Dove Anna McNabb. I remember my second grade teacher. She had black hair and brown eyes. Every morning as soon as class started she would write the news and weather on the board. We would copy it onto our tablet. She taught us conversational Spanish. All the boys had a crush on her. All the girls loved her too. I’ve tried to remember her name for several years now to no avail.

My dad taught Speech and English at the High School. He also did the plays. Tilghman High School was huge. It had a large theater and a football stadium. I suspect it wouldn’t seem quite as big to me now as it did when I was growing up in Paducah but even so, I’m still impressed by it.

One of the high points of my life growing up was getting to attend rehearsals for my dad’s plays. Tilghman was a large enough high school that there were lots of talented actors to pick from. He did productions as diverse as Macbeth, Mr Roberts, The Rainmaker, The Miracle Worker, Ondine, and Lady in the Dark. All were mounted with consummate stagecraft.

The spring of my second grade year my mother and father and I auditioned for a production of a play called Stars In My Crown. It was being produced during the summer at Kentucky Dam. It told the story of the development of the TVA and its role in taming the rivers of Western Kentucky. My mother was cast as the school teacher and I was cast as an extra. I played a student in the school scene and a young Indian in the scene about the Trail of Tears. My dad was hired as property master.

That summer and the next were magical. We got up around 11 am and ate lunch. We got ready and took my little brother to the baby sitters. We drove to the theater. Mom would usually pack a picnic dinner. We would eat and get ready for the show. I would play with the other children in the show.

The curtain went up at eight. The show had two acts and a twenty minute intermission. It was done outdoors in an amphitheater. After the show, the director or the stage manager would give us notes about things we needed to do to improve the show the next night. Sometimes we would rehearse a scene if we were getting too sloppy about it. Then we would drive home.

Often we would stop at a little all night truck stop on the way home. Mom and dad would drink coffee and I would have milk or a soda. Sometimes I would get a hamburger. Then we would go pick up my brother at the baby sitters and go home to bed. We did this six nights a week, all summer long. I loved it.

When I turned eight at the end of June I had the entire cast of Stars In My Crown at my birthday party. It was held after the show on stage. I felt like a very special person indeed.


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

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.