Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Re: The world is not object oriented

by hardburn (Abbot)
on Jan 02, 2004 at 22:21 UTC ( #318426=note: print w/replies, xml ) Need Help??

in reply to Re: The world is not object oriented
in thread The world is not object oriented

day and night could be viewed as another property of the time class or an assertion you could make against an instance of time, base on an artificial line between day and night.

I don't consider day and night to be artificial constructs, because nature does specific things during those times. For most bats, night is the time to wake up and start hunting, while it's time to go to sleep for a robin. The boarder between the two is fractal-like. If you can figure out the fractal's underlieing pattern, it should be easy to program your is_day and is_night methods, since fractal generators are surprisingly simple once you know the pattern. If you can't figure out the pattern, it'll be all but impossible without some artificial agreement.

I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: The world is not object oriented
by BrowserUk (Pope) on Jan 02, 2004 at 23:08 UTC

    With the aid of a PC connected GPS, and some fairly well defined celestial mechanics math, determining the time of Sunset and Sunrise at any given location isn't that hard.

    Though you would probably need a missile guidance system style local topology map to account for things like local mountain ranges etc. Depending where you live these may exist, but probably aren't avaiable to the general public.

    Accounting for refraction and backscatter of light due to the atmosphere will be very difficult as it will be affected by the presence, type and hieght of cloud cover upto several hundred miles from the target location.

    Given enough incentive, determining when the last vestiges of Sunlight will cease to fall on a given point on the earths surface would probably be possible, to a fairly high degree of accuracy.

    However, whether this would difinitively capture the etheral notion of evening I doubt. What constitutes the start and end of evening is very much determined by a whole range of factors well beyond the scope of any form of mathematical formulea to define.

    One example of these factors is social background: Different societies, and different groups of people within any given society, and even the age group of people can have an influence upon whether evening starts at 4pm, 6 pm or 8 pm or any point in between. Even once a computer calculated a specific point as the StartOfEvening, the percived accuracy of the determination would vary depending upon the audience, and may even vary with the same person according to a number of factors. Personally, Sunday Evening notionally starts later in the day -- as defined by my local time including artificial factors like daylight saving time -- than a work day evening. Likewise, evenings seem to start later, or the "afternoon" continues longer, when I am on holiday.

    There are many concepts in the real world that do not lend themselves to being viewed as objects, nor even attributes of objects. The question then becomes one of:

    Do these concepts have any place in computer programs?

    We can represent colours within a computer program more accurately than most human eyes can differenciate between them, even with 24-bits. However, writing a computer program that could quantify any given colour as a "nice colour" would be extremely difficult. Or even a pair of colours as having a "good contrast" or as "complementary" in the fashion designer sense of the terms.

    But then, what would be the purpose of having a computer program to do this? A computerised critique of the stars dress choices at red carpet parades?

    For exactly the same reasons as it is difficult to produce a computer program to perform these tasks, anything said, or written, has to be taken in the context of where and when it was written. Taking individual words and phrases and ideas, expressed in one context and then considering their merits in isolation from the original context is fraught with problems.

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://318426]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2017-05-26 04:44 GMT
Find Nodes?
    Voting Booth?