Code Renaissance is about building great teams and great software. By exploring best practices, team interactions, design, testing and related skills Code Renaissance strives to help you create the team and codebase that you've always wanted.

Evolution of (my) Javascript

Over the years the way that I code JavaScript has changed significantly and I wanted to review how my code has evolved. When I first started in JavaScript it might have looked something like this:

<a id='HW0' href='javascript:void(0)'
onclick='HelloWorld();'>Hello World Test 1</a>

<script type='text/javascript'>
function HelloWorld(){alert('Hello World');}
</script>

Later I learned that it was considered a good practice to mimic standard OO principles and that everything should be under one namespace so my code changed to this:

<a id='HW1' href='javascript:void(0)'
onclick='jdh1.World.Hello();'>Hello World Test 2</a>

<script type='text/javascript'>
    var jdh1 = {};
    jdh1.World = {};
    jdh1.World.Hello = function(){
    alert('Hello World!');}
</script>

Then I learned about JavaScript Object Notation (JSON) and my code looked more like this:

<a id='HW2' href='javascript:void(0)'
onclick='jdh2.World.Hello();'>Hello World Test 3</a>

<script type='text/javascript'>
var jdh2 = {
World:{
    Msg:'',

    Hello: function(){
        alert(jdh2.World.Msg);
    },

    Initialize: function(Settings){
        jdh2.World.Msg= Settings.Message;
    }
}
};

jdh2.World.Initialize({Message:'Hello World?'});

</script>

A while later I learned that my HTML really shouldn't have javascript embeded in it (e.g. no onclick) and also found out about self-executing anonymous functions (which I see no real need for, but find strangely irresistable), so my code morphed ever so slightly to this:

<a id='HW3' href='javascript:void(0)'>
Hello World Test 4</a>

<script type='text/javascript'>
var jdh3 = {
World:{
    Msg:'',

    Hello: function(){
        alert(jdh3.World.Msg);
    },

    Initialize: function(Settings){
        jdh3.World.Msg= Settings.Message;
    }
}
};

(function(){/*Page Initialization*/
    document.getElementById('HW3').onclick = 
    jdh3.World.Hello;
    jdh3.World.Initialize(
        {Message:'Hello World???'}
    );
})();

</script>

Finally I started using frameworks, such as JQuery and Asp.Net ajax which are more assistive than transformative and don't really apply to this example (though they allow you to replace that pesky getElementById with either dollar-sign($) or $get).

I have, however, mostly avoided the Moo Tools framework — which attempts to transform javascript from a prototyped object oriented language into class inheritance based one — for the same reason that I avoid prototypes themselves; within the context of my programming they add complexity without much gain (again strictly speaking within the context of my development).

I must say that I am ethusiastically embracing the the combination of ajax(via ASP.net) and DHTML(via jQuery); they complement one another beautifully.

T-Shaped People vs Generalizing Specialist

I've talked about T-shaped people in the past and why it can be useful to have them on your team. To hit the highlights:
  • T-shaped people are expert in a core skill, but also have a number of tangential skills that they are shallower in.
  • They should not be considered generalist because, unlike a generalist, T-Shaped People do have a core area of expertise.
  • T-shaped people work well on teams because they have the ability to see many perspectives, can stretch to fill gaps in the team and can take on new skill-sets quickly.

When I started reading about Generalizing Specialists I immediately drew parallels between the two and wondered how Generalizing Specialists differed from T-Shaped People.

One of the best articles on Generalizing Specialists is by Scott Ambler. In it he says that a Generalizing Specialist "seeks to gain new skills in both their existing specialties as well as in other areas, including both technical and domain areas." He goes on to give examples including Programming, Testing, Business, Project Management, and Deployment.

Though I strongly implied it in my original discussion about T-Shaped people I failed to state explicitly that I think that T-Shaped people are defined by their cross-disciplinary knowledge. From all that I've read from Scott and others there seems to be agreement that the requirements for a core specialty and cross-disciplinary knowledge cover both T-Shaped People and Generalizing Specialists, though, as with me, people haven't always emphasized that point strongly enough.

Consider the following comment I found on a post about Generalizing Specialist:
"I see great value in generalizing specialists for programming technologies. However... I cannot expect a single engineer to have IP routing, mobility management, session protocols, packet inspection and fast path expertise in my product. Those areas are domains in themselves and sometimes require years to master." Comment by Paul C

No disrespect to Paul, but a person with all of those skills is not a Generalizing Specialist. I wouldn't even recommend that they try to be (maybe there are some IP routing, packet inspecting, mobility managers out there who can enlighten me, but I just don't think they'd benefit from a great deal of cross-disciplinary knowledge).

Don't get me wrong, studying multiple sub-specialties within a domain is admirable, it's just not what we're talking about here. If you're going deep with a super narrow focus I'd say that makes you an uber-specialist and if you're doing so on several topics within the same domain, as above, would make you multi-uberspecialist. But no matter how many sub-domains a specialist masters it will not make them a Generalizing Specialist.

Regarding specialists Nobel laureate Konrad Lorenz said "Every man gets a narrower and narrower field of knowledge in which he must be an expert in order to compete with other people. The specialist knows more and more about less and less and finally knows everything about nothing."

