Other People's Code

Posted by Roie R. Black on Sun 05 July 2015

Here is a quote from one of my chief role models in life. I have changed two words. See if you can figure out which ones they are:

“I say and insist that programming in company is much better than alone, for many reasons. The first is that you would be ashamed to be seen behindhand among the students, and such shame will lead you to careful study. Secondly, a wholesome emulation will stimulate you to be among those who are more praised than yourself, and this praise of others will spur you on. Another is that you can learn from the programs of others who do better than yourself; and if you are better than they, you can profit by your contempt for their defects, while the praise of others will incite you to farther merits.”

Interesting quote, isn't it. It speaks to a style of learning that is all too uncommon in academia. We teach individuals. Yes they are in groups, but we focus on individual skills, and have them work alone. Perhaps this is wrong.

Learning from Others

I teach Computer Programming. Check that! I teach Software Engineering. There is a big difference. One can lead to a job, the other to a profession. Learning how to write computer programs is something I have spent the better part of 50 years doing. I am not done. I study code, and have done so since I started learning the craft. Although I cannot speak more than one human language (in spite of the best efforts of Mrs. Costa trying to teach me Spanish in high school), I have studied and written programs in over 40 different computer languages. That never ceases to amaze me!

One of the great resources for beginning programmers is the open-source community. There are hundreds of thousands of examples of code I call OPC: Other People's Code. Some of this code is good, some is bad. All is worthy of study. That is especially true if you want to master the craft of programming.

Many masters of their craft tell you to follow the examples of others. In the art world, copying the work of masters has a long tradition. In the days before computers were even thought up, apprentices would spend years following the masters to learn the craft. Sometimes these students would contribute to the master's work in some small way. I am convinced there should be more of that in schools today. Textbooks are too dry (and expensive) and do not show you the good, bad, and ugly of the craft being taught. A good student needs to practice far more than just doing what is assigned. They need to develop a passion for this craft they want to pursue, and generate their own projects!

Getting Started

Finding something to practice on can be a challenge. Of course, students are under pressure to get work done while in a class, but what you do for your own advancement tells far more about you than the grade you got in that class.

Something has to get you excited about the profession you want to pursue. I remember building programs while in college that had nothing to do with my studies. I wrote one hugely complex program to help me build a model airplane with a complex wing structure full of sweeping elliptical curves. I had to plot out all the parts by hand, and the program I created did the hard work for me. I spent more time on that program than on the labs for the physics courses I took that term. I learned a lot in the process!

You find the time to do the things that are important to you. And understanding what made airplanes fly was important to me! It still is!

I start many projects, just to learn something about a new technique. I post much of that work on GitHub, a hugely popular place to find open-source projects. I search GitHUb for examples of code folks put together the way I would like to build my own projects. I study the craft of programming. Perhaps I do not have a single master to learn from, but I have found dozens of developers, whose work I respect. I use their examples as a guide in creating my own lecture materials.

Finishing Projects

One of the biggest problems I have grappled with in my life is not finishing projects. I have suffered countless lectures on how bad a sin it is to leave work unfinished. Oddly, my life role model was given the label of "chronic procrastinator", and yet he is one of the most respected and well known people the human race has ever produced.

In his own words (slightly modified):

"Programs are never finished, only abandoned"

Why do I leave so much work unfinished? I have always believed that my interest in a topic was to understand it well enough to know if it was a worthwhile topic in the first place. I would study something until I understood it. Then I would think about where that topic fit in to the world I envisioned. I would add it to my set of ideas worth considering in the future, and I would move on to the next topic. In some respects, I am a student of all technology, not a master of any single technology. I choose to go just deep enough to see the value in the technology, and no deeper. Others who go deep into a technology may well become a master of it, but they may also miss the broader landscape of the technological world we live in.

This approach led to some interesting opportunities in my professional career. I was able to discuss just about any advanced technology folks brought up in our work, and ended up being an advisor to my bosses. I was placed in positions to make decisions on the technologies we would pursue, and placed in charge of teams doing the technical work. That was something I am pretty proud of.

I sometimes wish I were teaching in a graduate program where I would have "slave labor" (aka graduate students) to pursue the projects I start, just to see them finish. Me? I am off exploring another new technology!

The Path I took

I am convinced that all those hours wandering the halls of the Smithsonian as I was growing up created this intense curiosity about the world I live in. I would wander into a random hall and be fascinated by whatever I saw there. Some of the displays caused me to marvel at the theme of the display. Others caused me to marvel at the craftsmanship of the artists who created the displays. Indeed, my friendship with Andre De Pizzini, a staff artist who worked in the Department of Entomology in the Museum of Natural History, offered me a chance to visit the offices where these artists created the displays. The art got my attention as much as the topic being displayed.

Andre's illustrations of a bug head

Note

I can not believe what the Internet can do, these days! I "googled" Andre, and came up with a journal article that featured his illustrations. Andre taught me a lot about drawing with pen and ink, my favorite medium as a young artist while in high school.

I watched Andre spend hours staring through a microscope looking at insects and drawing what he saw. Those days are probably over with all the digital photography now, but he was a master of his art back then!

Programming is Creative

As much as I was into art back in high school, I knew my passion was more technical. I wanted to understand how airplanes flew, and my drawings from back them were all about airplanes. I had to tell my art teacher, Dr. Vincent deGregorio, that I was not interested in his efforts to get me a scholarship in art at American University. I was going to study aeronautical engineering at Virginia Tech.

But my creative side found a new outlet. When I first discovered computer programming in 1965, I found a new way to create something in the technical world I was so fascinated by. Writing has always been considered a creative art form, and writing computer programs is a creative activity. You express your solution to some problem in a form a computer can follow to do something good for some human user!

Becoming good at this takes a lot of practice, just as becoming good at art takes a lot of practice. You need good role models to help you along the path you have chosen.

Role Models

Back to my role model's quote.

I found my quote in an interesting article by Jon Brook.

We all need role models. If you were lucky, perhaps your parents were role models, or your favorite teacher. I have a hard time viewing anyone in sports, these days, as role models. Just when you think one is worthy, the news tells you otherwise.

Who was my role model? (You know if you clicked on that link!)

Leonardo Da Vinci!

What were the two words I changed? Drawing became programming, and drawings became programs.

Leonardo studied the works of others and was himself studied as well. I suppose we can safely say he was the master of his craft. His interests were far reaching and legendary. And, many of his greatest works were unfinished.

Probably his greatest: "The Adoration of The Magi", hanging today in the Ufrizzi in Florence:

Adoration of the Magi

So, if you want to become a master of anything you are passionate about, study the works of others. Practice your craft, and become better at it each day. Start projects, and do not fret over projects you never finish. The point of all the effort is to learn! Never stop learning until you simply cannot learn more. (When that happens, you will be no more. Perhaps the world will finish up where you leave off!)

His comment on unfinished work. We saw it earlier:

“Art is never finished, only abandoned” – Leonardo Da Vinci

Comments


There are no comments yet.

Add a Comment

You can use the Markdown syntax to format your comment.