Sunday, June 26, 2011

#DevTO - You don't just write code

#DevTO started out with @kevinkvs and @jonezy thinking about the need to have a regular meet up for developers in Toronto to share and learn from each other. I first heard of this idea on Twitter from Chris and was immediately intrigued and offered to help out. @clickflickca also joined in later on the fun and brings his experience organizing and running other events around Toronto.

A big part of our jobs involves learning; from yourself and others around you. The challenges you encounter are as wide as the job titles. The other big part of the job, is showing off how you solved that problem and what you have learned.

Some of us are lucky to have a team of awesome developers that you work with every day to learn from, bounce ideas off and show off the end result. Some of us might not have that daily. How to convince your boss that the database needs optimization? How can you reduce your build time in half? Need to know about common pitfalls building mobile sites? Got some IE6 horror stories and the scars to prove them? This is where #DevTO comes in.

No matter what technologies you have used, are currently using or are thinking of learning #DevTO is for you. The broader the audience the better. This event is not just limited to developers. Kevin co-founder and Community Cobra Commander of #DevTO said it best:


If you are liking the sound of this so far then make sure you RSVP to our second event tomorrow night:



Thursday, June 16, 2011

All developers are not created equal - hence not interchangeable

Earlier yesterday I came across this article on the New York Times: Thieves Found Citigroup Site an Easy Entry. At first I thought, "Man, another big site had their customer data compromised", but as I continued reading this incident is a little bit different; especially the nature of the attack that was described in the article. The marketing and PR departments for these brands - and in this case Citigroup - need to be a little more careful about the kind of technical information that gets released when shit hits the fan.
Think of it as a mansion with a high-tech security system — but the front door wasn’t locked tight.
After reading through the article and the retarded nature of the attack you can't think of it as a mansion with a high tech security system; not even close. Some context on this attack:

In the Citi breach, the data thieves were able to penetrate the bank’s defenses by first logging on to the site reserved for its credit card customers.Once inside, they leapfrogged between the accounts of different Citi customers by inserting vari-ous account numbers into a string of text located in the browser’s address bar. The hackers’ code systems automatically repeated this exercise tens of thousands of times — allowing them to capture the confidential private data.The method is seemingly simple, but the fact that the thieves knew to focus on this particular vulnerability marks the Citigroup attack as especially ingenious, security experts said.
So, all these thieves needed to do is basically log in with their own or even someone else's Citigroup account and lo and behold this account number was present in the address bar after login. Changing it gave them access to someone else's account. A little script to repeat this for thousands of accounts and scrape the details.

This process was described by "security experts" as "especially ingenious". Really?!? This is the oldest trick in the book; i.e. mess around with the URL until you get somewhere. These "security experts" should get fired if this kind of attack was surprising.

The "what can we do, we got hacked" wagon got extremely popular in recent years, especially this year, but this Citigroup incident is different. There is no excuse for being on the "we are retards, we got hacked" wagon. When your "high-tech security system" is composed of changing account numbers in URLs, then what else can someone find if they look harder?

How does one get to this position? I think at the root of the problem is the thinking that people working in technology are interchangeable cogs in a giant machine. When you are building the pyramids, yes you can get 40,000 slaves and have them drag giant slabs of rock into place and stack them with virtually no way for an error to occur. And yes you can get another 40,000 slaves and replace the first 40,000 and they will still drag and stack the rocks as good as the previous 40,000 did. That mentality works when the tasks at hand are fairly simple and mechanical such as building the pyramids, or the production line at Ford. It is absolutely not valid in technology, yet there are many executives, project managers, and software architects today that think its possible.

The other part of the problem has to do with measuring expertise. The above assumption that developers, architects, designers, etc. are interchangeable also leads to the flawed assumption that a developer with 10 years of experience can replace any other developer with 10 years of experience as well. It is easy to get to that assumption when you think of these tasks as mechanical such as building the pyramids, or putting the wheels on a car. 10 years of experience developing doesn't have the same weight it did 30 years ago. Most developers today got into while they are teenagers, and hence by the time they graduate university they already have 10 years of experience developing stuff. Also, there are more technologies today that are available to the average developer to experiment with and try out, than there was 30 years ago. Hence why building technology systems  and development in general is a combination of science and art. The Sistine Chapel would have looked different if Leonardo da Vinci painted it instead even if he got the same directions from the Pope. The Pyramids would have looked the same regardless where the 40,000 slaves came from.

So for an online application that has to do with people's credit card accounts to fail at this level doesn't give me the warm fuzzy feeling that I should be getting when I read "Citi has implemented enhanced procedures to prevent a recurrence of this type of event." - if I were a customer.

Where else did you not do the due diligence you owe your customers? What other skeletons are in the closet? The New York Article should have started out like this:
Think of it as a tent with a zipper — but the zipper wasn’t closed.

Saturday, February 26, 2011

Rogers OnDemand Online Vs. Netflix

A week after the condo I'm renting suffered from a bathroom flood fiasco, I sat down last night to watch some TV at home. Now, my whole unit is a mess, and furniture has been moved around so I couldn't really use my TV, instead I decided to use Rogers on Demand Online (RODO). However, I am also a Netflix customer, but for some reason I chose to try RODO.

Rogers On Demand Online

I first signed up to RODO when it was in beta and was invited to sign up for it via Twitter, back then I actually liked it, the streaming was decent and I was actually impressed. That was the last time I used it until last night. Of course I forgot my password, and I needed to reset it. Strangely the guys at RODO decided that I need to answer my hint question first before they e-mail the address I signed up with the reset instructions. So off I go to the Rogers tech support page, which now seems to have a "24/7" online support chat. Yeah right. I downloaded the software they wanted, and waited for someone to "be right with me" for  quite some time - probably 10-15 minutes - before I gave up. 

Next, I call the Rogers support team and tell them the problem, they reset my password and ask me to try again. However RODO still shows my profile has been locked and I need to reset the password. The support service lady resets it again, and I still can't get in. Then *drum roll* ... dropped call.

