In the Zone

(Ugh! I forgot to post this last week. My apologies)

English: Two programmers
English: Two programmers (Photo credit: Wikipedia)

Programming, as I’ve probably said before is a strange occupation. You start with a blank sheet, steal bits and pieces from where ever you can find them and glue them together modify them, add some bits of original (to you) code and try to think of all the possible ways your program can go wrong.

Then you try and break your code (and usually succeed at first). Programming is still very much an art form. Of course things have changed a lot over the years, and we are able to use the work of others to help us in our endeavours, but my first paragraph is still true.

This image was selected as a picture of the we...
This image was selected as a picture of the week on the Farsi Wikipedia for the 13th week, 2011. (Photo credit: Wikipedia)

In the beginning there was “Hello World”. This is probably the simplest program that does something visible. It doesn’t take any information in and its output, the words “Hello” and “World” are not very useful in themselves. Actually, I’d say that there is an even simpler program that takes no input, produces no output, and in the process changes nothing. A “null” program if you like.

A programmer writing a new program may well jump in and start coding by grabbing some other code that he or she has access to, but that stolen code was developed, ultimately, from “Hello World” or the null program.

Picture of "hello world" in C by Use...
Picture of “hello world” in C by User:aarchiba. (Photo credit: Wikipedia)

A good programmer is one who steals code from elsewhere and modifies it to do what he or she wants. There is no stigma of plagiarism attached to this process, and it is in fact strongly encouraged that programmers share code. A spoof news item that I came across stated that all programming courses would be replaced with a course on how to find code on “Stack Overflow“.  I’ve been unable to find the link again, but I believe that the item was on “The Onion“, a well known satirical website.

Of course, such a  process may propagate errors or bugs across many programs, but it is such an effective strategy that it is used more often than not. If code exists to solve a problem then it would be silly to pass it by and write it ones self, maybe introducing bugs to the code. The advantage of “borrowing” code is that while errors and bugs may be in the borrowed code, many eyes will have looked at the code and there is nothing more that programmers like than pointing out bugs in the code of other programmers.

Wheel bugs mating
Wheel bugs mating (Photo credit: Wikipedia)

Stack Overflow allows anyone to post code and comment (up to a point), so code posted may not be top quality, but other programmers are quick to jump if they see bugs or inefficiencies in code. Contributors will also point out code which doesn’t follow standards or conventions in the programming language being used. This is considered useful, as the code, if modified, can be accessed and understood more easily, and may often be safer and free of more bugs than unconventional code.


Embed from Getty Images

When a program is written it starts out as literally a few lines of code or even an empty file. Any programmer knows that a program grows swiftly and in ways that can’t be foreseen until it may be of enormous size. It won’t be all written in one sitting but is usually written in stages. I personally like to write my programs in very small chunks, building on what has gone before. I think that many programmers use this process, though there may be others who write a sizeable chunk of code before testing it.

Ah, testing! Testing is the less enthralling parts of writing programs. Any program must be tested, to ensure that it does all that is required and nothing else. Generally the program being written doesn’t do all that is required and does things that shouldn’t happen, and initially it is likely to crash or produce cryptic error messages under some conditions.


Embed from Getty Images

Testing is supposed to reduce the number of such unwanted happenings, and the programmer may do some rudimentary testing and may handle at least some errors. However the programmer will realise that users who are unfamiliar with how the program is written may well do something that he has not expected.

So clever people have developed ways of automatically testing programs. To do this they have had to write the programs that are used to test programs. And of course those testing programs may have bugs. You can see where that leads to!

Zebra (programming language)
Zebra (programming language) (Photo credit: Wikipedia)

When a programmer knows a programming language really well, he is able to literally think in that language. The word “literally” has been devalued in recent time, but I am using it in the true sense of the word. This is hard for some people to understand as they think of language as something like French or Tagalog, and they can’t understand how one can think in a programming language, which is qualitatively different from a spoken language.

An interesting thing happens when a true programmer is programming something. His thought processes become so involved in the process of programming and in thinking in the programming language that he loses track of the outside world. That’s why programmers are whimsically thought to subsist on fizzy energy drinks and dialled in pizza. It is because those things are easily acquired and the programmer can keep programming.


