When I was a kid, I found it fun to create “art” using a Paint by Numbers kit. Maybe you also played with it as well.
Paint by numbers was a way to take a person with minimal skill (that would be me) and have them follow some basic steps to “create” a recognizable painting.
For example, do you recognize this face?
Yeah, that’s the enigmatic expression on one of the most famous paintings on the globe. And that’s what it looks like using a Paint by Numbers kit.
But what about the original? Here is what Leonardo created:
While the first painting is recognizable, it is what I would expect to get as an unskilled painter. By following a set of rules and a sequence of mechanical steps, I can produce something somewhat recognizable.
So what am I getting at with this comparison?
In my experience, creating software to solve complex problems is a correspondingly complex endeavor. In his classic text, “The Mythical Man-Month” Fred Brooks refers to programming as a “craft”. Much as creating a work of art is a craft, so is creating software. It is not about grabbing a brush and putting paint on a canvas.
In describing the task of writing software, Brooks says “If one character, one pause, of the incantation is not strictly in proper form, the magic doesn’t work. Human beings are not accustomed to being perfect, and few areas of human activity demand it. Adjusting to the requirement for perfection is, I think, the most difficult part of learning to program.”
With advances in Artificial Intelligence and sophisticated IDEs, the idea of having the computer write the code for you is becoming popular. An emerging example of such a system is GitHub’s Copilot offering.
Copilot is an extension of your IDE (e.g. Visual Studio) that suggests code snippets as you write code. To a great extent, this can be useful. I have always been supportive of tools that speed up code writing such as variable or method/function completion. Even copy/paste can speed up coding and encourage the use of meaningful variable and method/function names.
The use of AI techniques provides Copilot with a range of suggestions for code snippets derived from a compendium of other developers’ coding. I can select from a number of snippets to help speed up my coding.
But does it help my programming? That is, do these suggested code fragments do anything to help me realize my overall system design? Not really. While it speeds up entering code (reduces keystrokes) it does not really help with the overall expression of the software system I am designing and implementing.
So, it is a lot like “Coding by Numbers” in that it can help with the mechanical aspects of writing code. And the code fragments may even help reduce bugs if the code selected is well written.
But let’s not forget that the most challenging aspect of creating reliable and secure software comes from the broader interaction of all of the “moving parts” of a design. In order to be able to test and debug a complex program, tools need to have the context of the entire program and not just a fragment.