I'm getting a little agitated right now, but I still can't log in. Then I get an e-mail to my phone saying my Rogers' portal password was reset. Great, so she ended up resetting the password to the billing portal. Isn't it bad enough that we have all these different passwords to remember, now we need to remember different passwords for the same company?

So I call them again; this time the wait time is "greater than 5 minutes". What does that mean? am I going to celebrate my 28th birthday before someone helps me?. 20 minutes later someone gets to me, and they reset the password for the right service. Awesome, now lets watch a movie. 

I log in to RODO, everything seems okay, so I start browsing the shows and movies. I don't know what the logic was for some of these movies and shows, but it almost like different channels have different presentation. The stuff that I would normally watch via Rogers on Demand on my TV looks great on the site, and I see a picture and some description and ratings. However, when I look at the stuff on TMN or another channel, it looks different. Its garbage.

Anyway, lets get on with it, so I pick a movie and then to my horror the quality was crap - even pixellated - and it was lagging as well. Great, all this for nothing. Ok, let me try a show, maybe it was just the movie. I wanted to catch up on Modern Family, so started that. No. Same shit.

Okay, I'm out of here. I leave a comment regarding their service and that I'm going to Netflix. (I'll leave the rant about the TV version of ROD for another post, but for now think about this: how come they still can't figure out how to display the full movie name? Is it really rocket science? If someone knows, please tell me, seriously, please.

Netflix

So, after my unsatisfactory experience with RODO, I go do what I should have done from the start. Netflix. Now, I signed up to that on my PS3, which I can't use right now due to the mess after the flooding, so I need to reset my password because who knows what I set it to when I created the account from the PS3. Anyway, go to netflix.com, and reset my password. Holy crap, I don't need to answer my hint question, the password reset got sent to the e-mail, amazing! 45 seconds later I am logged into my Netflix account - and even fixed my billing address since I moved 2 months ago and Netflix hasn't been able to charge my credit card. I pick a movie (and yes the selection is not as new as ROD but there are still some awesome shows, documentaries and classics there, some even delivered in HD. 

Netflix got their streaming technology nailed. Awesome quality. Great streaming. You only need to wait a minute at the start while it sets the player up, decide on the quality it will send, and buffer the movie. So why is that? Why is it that Netflix can do such a better job at the whole customer experience thing, than Rogers could?

The answer is on the Netflix Tech Blog.

Netflix is a technology firm that delivers media. Rogers is a media/communications firm, using technology to delivery media. Similar to my post about Yahoo's Culture vs. Google's Culture, Netflix would definitely have a higher innovation ratio than Rogers because of this difference in both companies. When technology is viewed as a cost center (as it is most likely the case at Rogers), then you end up with sub-par client facing technology such as Rogers On Demand Online, and even the Rogers portal itself. This goes to most "corporate web applications" as well.

As we get more entrenched in an online world, the big corporate world needs to let go of the perception that "technology" is a cost center and not a partner for delivering excellent and innovative customer experiences. 



Saturday, December 11, 2010

Mobile e-commerce & augmented reality?

When you think e-commerce what comes to mind? For me, I think Amazon.com and eBay.com. I remember reading somewhere that Amazon wasn't the first online bookstore, but in fact it was books.com - which is gone now by the way, and instead redirects to Barnes & Noble. Today, Amazon doesn't just sell books anymore, heck I can even order 18-inch wheels from there. But, what comes next? The e-commerce market is already at a point of saturation and it comes down to a battle-of-the-brands. Do I order this book from Amazon? or Barnes & Noble? or even Walmart? Should I buy a Dell from Dell.com? or from Walmart.com?

I blogged about social e-commerce at the beginning of this year, and some things are getting rolling in Collier's predictions, but we still have more to go before all her 2010 predictions are realized; sadly it won't be 2010; we're close I think, but I think social e-commerce is still a few years ahead. Its hard for these data silos to get broken down to really enable me to receiving recommendations from Amazon based on my Facebook friends or even tweets. Maybe I'm wrong.

But while these silos are up, m-commerce and augmented reality can go hand in hand, and it solves one of the problems faced by online shoppers; the "I'm not sure how this will look" problem. Its not a problem that every online store has, ex. I won't question how a PS3 will look like in my living room, nor will I question how a Mac mini will look like on my desk, so its not a problem there. It is a problem when buying something bigger, like furniture, appliances, decorations, wall paint, etc. Things that either take a lot of room, or might lead you to the dog house if your significant other does not approve take a lot of time to undo if you don't like where you placed it.

For e-commerce a picture is not worth 1000 words for most products out there. In the crazy world between my ears, I would go to the new place I'm moving into this month, pull out my iPhone 3GS and go to Ikea.com and start up their augmented reality furniture browser. I can then load up all the furniture I'm moving from the old place and see how everything comes together. It will then recommend other products based on the data it's collecting via my phone's camera, maybe different colours? maybe furniture pads to prevent the table from scratching the hardwood? Perhaps it'll recognize the TV and recommend a different place to reduce the glare in the morning since the windows face East?

Can it be done? I think so. The technology is already available. Where do you see mobile commerce heading in the next two years?

Friday, September 03, 2010

Don't tell me your TV supports Twitter (Part 2)

In Part 1 I ranted about the Samsung commercial that I caught on TV raving about accessing Facebook and Twitter from their new TV. I questioned how TV manufacturers are repeating the marketing campaigns the telecoms did a few years ago when the iPhone came out on select telecoms. The ones that weren't chosen such as Bell and Telus raved about their Blackberry, Palm and HTC lineups. They coined the term "social phones" or "smarter smart phone" and being able to access Facebook on their phones. Anyway, the future of mobile is in the apps, not the device nor the platform. I believe the same is true for TV.

In Part 2 I question the role of TV service providers and broadcasters in this new "smart TV" era that seems to be around the corner. The good thing that is going for these guys, is that they usually are Internet providers as well, or are at least partnered with an Internet provider. Smart TVs obviously need an Internet connection, so these guys will still be there. Their role could change a bit. As more Internet ready devices hit the market, it doesn't make sense for them to split their business into three lines; Internet, TV, Phone. What happens when we start getting fridges with WiFi / data chips? or washing machines? or even cars? I predict they'll just all converge into one line, connectivity and you pay for the data you use. Before we get there, we'll probably go through a stage where a standard package will give you X devices, a "gold" package gets you Y devices, and a "VIP" package gets you Z devices. Soon after that, that too won't cut it as it becomes the norm that devices have these connectivity chips built in.

Saturday, August 28, 2010

Fast Mover Advantage?

I just finished reading the book "The Accidental Billionaires" by Ben Mezrich. The book provides great stories into the lives of the "founding fathers" of probably the most successful website on the Internet today - Facebook - although it wasn't a first mover. What amazed me the most about the book is how fast everything was happening.

Maybe once upon a time "First Mover Advantage" was important, that time I believe is long gone. Maybe it was important when building and shipping any product or service was extremely costly and time consuming. It was probably an important idea or theory for the Space Race in the 60s and 70s. I don't think it is all that important today.

Image from http://www.flickr.com/photos/blackbutterfly/3051019058/

I think people should think more about the "Fast Mover Advantage" (I'm surprised there is no Wikipedia page on this today). The fast mover is able to counter all the hypothetical advantages associated with the first mover. Here is why:

Tuesday, August 24, 2010

Don't tell me your TV supports Twitter

Last night I caught a Best Buy ad on AMC about Samsung's smart/social/internet TV.  It reminded me of the Telus/Rogers/Bell BlackBerry ads a couple of years ago marketing Twitter and Facebook as features of their smartphones. They're still doing it with terms like "social phone" or "smarter smart phone" which I don't really understand.  I was still really excited about this ad, especially because it got the gears in the crazy place between my ears turning again...

Samsung seems confused about what to do with Google entering a market in which Samsung is one of the largest players. Add to that, Apple's arrival later this year with iTV. The same two companies that pretty much destroyed Samsung's chances in the phone industry. Samsung has its own OS for its phones, which also powers their smart tv - Bada. This is a bad idea:
  • PopularityRecent market results show iOS and Android capturing about 80% of the mobile web consumption. (Not including iPad). Since these numbers were gathered in June, the iPad has probably gained some more ground for iOS. Let's keep it at 80%. Samsung Bada's share is a fraction of that 10% for "Other", with probably an equal if not greater chunk of that "Other" going to SymbianOS.

Saturday, August 14, 2010

Yahoo's culture vs. Google's culture

Two interesting articles I have read in the past week had to do with Yahoo's "hacker-centric" culture - or lack of. Two different views, one from Paul Graham's "What happened to Yahoo" post and the second from Ryan Grove's "What's happening at Yahoo!". Both were excellent reads and provide an interesting look into Yahoo's culture.

These articles got me interested in comparing both Yahoo! and Google, and see which is more a technology/software firm. I started out with the leadership team of both companies and counted how many engineers, scientists and mathematicians are in both. I could be wrong, but I'm considering a "hacker-centric" culture is composed of a high number of engineers, scientists and mathematicians. So I'll refer to these as "techies".

The results were pretty amazing. The higher that number is, the more "hacker-centric" that company is. Feel free to comment about this, if I'm being biased or overlooked something. One thing I did, but not on purpose was I double counted some members if they were in both the board of directors and VP lists, so the ratios are a little skewed, but still the difference is huge.

First insight was the very different leadership structure in both companies. The boards of directors for both are rather similar, nine members in Google's, ten in Yahoo!'s, roughly the same number of "techies"; four in Google's vs three in Yahoo. Nothing surprising here.

Monday, August 09, 2010

Daily Digest

Last night I came across this sweet web app called paper.ly that generates a newspaper of your Twitter feed daily. It comes with a pretty basic embed that displays a table of contents for your own personalized news paper that you can embed on your blog or website. The people I follow are mainly from the tech community in North America and the Toronto Twitter community. You'll find posts from the usual suspects like GigaOM, TechCrunch, Mashable, and Seth Godin. Also some local people like Alex Blom, Scott Stratten, Breanna Hughes and Joallore have appeared in my daily digest today. Anyway, if you are interested in seeing what the Twitter community I'm following is publishing on Twitter, feel free to bookmark this page.

Sunday, August 08, 2010

Matt Ridley: When ideas have sex

Just came across this fascinating video on TED. Needless to say that when technological ideas have sex we can end up with the Twitters, Facebooks, iPads, iPods, iPhones, etc. etc. Enjoy.
At TEDGlobal 2010, author Matt Ridley shows how, throughout history, the engine of human progress has been the meeting and mating of ideas to make new ideas. It's not important how clever individuals are, he says; what really matters is how smart the collective brain is.

Saturday, August 07, 2010

Stay on your toes, think proactively

I was coming back home today and while in the elevator the lady that just got on forgot to press her floor's button. She realized a little too late as we passed the 15th floor; her floor. She then press 17, but that too was too late, then she pressed 18, and again that was too late. She gave up and got off the 20th floor with someone else. At that point I was thinking, if she pressed 17 and 18 at the same time, she probably would have gotten off at the 18th floor. Anyway, no harm done when you miss your floor, I just thought its an interesting intro to this post.

When things don't go to plan, most start to think reactively, how do I get back on plan? We panic and try all sort of different things to reduce the damage - with little consideration to the consequences of our remediation. Ex. You are driving on the highway and tailgating the person in front. Breaks go on, and now you are forced to slam on the breaks to avoid a collision. Thinking proactively would mean you wouldn't have been tailgating the person ahead, it would mean you were aware of what is happening around you. Isn't that what you get taught at driving school? Defensive driving is proactive thinking.

Even when things go to plan, you can begin to think reactively. Task 1 is done, on to task 2, then task 3, and so on. Following your plan blindly is also reactive thinking. I also think the longer your actions have been in line with your plan, the worse the consequences of your reactions will be when things eventually don't go to plan.

So, shit happens and you can't do anything about it, but good leaders shine when shit hits the fan. Good leaders are proactive thinkers. People who think reactively, are good at following, they're bad at leading; and that is okay. Not everybody can lead, and not every leader can lead all the time. I've been in positions where I followed great leadership; proactive leadership. I have also been in ones with reactive leadership. Its very different, but both offer lessons to learn. Good leaders know when to step out of your way and let you run with it. Because reactive leaders are bad leaders, and they're good at following, they expect others to blindly follow them - blindly following someone isn't proactive thinking.

Proactive thinkers are Linchpins.

Thursday, July 29, 2010

@flipboard - my personal magazine

I haven't tried this yet, and I don't have an iPad still, however this video is just screaming at me to go buy an iPad just for this app. It's kind of like how Shazam and UrbanSpoon apps in the iPhone ads were the "kick over fence" for me.



I'm not all that interested about using it for Facebook, the use case that appeals to me the most is its Twitter integration. Twitter is a brilliant way to keep up on news in any field, on any topic, any event.



I'm not that interested in reading any individual's Twitter feed on the Flipboard. What I'm interested in is something like NewsMap however personalized like Flipboard. For this to work the way I think I'll find it useful, it needs to support Twitter lists, more than off my feed. Following 350 people is not easy, it stopped being easy at 25, and this is where TweetAgora came to the rescue. TweetAgora tackles this problem from one angle, identify the noise to amplify the signal. Its a very good angle. I tried a lot of Twitter clients for the iPhone and Mac, and honestly no other app tackles it as effectively as TweetAgora.

There is another angle, the angle that Flipboard could come at it, from what I have learned from Bretton MacLean it doesn't support that angle yet. When the characteristics of the noise are known, we can improve the signal to noise ratio, however if you don't know these characteristics, then you could reduce the actual signal. One of the great things about Twitter is that it opened my mind to all sorts of different topics that I didn't know I was interested in, I can miss them in my global feed, and I won't have them in my agoras because the characteristics are still unknown to me.

So here is the meat of this post. I'm thinking some sort of crazy mashup of Twitter lists, combined with Twitter lists of members on Twitter lists I follow. Ex. If I follow list A, and user 2 is on list A and they own list B, perhaps mashing up the content in list A and list B will bring to my attention new stuff for me to read when I look at the Flipboard magazine that contains list A. After all, the magazine's soul purpose is to show you something you didn't know, and kill time. : )

Anyway, congratulations to Mike McCue and the Flipboard team. All the best. I can't speak for the app itself, but the video is sick! Help me kill time more effectively.

Monday, July 19, 2010

Dojo templates & Google Maps InfoWindow

I have been building mashups using Google Maps since 2007 and one problem I had is passing in the content for these bubbles that show up when you click on a marker i.e. the InfoWindow. One big annoyance with it, is that you have to pass in the HTML content as a string when opening the marker. I don't like it because I have to intertwine HTML inside of JavaScript. So how can we make this better?

Dojo Templates


Dojo Templates is the number one reason I love this library, I like the PubSub mechanism I posted about last time but not as much as the templates.

Dojo Templates allow you to associate HTML template files with your widgets, that get instantiated when Dojo parses your page and constructs the widget, basically replacing the references to your widgets with the widget's markup in the HTML template file.

First: my infowindow.html template file

<div class="infoWindowContainer" dojoattachpoint="infoWindow">
<h1>${title}</h1>
</div>

Don't worry about that ${title} thing just yet, but I guess you already can see where I am going with this.

Second: my infowindow.js widget

dojo.declare(
"nael.widgets.infowindow",
[dijit._Widget, dijit._Templated],
{
templatePath: new dojo.moduleUrl('nael.templates', 'infowindow.html'),
constructor: function(){

}
}
);

In this example, my infowindow widget's constructor is empty.

Next we create the marker. Here we using dojo.forEach to loop over all the points that were returned with our AJAX response to fetch points. this.map is the object within this map controller that references the Google Map. (This is the same controller from the previous post on Dojo PubSub mechanism)

dojo.forEach(pois, dojo.hitch(this, function(p){
var marker = new google.maps.Marker({
position: new google.maps.LatLng(p.lat, p.lng),
map: this.map
});
var content = "<div class='infoWindow' dojoType='nael.widgets.infowindow' title='"+p.Pois.name+"'>
" ;
this.addInfoWindowToMarker(marker,content);
}));


The important part is the line where we add the content. Yes, we still need markup in there, but now its just a placeholder for the real markup. We can pass attributes like title into the placeholder for nael.widgets.infowindow. So anything that you want displayed in the info window becomes an attribute. This allows you to focus on content, and not worry about presentation just yet.

The last method we call addInfoWindowToMarker creates a Google maps listener on the marker and connects the info window to it. Note, that the info window here, is not the widget we created in the beginning. The one at the top is "nael's infowindow" and only serves the purpose of templating.

addInfoWindowToMarker: function(marker,content){
google.maps.event.addListener(marker, 'click', dojo.hitch(this, function(){
this.infoWindow.content = content;
this.infoWindow.maxWidth = 300;
this.infoWindow.open(this.map, marker);
}));
}


If you try the above, and click on the marker, the content will still be empty. Because this is a widget, it needs to be constructed. You need to tell Dojo when to parse the DOM to look for new widgets that you introduced since the last parse.


google.maps.event.addListener(this.infoWindow, "domready", dojo.hitch(this, function(){
dojo.parser.parse(this.mapCanvasNode.id);
}));


We don't want Dojo to go looking through the whole DOM for new widgets, we know where the widget was added. So we can just tell Dojo to look for widgets within the div referenced by the HTML id this.mapCanvasNode.id)

Finally, back to our infowindow.html template:

<div class="infoWindowContainer" dojoattachpoint="infoWindow">
<h1>${title}</h1>
</div>


We can now adjust the template as we please without trouble, and this sure is much cleaner than doing this like I used to for years.

var content = "<div class='infoWindowContainer'>";
content += "<h1>" + title + "</h1>";
content += "</div>";


Maybe one day Google Maps will support templating the HTML for InfoWindows internally, until then, I'm sticking to the above when I can.



The benefit of templating the InfoWindow becomes obvious when you are dealing with complex InfoWindows with functionality built into it such as sharing on social networks, embedded videos, AJAX requests, pictures, etc. All that stuff can be templated, and only the dynamic stuff that comes from the backend is passed through.

Of course, on top of being able to template your InfoWindow markup, it is much easier now to replace an InfoWindow with a version 2.0 of the InfoWindow. You just have to drop in the new and improved widget and template, then abide by the Pub Sub channels you have defined between the widget and the rest of the application.

Sunday, July 18, 2010

Dojo How To: Publish / Subscribe

I haven't been using Dojo for a very long time, just over a year now, but its time I blog about all the little great features I have learned.

One of the features I like the most in Dojo is the Publish / Subscribe mechanism. Its flexibility allows you to cleanly implement communication between different components like modules, widgets, portlets, etc.

Lets get down to business. Say I have two controllers, a map controller, and the main app controller. The map controller owns the map object in my application, in this case a Google Map object. The app controller owns the communication with the user, browser, AJAX, etc. When my app loads, I want the map to go right to the user's location. The map doesn't care where I get the coordinates from, it just needs the coordinates.


startup: function(){

//some other startup code

//subscribe to the event we will get back from the app when coordinates are available
dojo.subscribe("nael.controller.app.currentPosition", this, this.eventHandlers.updateMapCenter);

//when Im done starting up, yell to the app controller saying Im ready for coordinates
dojo.publish("nael.controller.app.requests",["getBrowserCoordinates"]);
},


So the map widget will initialize the Google Map I'm using, do some other stuff, and when it is done it will publish to the app controller's "nael.controller.app.requests" channel. The message it sends to the channel is an array of arguments. In this case it is the request ["getBrowserCoordinates"]. Your channel names can be anything, I just use the Dojo module path to that widget and end with a good description of the channel, i.e. "requests"

On to the app controller:

The startup function of the widget just subscribes to the required channels

startup: function(){
dojo.subscribe("nael.controller.app.requests",this,this.eventListener);
},


One event listener for the "nael.controller.app.requests" channel. Notice that the listener just passes it to the appropriate event handler, the one we passed in to the channel.

eventListener: function(event){
this.eventHandlers[event]();
},


Finally, the eventHandlers object which will contain all our actual event handlers. Here we have the "getBrowserCoordinates" handler which was the argument ["getBrowserCoordinates"] the map passed into the channel.

eventHandlers:{
getBrowserCoordinates: function(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position){
var coords = {lng:position.coords.longitude, lat:position.coords.latitude};

dojo.publish("nael.controller.app.currentPosition",[coords]);

}
);
}
},

