All right! This is one of my favourite topics -- thanks demerphq for giving me the chance to pontificate a bit.

In some sense, I'd say that orthogonality, in software engineering terms, is very close to the mathematical definition: a software component is orthogonal to a set of (other) components when it does something that none of the others does, without duplicating any functionality already present in the set. (If you want to get really geeky, its "capability vector" is normal to that of each other component in the set.)

I think that's a good starting place, but it's too rigid. More pragmatically, two components are orthogonal when they perform different (but possibly related, and possibly overlapping) tasks, have no dependencies on each other (you can call foo() before bar(), or bar() before foo(), or just call bar() and not worry about foo()). So my orthogonal set now consists of components that do one well-defined thing, do it well, and have no external dependencies. The point here is that you can pick the tool that you need without having to pick any others.

A good indicator for orthogonal code is when you're writing a program, think "I have code to do that", find the existing code, and start using it in your new program without modifying it. If you have to tweak the interface a bit, or include another function that doesn't solve your problem, or otherwise bring extra crap to the table, your code isn't orthogonal.

Update: I'm not tilly. But I wish him luck. :-)

--
Good luck to you, tilly
:wq


In reply to Re: (OT) On Orthogonality by FoxtrotUniform
in thread (OT) On Orthogonality by demerphq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.