Understanding Love


My understanding of what love really means has tremendously changed over the past few years.

  • 7 years ago, in my school, if a classmate even speaks that word I used to watch him in amazement, following an exclamation.
  • 4 years ago, I had my first sight of what is called – love, in real life. That’s when I started to see some immature in-love couples (as they think so).
  • 2 years ago, well, it became quite common. Still, I thought of love as something bad, for no good reason.

Well, all of this is past. You might want to know what my current view of it is. There’s time for that, wait.

When a boy X, a classmate, says he loves his parents, you think of him as a good person. When the same X says he loves a girl, you get a somewhat bad picture of him, despite the fact you do love someone else.

Well, what is the reason for this confusion? I’ll tell you. All love is not the same. Love is not only some kind of attraction. What kind of attraction towards parents, eh? The solution to this confusion is classification of love.

Types of Love

Love can be categorized into 3 different types – Familial, Romantic and Platonic. The distinction is necessary to avoid any misconceptions regarding love. The main focus of this article is on platonic love, but I’ll be discussing them all.

Familial Love (Storge)

The quote below gives an extensive description of Familial Love

Storge or affection is a wide-ranging force which can apply between family members, friends, pets and owners, companions or colleagues; it can also blend with and help underpin other types of tie such as passionate love or friendship.

Storge is some kind of bondage between committed or married people.

Romantic Love

Romantic Love is the happy feeling from an attraction towards another person associated with love. That feeling is caused by the secretion of a hormone called Dopamine which can also be gained by taking sufficient amounts of Vitamin C, and E.

The distinction between Romantic Love and Platonic Love will be discussed in next subsection. Romantic love needs no special introduction, I guess. You’re already familiar with it.

Platonic Love

Platonic Love is named after Plato, a philosopher, who studied about the nature of Love. Platonic Love is the love between friends or some known people. It is also the love that a person shows towards people.

Platonic love is best defines as the form of love which is not romantic or familial.

Though there are other forms of love which I didn’t discuss, these are the forms of love that exist between two persons. I conclude this article by telling that you can pretty much love anyone, platonically.

On Love


In this article, I would like to share my opinions on love. Please excuse me if this seems crazy or incorrect. This article is for all those who think Love is great.

Having gotten my fifteenth love proposal, I was inspired to write this article. Love is a feeling, mood, or more precisely a mental condition rather than a thing. It is more or less Limerence, a mental condition resulting in attraction towards a person of the opposite gender (or towards those whom they are usually attracted to). It is experienced by almost everyone in this world, and I am no exception to this.

My view of love may sound crazy to almost everyone who love.

Using the word love in this article I refer to Limerence or the feeling of attraction which you, if you’re reading this article by yourself, are already familiar with.  Love does not start in the so-called teenage. It starts earlier, but it strengthens in that age. It gradually disappears when you become mature.

Continue reading

Implementing a cross-browser event handling system

Implementing Events

JavaScript, in the browser, is an event-driven programming language – with no consistent event handling support. While adding and removing listeners might work in almost all JavaScript-enabled browsers, triggering events, to this data, has been a nightmare for many JavaScripters out there and I’m no exception.

While I’ve been working on Hilo a few months ago, I had to deal with this situation. And the thing which I came up with only worked in a few modern browsers. It did not work in Internet Explorer, no wonder. Even after a few days of peeking into other libraries I could not implement a consistent system, whatever the reason might be. Recently I started rewriting Hilo all over again. And as before, I had to deal with those events. As I already had a pretty bad experience implementing an event handling system, this time I wanted to do it the right way and the modern way whatsoever.

I went on and made addEvent and removeEvent methods which are pretty easy to do and then I wrote this code and started at it for more than 60 seconds…


function triggerEvent () {
 
}

I know how to trigger events, but I wanted my handling system to support custom events, which is really hard to. Listening for custom events can be done in the same way as you listen to other events, but there will be a problem when you need to trigger them. While some browsers provide support for Custom Events, some do not. To handle this situation I came up with an idea:

Store all the events somewhere and call them when that event is fired on that element. GREAT IDEA! But.. I wanted something more.. support for multiple events.

After scratching my head for more than ten minutes, I came up with my implementation of cross-browser event delegation system.

For the sake of this article I’ve made a gist and made it available at https://gist.github.com/erikroyall/6618740.


// Evento - v1.0.0
// by Erik Royall  (http://erikroyall.github.io)
// Dual licensed under MIT and GPL
 
// Array.prototype.indexOf shim
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
 
if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
    'use strict';
    if (this == null) {
      throw new TypeError();
    }
    
    var n, k, t = Object(this)
      , len = t.length >>> 0;
 
    if (len === 0) {
      return -1;
    }
    
    n = 0;
    if (arguments.length > 1) {
      n = Number(arguments[1]);
      if (n != n) { // shortcut for verifying if it's NaN
        n = 0;
      } else if (n != 0 && n != Infinity && n != -Infinity) {
        n = (n > 0 || -1) * Math.floor(Math.abs(n));
      }
    }
    if (n >= len) {
      return -1;
    }
    for (k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); k < len; k++) {
      if (k in t && t[k] === searchElement) {
        return k;
      }
    }
    return -1;
  };
}
 
