I have had the pleasure, recently, of introducing Object-Oriented programming ("OOP") to a bunch of students on a brand new course. My introduction was deliberately incomplete, with most of the terminology deliberately cut away, because I know my colleagues will be bringing out the big UML guns next week. It has been a pleasure because every time anything is taught, the teacher has an opportunity to learn the stuff in a new way. (Whether he will take the opportunity is another matter).

It is fair to say that OOP is where computer science crosses over into biology and philosophy and - if you dare - finds a solid footing in the spiritual, even 'the sacred', where concepts like 'God' begin to mean something quite specific. What is this OOP? How does a programming paradigm have the potential to reveal the mysteries of the universe?

Well, sorry, this is not really very much about OOP. If you want to learn OOP there are thousands of excellent resources available on the net, and I can confidently say that reading about it is not the same as doing it, or as Frank Zappa put it, "writing about music is like dancing about architecture."

Every user of any modern computer system already understands the central concept of OOP - that the software should somehow resemble the 'real' world, or at least reproduce a recognisable fiction. The pictures on your social network are arranged in 'albums' (does anyone under 25 know what a 'photo album' used to be?); The labelled numerical transactions on the netbank screen should convince you that you are looking at 'your bank account'; Your files are organised in 'folders' and so on.

These 'objects' in the digital landscape are simulations of real things, or at least 'common fictions'. It is preferred if their designs make small concessions - illusory panderings - to your expectations. A 'document' icon should preferably have a dog-eared corner. A 'trash can' or 'recycle bin' should advertise the fact that it is empty or full by displaying a suitable icon. Software objects are metaphors for real and archetypal conceits, and we must recognise the metaphor in order to make use of them.

This is all well and good, and if you have no ambitions to discover or explore the mystical/occult dimensions of the digital landscape, you may stop reading here, secure with the blessed truth that these simulations are no more or less 'real' than the printed paper bank statement that arrives in a paper envelope, or the greetings on a birthday card.

When I learned to make my own software objects, I was very much distracted by the idea that I was doing something 'strange' or even 'difficult'. It was certainly a different way of thinking about writing code. I have been writing code since I was 14, so I have almost forgotten what it means not to know what programming might be. I get a bit of clue when I have to 'program' my washing machine or my video recorder, where the 'metaphors' fall far short of what happens on my computer screen. (Washing machines are so poorly imagined that they offer no metaphors. You simply choose between 'programs' using a clunky control panel. Haven't the washing machine interface designers heard of brainstorming?)

The fact is that 'programming' is what you want to avoid doing. Even programmers prefer to avoid actual programming. Programmers don't even like to think of themselves as programmers. They prefer other names for their work: Coding, developing, modelling, hacking, refactoring, and various other euphemisms. Programming is not just for dummies, it's 'for idiots'. It's a purely mechanical manifestation of something much more refined and interesting and beautiful: The algorithm.. the datatype... the class... the model. We make concessions to the rest of humanity, who have no clue, poor dears, and we sigh and say "yes, I am a programmer" as if we are embarrassed about it, but secretly we want to admit that we are really misunderstood philosophers, artists, magicians, messiahs... alas modesty forbids.

Are we just arrogant, deluded fools? There is a trend which would like to marginalise us that way. It can be quite threatening for those with an aversion to maths or technology when they encounter a programmer in person. Prejudices and clichés abound: Programmers are into science fiction and pizza, they rarely exercise, and don't wash often enough, they have no small talk, they're 'strange' and inscrutable, with poor social skills, they are allowed to come to work without wearing a suit and tie, they work at night and hold petty grudges and they probably know how to hack into your private stuff on facebook. Brrrrr. Creepy.

I am afraid that these clichés are partly, true. No, let's be honest, they are often true. So what is it about OOP that breaks the pattern? What happens to the object-oriented programmer which is different from the guy who is setting up his VHS machine to record "Eastenders" while he is on holiday?

The Object-Oriented programmer gets inside. Above all, he understands that there is a boundary between inside and outside, and you can be sure that he wants to spend some time inside and some time outside, and he is exquisitely interested in the boundary, the 'interface' between the two contexts. Even more bizarre: When the Object-Oriented programmer gets inside, his identity begins to shift. He become the object that he is modelling. Instead of "what code should I write here?" he asks "what do I know here and now? What do I need to know?" - he becomes the object, with its knowledge and (especially) its limitations and asks himself what he would do if he fit perfectly into the broader ecology of the system which his human programmer-self was just busy with a few moments ago.

Programmers enter trance states, where inputs and outputs are limited and simplified. This is not 'hippie' stuff, it's the noble science of excluding irrelevant variables from consciousness to create a pure, clean. testable hypothesis. "IN THIS SPECIFIC CONTEXT: WHAT DO I KNOW? WHAT CAN I DO?". He excludes, he narrows, he restrains, he focuses, he shifts, he transforms into the very thing he is making - he becomes the 'sub-machine' which is part of the 'super-machine'. He is humble, delirious, anxious and gloriously happy. This is truly part of the shamanistic tradition which is surely older than humanity - the art of relocating the self into some metaphorical 'other', in order to create tools for transformation and growth.

The broader community - humanity, or 'the user' - is only interested in the tools, the stories, the metaphors, and gives little thought to the fact that these are not random choices. The programmer has arrived at these specific choices through an essentially shamanistic process.

And if you doubt any of this, just consider what might be 'really' happening when you casually 'empty the recycle bin' on your PC.

0 comments:


 

Free Blogger Templates | Created by Adam Every