Sunday, April 23, 2006

Re-usable?

Now everyone is nodding agreement with the above law, but saying 'well, of course, we always knew that, we're not stupid you know!' So why do we never ask as our number one question 'why was this developed, where has it been used, who used it, why did they need to, what is it good at?' (OK, more than one question then).

Object Orientation uses the concept of classes which can be pre-designed and re-used. However, designing classes that have all the functionality required for any given use in the future is very difficult, too difficult to expect it to be achieved in 'average' developments. No, classes are best designed when all their potential use is already known - oops - I think this kind of defeats the object (!) of the exercise. In fact classes are at their very best when the are handling fixed, but complex, interfaces such as those found in Windows application, with mice, keyboards, files, etc. Could it be that the very definite benefits that have been observed by the use of object orientation in building user interfaces may not be as obvious when applied to the world of general business application development?

Friday, April 21, 2006

The Problem with every good idea in IT

Object Orientation is a good idea. There have been many good ideas put forward in IT over the last 20 years. BUT,

NOW LISTEN VERY CAREFULLY!

THORPE'S LAW OF RELATIVITY;

There are no panaceas.

There are no 'silver bullets'.

What works in one situation will not work in all others.

Thursday, April 20, 2006

More OO

The best thing about object orientation is the variety of ways you can use the word 'object' or the initials '00'. Although the concept of the 'blob' by either Shlayer/Myer or Jacobson looks like a promising piece of Zen.

Wednesday, April 19, 2006

The 'Six Famous' Game (With Paradigm Shift)

In my travels around Europe I invariably end up playing this game with whoever I am with (although it works better in smaller countries). The game goes like this; name six famous Finns (or Swedes, or Danes, or Poles, etc) who are not rally drivers (or tennis players, or ABBA, or Carlsberg, etc.). In order to play the game ‘properly’ the person in question must be a famous household name and not, a real example here, the chief executive of Volvo! Once played with an American in the group so limited him to Native Americans only.

By the way, what is a paradigm shift anyway?

Tuesday, April 18, 2006

And Finnish!

Now I know you won't believe this, but I also knew a very good Finnish Technologist, Matti Leporanta, here some Finnish;

Kaisitteen'kasite on vaitia kasittaa siksi esitykseni nakokulma rylmatyohon on kaytannollinen.

Which roughly translated says " The concept of concept is difficult to understand that is why my presentation of teamwork is pragmatic".


And wouldn't a Welsh Spelling Checker be classed as a virus any way?

Sunday, April 16, 2006

Really useful spelling checkers

How would you write a Welsh spelling checker? Would you check to make sure that the word has no vowels (see later for a practical example of a use for a vowel eliminator) or that it is completely unpronounceable, or that it looks weird.

Back to the point of the story. I was working on the presentation on which this blog is based, with a colleague and he was using Mapper to do some of the clever multimedia bits. Now Mapper is a non­procedural parameter based 4GL but it looks awful, let us take a look at some code;

@incv6ifv6<7gtolin-2;.

@if v36 = " Idv v36=0 ; if v37 = " gto lin 3 . truncate before stacking @cal,-4 AV 15-10,26-10,37-10,48-10,59-10,70-10 ,a,a,a,a,a,a 1 a=(v37a)*(v36)+(v36<=a)*(v37>=a)*a rnm -4. @cal,-4 AO 15-10,26-10,37-10,48-10,59-10,70-10 ,a,b,c,d,e,f 1 'm=vmin(a,b,c,d,e,f);n=vmax(a,b,c,d,e,f);m=vmin(a,m);n=vmax(a,n);'1 I 'a=a+b+c+d+e+f;n=vmax(a,n)' v20f12,v21f12 .