Once the app controller receives the coordinates from the browser's geo location API, it publishes the coordinates to the "nael.controller.app.currentPosition" channel - which the map widget has subscribed to during its startup step. When the map receives that event, it tells the Google Map to re-center around the new point.

I'm doing it this way, to reduce the number of channels each module needs to listen to. I can easily bring the browser to its knees if I have a unique channel for each event I'm thinking of raising. Remember, kitchens get dirty one dish at a time. It makes sense to have one "requests" channel for the main app controller, (or every widget as a matter of fact) that all other components can just send requests to.

You may ask why I have a specific channel for the current position? I guess I could have done it similarly to the requests channel. However, I figured that all widgets will be asking the app controller for stuff, while not all widgets would need to know about the user's current position. If we have a "responses" channel that all widgets subscribed to, it could lead to a lot of unnecessary chatter amongst the widgets and too many event listeners. The second reason, is that the current position channel, may get pretty noisy if it is a mobile browser. Couple both reasons together, and you have a recipe for disaster

So why should you care about JavaScript Publish / Subscribe?


The same reason you would care about it for other technologies. Its a better and much more powerful interface between JavaScript modules. Without these channels and event listeners, you would have just called the getBrowserCoordinates method from the map, or worse, you would have called the GeoLocation API straight from the map. You don't have to use Dojo for this, other libraries also provide you with a pub sub mechanism, like YUI EventTarget. Other JavaScript libraries have it, or have plugins for it. Its a design pattern that makes sense.

