7 April 2008

Glocalization and Jobs

This blog was founded with the loose theme of glocalization, which in the business of technology implies the sequential processes of internationalization and localization. Internationalization demands a platform that is independent of any single language and not bound to any one locale. Localization is the process of adopting the universal internationalized platform and plugging it into a particular language and locale to deliver a complete product. Presumably, it's an appealing model because the labor cost of localizing an internationalized product is less than that of recreating the same product for every region and language in the world. I wonder how staff at global companies who currently develop region-specific versions will be affected as businesses continue to adopt the glocal model though…

31 March 2008

Jean-Luc Marion at Wheaton College

Jean-Luc Marion, probably the most well-known French philosopher alive, is giving a lecture at Wheaton this Thursday, April 3, at 7:30pm. The names we study in college are dying off — Derrida, Gadamer, and Rorty all in the last five years. Take advantage of the opportunity if you can. I'd be there if I could. Maybe someone will come to USC or UCLA one of these days.

20 March 2008

JavaScript and the Semicolon

Until today, I'd never really delved into when and when not to use a semicolon to close a line in JavaScript. I used to use them excessively, which is safe, but recently tried abandoning the semicolon after all closing brackets ("}"). This apparently broke some of my code today though, and I discovered that I need to keep the semicolon after the closing bracket of function expressions, while it is safe to leave it out after the closing bracket of a function statement. The different usage being illustrated here:

// Function expression

var myFunction = function(...) {
    ...
};

// Function statement

function myFunction(...) {
    ...
}

14 March 2008

ActionScript 3 ExternalInterface

One of the projects I've been working on does a lot with communication between JavaScript and Flash. The ExternalInterface available in ActionScript 3 makes this a lot easier, and I've been wanting to do something cool with it. For now, I've worked on this example to illustrate the basics of how ExternalInterface works and its simplicity.

The relevant portion of the ActionScript:

// Add an ExternalInterface callback for communication from JavaScript

function flashCallback(data:String):void {
    textBox.text = "JavaScript: You clicked " + data + ".";
}
ExternalInterface.addCallback("flashCallback", flashCallback);

// Add listeners to communicate to JavaScript via ExternalInterface

circle.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
    ExternalInterface.call("jsObject.callback", "Green Circle");
});
square.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
    ExternalInterface.call("jsObject.callback", "Red Square");
});

The relevant portion of the JavaScript:

// Create a JavaScript object containing the callback for communication from Flash and triggers to communicate to Flash

var jsObject = (function() {
    var triggers = document.getElementsByTagName('a');
    var init = (function() {
        YAHOO.util.Event.addListener(triggers, 'click', function(e) {
            YAHOO.util.Event.stopEvent(e);
            YAHOO.util.Dom.get('mySWF').flashCallback(this.innerHTML);
        });
    })();
    return {
        callback: function(data) {
            YAHOO.util.Dom.get('flash_response').innerHTML = 'Flash: You clicked the ' + data + '.';
        }
    }
})();

View source on the example for more details.

Example

Download the FLA

6 March 2008

Free Software

I find people often spend unnecessary amounts of time and money either paying for expensive software or trying to obtain said software by illegal means when there are in fact plenty of free solutions out there. The Yahoo! front page recently ran an article on good free software. I agreed with some things on the list but not all. Here's my list of non-intrusive, well-made free software: