The problem with software

Software does not wear and tear. It does not break. It does not fade, evaporate or oxidate. Software is not affected by its environment. To update software to its changing environment code needs to be changed, by humans.

Another challenge is we can not proof that the software is programmed correctly. Testing helps, but: program testing can be used to show the presence of bugs, but never to show their absence (Dijkstra, EWD 249).

Software has become complex beyond comprehension. It resembles a dynamic system. Small changes in input can give major changes in output. Code is built on code and turns from structured material into amorphous mass. And we constantly change the input as well as the code.

So we must move to a different model for creating and maintaining software.
What we do today is gather requirements. From the requirements we build the software.
Then we test the software by translating the requirements into test cases (ideally – linking requirements to test cases is not such a generally adopted practice even).

Why not turn requirements in code, automatically? Instead of teaching programmers to create code, we should teach them to generate code. Then we can change the requirements, and regenerate the code. Or it can change/regenerate itself.

A recent article in The Atlantic discusses a coming software crisis. The remediation that is described in this article is to apply formal methods. This basically means we do not code but create a formal, mathematical model of the problem space. This model can then be turned into code. This code can be proven to be correct. The article explains how the existing formal methods, like TLA+, are still immature and there is still a lot of skepticism in the market on its applicability.

Formal methods have been around for a long time, but they never developed beyond an academic context. Translating more complex problems into formal models has proven to be very difficult.

For now, we will have to do with the current discipline. Which could do with more discipline.
Programmers often (must) start coding before understanding the problem, and having a comprehensive idea about the solution. They are caught up in the detail of programming. And modern languages (Java or JavaScript) do not make that easier. These nitty-gritty programming languages leave a lot of detail to be handled by the programmer – making it even more difficult to oversee a program’s complexity.

Also, a higher level of reuse should be encouraged. Every day in software you see programmers solving problems that have been solved for decades. Time pressures, and inaccessibility of existing code make programmers build yet another sort routine, search algorithm or data access mechanism. The building libraries of abstract, generalized libraries should become a common discipline among development teams.

Adopting a microservices approach (not necessarily the technology) will further help separating functionality, making the software system more flexible and therefore change-able.

I am a big proponent of coding for longevity but that is a very controversial opinion these days. But delivery speed is more important than delivery quality. Because things change so fast. Yes, this is true, but we oftentimes can not tell which code will last for decades and which code is quickly obsolete. So we’d better increase the quality of what’s delivered. And invest in methods and technologies that can help improve quality.

Google’s Documentation Style Guide – helping the writer in the developer

Google have published a style guide for their developers.

It’s a nice guide for all writers of non-fiction.

Some cute things:

On semicolons (I never know when to use) not much help (https://developers.google.com/style/semicolons)

Where to use semicolons is often a matter of judgment. Use them judiciously.

In the resources section the style guide refers to Apple’s and Microsoft’s style guides. (https://developers.google.com/style/resources)

Other companies’ style guides, such as the Apple Style Guide or the Microsoft Manual of Style.

Anthropomorphisms, which I like especially in documentation (makes them read like a novel, if done well), however not recommended by Google (https://developers.google.com/style/anthropomorphism):

Examples

Not recommended: A Delimiter object tells the splitter where a string should be broken.

Recommended: A Delimiter object specifies where to split a string.

Just one I did not understand (https://developers.google.com/style/headings):

Things to avoid in headings

Don’t use the following in headings:

Enjoyable.

Should you learn how to code?

Everyone in IT should know the basics of programming. (Also you should have installed some Linux distribution on your laptop. Even if its your laptop, it increases your understanding of the complexities of managing a platform.)

Program something

Program a crappy little program, you will understand more about the challenges of the programmer.

Derek Sivers wrote a nice article about why you should learn programming. https://sivers.org/prog
For him learning to code means self reliance and basic understanding are the main reasons.

Also experience the joy of building you own computer. I helped my son when he built his gaming computer. I learned at least as much as he did.

What language to start with

Derek recommends to start with HTML and CSS. Well, yes, agree of if you are interested in programming web sites. But HTML is such an ugly programming language. It’s like staring programming with BASIC. Before you know you think GOTO is a great flexible feature. While it actually is kitsch. I would rather start with Python, php or Java.

Build something useful in a very short time. Make it ugly. It doesn’t matter. Improve it step by step. Or start something new.

I like exploring programming languages.

 

I recently played with php. Built a small website showing photo’s from google images using random keywords.
Using MAMP.

Then played with python, programming an interface between Kindle and Evernote. Used Pydev.

Did some Javascript and node-RED.

A lot of Rexx programming. 

And Erlang.  That’s a hard one if you are not familiar with functional programming languages.

I learned a ton. I am always amazed what you can learn FOR FREE on the Internet.

Programming: a profession

Programming, a profession not a monkey task

A few years ago an IT manager said to me: for this programming job, I should be able to hire any monkey from the street.

I told him such an attitude would very quickly ruin his application, if not his entire business.

For an organisation that relies on software so heavily, allowing unmaintainable code to enter your applications is like accepting a loan your will never be able to pay off. You are building up an insurmountable technical debt. You can only hope you have some superb programmers around when the bugs hit the fan.

Programming profession

But for us programmers the problem is also about professionalism.

Coding is a profession. Good programming is a skill.

Some organisations want to have code done for 5$ per hour. Or so. Less than you would pay for a plumber. You would trust a plumber for that rate, why leave a programming job to someone for that rate? You are simply not serious about the problem at hand if you hire like that.

Democratization – the amateur and the pro

There is a tendency to underestimate the importance of skill.
Programming is democratized. That is good. Coding is not something mythical either. Amateurs can do it. Do it well. And enjoy it.

But for the problem in my organisation I need a pro.

Photographing is democratized. But for my wedding photos or for my business brochure I hire a professional photographer. Because he has a number of things extra, which I would summarize a craftsmanship and experience.

If you want stuff done you want good craftsmanship. A specialist you can talk to.

And by the way, ideally they should be at your desk and you at their’s. This is where outsourcing often goes off the track. Too little interaction.

Go pro

Cheap programming may work for throw-away apps. But not for high quality solutions that need to work be maintained for a couple of years or more. That stuff is built for the future. For maintainability.

By an expert.

7 augustus – toer #2

De volgende attractie van de toer is een bamboebrug over een rijstveld. De brug, een toeristische trekpleister, is eigenlijk een stalen skelet met bamboe aangekleed.  Er zijn nu een paar mensen op de brug door het veld. In het seizoen moet het hier enorm druk zijn.

We eten bij een restaurantje langs de weg bij de brug, en vervolgen de toer naar de waterval. Deze ligt een paar honderd meter van de weg af, de jungle in. Een smal pad leidt door een kloof naar de waterval. Een klein meertje aan de voet van de waterval. We badderen wat en nemen elkaar op de foto.

De land-split is een heel apart seismisch / geologisch (?) verschijnsel. Een jaar of twintig geleden zag een boer hier opeens in zijn landje op de berghelling enorme scheuren van wel 20-30 meter diep ontstaan. Dat maakt het land onbruikbaar voor landbouw en de boer besloot het fenomeen open te stellen voor publiek. Een paar jaar later trokken er nog meer scheuren in zijn land. De attractie wordt op een ludieke manier gefinancierd. Bij de ingang krijgen de bezoekers allerlei lekkernijen aangeboden. Lokale specialiteiten, drankjes en hapjes. Je kan deze ook kopen, maar dat hoeft niet, zegt men er bij. Allemaal heel gracieus en niet opdringerig. En de man die de boel leidt spreekt enorm goed engels. Het enige dat ze van je vragen je te overwegen een donatie te doen, van hoeveel mag je zelf weten. Dat laat je maar afhangen van hie je e.e.a. hebt ervaren. We drinken sap van de Hibiscus (bloem (?), eten tamarinde, gefrituurde bananenchips, zoete aardappel. We koepn een fles van het Hibiscusdrankje, dat waarschijnlijk straks lang niet zo goed meer smaakt.

De Pai Canyon staat als laatste op het programma van de rondleiding. De Canyon is een hele steile rotspartij van waar af je een heel mooi uitzicht over het dal van Pai hebt. Het is hier goed zweten, zo op het warmst van de dag. Japanners en Chinezen halen halsbrekende toeren uit op hun slippertje langs de hellingen. Heel mooi, uniek uitzicht over het dal rond Pai.

Op de terugweg bespreken we bij de chauffeur voor de volgende dag een bezoek aan de grotten van Lod.