Last week I wrote about the mystery which is my employment – I’m a software engineer, but what exactly is software? Throughout this series, I’ll mention a few half-truths and ignore some of the more modern developments in computing, for the sake of brevity.
As a way of advance apology, if this makes little sense it’s because “Singing in the Rain” is on in the background (well it is New Year) and I’m slightly distracted.
Computers are fairly dumb items. The cold, hard lumps of plastic and exotic metals that make up the stuff you can throw down the stairs is generically called “hardware”. On it’s own, this hardware doesn’t actually do anything. And I mean literally would produce no display and no beeps. Hardware is very good at doing exactly what it’s told, very quickly but nothing more. To make the picture look even more bleak, computers can only do a limited number of things, mostly revolving around copying and comparing numbers. You do get hardware that is designed to simply convert those numbers into something humans can use, such as a screen or a printer. There’s obviously the opposite devices – they convert human input into numbers (such as keyboards and mice). There’s also devices which convert numbers into light or electricity pulses for talking to other computers, but the principle is the same as human output.
The trick, therefore, is to tell the hardware exactly how to take these numbers from keyboards and mice, do something useful with them, and then produce some more numbers which can be given to stuff like screens and printers. The term software is applied to the sequence of instructions which hardware uses to decide on what to do with all this input, and how to produce the required output. My job as a software engineer is to do the following:
- Find out what a user wants the software do (the useful work)
- Work out what a user could possibly enter into the computer
- Work out for each of those possible inputs, what the user would like to happen
- Break this down into a sequence of very explicit instructions that a computer can manage
- Enter this sequence of instructions into the computer in a format that it can understand
In theory, that’s job done. Unfortunately, things never turn out that easy:
- The user is rarely sure of what they want the software to do, let alone able to communicate completely what they want
- It’s very hard to predict everything the user can possibly enter – don’t forget that sequence and often timing is relevant too
- Deciding on what is a sensible output for every possible input is very difficult
- It’s actually quite hard to break things down into such low-level instructions that a computer can manage them
- Entering this information into a computer is done in a special format, known as a computer language – like any human language, it takes time to learn a computer language and years to perfect
So that’s a generic description of software and how it comes about. In the next part, I’ll write about the process of breaking down things into simple instructions and entering them to the computer using a computer language – this is the bit which is generally considered “programming”.