Practical computing

This looks set to be my final post of this series about the history and functional mechanics of computers. Today I want to get onto the nuts & bolts of computer programming and interaction, the sort of thing you might learn as a budding amateur wanting to figure out how to mess around with these things, and who’s interested in exactly how they work (bear in mind that I am not one of these people and am, therefore, likely to get quite a bit of this wrong). So, to summarise what I’ve said in the last two posts (and to fill in a couple of gaps): silicon chips are massive piles of tiny electronic switches, memory is stored in tiny circuits that are either off or on, this pattern of off and on can be used to represent information in memory, memory stores data and instructions for the CPU, the CPU has no actual ability to do anything but automatically delegates through the structure of its transistors to the areas that do, the arithmetic logic unit is a dumb counting machine used to do all the grunt work and is also responsible, through the CPU, for telling the screen how to make the appropriate pretty pictures.

OK? Good, we can get on then.

Programming languages are a way of translating the medium of computer information and instruction (binary data) into our medium of the same: words and language. Obviously, computers do not understand that the buttons we press on our screen have symbols on them, that these symbols mean something to us and that they are so built to produce the same symbols on the monitor when we press them, but we humans do and that makes computers actually usable for 99.99% of the world population. When a programmer brings up an appropriate program and starts typing instructions into it, at the time of typing their words mean absolutely nothing. The key thing is what happens when their data is committed to memory, for here the program concerned kicks in.

The key feature that defines a programming language is not the language itself, but the interface that converts words to instructions. Built into the workings of each is a list of ‘words’ in binary, each word having a corresponding, but entirely different, string of data associated with it that represents the appropriate set of ‘ons and offs’ that will get a computer to perform the correct task. This works in one of two ways: an ‘interpreter’ is an inbuilt system whereby the programming is stored just as words and is then converted to ‘machine code’ by the interpreter as it is accessed from memory, but the most common form is to use a compiler. This basically means that once you have finished writing your program, you hit a button to tell the computer to ‘compile’ your written code into an executable program in data form. This allows you to delete the written file afterwards, makes programs run faster, and gives programmers an excuse to bum around all the time (I refer you here)

That is, basically how computer programs work- but there is one last, key feature, in the workings of a modern computer, one that has divided both nerds and laymen alike across the years and decades and to this day provokes furious debate: the operating system.

An OS, something like Windows (Microsoft), OS X (Apple) or Linux (nerds), is basically the software that enables the CPU to do its job of managing processes and applications. Think of it this way: whilst the CPU might put two inputs through a logic gate and send an output to a program, it is the operating system that will set it up to determine exactly which gate to put it through and exactly how that program will execute. Operating systems are written onto the hard drive, and can, theoretically, be written using nothing more than a magnetized needle, a lot of time and a plethora of expertise to flip the magnetically charged ‘bits’ on the hard disk. They consist of many different parts, but the key feature of all of them is the kernel, the part that manages the memory, optimises the CPU performance and translates programs from memory to screen. The precise translation and method by which this latter function happens differs from OS to OS, hence why a program written for Windows won’t work on a Mac, and why Android (Linux-powered) smartphones couldn’t run iPhone (iOS) apps even if they could access the store. It is also the cause of all the debate between advocates of different operating systems, since different translation methods prioritise/are better at dealing with different things, work with varying degrees of efficiency and are more  or less vulnerable to virus attack. However, perhaps the most vital things that modern OS’s do on our home computers is the stuff that, at first glance seems secondary- moving stuff around and scheduling. A CPU cannot process more than one task at once, meaning that it should not be theoretically possible for a computer to multi-task; the sheer concept of playing minesweeper whilst waiting for the rest of the computer to boot up and sort itself out would be just too outlandish for words. However, a clever piece of software called a scheduler in each OS which switches from process to process very rapidly (remember computers run so fast that they can count to a billion, one by one, in under a second) to give the impression of it all happening simultaneously. Similarly, a kernel will allocate areas of empty memory for a given program to store its temporary information and run on, but may also shift some rarely-accessed memory from RAM (where it is accessible) to hard disk (where it isn’t) to free up more space (this is how computers with very little free memory space run programs, and the time taken to do this for large amounts of data is why they run so slowly) and must cope when a program needs to access data from another part of the computer that has not been specifically allocated a part of that program.

If I knew what I was talking about, I could witter on all day about the functioning of operating systems and the vast array of headache-causing practicalities and features that any OS programmer must consider, but I don’t and as such won’t. Instead, I will simply sit back, pat myself on the back for having actually got around to researching and (after a fashion) understanding all this, and marvel at what strange, confusing, brilliant inventions computers are.

