views:

787

answers:

14

In The Pragmatic Programmer this term is introduced and "linearly independency" is used as an example for orthogonality.

How do you explain the same thing to a non-technical person and why independency is a good thing to have? Are there "real-life" (i.e. non-geek) examples for this concept?

+3  A: 

For example, a car has orthogonal components and controls (e.g. accelerating the vehicle does not influence anything else but the components involved exclusively with the acceleration function). On the other hand, a non-orthogonal design might have its steering influence its braking (e.g. Electronic Stability Control), or its speed tweak its suspension.[1] Consequently, this usage is seen to be derived from the use of orthogonal in mathematics: One may project a vector onto a subspace by projecting it onto each member of a set of basis vectors separately and adding the projections if and only if the basis vectors are mutually orthogonal.

Wikipedia provides a great answer: http://en.wikipedia.org/wiki/Orthogonal

danny
Thanks for the answer, but you and I know what orthogonality is, but I doubt many people even know what a "vector" is. And "subspace"? I think I heard both of them on Star Trek :)
DR
is the [1] meant to link somewhere, such as http://en.wikipedia.org/wiki/Torque_steering ?
Pete Kirkham
@DR I learned about vectors in high school maths; I think it's safe to assume most people know what they are.
Adam Jaskiewicz
I think the car example is useful; and the vector one could be explained with a pen and paper quite easily.
danny
+2  A: 

One of the simplest examples around everyone's house is the home theater.

TV, Amplifier/receiver/tuner, DVD/CD player, speakers, DVR, Cable/satellite/broadcast box, and any other toys (game cube).

They're all independent. Each can be upgraded or downgraded independently. And they have well-defined interfaces that makes interconnections possible. But the interfaces are relatively unique: video is not interchangeable with audio, but they do share a common physical interface.

S.Lott
A: 

There's plenty of real-life examples of orthogonality. In general, two things are orthogonal if changes in one have nothing to do with changes in another. Here are a few offbeat cases:

  • Prices of unrelated objects are mostly orthogonal. When the price of milk goes up, the price of wood isn't affected.
  • The current time is orthogonal to the number of wheels on your car.
  • The average number of apples produced by an apple tree in a given year is orthogonal to the average number of tax returns filed in Australia in the same year.

Just pick two completely unrelated metrics, and you've come up with two things that are orthogonal to each other.

John Feminella
Well, if woodman has to pay more for milk, he might put a higher price tag on wood he sells.If you leave your car in an unfriendly neighborhood, amount of wheels on your car is strictly correlated to time you left it unwatched.;)
macbirdie
Spelling ability correlates with foot size. Global warming correlates with lack of pirates. Both of these have mutual dependence (on age and world industrialization, respectively). BTW, the price of milk and the price of wood have gone up considerably from my childhood.
David Thornley
The examples you cited aren't orthogonal, since you just showed how they're dependent on each other. So you didn't follow the instructions of keeping them completely unrelated! :) Prices are probably bad example since, as you point out, inflation affects everything.
John Feminella
+16  A: 

Just replace "orthogonal" with "independent." They mean the same thing, and everyone understands the latter.

To "explain the benefits," you can simply point out that "messing with X doesn't affect Y." Most people can see why this is a good thing.

j_random_hacker
A: 

j_random_hacker is completely right when he says you should simply replace "orthogonal" with independent.

However, independence/orthogonality is not in itself a good thing. Thus I would not recommend to try to persuade non-technical people about any supposed benefits. There aren't any - without a specific context.

innaM
Thanks Manni, but tell me, is orthogonality ever a bad thing? I can't think of an example off the top of my head where you (as the designer) would prefer a non-orthogonal design to an orthogonal one, can you?
j_random_hacker
Designer of what? Of course, when designing software, side effects are generally a bad thing. But I certainly wouldn't want answers on SO that are orthogonal to the questions.
innaM
Um, OK. I guess I took it as read that orthogonality was being talked about in the context of the design of complex systems. Just as if the question had instead talked about unit testing being good, I would have assumed they meant for building software, not for e.g. answers submitted on SO.
j_random_hacker
Well, isn't SO a complex system and weren't its designers trying to get some non-orthogonality in this respect?
innaM
Of course, you can also find technical/software examples. Should a ORM system not be designed so that you using it yield non-orthogonal effects in your database?
innaM
+2  A: 
Gökhan Ercan
Is that really the Dependency Inversion principle? It sounds more like the Adapter pattern to me.
John Topley
Lamps are a terrible example, because many light fittings are fitted permanently to the wall. Something like a hairdrier would be more fitting. But I don't think IoC or dependency injection speaks directly to the question of orthogonality.
slim
+4  A: 