Embed from Getty Images

A programmer “in the zone” is so embedded in the world of the program that he or she may often be reluctant to leave that world and respond to irritations like bodily needs and colleagues. I doubt that there is a real programmer who has not surfaced from a deep dive into the depths of a programming problem and realised that all his colleagues have left and it is late at night or very early in the morning. That’s the reason programmers stay after all other people have left – they know that they can slay the current bug with just a few more changes and a few more runs of the program.

The zone has similarities to the state of meditation. While meditation is passive though, programming is an active state. In both cases the person basically disconnects from the world, so far as he or she can, and the concentration is directed internally. Now that I think about it, any deep thought, be it meditation, programming, or philosophising, even playing a sport at a very high level, needs such concentration that much of the world is disregarded and the exponent enters the zone.


Embed from Getty Images

Banding together

Flag ~ Romania, Roumanie
Flag ~ Romania, also by chance the Tawa colours.

Our local rugby team has made it to the final of a competition (they won!) and naturally supporters are getting ready for the final match. They are organising coaches to take people to the match and no doubt there will be a good turn out. This got me thinking about how humans like to form bands and groups and supporter groups.

I think that banding together is at heart a self-protection thing. A human who belongs to a group gets supported by the group and reciprocally supports the group himself. In many cases the group is in competition against other groups of humans for a scarce resource such as food or territory, or in the case of sport points on the board of the elusive trophy. There is a synergy when people work together.

A rugby union scrum between the British and Ir...
A rugby union scrum between the British and Irish Lions and the All Blacks. (Photo credit: Wikipedia)

It’s not always humans versus humans though. A group may be formed to overcome some physical difficulty or to provide something that an individual can’t provide or achieve by themselves. That’s why travellers form caravans to cross deserts and a group of individuals might be able to buy a bigger boat together than they could have bought alone and take turns using it. Musicians of all genres usually form groups, at least to get started.

Les Rolling Stones à l'Olympia Stadion de Müni...
Les Rolling Stones à l’Olympia Stadion de Münich, alors qu’une partie de la scène avançait dans la foule (Photo credit: Wikipedia)

Forming a group allows individuals to specialise – in a hamlet or village one person becomes the smith, another the baker, another the mayor and another the constable, each person his or her particular skills in the role.

The role of supporters is to encourage and assist but not to actually take part in the contest or enterprise, but sometimes the line is blurred. For example the coach and trainer might not take part in a game, but in some ways they are part of the team. The supporters on the sidelines, yelling encouragement and advice, are even less part of the team, but they can certainly help out, and they form a larger group surrounding the team.

English: Greece - Russia Euro 2008
English: Greece – Russia Euro 2008 (Photo credit: Wikipedia)

Sometimes, of course, two groups of supporters clash. This is generally agreed to be a bad thing, but if you take a step back and think about it, it is to be expected, but not encouraged. It is an unwritten but basic rule of sport that the conflict, physically at least, stay on the field of play. Non-physical conflict, such as chants, banners and team regalia, is permitted between opposing spectators and even encouraged. “Get behind the team” is a rousing call for supporters. No wonder the non-physical conflict fairly often becomes physical.

The biggest ‘teams’ are countries, which strike me as being somewhat artificial in this day and age. Can one supergroup really speak for people who might be thousands of miles away? There may be an aboriginal population in a country that has far more inhabitants of immigrant origins, and these people may not consider themselves to be truly part of the nation in which they reside. Some nomadic people may travel through several countries, and may not consider themselves to be a part of any of them. The sheer size of modern countries almost invites the formation of ethnically or geographically ‘seperatists’ groups.

Matthes -- Separatists at Coblenz  (LOC)
Matthes — Separatists at Coblenz (LOC) (Photo credit: The Library of Congress)

Mankind probably started out as family groups, and were probably nomadic. When they settled down (perhaps as a result of developing agriculture) it would seem natural to settle down in larger groups, maybe two or three families to provide defence against those still travelling around. As mankind spread and became more numerous these little settlements would grow into towns, with inhabitants specialising into roles like the smith or baker mentioned above.

