We're growing into something new. Read More
cerebralideas

Justin Lowery


New Company Site (beta)

I finally decided to force myself to redesign my company's site (it's been more than 3 years, I think). There were a few things that were required: * I had to be able to complete the design and development of a beta in 2 days * I wanted to use Node.js with the [Express framework](http://expressjs.com/) for the back-end * I wanted to test out my custom UI/Ix framework (in alpha) for the front-end * I wanted it to be responsive, cross-browser and very lightweight

// If you run this in a browser w/o a console,
// the alert will not run!

function () {
	console.log('I block what is below!');
	alert('I will not run.');
}

console.log() in Browsers w/o a Console Breaks JS

A couple of days ago, I learned that calling on the console object in a browser with no console will block break the rest of the JS within the current scope from running that follows because it throws an Object Undefined Error. The lesson of the day is remove, or comment out, ALL console.log() statements in your JS prior to publicly launching your site/app. I can't believe I didn't know this, but figured if I was unaware of it, others might be too. Hope this prevents someone from a long, arduous session of trying to debug something as simple as removing a console.log() statement. Update: I've corrected some errors brought to my attention from the great comments below. This is a tricky issue to report or solve because as soon as you install a console, the issue goes away. It's like trying to describe the color of flowers with a blindfold on.

Nina: Typographic Play with Adore

My girlfriend wanted her name in a feminine, yet classic, style typeface for some stickers. I started with Adore and made some modifications. A ligature here, swash there, added more stroke contrast and voilà!

// Below is the core of the patterns.
// See examples (liked in text) for the entire context.

/*****************************************\
 ** Constructor/Prototype Pattern **
\*****************************************/

var ListId = function (item) {
    
    item = item || {};
        
    this.element = item;
    
    // We have to check if item has the getAttribute method
    if (typeof item.getAttribute === 'function') {
        this.elementId = item.getAttribute('id');
    } else {
        // console.log(item + "doesn't have the getAttribute method");
    }
};
    
ListId.prototype = {
    constructor: ListId,
    getId: function () {
        
        var element = this.element,
            elementId = this.elementId;
        
        $(element).click(function () {
            alert(elementId);
        });
    }
}; // End of Constructor/Prototype

/*************************************\
 ** Functional Object Pattern   **
\*************************************/

var listId = function (item) {

    item = item || {};    
    var that = {};
    
    that.element = item;
    that.elementId = item.getAttribute('id');
    
    that.getId = function () {
        
        $(that.element).click(function () {
            alert(that.elementId);
        });
    };
    
    return that;
    
}; // End of Functional Object Pattern

OOP in JS: Constructor/Prototype V. Functional Objects

I've noticed that few Javascript developers with which I work utilize Douglas Crockford's suggested methods of programming in Javascript — one of which is the "Functional Object Pattern", known from here as FOP. This pattern, he claims, capitalizes on Javascript's everything's an object, class-less language features. Instead, my fellow JS devs tend to try to build "classes", using the "Constructor/Prototype Pattern", known from here as CPP, that's attempts to emulate the features of classical languages. Since everyone else uses the "classical" method, I started doing it too, but after a short period, I felt it was pretty clumsy. So, I revisited Douglas Crockford's "Javascript: The Good Parts" and tried to rebuild the same functionality using his suggested methods. I have to say, it is much simpler and more intuitive for me. I may be saying this because I'm not a classically-trained programmer; Javascript is the only programming language I can comfortably write. So, that begs the question, after looking at the above code and my examples (linked below), would you agree that Crockford's methods are better? Constructor/Prototype Pattern Functional Object Pattern As you can see, the CPP is 9 more lines of code (space and comments were removed from both files for comparison), the parent object is broken into two pieces — the constructor function and the prototype object — and any creation of a new object from the constructor requires the new keyword (which to me seems dangerous). There is also some code redundancy when extending the parent object. To me, the FOP looks better, cleaner, is self-contained and doesn't require the new keyword. Unless I'm missing something here, FOP is just better. What do you think?

Final Logo Redesign, I Promise :P

I posted a design a while ago with a unique pilcrow which was intended to be nothing more than just an interesting graphic (see forr.st/…). Many focused on that graphic as part of my brand and wanted it to be more prominent in the design. The issue was that graphic is part of a typeface, so I didn't want to use that in my brand as it wasn't an original design. So, I decided to rethink the whole thing, and I came up with designing my own pilcrow from scratch (see drbl.in/…) and use it as my icon/logomark. Well, the design took a life of its own, and after it was all said and done, I needed to use a different typeface for my logotype. Hence, a complete redesign by accident :-/ Anyway, this is the result of my efforts. Let me know what you think; I'm still not sold on using the drops of ink. Here's a version w/o the drops: cl.ly/…

Business Card Concept

This is a business card design for a property management company. The logo (still a WIP) and card design are being developed in parallel to see how the design looks in context. I'm taking some liberty with some asymmetrical design and playing with the golden ratio. Let me know what you think. Note: No, I did not come up with the slogan. That was given to me ;)

Business Card and Brand Redesign v.2.2

Okay, so this is a second go around with modifications addressing suggestions from both Forrst and Dribbble. If you didn't see the first go around, I'm doing a redesign for my brand and a new business card design. I'm going for a striking, yet simple, design that uses some typographic tension and bold colors to "stand out" if you will. Here's the first attempt: forrst.com/posts/…

Business Card Concept and Refreshed Brand

I've been using an old business card that doesn't closely enough represent what I currently do. So, I'm freshening up my brand and business card for SXSW this March. I'm going for a striking, yet simple, design that uses some typographic tension and bold colors to "stand out" if you will.