Note: if you are still not using a JavaScript library for your web app development, you should seriously reconsider because you are wasting a lot of time re-inventing wheels and light bulbs.

Another example, say you need to add a new widget, instead of trying to figure out where you are all the right places to call a method in this widget from another, you just add the widget and subscribe to the event that is triggered. Change request done.

One final reason, Publish / Subscribe is an excellent way to build a mockup of application workflow. You can stub in some datsabase data and when the backend is ready, you just replace the stub module with the one that will listen to the right request channel, and publish to the right response channel. And as an added bonus, if you screw up the channels, nothing breaks, the messages just won't get passed and you won't see browser errors when functions aren't defined. It fails gracefully - which is important.

Sunday, July 04, 2010

John Underkoffler points to the future of UI

I caught this video by John Underkoffler - the science advisor for the movie Minority Report on TED the other day and it got me thinking about web interfaces, especially for online banking such as CIBC's and online billing such as Roger's. I'm not saying we need interfaces such as this for these kind of online applications, but we are surely due for a major overhaul of these interfaces. I sure hope we don't need movies about these before they become more mainstream.

Is technology capable of improving the interfaces for online banking/billing sites?



Hell yes! The customers just need to demand that. We have been stuck in this e-statement model for far too long. Technology isn't the hold up. We have had these brilliant interfaces in the wild for a while now. Consider Mint. That 15 person team was so successful they were even purchased by accounting software maker Intuit in 2009. So it is not technology that is limiting us, Mint did it and clearly they don't have as much resources as the banks or telecoms do. So what is the hold up?

