A further addendum to my very personal history of programming
How much wood could a woodchuck chuck?
Let me describe to you a recent programming job I did for a friend.
He asked me if I could create a web application that took a list of names and sent each name to a third-party web service which returned a list of results that could be imported into a spreadsheet. It bears mentioning that he already had an application that did this, but it was so difficult to use (another failed enterprise IT project) that he asked me for my help in creating a replacement. This is a classic example of shadow IT at its best.
Requirements (from his IT department) were that it be written in the Python programming language, and that any libraries or code snippets that I did not write myself used the MIT license (a type of open source license).
I am not a graphic designer, so the best way for me to make sure the app would be pleasant to look at was to search Google and Github and find an MIT licensed UI template. In about an hour I had one I liked, and by the end of the day I had a pretty looking web app that didn’t do anything. All the buttons and entry fields were there, they just weren’t wired up to anything.
That was a good thing. Because it enabled me to have a discussion with my friend based on an actual on-screen UI. Which forced us to examine some of his assumptions and expectations and clarified some requirements before I wrote any code for them.
To manage the tables of results (before they got exported to the spreadsheet) I used what is likely the most widely-used open source library for tables in a web UI: a library named datatables.js. This is where the fun started.
So far, I have in the way of moving parts:
- Bootstrap CSS library for styling of HTML
- startbootstrap-landing-page template by Blackrock Digital LLC
- DataTables Plug-in for jQuery to add advanced interaction controls to HTML tables
- Python for server-side scripting
- Bottle, a Python-based WSGI Web Framework
Next I had to decide on the best way to perform the steps of:
- Sending a line from the list to the web service
- Getting the result and adding it to a table
- Loading the table data into datatables.js
Do I collect all of the results in Python first and save them as a file, and then read the file into the datatable?
I have now spent a full week on this. In addition to the three hours of UI, I have added another two hours of real programming (figuring out how to split up the list into different categories of request and handle each type of request differently).
Out of a full week of work: only five hours spent “writing code” the way Mel did. Thirty-five hours spent getting different libraries to work with each other in much the same way fitters² used to file away to make parts fit.
I spent another five hours packaging the code with instructions to make sure the IT team could install it without issues, and the IT department will spend dozens, if not hundreds, of hours monitoring it operationally and applying upgrades and security patches.
I have spent at most 5% of my time actually writing code.
On my good days
I actually understand the code I am including. Other days, I just hack away it until it works without any (obvious) errors.
I know that I am not alone in this. In fact I am the rule, not the exception. The reality is: that frameworks have become more important than the languages they are based upon. In my next article, I will trace the evolution of this trend, starting with PHP-Nuke and Swing.
 Prior to the 1950’s most parts used in manufacturing would not fit together “out of the box” and had to be individually fitted to each other by filing away at the parts to create a smooth fit. Fitter was the job title of the person who did the filing.
This article is an excerpt from my upcoming book The Chaos Factory which explains why most companies and government can’t write software that “just works”, and how it can be fixed.