Perfect example of whats wrong with JS

This is from the Require.js library which is very useful, and solves a lot of find when using JS.

    //Alias for caja compliance internally -
    //specifically: "Dynamically computed names should use require.async()"
    //even though this spec isn't really decided on.
    //Since it is here, use this alias to make typing shorter.
    req = require;


Use this alias to make your development time noticeably shorter by doing that? Are you really clocking out earlier? Calling it a half day most of the time after that huge time saver?

No it’s just a pointless and at worst confusing inconsistent modification to the code from only that point forward to anyone looking at it.

Another Example

This also irks me. I’m getting some error, and im trying to dive into the multi-thousand line (literally) file, and figure out whats going wrong / learn the module better. When I go to the line in question, i scroll up to find this:

 main = function (name, deps, callback, config, contextName, relModuleName) {
        //Grab the context, or create a new one for the given context name.
        var context, newContext, loaded, pluginPrefix,
            canSetContext, prop, newLength, outDeps, mods, paths, index, i,
            deferMods, deferModArgs, lastModArg, waitingName, packages,
        contextName = contextName ? contextName : (config && config.context ? config.context : s.ctxName);
// What the freaking hell is s?       
context = s.contexts[contextName];
        if (name) {
                        // Pull off any plugin prefix.
            index = name.indexOf("!");
            if (index !== -1) {
                pluginPrefix = name.substring(0, index);
                name = name.substring(index + 1, name.length);
            } else {
                //Could be that the plugin name should be auto-applied.
                //Used by i18n plugin to enable anonymous i18n modules, but
                //still associating the auto-generated name with the i18n plugin.
//				console.log(" context.defPlugin[name]", this);
                pluginPrefix = context.defPlugin[name];
            //If module already defined for context, or already waiting to be
            //evaluated, leave.
            waitingName = context.waiting[name];
            if (context && (context.defined[name] || (waitingName && waitingName !== ap[name]))) {

What the hell is ‘s’? !! This left my struggling to find it by doing ctrl+f, for the most popular letter in the alphabet.

Seriously i waste so much time on this kind of junk when I code in javascript – it really takes the fun of it.

Cheap NYC Whiteboard

Whiteboards are pretty great. They save you a lot of time, you draw the connections between something or how it might work – whatever the flow is and right away you can usually many flaws in your logic or gaps to fill. If you’re like me, then you’ll still have many more once you implement it 🙂 – however, at least i can catch a few early mistakes.

More importantly they make whatever task you’re working on seem very important. After all it’s on a written on the board isn’t it?

Whiteboard NYC-Style

Living in NYC you learn to cobble together various things and make something out of it because space here is so limited. So this is a “whiteboard” I created using an acrylic picture frame I bought from Muji. It isn’t the cheapest but it comes with some nice hanging hooks, and two sides. (I’m not using the second side, or the hooks since I used that half for something else aleady).

I’m going to buy another one, and double the whiteboard space. It will be like buying a new harddrive, whenever you get one you, “think ok now i have ALL the space i’ll ever need.”

If you notice the walls, you can tell I live in NYC East Village where landlord’s live by the motto:
“Why fix, when you can apply more paint!”

I also bought some dry-erase makers with an eraser from CVS for 8 dollars. So total is ~25 dollars.

Hello world!

My name is Mario Gonzalez
I am a programmer in New York City.

I’m currently a Senior Application Developer at Ogilvy & Mather NYC.

I love making things.
Especially making visual things.
Even more especially making visual interactive things.

I have created applications on or in:
Web (Actionscript 3.0 / Php-Mysql / html-css-javascript)
iPhone (Objective-C / C++ / OpenGL-ES)
OSX (C++ / OpenGL)