Its a monopoly on my data


Consider the analyst who goes through some sort of overview of customer spending habits to figure out new plans or services to offer to these customers. Do they get a dump of the data? Probably not, you can't make sense of it. For these analysts to be able to see spending habits to justify new services they probably get to see some sort of visual, a chart, a graph, something. Human minds are visual, we are pretty good at spotting things if they are in a picture, not so good at spotting the one line in a contract that will
rip you a new one
cause you trouble in the future; that is why there are lawyers. Instead of dazzling me with loading icons please start focusing on delivering a little more value. I think as much right these analysts have to study my data to justify future products and services, I too have a right to my data to make sense of my spending habits. Here's a thought, I would happily pay $6 a month for that, instead of $6 a month for call display - which by the way probably requires you to do work to DISABLE. Why do we let these people reach into our pockets without providing anything of real value to us? Would you buy a car from a dealer who asks for more money to enable the 3rd gear? or charges you per minute per kilometer driving on an out of province highway? or you pay a service charge for filling up with a different grade gas?

Who would want this kind of stuff anyway?


Gen Y grew up in the Internet age, they expect this stuff to be the norm. Its only a matter of time before it becomes the norm so why fight it? I have been using Wesabe to make sense of my banking statements up until they posted a shut down notice. I didn't mind the hassle of exporting my statement and importing it in every month to see these beautiful spending charts. The tagging feature even allowed me to track my spending on smokes by making me more disciplined at buying my smokes from the same 2 places so that I could tag my spending at these 2 grocery stores as "smokes".