I thought this was a neat answer, which focuses on side effects: (Source)

"Your monitor has orthogonal controls. You can change the brightness independently of the contrast level, and (if the monitor has one) the color balance control will be independent of both. Imagine how much more difficult it would be to adjust a monitor on which the brightness knob affected the color balance: you'd have to compensate by tweaking the color balance every time after you changed the brightness. Worse, imagine if the contrast control also affected the color balance; then, you'd have to adjust both knobs simultaneously in exactly the right way to change either contrast or color balance alone while holding the other constant."

attack
Well. The guy was obviously referring to those expensive monitors. The controls of my monitor are as non-orthogonal as it gets.
innaM
A: 

I would try to describe it by explaining where orthogonal comes from: each thing lives in its own dimension and can move in it without affecting anything from the other dimension.

No matter how much you move along the x axis, your y-value doesn't change; x and y coordinates reside in orthogonal dimensions. (the x-axis and the y-axis).

That's a good thing because, well, suppose x and y were not independent, this means that every time you change x, y will also change, but chances are, you only want to change x, not y, so now you have to go back and fix y, and btw when you do that x could change again on you!

hasen j
Well, I think that's a good way to explain it to a geek, but the asker is specifically targeting non-geeks :)
j_random_hacker
well, I'd assume even laymen would be familiar with (x,y), it's high-school math.
hasen j
+2  A: 

I believe it is seldom possible to explain anything to such a person. For a person to identify as or be identified as "non-geek" means that one of the following cases applies:

  • The person has been enculturated as a consumer. Such people choose ignorance because understanding would carry social stigma. When such people ask for help, they mean "do it for me, menial person". When was the last time the person asking you to "fix" a computer offered to mow your lawn or make your dinner in return?
  • The person's educational background is poor. If capable of the necessary mental gymnastics, such a person will often self-bootstrap and not need you.
  • The cultural gap is too large and the mental symbols are too different. My father is a marvel with things mechanical yet utterly fails to apprehend software abstractions and metaphors.
  • The person is too lazy, stupid or selfish to think.

Orthogonality can be succinctly explained as absence of crosstalk between control variables, but this is unlikely to mean anything to someone who thinks the pinnacle of technical sophistication is knowing how to connect an Xbox to a TV.

Peter Wone
-1, borderline offensive. What a bunch of arrogant hatemongering. Yes, most of us have had the unpleasant experience of helping someone who doesn't appreciate it. It sucks. Now get over it.
j_random_hacker
+1 for hitting the nail on the head. I deal with people like this all the time. They're supposedly experts in project management or the core business, but in reality they're just glorified secretaries. I know there are good PMs/Business Analysts our there, but they're few and far between.
Clayton
Those who can't understand are beyond help. Those who choose not to understand are trying to exploit those who understand. I harbour no resentment for such people. I merely recognise them as parasites and decline to be used by them.
Peter Wone
You're ignoring the large number of people who would understand if somebody explained it to them well. Consider your third point: if you could explain a software concept in a metalworking context, he'd get it.
David Thornley
Those people use google and stackoverflow
Peter Wone
Re my dad: I have tried patiently over many years to do just that. He sees things in the colour and flow of molten steel that I can see but only while he's explaining, just as he understands his system while I'm there explaining, but neither of us can hold onto this glimpse into another world.
Peter Wone
@Peter: To take your argument to its logical conclusion, no person capable of understanding something would ever ask a question about it.
j_random_hacker
Also, you picked a bad example of something to hold up as "beyond the understanding of non-programmers" -- anyone can understand why something made from independent parts is robust.
j_random_hacker
@j_random_hacker: Nope. The first sentence of my statement defines the scope: persons who would be classified as "non-geek". I'm talking about the class of person who deliberate avoids association or identification with persons possessed of technical competence.
Peter Wone
@j_random_hacker: My father falls into the category of those unable to undertand (due to cultural gap). I chose him as a good example of a person who is not lazy, not stupid, interested and yet incapable of retaining the material, and I counterpoint it with my own inability to truly grok metals.
Peter Wone
@j_random_hacker: You can tell when a person is capable of understanding by the fact that he's asked the right question. At this point, a person free of the defects I mention will often no longer need to ask for explanation, only for the location of details, or a name with which to search.
Peter Wone
@Peter: I don't think anyone has a problem with the "mental symbols are too different" category that your father falls into, at least I don't. But the rest of your post reads like this: "I'm smart but nobody appreciates me, so here are some reasons why you shouldn't even try to help these ingrates."
j_random_hacker
@Peter: Why do you choose to focus mainly on people in negative categories? "Defining the scope" in this way serves no purpose other than giving you a chance to vent your frustrations.
j_random_hacker
Because the positive elements pose no threat.
Peter Wone
+4  A: 