var evento = (function (window) {
  var win = window
    , doc = win.document
    , _handlers = {}
    , addEvent
    , removeEvent
    , triggerEvent;
  
  addEvent = (function () {
    if (typeof doc.addEventListener === "function") {
      return function (el, evt, fn) {
        el.addEventListener(evt, fn, false);
        _handlers[el] = _handlers[el] || {};
        _handlers[el][evt] = _handlers[el][evt] || [];
        _handlers[el][evt].push(fn);

      };
    } else if (typeof doc.attachEvent === "function") {
      return function (el, evt, fn) {
        el.attachEvent(evt, fn);
        _handlers[el] = _handlers[el] || {};
        _handlers[el][evt] = _handlers[el][evt] || [];
        _handlers[el][evt].push(fn);
      };
    } else {
      return function (el, evt, fn) {
        el["on" + evt] = fn;
        _handlers[el] = _handlers[el] || {};
        _handlers[el][evt] = _handlers[el][evt] || [];
        _handlers[el][evt].push(fn);
      };
    }
  }());

  // removeEvent
  removeEvent = (function () {
    if (typeof doc.removeEventListener === "function") {
      return function (el, evt, fn) {
        el.removeEventListener(evt, fn, false);
        Helio.each(_handlers[el][evt], function (fun) {
          if (fun === fn) {
            _handlers[el] = _handlers[el] || {};
            _handlers[el][evt] = _handlers[el][evt] || [];
            _handlers[el][evt][_handlers[el][evt].indexOf(fun)] = undefined;
          }
        });

      };
    } else if (typeof doc.detachEvent === "function") {
      return function (el, evt, fn) {
        el.detachEvent(evt, fn);
        Helio.each(_handlers[el][evt], function (fun) {
          if (fun === fn) {
            _handlers[el] = _handlers[el] || {};
            _handlers[el][evt] = _handlers[el][evt] || [];
            _handlers[el][evt][_handlers[el][evt].indexOf(fun)] = undefined;
          }
        });
      };
    } else {
      return function (el, evt, fn) {
        el["on" + evt] = undefined;
        Helio.each(_handlers[el][evt], function (fun) {
          if (fun === fn) {
            _handlers[el] = _handlers[el] || {};
            _handlers[el][evt] = _handlers[el][evt] || [];
            _handlers[el][evt][_handlers[el][evt].indexOf(fun)] = undefined;
          }
        });
      };
    }
  }());

  // triggerEvent
  triggerEvent = function (el, evt) {
    _handlers[el] = _handlers[el] || {};
    _handlers[el][evt] = _handlers[el][evt] || [];

    for (var _i = 0, _l = _handlers[el][evt].length; _i < _l; _i += 1) {
      _handlers[el][evt][_i]();
    }
  };
  
  return {
    add: addEvent,
    remove: removeEvent,
    trigger: triggerEvent,
    _handlers: _handlers
  };
}(this));

I used callbacks in this article to keep it simple. I’ll write another article which purely uses events (fake events) to do this. Thanks for reading tis article. Any suggestions go below…

Personal Blogging, Documentary, and History


When it comes to personal blogging, documentary is the default genre. There are plenty of blogs that serve other functions, but many blogs are primarily catalogues of the life experiences of their author. Although there are quite a few blogs that focus on collecting poetry and other forms of creative writing, the vast majority of personal blogs are in some sense documentaries.

For many years, the act of making a documentary was meant to be an objective act of reporting the sights and sounds that the filmmaker, writer, or photographer encountered. However, in contemporary times there has been a movement towards embracing the subjectivity inherent in the documentary form. This means that modern documentaries often reflect the distinctive voice and sensibility of their creator, and the fact that todays documentaries often revolve around personality blurs the lines between documentary and memoir. Blogs rest somewhere between these two genres, muddying the distinctions even further. Personal blogging, documentary, and memoir are now irrevocably intertwined, for better or for worse.

Although few bloggers think of themselves as making documentaries in any formal sense, every time somebody sits down in front of a computer and types up a record of their day, they are documenting their own historical moment.

The things that we take for granted about our daily lives, like the way that we use specific modes of transportation, or the kinds of products that we buy, often seem quite fascinating to people who live in circumstances different from ours, and it is this kind of fascination that is at the heart of many documentary projects. When people think about blogging, documentary is not very likely to be the first adjective that crosses their minds, but a few decades down the road it is very likely that todays blogs will be seen primarily as very subjective documentaries of our era. The people of tomorrow will almost certainly look to the blogs of today for insight into our historical moment.

When it comes to blogging, documentary may not be the aim of most people who spend their time posting their thoughts and ideas on the internet. In some ways, the documentary aspect of blogging is more of a side effect than a primary goal. However, the fact that so many people are interested in publishing these public online diaries shows that personal blogs are about more than just rumination. The fact that bloggers are so stimulated by and interested in sharing their ideas with each other reinforces the idea that personal blogs are, in some ways, documentaries meant for public consumption. Documentaries appeal to people who are curious about other ways of life, and many people who regularly read others personal blogs are looking for this same kind of new perspective.
(Word count 462)
PPPPP