As much as I'd love to manipulate my phone bill in 3D space, I will be extremely happy if my interaction with it becomes more 2010, instead of 1997. All I'm asking at this point is for 3 fairly simple, yet significant improvements:
  1. The ability to tag transactions, and to view my statement by tag for both billing & banking. Rogers already allows me to tag numbers, so you are halfway there!.
  2. View tags as a pie chart -or any other visual- for both billing and banking
  3. For banking, graph my "income" against "expenses", month to month, year over year.


Simple? Can you do it for 2010? And then if you agree that these add value to your customer, then how about you replicate Wesabe for 2011?


Minority Report science adviser and inventor John Underkoffler demos g-speak -- the real-life version of the film's eye-popping, tai chi-meets-cyberspace computer interface. Is this how tomorrow's computers will be controlled?

Tuesday, June 29, 2010

the intersection of business and technology

Technology is useless if it does not deliver business value. Either it saves me time and hence money, or it makes me money. It has to be one or the other. Where does front end architecture fit in this picture? As the title points out, its right in the middle.

The front end is a misunderstood piece of any application, it is usually overlooked, underestimated, and belittled. Its fairly common to perceive it as "toying" around, "no/low value", etc. Its also very easy to believe that all the stuff that happens at the backend is the stuff that commands the big bucks. Unless you develop low level software such as compilers, web servers, drivers, etc. here is why you are wrong, and why front end architecture matters.

You can't deliver "customer focused solutions" if you belittle the front end


Successful front end architecture means focusing on what is important for the end user, not you the developer, nor you the SQL ninja, and not even you the business SME.
I don't know how this upside down tradition started, but I might have an idea. Application development usually starts with the back end framework, you know the Springs, and the Djangos, the Struts, and the Zends. None of these deliver any value to the user, they do add value to the delivery team and make them -in a perfect world- deliver better code, faster. So how did this tradition start? (One that focused on starting in an area that couldn't be any farther from the end user) My reasoning is that it started with equating building end user software with constructing a building. The first step of doing that, is to lay the foundation, the stuff that will carry all the weight of the rebar, steel, concrete, pillars, roof, and all the occupants and their equipment. All this stuff is as far away from the occupants of the building as possible, but it is by far more important than whether the doors open in or out. The occupants of a building are first concerned about their safety, a "customer focused solution" in the construction industry is one that is first safe for its occupants. Everything else comes later. However, when we use this analogy to building end-user software, we start out right off the bat focusing on the wrong things. A customer focused solution starts with the end user, what will he be interacting with, and then works backwards to define the solution that is required to support that end user.

You can't slap an interface on it


Okay, you can, but you shouldn't. Can you slap a steering wheel in the backseat of the car? Sure you can. Should you? probably not. Why is the steering wheel in the front? because the end user needs to see the road. Start with the end user and work backwards to the solution. A more accurate statement is actually "slapping a back end on it", or "wiring the back end to the front end". That you can do. Why? Because at that point you know what the user wants, and you know how your front end will achieve it.

Another reason why not to do this, is if you care about your users' experience, you would spend more time thinking through the front end, iterating and making it better. Forget the focus groups. Forget the design committees. Empower qualified, creative, and responsible people to make usability decisions. Have real users developers use your application, and keep your mouth shut. Don't show them how to use it, or what they're doing wrong. Observe, take notes, and make it better. Focus groups could just make you chase your own tail, as what happened with New Coke.

Phasing in features


Good back end frameworks and architecture allow you to phase in functionality as you progress in the project. A good front end architecture needs and should do the same. This means, just like a good back end does, a good front end must utilize a common framework. Today, not much focus is given to the front end. In fact it is assumed it can be completed 100% with a "big bang" approach. We don't use a "big bang" approach with the back end, why do you do it on the front end? Because you tried to slap an interface on it...

Front end components need to be thoughtfully designed, with re-use and phase-in in mind. Don't attempt a one-size-fits-all approach to these components. It might make for less development, but if your focus is "customer focused solutions" then you need to account for different use cases and different user types/roles. Also, just like back end components get re-factored when duplications occur, so must front end components. Why the double standard? because the front end gets belittled.

More data is better data