Today

Today, as very few of you will I’m sure be aware (hey, I wasn’t until a few minutes ago) is World Mental Health Day. I have touched on my own personal experiences of mental health problems before, having spent the last few years suffering from depression, but I feel today is a suitably appropriate time to bring it up again, because this is an issue that, in the modern world, cannot be talked about enough.

Y’see, conservative estimates claim at least 1 in 4 of us will suffer from a mental health problem at some point in our lives, be it a relatively temporary one such as post-natal depression or a lifelong battle with the likes of manic depressive disorder or schizophrenia. Mental health is also in the top five biggest killers in the developed world, through a mixture of suicide, drug usage, self-harming or self-negligence, and as such there is next to zero chance that you will go through your life without somebody you know very closely suffering or even dying as a result of what’s going on in their upstairs. If mental health disorders were a disease in the traditional sense, this would be labelled a red alert, emergency level pandemic.

However, despite the prevalence and danger associated with mental health, the majority of sufferers do so in silence. Some have argued that the two correlate due to the mindset of sufferers, but this claim does not change the fact 9 out of 10 people suffering from a mental health problem say that they feel a degree of social stigma and discrimination against their disability (and yes that description is appropriate; a damaged mind is surely just as debilitating, if not more so, than a damaged body), and this prevents them from coming out to their friends about their suffering.

The reason for this is an all too human one; we humans rely heavily, perhaps more so than any other species, on our sense of sight to formulate our mental picture of the world around us, from the obviously there to the unsaid subtext. We are, therefore, easily able to identify with and relate to physical injuries and obvious behaviours that suggest something is ‘broken’ with another’s body and general being, and that they are injured or disabled is clear to us. However, a mental problem is confined to the unseen recesses of our brain, hiding away from the physical world and making it hard for us to identify with as a problem. We may see people acting down a lot, hanging their head and giving other hints through their body language that something’s up, but everybody looks that way from time to time and it is generally considered a regrettable but normal part of being human. If we see someone acting like that every day, our sympathy for what we perceive as a short-term issue may often turn into annoyance that people aren’t resolving it, creating a sense that they are in the wrong for being so unhappy the whole time and not taking a positive outlook on life.

Then we must also consider the fact that mental health problems tend to place a lot of emphasis on the self, rather than one’s surroundings. With a physical disability, such as a broken leg, the source of our problems, and our worry, is centred on the physical world around us; how can I get up that flight of stairs, will I be able to keep up with everyone, what if I slip or get knocked over, and so on. However, when one suffers from depression, anxiety or whatever, the source of our worry is generally to do with our own personal failings or problems, and less on the world around us. We might continually beat ourselves up over the most microscopic of failings and tell ourselves that we’re not good enough, or be filled by an overbearing, unidentifiable sense of dread that we can only identify as emanating from within ourselves. Thus, when suffering from mental issues we tend to focus our attention inwards, creating a barrier between our suffering and the outside world and making it hard to break through the wall and let others know of our suffering.

All this creates an environment surrounding mental health that it is a subject not to be broached in general conversation, that it just doesn’t get talked about; not so much because it is a taboo of any kind but more due to a sense that it will not fit into the real world that well. This is even a problem in the environment of counselling  specifically designed to try and address such issues, as people are naturally reluctant to let it out or even to ‘give in’ and admit there is something wrong. Many people who take a break from counselling, me included, confident that we’ve come a long way towards solving our various issues, are for this reason resistive to the idea of going back if things take a turn for the worse again.

And it’s not as simple as making people go to counselling either, because quite frequently that’s not the answer. For some people, they go to the wrong place and find their counsellor is not good at relating to and helping them; others may need medication or some such rather than words to get them through the worst times, and for others counselling just plain doesn’t work. But this does not detract from the fact that no mental health condition in no person, however serious, is so bad as to be untreatable, and the best treatment I’ve ever found for my depression has been those moments when people are just nice to me, and make me feel like I belong.

This then, is the two-part message of today, of World Mental Health Day, and of every day and every person across the world; if you have a mental health problem, talk. Get it out there, let people know. Tell your friends, tell your family, find a therapist and tell them, but break the walls of your own mental imprisonment and let the message out. This is not something that should be forever bottled up inside us.

And for the rest of you, those of us who do not suffer or are not at the moment, your task is perhaps even more important; be there. Be prepared to hear that someone has a mental health problem, be ready to offer them support, a shoulder to lean on, but most importantly, just be a nice human being. Share a little love wherever and to whoever you can, and help to make the world a better place for every silent sufferer out there.