Not that there's anything wrong with that. In many contexts a specialist is exactly what you need and I think that Paul lists several great examples, but in other contexts, for instance Agile Development and User Experience/User Interaction Design, I think it's been widely recognized that it's beneficial to to have a lot of T-Shaped, Generalizing Specialists in those roles.

So, are T-Shaped People and Generalizing Specialists the same thing? I think they are. Its funny how nearly identical concepts can spring up from multiple sources around the same time.

I'll leave you with one final quote about specialists from one of my favorite Sci-Fi authors:
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." Robert Heinlein

You may also be interested in the following posts:

Good Marketing vs Evil Marketing

Like many of you I have a teeth grinding, nails on the chalkboard, trip to the dentist reaction to the term marketing. One that conjures up memories of late night infomercials, telemarketers, and internet/twitter/email spammers. Corporately you may also encounter the term used in the following context: "Marketing says they need [impossible changes] to [something you're responsible for] by [impossible deadline] because of [illogical reasoning/self-promoting corporate politics]".

In fact in most contexts the term Marketing is about as well received as a fur coat at a PETA luncheon.

Believe it or not though, while it can be used for evil, marketing isn't inherently evil. At its heart marketing is simply an attempt to take something that you're selling and make it appear favorable. Yes you could be selling a product but thinking more broadly you could also be selling an idea or even selling yourself (think about the last time you went on an interview).

Evil marketing says: We have a awful product/service/idea that we want you to think is great! Often the product was designed primarily to be sellable, but not necessarily useful or reliable.

Good marketing stems from the product itself. It only occurs when you've worked hard to create an awesome, usable product that fills a need and, having done that, seek to get the message out to the people that it will help.

To simplify it further, marketing is the sum of the messages that you are putting out there about something you want others to care about, whether it be your company, your product, your team, or yourself. It is critical to be aware of the messages you are putting out, how consistent they are and the perception that they are creating.

How good your product/blog/software looks sends a message. How it's presented sends another. How useful it is, while critical, can be buried behind the all the other messages that are being sent. Perception is often more important than reality and perception is exactly what marketing seeks to influence.

Companies are marketing their products; Managers are marketing their teams; Team members are marketing their skills and their usefulness to the company. Good marketing takes something worthwhile and aligns perception with reality; poor marketing fails to do so. Evil marketing takes something worthless and attempts to skew perceptions to make it seem worthwhile.

Virtual ALT.NET Lunch & Learns: A chance to speak

I attended the yesterdays Virtual Alt.Net(VAN) Brown Bag Lunch online and was surprised by the variety of content. The floor was opened up for anyone in attendance to give a quick presentation of things they're working on or wanted to share and several different developers stepped up. From programming to tools to application etc it was quality content all around and well worth the time.

It's rare to find something this exceptional and pleasantly different out there. I'm sure if the meetings got large enough they'd need to have people schedule ahead of time but for the moment it's an extremely interesting, and rather unique format; I really hope it scales as they grow.

If I'd know ahead of time that they would be opening up the floor I might have had something quick prepared... I may have a go at it next time.

I hope you'll all make it a priority to make at least one meeting in the next month. Whether you come to speak or just to listen I think that you'll be pleased.

Every Wednesday 1PM EST Virtual Alt.Net Mettings (via LiveMeeting) are here.

Virtual ALT.NET is not a Cult

I mentioned to someone at work that I'd be attending a Virtual Alt.Net (VAN) Meeting online and their response was (no kidding): "Alt.Net? Isn't that a cult?".

Now you may have heard rumors flying about those crazy Alt.Net guys being some sort of X-Files, Lone Gun Men sitting on the sidewalk outside of Starbucks typing on a laptop with one hand and holding up cardboard sign with the other declaring the coming Apocalypse , but I assure you it isn't so (at least not based on tonight's meeting).

Ryan Svihla (@rssvihla) gave an excellent presentation for VAN (Virtual Alt.Net) on the Castle Project tonight. His coverage of IoC and Dependency Injection were solid and the discussion of Castle was interesting. Castle it isn't quite mainstream and to tell the truth, all the code was a bit much for me to absorb in one session, but it was clear from what I saw that these types of frameworks for managing dependencies are the way things need to be headed.

Anyway, the meeting went off without a hitch using Microsoft LiveMeeting (just like the Linked In Dot Net User Group - LIDNUG). Unlike LIDNUG The Virtual Alt.net guys have meetings scheduled very consistently and conveniently for an American crowd; if you're in the continental US they should be Wednesdays sometime after work and Thursdays around Lunch time. There are also a few meetings scheduled for the international crowd.

It seems like they're just getting everything off the ground and they're doing a great job so far but I would like to offer a little feed back. Their site www.virtualaltnet.com doesn't come up first in a google search. Also, when I got there I couldn't find the LiveMeeting link (I might have missed it but I didn't see it there). Thankfully they have members active on twitter and I found the link there with a quick search. It's a minor thing, and one to be expected with a newly forming group, but the sooner they fix it the better their numbers will be.

Anyway, it was a great meeting. I plan on attending tomorrow's brown-bagger from work if I can.

You should be able to attend for tomorrows and all future Virtual Alt.Net Mettings (LiveMeeting) here.

Thanks again guys.