Yes, your gut can have a lot of say when it comes to the front end. However sometimes the change has no affect on your gut. Does it matter if your links are underlined? or are you just doing it because [insert your favorite reason here, ex. because my dog wags its tail when it sees underlined hyperlinks] Design your front end to be able to gather these usage patterns, because "customer-focused solutions" support their decisions on customers' actions. Don't even ask your customer whether they like A or B better, keep your mouth shut and observe. Do they use your application more? better? quicker? when A is there? or when B is there?

At the intersection of business and technology lies the role of the Front End Architect (FA). This person should be empowered and trusted to make front end architectural decisions based on supporting data that will deliver value to the end user. The FA, is not a business SME, they're not a designer, but they could be. They are a technical person, a developer with the scars to prove it. They work with the business to figure out how to deliver this end-user value. The FA also works with designers to iron out any usability issues that may affect the end-user value and can be fixed via enhancing the look and feel. They also work with the rest of the developers to keep front end components re-usable, and phase in friendly.

Do you have an FA on your project/in your organization?

Saturday, June 05, 2010

On selling customer experiences

I was looking at how much of a dent an iPad will put in my wallet when I noticed the mandatory field reminder on Apple.com's shopping cart. Then I came to this realization, Apple isn't a mobile device's company, nor a computer company, its a customer experience company. So much time is spent on just tweaking and perfecting the whole cycle. From the moment you browse their online store or their mortar-and-brick store, to the point you make your purchase, including the point when you receive your product, unwrap it - perhaps even record that joyous moment - and then finally start using it and then officially become a fan boy or girl. This happened to me in 2003/2004 when I purchased my first Mac, a PPC PowerBook G4.

Sorry, I went on a tangent there. Anyway, they are a customer experience company. The developers who built this form did not have to do it the way they did. This sick tooltip reminding you of the mandatory fields could just have been a red asterisk. However, because they are a customer experience company, they didn't do what every average Jack and Jill developer would have. As simple a page it is - a personal info page - it most definitely went through multiple iterations before it reached its current state.

Another example, lets say you don't look like a pirate but have a speech impediment. I'm a nice guy. If you seem like a nice person too, I'm going to do my best to understand you. However, that doesn't apply to your website or application. Don't make your product seem like it has a speech impediment - even if it looks great. Its just going to be awkward.

Learn from Apple guys, they don't have to do their site the way they do, they don't have to finnish their products the way they do, they don't have to meticulously design the packaging inside and out. But they do. And because they do, they're in the business of selling customer experiences. That is a very profitable business, and that is why Apple's stock P/E is twice that of Microsoft's.

Here's a great TED talk on "People don't buy what you do, they buy WHY you do it":

Friday, May 28, 2010

Chefs, Curators, & Developers

Besides that these people all eat, sleep, and lineup for the latest iStuff, developers ought to have another thing in common with chefs and curators. I would say software development is part engineering/science and part creativity, even as high 50/50 or maybe a little more.

Curators

The term "custodian of a collection" doesn't describe what curators really do. It almost makes it sound as if they just take care of a collection, but not necessarily care for it. A museum without a curator simply turns into a warehouse. It is the curators job to prevent that from happening. To care for the collection and keep an eye at the big picture.
Every piece, big or small, serves a purpose and delivers an essential part of the experience. The opposite of a curator is a hoarder.

Chefs

Similarly the chef does not just cook the food, they keep an eye on how the items on their menu works together, how the dishes enhance the experience, and how every ingredient in a dish works with the other ingredients. Every detail counts, and great head chefs will look after it all. They are food curators.
Musuems, food, and software is made better by what has been left out - purposely - and not what's included.

How do they do it?

Great museums don't happen overnight, they happen over time, time spent doing the same thing - improving the museum. The task is never done. It's iterative, and perpetual. Curators aren't afraid of tossing things out because they don't work, or something better came along. Curators are careful not to hoard shit, even if it's all good shit. They don't go about it alone, they get feedback from other curators, from their clients, and finally their gut & others' guts. Your unconscious brain has a lot to do with this task, sometimes it is hard to explain, but often your gut is on target.

Lessons from Chef Ramsay

The number one thing Gordon does to fix a failing restaurant is "cut the crap" - after he is done ripping through the owners of course. If you watch the show, you probably have seen him throw out half the menu - if not all of it in some cases. Take the episode of the "Curry Lounge", tons
of curry based dishes. None of the waiters guessed what any dish was during the blind fold taste test - except for the french fries; at an authentic Indian restaurant. Chef Ramsay tweaks and iterates over the food, how it's made and served over the course of the week. That's his formula. That is why he is a great head chef.

Don't be scared of "No"

There are many good reasons for saying "No". There are also wrong times to say "No". Say you are at a restaurant, and you ask the chef to skip the pistachio on your baked chicken because of allergies. That is a valid request you cannot say "No" to. On the other hand, don't be surprised if the chef says "No" while at an authentic Italian pizzeria and ask for extra cheese on your Pizza Terreno - he knows better than you. A good way to say "No" is to always provide reasons and alternatives. Most clients will consider alternatives, after all they are paying you to provide the best possible service you can afford them. Sadly, you don't always win, or you are just wrong and you lose the battle and have to provide exactly what you have been asked.

"But that is not how we do things around here"

There is always room for improvement, and there is always areas and times where you can play the role of the curator at what you do. Always start with the things you control. What if you work at a hypothetical restaurant that followed the Waterfall model? retarded right? but at every point in the process a curator could help, and a curator can make the experience better - even a little. This Waterfall restaurant basically takes orders at 5pm, by the time they are validated and cooking starts at 8pm. Then the dishes get checked, fixed and reheated. Food starts to come out at midnight. And into the wee hours of the morning the cooks have gone mad trying to
figure out what was ordered eight hours ago. Every single role in this kitchen can play the curator in what they are doing. As badly suited the experience is, it's much worse if everybody minds their own business and blindly follow the blind.

Kitchens get dirty one dish at a time

