Archive for the Cattle Category

Unfortunately, some people have a very rudimentary way of understanding basic things.  I’ve been asked on several occasions to explain simple programming concepts that seem to escape them.

Now, anyone with even a slight grasp of programming knowledge will likely raise one of their eyebrows and put even Mr. Spock to shame, because this is the kind of stuff we learned by ourselves when we were nine years old.  However, I’m not an elitist (mostly) and things like this remind me of how much I felt sorry for the poor fools in high school who couldn’t even spell their own name because they were too busy SMSing each other about their lack of genitalia while bathing in copious amounts of turpentine.


First of all, understanding how object-orientation works is of paramount importance.  Visualising code in your head without writing it down and staring at it for hours wondering what it’s supposed to do is a handy skill to have.  This is explicit with Java only (which is a crap language, but is popular because people are obese and lazy), but is easily transferable to other OOP languages.

So, say I wanted to create a simple program that outputted the text “You are fat.” in an OOP-like fashion, it would be something like this:


public class YouAreFat {

  String message;


This stores a piece of data (’message‘) as a unique part of the class YouAreFat.  (Technically, it’s a reference, but people just say that to try and make you look stupid.)


  public Message(String conMessage) {
    this.message = conMessage;


This is the actual constructor for the message.  By doing this, the message can be modified to be anything the programmer wants it to be, and have multiple, different instances of it.  Pretty useless, you might think?  Right now, yes.  But this allows high scalability and flexibility because you can add a lot more variables and data if you needed to without giving you a headache later on.

(The reason I prefix ‘con‘ to ‘conMessage‘ is to indicate that it’s a construction variable.  This is just for aesthetics.)

More on this later.


  public static void main(String args[]) {
    Message Message01 = new Message("You are fat.");


This is the ‘test’ code; this is what calls the shots, so to speak.  Formally, this part of the code should be separate and in its own file — the reason behind this is to make the code easier to change and look less obfuscated (cluttered to you illiterates).  However, I usually ignore this unless the program is huge, because it’s a stupid rule.  So, why not just write System.out.println(”You are fat.”);?  Because then it would not be very object oriented, and you can’t build on it and manipulate it.  This is how you learn how it’s supposed to work — by starting off with something simple and easy to understand.

Message Message01 = new Message(”You are fat.”); instantiates the constructor.  Basically, this is saying “I want to make a Message object, called Message01, and give it a string of text that reads ‘You are fat.’”.  The line after that, System.out.println(Message01.message);, gets the data of the message and outputs it as text.

Think of it like an MP3 player, or iPod.  Each music track is like a constructor:


  String title;

  public Song(String conTitle) {
    this.title = conTitle;


Now, you want to put some music on your iPod:


  Song Track01 = new Song("Ultra Sheriff - Galactic Fame");
  Song Track02 = new Song("Chopin - Scherzo No. 1 in B minor, Op. 20");
  Song Track03 = new Song("Karnivool - COTE");


You now have three songs on it!  Yay!


But wait, you want to actually play the music too!




This is basically the same concept.  This is important.  You must understand this concept, and so many people don’t.

Let’s say you want to expand upon your iPod (or JavaPod, actually).  You want it to distinguish between band and song, maybe so you can order them alphabetically in the future, or see how many songs from each band you have or something.  Easy!


String title, band;


Instead of just a title, this also defines the band.


public Song(String conBand, String conTitle) {
  this.title = conBand;  = conTitle;


This constructs each track entry.


public static void main(String args[]) {
  Song Track01 = new Song("Ultra Sheriff", "Galactic Fame");
  Song Track02 = new Song("Chopin", "Scherzo No. 1 in B minor, Op. 20");
  Song Track03 = new Song("Karnivool", "COTE");

  System.out.println("Title: " + Track01.title + "\nBy: " +;
  System.out.println("Title: " + Track02.title + "\nBy: " +;
  System.out.println("Title: " + Track03.title + "\nBy: " +;


And this creates and displays the track.  Notice there are now two inputs in Song.

However, let’s just say we accidentally named a track wrong, and we want to change it.  All we would have to do is create a method for changing an object’s data, and then run it in the test program (or main).

We add:


public void setTitle(String mutTitle) {
  this.title = mutTitle;


This is a void because it’s not going to return any data, it’s just going to change (mutate) the data of an object.  The reason I prefixed ‘mut‘ to ‘mutTitle‘ is to indicate the input is a mutation; aesthetics again.

We then add this to the main:


Track01.setTitle("Destroy All Humans");


Now Track01’s title will now display as something different when written to the screen!

Here is a slightly modified version of what the above code should look like at last:


public class Song {

  String title, band;

  public Song(String conBand, String conTitle) {
    this.title = conBand;  = conTitle;

  public void setTitle(String mutTitle) {
    this.title = mutTitle;

  public static void main(String args[]) {
    Song Track[] = new Song[4];
      Track[1] = new Song("Ultra Sheriff", "Galactic Fame");
      Track[2] = new Song("Chopin", "Scherzo No. 1 in B minor, Op. 20");
      Track[3] = new Song("Karnivool", "COTE");

    Track[1].setTitle("Destroy All Humans");

    for (int idx = 1; idx < 4; idx++) {
      System.out.println("Title: " + Track[idx].title + "\nBy: " + Track[idx].band);



The for loop and track representation through an array is just a cleaner way of outputting an index of items that would otherwise clutter up the code.  It’s the same as writing System.out.println(”Title: ” + Track01.title + “\nBy: ” +; three times, only changing the number in each one.  Don’t worry about understanding this if you failed grade 1 math.

Learning the rest is SO easy once you know this horribly basic and simple part.  Hammer it into your head, preferably with something heavy and made from iron.

Isaac Asimov

Murray Templeton was forty-five years old, in the prime of life, and with all parts of his body in perfect working order except for certain key portions of his coronary arteries, but that was enough.

The pain had come suddenly, had mounted to an unbearable peak, and had then ebbed steadily. He could feel his breath slowing and a kind of gathering peace washing over him.

There is no pleasure like the absence of pain - immediately after pain. Murray felt an almost giddy lightness as though he were lifting in the air and hovering.

He opened his eyes and noted with distant amusement that the others in the room were still agitated. He had been in the laboratory when the pain had struck, quite without warning, and when he had staggered, he had heard surprised outcries from the others before everything vanished into overwhelming agony.

Now, with the pain gone, the others were still hovering, still anxious, still gathered about his fallen body — Which, he suddenly realised, he was looking down on.

He was down there, sprawled, face contorted. He was up here, at peace and watching.

He thought: Miracle of miracles! The life-after-life nuts were right.

And although that was a humiliating way for an atheistic physicist to die, he felt only the mildest surprise, and no alteration of the peace in which he was immersed.

He thought: There should be some angel - or something - coming for me.

The Earthly scene was fading. Darkness was invading his consciousness and off in a distance, as a last glimmer of sight, there was a figure of light, vaguely human in form, and radiating warmth.

Murray thought: What a joke on me. I’m going to Heaven.

Even as he thought that, the light faded, but the warmth remained. There was no lessening of the peace even though in all the Universe only he remained - and the Voice.

The Voice said, “I have done this so often and yet I still have the capacity to be pleased at success.”

It was in Murray’s mind to say something, but he was not conscious of possessing a mouth, tongue, or vocal chords. Nevertheless, tried to make a sound. He tried, mouthlessly, to hum words or breathe them or just push them out by a contraction of - something.

And they came out. He heard his own voice, quite recognisable, and his own words, infinitely clear.

Murray said, “Is this Heaven?”

The Voice said, “This is no place as you understand place.”

Murray was embarrassed, but the next question had to be asked. “Pardon me if I sound like a jackass. Are you God?”

Without changing intonation or in any way marring the perfection of the sound, the Voice managed to sound amused. “It is strange that I am always asked that in, of course, an infinite number of ways. There is no answer I can give that you would comprehend. I am - which is all that I can say significantly and you may cover that with any word or concept you please.”

Murray said, “And what am I? A soul? Or am I only personified existence too?” He tried not to sound sarcastic, but it seemed to him that he had failed. He thought then, fleetingly, of adding a ‘Your Grace’ or ‘Holy One’ or something to counteract the sarcasm, and could not bring himself to do so even though for the first time in his existence he speculated on the possibility of being punished for his insolence - or sin? - with Hell, and what that might be like.

The Voice did not sound offended. “You are easy to explain - even to you. You may call yourself a soul if that pleases you, but what you are is a nexus of electromagnetic forces, so arranged that all the interconnections and interrelationships are exactly imitative of those of your brain in your Universe-existence - down to the smallest detail. Therefore you have your capacity for thought, your memories, your personality. It still seems to you that you are you.”

Murray found himself incredulous. “You mean the essence of my brain was permanent?”

“Not at all. There is nothing about you that is permanent except what I choose to make so. I formed the nexus. I constructed it while you had physical existence and adjusted it to the moment when the existence failed.”

The Voice seemed distinctly pleased with itself, and went on after a moment’s pause. “An intricate but entirely precise construction. I could, of course, do it for every human being on your world but I am pleased that I do not. There is pleasure in the selection.”

“You choose very few then?”

“Very few.”

“And what happens to the rest?”

“Oblivion! - Oh, of course, you imagine a Hell.”

Murray would have flushed if he had the capacity to do so. He said, “I do not. It is spoken of. Still, I would scarcely have thought I was virtuous enough to have attracted your attention as one of the Elect.”

“Virtuous? - Ah, I see what you mean. It is troublesome to have to force my thinking small enough to permeate yours. No, I have chosen you for your capacity for thought, as I choose others, in quadrillions, from all the intelligent species of the Universe.”

Murray found himself suddenly curious, the habit of a lifetime. He said, “Do you choose them all yourself or are there others like you?”

For a fleeting moment, Murray thought there was an impatient reaction to that, but when the Voice came, it was unmoved. “Whether or not there are others is irrelevant to you. This Universe is mine, and mine alone. It is my invention, my construction, intended for my purpose alone.”

“And yet with quadrillions of nexi you have formed, you spend time with me? Am I that important?”

The Voice said, “You are not important at all. I am also with others in a way which, to your perception, would seem simultaneous.”

“And yet you are one?”

Again amusement. The Voice said, “You seek to trap me into an inconsistency. If you were an amoeba who could consider individuality only in connection with single cells and if you were to ask a sperm whale, made up of thirty quadrillion cells, whether it was one or many, how could the sperm whale answer in a way that would be comprehensible to the amoeba?”

Murray said dryly, “I’ll think about it. It may become comprehensible.”

“Exactly. That is your function. You will think.”

“To what end? You already know everything, I suppose.”

The Voice said, “Even if I knew everything, I could not know that I know everything.”

Murray said, “That sounds like a bit of Eastern philosophy - something that sounds profound precisely because it has no meaning.”

The Voice said, “You have promise. You answer my paradox with a paradox - except that mine is not a paradox. Consider. I have existed eternally, but what does that mean? It means I cannot remember having come into existence. If I could, I would not have existed eternally. If I cannot remember having come into existence, then there is at least one thing - the nature of my coming into existence - that I do not know.

“Then, too, although what I know is infinite, it is also true that what there is to know is infinite, and how can I be sure that both infinities are equal? The infinity of potential knowledge may be infinitely greater than the infinity of my actual knowledge. Here is a simple example: If I knew every one of the even integers, I would know an infinite number of items, and yet I would still not know a single odd integer.”

Murray said, “But the odd integers can be derived. If you divide every even integer in the entire infinite series by two, you will get another infinite series which will contain within it the infinite series of odd integers.”

The Voice said, “You have the idea. I am pleased. It will be your task to find other such ways, far more difficult ones, from the known to the not-yet-known. You have your memories. You will remember all the data you have ever collected or learned, or that you have or will deduce from that data. If necessary, you will be allowed to learn what additional data you will consider relevant to the problems you set yourself.”

“Could you not do all that for yourself?”

The Voice said, “I can, but it is more interesting this way. I constructed the Universe in order to have more facts to deal with. I inserted the uncertainty principle, entropy, and other randomisation factors to make the whole not instantly obvious. It has worked well for it has amused me throughout its entire existence.

“I then allowed complexities that produced first life and then intelligence, and use it as a source for a research team, not because I need the aid, but because it would introduce a new random factor. I found I could not predict the next interesting piece of knowledge gained, where it would come from, by what means derived.”

Murray said, “Does that ever happen?”

“Certainly. A century doesn’t pass in which some interesting item doesn’t appear somewhere.”

“Something that you could have thought of yourself, but had not done so yet?”


Murray said, “Do you actually think there’s a chance of my obliging you in this manner?”

“In the next century? Virtually none. In the long run, though, your success is certain, since you will be engaged eternally.”

Murray said, “I will be thinking through eternity? Forever?”


“To what end?”

“I have told you. To find new knowledge.”

“But beyond that. For what purpose am I to find new knowledge?”

“It was what you did in your Universe-bound life. What was its purpose then?”

Murray said, “To gain new knowledge that only I could gain. To receive the praise of my fellows. To feel the satisfaction of accomplishment knowing that I had only a short time allotted me for the purpose. - Now I would gain only what you could gain yourself if you wished to take a small bit of trouble. You cannot praise me; you can only be amused. And there is no credit or satisfaction in accomplishment when I have all eternity to do it in.”

The Voice said, “And you do not find thought and discovery worthwhile in itself? You do not find it requiring no further purpose?”

“For a finite time, yes. Not for all eternity.”

“I see your point. Nevertheless, you have no choice.”

“You say I am to think. You cannot make me do so.”

The Voice said, “I do not wish to constrain you directly. I will not need to. Since you can do nothing but think, you will think. You do not know how not to think.”

“Then I will give myself a goal. I will invent a purpose.”

The Voice said tolerantly, “That you can certainly do.”

“I have already found a purpose.”

“May I know what it is?”

“You know already. I know we are not speaking in the ordinary fashion. You adjust my nexus is such a way that I believe I hear you and I believe I speak, but you transfer thoughts to me and from me directly. And when my nexus changes with my thoughts you are at once aware of them and do not need my voluntary transmission.”

The Voice said, “You are surprisingly correct. I am pleased. - But it also pleases me to have you tell me your thoughts voluntarily.”

“Then I will tell you. The purpose of my thinking will be to discover a way to disrupt this nexus of me that you have created. I do not want to think for no purpose but to amuse you. I do not want to think forever to amuse you. I do not want to exist forever to amuse you. All my thinking will be directed toward ending the nexus. That would amuse me.”

The Voice said, “I have no objection to that. Even concentrated thought on ending your own existence may, in spite of you, come up with something new and interesting. And, of course, if you succeed in this suicide attempt you will have accomplished nothing, for I would instantly reconstruct you and in such a way as to make your method of suicide impossible. And if you found another and still more subtle fashion of disrupting yourself, I would reconstruct you with that possibility eliminated, and so on. It could be an interesting game, but you will nevertheless exist eternally. It is my will.”

Murray felt a quaver but the words came out with a perfect calm. “Am I in Hell then, after all? You have implied there is none, but if this were Hell you would lie to us as part of the game of Hell.”

The Voice said, “In that case, of what use is it to assure you that you are not in Hell? Nevertheless, I assure you. There is here neither Heaven nor Hell. There is only myself.”

Murray said, “Consider, then, that my thoughts may be useless to you. If I come up with nothing useful, will it not be worth your while to - disassemble me and take no further trouble with me?”

“As a reward? You want Nirvana as the prize of failure and you intend to assure me failure? There is no bargain there. You will not fail. With all eternity before you, you cannot avoid having at least one interesting thought, however you try against it.”

“Then I will create another purpose for myself. I will not try to destroy myself. I will set as my goal the humiliation of you. I will think of something you have not only never thought of but never could think of. I will think of the last answer, beyond which there is no knowledge further.”

The Voice said, “You do not understand the nature of the infinite. There may be things I have not yet troubled to know. There cannot be anything I cannot know.”

Murray said thoughtfully, “You cannot know your beginning. You have said so. Therefore you cannot know your end. Very well, then. That will be my purpose and that will be the last answer. I will not destroy myself. I will destroy you - if you do not destroy me first.”

The Voice said, “Ah! You come to that in rather less than average time. I would have thought it would have taken you longer. There is not one of those I have with me in this existence of perfect and eternal thought that does not have the ambition of destroying me. It cannot be done.”

Murray said, “I have all eternity to think of a way of destroying you.”

The Voice said, equably, “Then try to think of it.” And it was gone.

But Murray had his purpose now and was content.

For what could any Entity, conscious of eternal existence, want - but an end?

For what else had the Voice been searching for countless billions of years? And for what other reason had intelligence been created and certain specimens salvaged and put to work, but to aid in that great search? And Murray intended that it would be he, and he alone, who would succeed.

Carefully, and with the thrill of purpose, Murray began to think.

He had plenty of time.