@if v37 = " Idv v37=v21 ; if v37 < v21 Idv v37=v21 ; if v36 = " Idv v36=v20 @rsr,v97,v98,v114 1 . v25 = interval, v26 = number of int, v28 = scale factor, @rsr 91 . subroutine to draw grid lines, tics, y-axis labels
@cal,-4 Ar.00000001 15-10,26-10,37-10,48-10,59-10,70-10 ,a,a,a,a,a,a 1
a=a rnm -4.',
@cal,-4AIV 15-10,25-10,37-10,48-10,59-10,70-10 ,a,b,c,d,e,f 1 a=a*v28;a=a-(v36*v28);b=a+(b*v28);c=b+(c*v28);d=c+(d*v28);e=d+(e*v28);1 i f=e+(f"v28).
@Idv v3i3=1,v4i3=1 . v4 wiLL be number of bars to draw + 1 @if v89(v3-1) = 1 inc v4 ; inc v3 if v3 < 7 gto lin-0 . @ifv4=7decv4;.
@art v179+1;1.225*a;242501b;c*1.225 v118i5,v12f12,v25i5,v26i5 .

Pretty bad, eh! On the other hand did have a song written about it. It was at this point that an amazing thought dawned on me -- all the best programmers I knew spoke languages that could best be described as 'self encrypting'.

Saturday, April 15, 2006

Strange Languages

Speaking of strange languages, C++ in this case, have you ever seen the Welsh language, also known as Gaelic, here is an example;

swp wystrys bro gwyr.


Which manages to say "gower oyster soup" using only one vowel.


In fact there are eight different Welsh words for 'cat', a fact I found out from the Welsh spelling checker. For example you can call a cat a 'cathod' or 'nghath', etc.;

Friday, April 14, 2006

00 Koans

  • Would 'thing-orientation' have created the same academic and commercial interest as 'object-orientation'?

  • What is the difference between object orientation and entity analysis?

Because I know nothing about OO it is time for another digression, in fact, how about a series of nested digressions?

I started programming using Assembler language with the odd, occasional, drop into machine code. I subsequently went on to use COBOL and then a series of 4GL's which, as you can read elsewhere, seemed to make extensive use of punctuation marks of one sort or another. However, nothing could prepare me for my first sight of the structure of the C language, and where on earth did they get the idea for the name C+ and C++, what is wrong with I, II, III, and IV; or even l, 2, 3, 4; whoever said you can mix arithmetic symbols in amongst the rest of the alphabet. You c++an see what c++ould happen if this c++oncept were to c++atch on, and what has this to do with objec++t orientation?

Thursday, April 13, 2006

Object Orientation

"Wild thing, you make my heart sing" - The Troggs

Any thing (!) written about systems since 1990 must include something about object orientation, and this is no exception. However, there is a small problem here, and that is that I know nothing about the subject. Still, that should not stop me should it? There is certainly no reason why I cannot make uninformed, ignorant, luddite comments.

What is an Object?

An object is a 'thing' (hence 'Wild Thing' at the beginning of the chapter, do I really need to explain these things (oh no, another thing (oh no, another .... wait a minute I think I am in a semantic, loop - let us abort this line of thought))). More specifically an object is a 'thing' about which you which to store information for the system you are interested in. Now, if you have been around as long as I have then you may well remember a similar definition, only the last time it was referring to an 'entity'.

THING = OBJECT

THING = ENTITY

therefore; ENTITY = OBJECT ?

So, what is the difference between and entity and an object? By the way if an object is a thing the why not call it 'thing-orientation'.

Wednesday, April 12, 2006

Nihilism

Zen is also often accused of nihilism as a result of misunderstanding the Buddhist idea that nothing exists independently. In fact, after explaining some of my ideas to a colleague he accused me of being nihilistic. "I am quite happy to be called nihilistic", I said to him. "Why is that?" he asked. "Because I do not know what it means" was my reply. Just in case you don't know what it means here is a definition;

nihilistic (narhr'listik, nr-), a and sh. A. adj. Of, relating to, or professing, hihilism: a. in philosophy or religion.

...that was not very helpful was it?

P.S. Oh, and by the way, as I said earlier, it is impossible to learn Zen from a blog, it is also impossible to learn how to develop software from a blog.

Tuesday, April 11, 2006

Other Zen Stuff

Zen has been described as 'the Artless Art' meaning that you should not be self conscious about it, that you should not try too hard - good advice to systems developers.

Directness

Zen encourages freedom of thought and action, in fact it wants you to go beyond 'Zen' rather than follow rules or simply repeat what has gone before. Of course, if Zen did not do this then it would simply be another dead dogma.

Compassion

Zen teaches, as you would expect, compassion .......but ....

.....one of the things I love about Zen is the way it can encompass everything in its teachings. Yes, they teach compassion but one of the schools of Zen, the one founded by the Zen Master Ma-tsu, uses shouts abuse, kicks, punches and blows with sticks to 'enlighten' their students!

Monday, April 10, 2006

Meditation


Zen is based almost entirely on the use of meditation as the path to enlightenment rather than on obeying rules ands studying scriptures. And if meditation is thinking, and one of the objectives of this blog is to make you think - then this is another good reason for the title.

Update to the 'Database Koan'

I have had a Zen inspired update to the 'Database Koan' (did anyone notice I use one word for database and not two) from Matti Leporanta in Helsinki (more about Matti and Finland later this week);

"the system is not a problem nor the users, it is the customers who force users to use the system"

Sunday, April 09, 2006

Irony

Sometimes Zen teachers will describe things as exactly there opposite, in a humorous way of course. And the description of something as its opposite is the use of irony. For example;

"how should you build systems?"

"By defining, in writing, exactly what is required, freezing it, insisting that the customer agrees to what is described without seeing it, give the written description to a large number of technicians who are not allow to talk to the customer, place in a large locked room and wait for two years, stirring occasionally with new technology."

By the way, I was not being serious you know!

As you may have realised, Irony can be very dangerous, and can be two edged. Are the IT gurus being ironic, is our current crisis in IT ('current' as in 'always') the punch line of a huge celestial joke?

Here's how it works. Say something outrageous; if your views are excepted then write a book, give a lecture tour, pack in work and raise chickens on a farm (we will come back to the chickens later but in a few years from now there will be a world shortage due to the requirements of parallel processors and culling from bird flu). If your views are not excepted then say you were being ironic ..... write a book ......etc.

Saturday, April 08, 2006

The 'Trust Me' Koan

“Would I lie to you” – Charles and Eddy

One of the premises of this blog is the importance of experience, not only so that you know you are doing but that others believe that you know as well. This story shows why. A large, complex, development was underway, as usual racing against the clock. No one on the team, apart from myself, had ever built a major system from scratch, as with most of the world's development staff they had spent their time maintaining a system. We had designed the system as a series of modules, 20 in fact, and because some of the modules took longer to design than others, and because sometimes we had to go back to the drawing board there was no real 'overall design'. Nevertheless everything was going well and the project was making good progress until the team called a meeting to ask me a key questions;

Will the system work?

Will it all fit together?

Are we doing the right things?

And the responses (exaggerated slightly!);

Of course it will!

I've done this before!

Trust me ! (best said with Ray Ban Wayfarer sunglasses on)!

Did I know it would work? Of course not, they were building the software, not me! But all software developers go through this period of self doubt, of thinking that it is just all too complex to ever fit together, and this is where experience can pull you through. Of course you could always lie! ...wait a minute, it's time to conjugate a verb!

I lie
you lie
he lies
she lies
We lie
They Lie

Yes, they do actually, especially if they work in marketing, and you'd better remember that.

Friday, April 07, 2006

A Database Koan

Here is a perfect example of a Zen koan; once I worked as a database administrator

INTERRUPT... The first decision the database administration function ever took was to say how many words was 'database' one or 'data base' two; it was decided that since DBA was three letters, and Administrator was obviously one - then 'database' must be two! Simple, eh?

As DBA (!) I was charged with checking the viability of-the data base usage that was put forward by various projects. On one of the projects I examined what was proposed and pointed out that one of the enquiry screens would take six hours to receive a response and would stop everyone else using the system. 'That's O.K.' was the response, ' no one would ever use that screen anyway!'

This led to the ultimate systems koan :- 'does system performance matter if no one uses the system'.

Which in turn leads you to believe that all systems are OK. unless used by users; which leads you to the fact that 'to be successful' you must not allow any users onto the software.

This is quite an important point, so let me say this a little louder;

SYSTEMS ARE NOT THE PROBLEM, USER'S ARE!

Koans

The word koan originally meant a court case which had established a legal precedent and was therefore a public record of an interaction. In Zen a koan is also a record of an interaction, or a question between a Zen master and a student. Here are some famous Zen koan's;

What is the sound of one hand clapping?

If a tree falls in a forest and no one is there will it make a sound?

A Zen master once saw two monks debating whether the wind or the flag was moving. He said 'This is not the movement of the wind, nor the movement of the banner; it is the movement of your minds'.

There are many thousands of Zen Koans but they all revolve around just two concepts; an understanding of what we are or an understanding of what we could be.

Thursday, April 06, 2006

Absurdity

One of the ways Zen has been taught is by the use of a series of drawings called 'the Ox-Herding Pictures'. There is a progression of ten Ox-Herding pictures starting with 'Seeking the ox' and ending with 'Entering the market place with helping hands'. This is my favourite;



The Ox
and the Man both gone out of sight





I am sure that I am being irreverent, if such a thing is possible in Zen, but the idea of a picture showing a man and his ox having gone somewhere else strikes me as somewhat absurd. You could expand this and create an entire series of drawing, all of different objects which, unfortunately, are not in view at the moment. Perhaps their is an opportunity for me to become a famous Zen artist without actually painting or drawing anything at all.

The absurd relies on breaking the norm, on challenging fixed views, and on surprise.

Wednesday, April 05, 2006

Humour

Humour plays a big part in the teaching of Zen and it is very easy to understand why.

· Can you concentrate if you are tense?

· Can you perform difficult tasks when you are really wound up?

· Are you at your best if you are under a great deal of stress?

· The answer to all these questions has to be - "NO"!

Ask any performer or sportsmen how to achieve peak performance and somewhere the word 'relax' will appear. This not only applies to physical activities but also, in fact even more so, to mental tasks.

"RELAX" - easier said than done. Entire philosophies, religions and businesses have built up around the idea that you really ought to relax more.

So where does humour fit in to this? Well, laughter and humour are amongst the very best ways of reducing stress, relaxing and doing whatever it is you are doing better. And so it is with Zen. How could you possibly become 'enlightened' whilst wound up not just like a watch spring but like a Swiss made, chronologically tested, titanium, waterproof, shockproof, accurate to a second a year, etc.

Of course there is much more to humour than the beneficial effects it has on your well being, it also enables the mind to look at ideas in a different way, to move quickly from one idea to another. Why? Well, humour relies a great deal on the putting together of conflicting images, of surprising us, by being different. All these aspects of humour are exactly what you want if you are looking at pushing the mind into new territory. Of course humour is a huge topic, in fact so large it is worth looking at some specific aspects of it in future posts.

A vowel conspiracy

This post was going to be headed ‘humour’ but then the spelling checker started bugging me about the US spelling of ‘humor’. And then I thought about ‘colour’ and wondered what they were doing with all the spare ‘u’s? Are they being stored in a hollowed out mountain in the mid west, and if so why?

And then there was ‘organise’ and organize’ and I understood that this was much bigger than I had at first realis(z)ed, it includes consonants!

(For now, I will continue to use the UK spelling.)

Tuesday, April 04, 2006

Mount Fuji

Why Zen?

"Ob La Di, Ob La Da" - The Beatles

Since the title of this blog is 'Zen and the Art of Software Development' and Zen plays a great part in the way the ideas have been put forward, then it is appropriate that I say something about it. The first thing I must point out is that I am not a student of Zen. However, I have read a great deal on the subject (a statement that you will realise by the end of this post is incredibly ironic) and I admire its philosophies. What are the attributes of Zen that have given it a place in the title of this blog?

And, What is Zen?

Zen cannot be learnt from a book. Zen relies on experience and personal tuition. So, why have more books been written about Zen that perhaps another 'religion' in the world? All books on Zen suffer from a major disadvantage, and that is that it is impossible to describe it, it must be experienced. It is a similar problem to the one I face, can you really describe the feeling involved in building a system. Well you may not be able to learn Zen from a book but you can smile at the Humour, you can nod with understanding at the wise statements, and you can be mystified by its illogicality (I may have just invented a new word).

So ...

What is the objective of Zen?

ENLIGHTENMENT

Or “ Nirvana” (not the grunge band that came from Seattle).

Which is when you realise yourself and the entire universe completely.

The title translated into Kanji

Monday, April 03, 2006

What do I hope to achieve?

"You take my breath away" - Berlin

What are the 'objectives' of this blog? Well, first of all I have been told many times on many management training courses, seminars, books and by many, many 'bosses' that objectives must always be measurable, achievable, and with a fixed end date. It is this kind of dogma, of fixed ideas, that this blog sets itself against. This is not to say I do not have any objectives in mind, of course I do its just that there not very precise, not measurable and not time stamped but they are very definitely achievable! Here are my objectives for this blog;

- first of all I want to entertain you, because unless I do that then none of the other objectives are possible. Think back to over all the non­fiction books you've read, which ones had the most impact, were memorable and, perhaps, even changed the way you thought and acted? Chances are the books that were entertaining also had the most impact.

- I want to reach a 'wider' audience. As I said earlier, this blog is based on some presentations, and it is much more effective to deliver the messages embodied within it in person. However, there are only so many presentations it is possible to deliver, and there or only so many Systems people who can manage to attend them.

- I want to make you think! If we spent more time thinking and less time in meetings, filling in forms, completing project plans, writing documentation, and even writing code, then our jobs would be much, much easier and we would produce better results.

The problem is that lots of people, including some of you, do not believe this is true. Let us be very clear, if you do not think and let the people who work for you think then you are not doing your job! Do not ever be pressured into mistaking code or paper production, etc, as real progress.

BUT

THIS IS A 'ZEN' BLOG

So, if this is a 'Zen' based blog (and it is!) what is the real objective? Well, the real objective must be for you to achieve.....

ENLIGHTENMENT

I would really like to see someone turn that very real objective into something that is 'measurable', etc., etc.

Well, those are my objectives, what are yours?

Sunday, April 02, 2006

The Twilight Zone


Now where are we going to go?

We are going to go on the following journey ....

YOU'RE TRAVELLING TO ANOTHER DIMENSION.. A DIMENSION NOT ONLY OF SIGHT AND SOUND.. BUT OF MIND..

A JOURNEY INTO A WONDROUS LAND...

WHOSE BOUNDARIES ARE THAT OF IMAGINATION..

AT THE SIGNPOST UP AHEAD..

YOUR NEXT STOP...

Cue theme music;

DO DOO DO DOO DO DOO

The Theme from The Twilight Zone


BTW this is not the score to the Twilight Zone unless it was written by Franz List and not Bernard Herrman. This from Wikipedia;


The four-note repetition in the Twilight Zone's theme music is so familiar to American audiences that it may be sung or hummed as a reference in conversation to something unusual (in lieu of actually uttering that a situation bears resemblance to something from the "twilight zone").


But it won't all be scary, we'll be able to see 'Lucy in the sky' and "We may be the Walrus", we'll be going on a Magical Mystery Tour of our own.

Why the twilight zone, why the outer limits, why the magical mystery tour? Well, part of the answer to this question is the title of the blog -'ZEN'. So the real question is 'why Zen? I'll explain 'why Zen' later, but for now a word of warning, a great many subjects will be touched upon, but because this is 'Zen blog' topics will be being covered in a random order, with frequent interruptions to the natural flow of things.

A dedication


I'd like to dedicate this blog, not to my mom, or wife, of children, or (god forbid) my employers. No, I'd like to dedicate this blog to someone who's simple law influences everything I do, not Isaac Newton, or Albert Einstein, or Pascal, or Turing, no none of those, my hero is Vilfredo Perato (1848-1923 ) an Italian lawyer/mathematician belwow is a representation of Perato's Law (in German of course);

Perato's law is more commonly known as the 80/20 law and put into English means that eighty percent of the results can be achieved with twenty percent of the effort, or 20 percent of people spend 80% of the money, or ...... My experiences have constantly proved and reproved Perato's law, how long does it take to get the basic design of a system in place? And then how long does it take to get to the finished product? The same applies to the physical implementation but at least everyone knows that this is an iterative process and accepts the 80/20 concept.

Another classic example of Perato's law in action is during testing, everyone knows that you can't test 100%, but in testing we know that it is by careful selection that we get maximum benefit; so remember - it's not just any old 80% of the work; you can't just say 'I'll do four fifths of the job and that will be the most effective way of working', you have to use intelligence in order to get the benefit. So you know about Perato, and you know about 80/20, how does this help? Well, we'll come back to estimating later but be aware that the 'full' job will take five times longer than the solution you probably first had in mind.

An alternative to the 80/20 law is my own 95/95 law which says that when 95% of the task is complete the remaining 5% will require another 95% effort, but;

Perato Rules OK!.

Fashion?

I suppose what goes for the academic world also goes for the research and development departments of the various suppliers to the industry. Again, huge sums are invested and some of this is purely to follow the latest fashions, to shorten the skirt on your database, or change the colour of your programming language. Although, despite the fashions, not all of these products see the light of day (thank god)!

And academics

It is not only the sales and marketing departments that are to blame, after all where do they find the latest bandwagons to jump on? Amazingly, some of the major culprits are academics - the fact is that there is very little that is really new in software development. I do not suppose that there would be too many research grant to look at 'testing dot net systems', or 'software version control in a distributed environment'. The fact is software development suffers from two major problems in its relationship with academia. Firstly, no one has really defined what it is, is it mathematics, engineering, or logic? The nearest definition is by Fred Brooks who called it' an alien environment' in his famous book 'The Mythical Man Month, and anyone in the commercial environment will appreciate this definition when they are trying, for the nth time, to explain to a senior manager from another area just why his 'small' request is going to take 'forever'.

Secondly, software development is still relatively new and therefore no one really knows how to deal with it yet, there is no expectation that research into 'the works of Francis Bacon' in the English department of a university would impact how journalists perform their day to day tasks; this same expectation does not hold with the; computer science, or information technology, or computing, or data processing, or electronic data processing , or systems .......... research, or whatever today's name is for the area we all work(ed) in. In fact my job title has changed so many times in the past that I sometimes felt like I was on the FBI's witness protection program!

Saturday, April 01, 2006

More on 'salesmen'

I once worked in the sales arm of a computer manufacture and went through all of their sales training. What were we taught? We were taught to sell the benefits of technology to the senior executives in the organisation, to go beyond the IT department, to sell 'high and wide' within the organisation. (I afterwards used to say that as a result of this I have 'lied professionally'.) This approach was common across all manufactures and results in questions from senior users, chief executives, etc., such as 'why aren't we going to thin client?', 'I hope you will be using object orientation on this?' and so on. Is it any wonder that new approaches and technologies are used inappropriately most of the time.

A word about marketing and sales

Who is to blame?


Once, whilst listening to a marketing manager explain how their products were at the leading edge of client/server, or object orientation, or openness, or whatever, I realised that with so many marketing and sales staff involved in IT they have to keep coming up with new things to market and sell. How many millions of dollars are used IT marketing every year, probably more than in the fashion industry and the same hype is created. After all if the database you purchased five years ago were not now out of date where would all the new
software products go?


I interrupt this venom to retell a story that has been going around a long time; Once upon a time brave King was in a fierce battle with arrows, swords and spears, and he appeared to be losing. One of the King's knaves told the King that there was someone here to see him. 'I haven't time to see a salesman now' shouted the King to the man in the dark blue suit and white shirt carrying a bazooka!

THE MORAL OF THIS STORY IS;

Always be aware of what is available.

Eventually, during a break in the battle the King agrees to see the salesman and orders 50 bazookas for delivery the next day. After three months one bazooka arrives, and no ammunition.

THE REAL MORAL OF THIS STORY IS;

Never believe a salesman.


Technology
Blog Top Sites Weblogs Directory SynBlog.com - Blog Directory View Terence Thorpe's profile on LinkedIn