"Too many chefs spoil the soup" True, and applies everywhere. Why else do the Marines and special commandos operate in small, tightly knit groups? Do you seriously believe that anything will need an army of develop
ers yet the army elites can perform heroic missions with a team of 15?
Don't let your kitchen get dirty, it's easy to say you will do it later, but know that your effort to clean it does not have a linear relationship with how long you left it dirty.

Everybody can be a curator

Whatever business you are in, you are involved in curating and improving the product/service you provide. Whether you design buildings, write software, an author, or a sales guy, a president, or an army general. We all do it. We all know that the first draft of an essay is always the worst. When you walk into a board room to make a pitch, how many times do you revise and tweak that slide deck? how many times do you do it the night before? or even 30 minutes prior? We all do it.

So here is the big question, when did we say that code should be written once and done with? What tends to happen with development teams is this task is not performed as often as it should - specially as the team size grows. It gets worse when dates start to slip, as things like continuous improvement and cleaning up the kitchen are ditched. Here is the other problem, managers, executives, planners, etc. don't like to see tasks that don't have end dates on the plan. They want to know things like effort spent, time elapsed and percentages for each. An iterative task only has elapsed time, but nothing to identify how much is left because it's never complete. The affects of this curating task are phenomenal. Almost always you will be amazed by how little you changed or even better removed and how substantial the improvement was.

Making something better is never easy

...but the harder the decision, the better shape that thing is. To be successful at being a curator you really need to understand what your customer wants. Not just a little, you need to get in their head and figure shit out. You need to figure out how you can add value, or if you just can't. Value add is highly dependent on the context. If I am in a rush, fast food will be the best value for me at that time. I'm hungry, and need a quick solution. On the other hand, you wouldn't take your wife there on your 10th anniversary. The best way to bring yourself to a point where you can understand how you can add value, is by aiming for the simplicity on the other side of complexity. If you are looking for a good healthy relationship, you need to invest the time up front, you need to climb that complexity hill, sometimes it's steep, sometimes it's long, but rest assured it will flatten out after the peak. Thats where you want to be. Not many people make it to the other side, most will be hanging around at the base or on the way up. That region is highly competitive. The elite don't hang out there. Take Apple for example. We can consider Apple to be one of the elites of the tech industry - almost like they have the Midas touch. People have tried to replicate the iPod with little success. This week, slowly but surely Apple wrestled the 2nd highest market cap from Microsoft - without even dominating the market. They know their customers, and they don't even want everyone to be their customer.

Everything looks great on paper, it's not until it comes to life you start spotting glitches and things to improve. Good restaurants will shutdown for a day occasionally and just cook the whole menu and their staff will critique everything and make adjustments. Iteration is key. In school you are taught to review your essays, read them out loud, tweak and adjust the paragraphs, shuffle things around, all of this to find the essence and flow of what it is you are trying to accomplish.

There are only two kinds of developers.

Those that just get shit done - literally -, and those that will get it done very well. From a time line point of view, you won't be able to tell the difference. They both finish on time, and their stuff will work. However, the first, don't care about what it is they are building, don't care about who they are building it with, they put in their hours, get paid and that is it. Excellent developers don't have to be geniuses or come with Masters & Phds. These are the ones that want to be proud of what it is they are building. They are the ones that think several steps ahead, and design for change. They will embrace change if it makes what they are building better. They will try to resist change that adds no value. They are the ones that keep an eye on the big picture. Those are the ones that will invest the extra time to re-factor the redundant classes they spotted. They are the ones that experiment and try stuff out because they are always on the look out for a better option. They are the ones that will tell you "No, you shouldn't do that". That is how you separate the two. An excellent developer will wave his hands and yell when something is just not right. The first kind will shrug their shoulders and pile on the dishes.

Monday, May 24, 2010

The Mythical Man-Month

I think it was in first year software engineering that we had to read this book, and nine years later I really, really understand the underlying purpose of this book. It may just be yet another book back then, but the lessons that are hopefully learned from it will last a life-time - not just for software projects, but any project.

The Mythical Man-Month

Unfortunately on software project plans, developers, designers, testers, business analysts, product managers, etc. etc. are considered "just another resource" that are added and removed off of tasks. The assumption is that all are equally effective and skilled in all the required domains, and all will produce the same volume and quality. So in a perfect world it makes sense to scale the team to meet deadlines, although we don't live in a perfect and linear world, this is still the method of choice. Even though the biggest effect of this method; drastically increased non-linear communication time is widely known but mostly ignored.

Sadly this is the state of this industry, project plans that are too often disconnected from reality. I think part of the problem is driven by dividing tasks into a unit of time, after all that is how budgets are built, teams are put together, and progress is tracked. However on the other hand, this unit of time does not measure the real size of the task. Its just an illusion. Its like a building, we don't measure building size in number of months it took to build, we measure it by number of floors or in meters i.e. something relevant and real. If a 40 meter building was estimated to take 12 months, and in 6 months we are at 10 meters, then we are 25% done, and not 50%. However if this building were a software project its assumed we are 50% complete. Then at 10 months we realize we won't meet the deadline, forget about the Mythical Man Month and scale up. Why did this happen? Because software does not have a realistic metric, software is abstract.

Some say you get better at estimating over time, but that too assumes we live in a linear world. Ex. Project X took us 3 months, so we will estimate that project Y will take 9 months. We don't live in a linear world, and humans aren't good at estimating non-linear stuff. We may think that the second project is 3x as long as the first, but it could be x^2. However the hope is that over time you can make a non-linear project more linear by improving the processes for the non linear components. That effort is also non linear.

You can try to measure by team size, effort, or lines of code, etc. but all are just an illusion of measurement, none are real. Whether you measure buildings by floors or meters, you can translate between both. On the other hand, you can't translate lines of code into time, effort or team size.

I don't know what a better alternative is, but surely it is not this. Perhaps the problem is just trying to estimate that far into the future with too many unknown variables. Feel free to comment.

I recently read the book "ReWork" by the guys at 37Signals and one paragraph I absolutely loved has to do with project estimation.


The book is a must read.