I'd use the example used in the book for a not orthogonal control: A helicopter.

If you want to fly faster you have to put the nose of the helicopter down. But you also have to increase throttle, to stay at the same altitude, which in turn will cause the helicopter to spin, which you have to prevent by yet another action.

Jens Schauder
It's a good example, which is why the Pragmatic Programmers used it. But then you need to explain why orthogonality is better, and why helicopter designers have failed to design an orthogonal control scheme.
slim
Yes, that's the reason I'm looking for different examples.
DR
Very good example! Controlling helicopters in games (like GTA3) is so fricking difficult!!
hasen j
Why orthogonality is better, should be obvious from the example. Why helicopter designers failed to do it? I'd guess because it is difficult to do with mechanics only. And when electronics became available pilots where used to the weird controls ... but I think this realy is irrelevant for the point
Jens Schauder
Heli designers didn't fail to do it. There are fly-by-wire helis that have completely orthogonal controls, with a great deal of sophisticated automation to achieve this blissful state. They are expensive, complicated and more prone to failure than the simple ones.
Peter Wone
+3  A: 

This is not the direct answer but by reading articles at betterexplained you may get some good idea.

TheMachineCharmer
Wow, this site rocks so much!
A: 

Perhaps you could explain it in terms of supply of goods or services. For example, gas and electricity.

You can treat gas an electricity as orthogonal, and this has strong advantages. Imagine you have a separate gas supplier and electricity supplier. If the gas supplier starts overcharging you can move to a different supplier, while staying with electricity supplier you're happy with.

Nowadays (in the UK at least) it's common for the same commercial entity to bundle gas and electricity into one account. You might save money by doing this. It might be more convenient to get one bill instead of two. But you sacrifice flexibility - you can't change your gas supplier without affecting your electricity deal. It would be a wrench to split things out so they are orthogonal again.

That's akin to the choices you make when developing software. There may be reasons for non-orthogonality. By not separating concerns you might gain performance, or simply hack something up faster. But you'd be sacrificing maintainability. Just as you can't change gas supplier without changing electricity supplier, you can't change your logging code without touching your billing code (for example).

slim
Just realised that the common class naming convention XxxProvider fits in well with this analogy.
slim
+1  A: 

Consider a refrigerator with a freezer, the usual sort of thing with two compartments and two doors. It will probably not have two independent cooling systems.

Now suppose you control how much cooling you get and how much goes to which compartment. That gives you complete control, right? Except that you can spend days getting it right, particularly if it's not well labeled. There's no clear way to make the freezer colder without affecting the refrigerator temperature. All you can do is turn up the cooling and the amount going to the freezer.

That's two functions not being orthogonal, or independent.

Now suppose that you have one knob for each compartment, and it's the refrigerator's job to figure it out. It will have thermometers in each compartment, and adjust appropriately. If you want to keep the ice cream harder without freezing the milk, you adjust the freezer control.

That's two functions being orthogonal.

It should be obvious which is easier to use.

David Thornley
A: 

Well, I've been Googling "Why orthogonality" and I find myself here in the middle of a strange land. I am "Bob the Builder" and I have taken a geometric stance in life of preaching to the inhabitants of this constrained world of orthogonality to change their ways and embrace rhombic dodecahedralism. Please join my quest if you have a will. It may well apply.

http://www.hexpressionism.com/2008/07/architectural-dodecahedronism.html

Bob Burdon