At some stage strong leaders became feudal lords. This appears to have been common, but was possibly not universal. Eventually the lords and barons gave their allegiance to a king or overlord and a number of small (by current standards) states were formed, sometimes based around a city as in Sparta in Greece or sometimes based in a geographical area. The debatably mythical Arthur around the 5th or 6th centuries in Britain was supposedly king of Britain, although at that time there were probably several kingdoms in what is now Britain, and Athelstan is usually considered the first true English king.

English: King
English: King (Photo credit: Wikipedia)

The nations of the world are these days largely static in shape and size, but they do still change now and then. Czechoslovakia split apart in 1993, and the Soviet Union (USSR) formed in 1922 and split up in 1991.

The next logical step in this process, one would have expected, would be the formation of a global entity, grouping the whole of mankind into one huge group, but this has not happened. There are a number of global entities, notably the United Nations, but they tend to concentrate on specific areas of endeavour rather than being the World Government that would have been expected. There are ‘blocs’ of similarly inclined countries but these also don’t have the spread of activities that would make them a ‘super-government’.

English: Global map of noted supranational uni...
English: Global map of noted supranational unions. Based roughly upon http://www.towardsunity.org/. (Photo credit: Wikipedia)

It may be that the only thing that would cause the formation of a super-group encompassing all of humanity would be an encounter with hostile and destructive aliens, but the chances of that would be very small.

Take me to your leader. iPhone 3GS
Take me to your leader. iPhone 3GS (Photo credit: Kimb0lene)

Understanding

Math Class
Math Class (Photo credit: attercop311)

On and off over the years I’ve been thinking about the concept of understanding, most particularly in the field of mathematics. When one encounters a new branch of mathematics, one is (conceptually) presented with the definitions, axioms and theorems in the field. Of course, one doesn’t necessarily understand them at first. However, after delving into the field, studying the axioms and definitions, and following through the proofs one soon gets the general feel for the field.

I might for instance read a ‘popular’ book about mathematics and read about ‘hyperreal numbers‘. By a ‘popular’ book, about maths, science or practically anything else, I mean a book which provides a non-rigorous introduction to a field, intended to give a feeling for it. If a reader of such a book requires an in-depth treatment of the subject, the reader would no doubt have to spend a long period studying the necessary maths to even start to address the topic. Such a ‘popular’ book could not possibly give one an understanding of ‘hyperreal numbers‘ of course. It’s more of a geography lesson, in that it would provide an understanding of where the topic fits in to the topography of mathematics, just as one might read about Greece, but one would not understand from the guide book what Greece is really like. For that one must go there.

Tired of studying!
Understanding mathematics requires study!

So you need to study something in maths to understand it. When do you know that you have understood it? I believe that there are at least three stages or signs that you understand it.

In the first stage, you have studied the axioms or the basis for the field of mathematics that you are trying to understand and you have seen and understood a few of the proofs of theorems in the field and you can reproduce them if asked. You have arrived in Greece, you are getting to grips with the money, you know how to purchase something in a cafe or restaurant, to extend the analogy.

In the second stage, you understand the ‘why’ of the proofs, you start to get a feel for the way that proofs are put together in the field and what can be achieved in the field. The concepts are sinking in. In Greece, you know how to find the best bars and restaurants where the Greeks drink and eat, you know what to order from the menus, and you are picking up a smattering of the language.

In the third and final stage, you are using the mathematics in the field with confidence, either to develop your own ideas in the field or in further study. When you look back at the difficulties you used to have in the field you are astonished that it took so long for the concepts to sink in. They seem obvious now. In the Greece analogy, you speak the language fluently, you have married a Greek person and you have lived in Greece for years. You mock the foreign tourists, and also you realise that there is more to Greece than your particular corner of it.

Greece
Greece (Photo credit: robynejay)

So, my point is that to understand something you need to immerse yourself in the topic. I don’t mean to say that you won’t have “Eureka Moments“, but even Archimedes had to immerse himself in his topic of study to come up with his Principle!

archimedes
archimedes (Photo credit: Sputnik Beanburger III)