NCZOnline

Front Page and YUI 3 causes a stir

It’s really funny sometimes what gets coverage in tech news. Apparently, my blog post about how we co-developed the new Yahoo! Front Page and YUI 3 is really interesting to a number of people. I woke up this morning to find coverage of my humble offering plastered all over the Web:

In addition, today it’s on the front page of Techmeme and was at the top on Reddit and Delicious Popular.

Honestly, I had no idea that this would be of interest to so many people. I’ve been planning this post for a while, in concert with Eric Miraglia, for a time that we thought was appropriate. The goal was really to explain how YUI 3 is built for the future but various people have taken it in other directions. Oh well. All of the feedback thusfar has been overwhelmingly positive to my post, so thanks to everyone for the kind words.

Professional JavaScript, 2nd Edition available for pre-order

Good news! Professional JavaScript, 2nd Edition is now available for pre-order from Amazon. This is my fourth book release in the past five years, and boy am I tired. I’m very excited about this book as it represents my revisiting of the book that started it all for me. The first edition of Professional JavaScript was both a labor of love and my introduction into the world of technical books. I’ve learned a lot since then, both technically and in terms of my writing, so this book represents all the additional knowledge I’ve acquired in the past five years.

So why would you want to buy this version if you already bought the first? Quite simply, because a lot has changed since the first book came out. You should buy this book if you want to learn:

All the latest techniques for object-oriented programming in JavaScript, including Crockford’s design patterns. What happens behind-the-scenes in the JavaScript engine in terms of how objects are related to their prototypes, memory usage, and garbage collection. ECMAScript 4 and its successor, ECMAScript 3.1. The quirks in the JavaScript implementations of various browsers, including Google Chrome, Safari 3.1, Firefox 3, and Internet Explorer 8. Best practices for development, performance, coding style, maintainability, and deployment. Cross-domain Ajax requests in Internet Explorer and Firefox. How JavaScript works on web-enabled devices such as the iPhone and Wii. The latest features of HTML 5 and which parts have already been implemented.

Professional JavaScript, 2nd Edition, took me over a year to complete. All the while, new browsers kept being released, so I hope everyone can appreciate just how up-to-date this book will be when it hits shelves in January. I look forward to hearing your feedback very soon!

The YUI Test world tour

When I wrote YUI Test, my hope was to generate interest in unit testing for JavaScript. I became a fan of unit testing several years ago and have constantly been seeking ways to inject more of it into my development. I had hoped to publicize the framework this year and really get the word out. I didn’t get the opportunity in the first half of 2008 due to a frantic work schedule, but starting in the fall, I embarked on what I’ve lovingly called the YUI Test world tour. The schedule, dating back to the first talk, looks like this:

The Rich Web Experience West (September) - sadly, this event was canceled so the debut had to be postponed. The Ajax Experience (September-October) - the first public presentation of my talk, Test Driven Development with YUI Test (slides). Yahoo! Front End Summit (October) - our annual, in-house front end development conference, where I presented a more Yahoo!-focused version of my talk (video). LinkedIn (November) - coming up this week, I’ll be heading up the highway to talk about YUI Test with the good folks at LinkedIn. NASA Research (December) - originally postponed from this month, I’m going to share the test driven development love with the web gurus at NASA.

I’m hoping to keep this whirlwind tour going and continue to spread the word of test driven development. If you’d like me to stop by your workplace, conference, or school, drop me a line and I’ll see what I can do.

ECMAScript 3.1 static object methods prototype

While writing the section on ECMAScript 3.1 for my upcoming book, Professional JavaScript, 2nd Edition, I found it useful to create some of the static object methods to play around with. For those unaware, ECMAScript 3.1 defines several methods on Object designed to make it easier to manage object properties. These methods can be used to define new properties, including properties that are enumerable, read only, or otherwise different from standard developer-defined properties. From reading the specification, it’s a little bit difficult to determine how one would use the methods, so I figured I’d create as many as possible using existing ECMAScript 3.0 functionality to make sure I completely understood the functionality. The result is a small library that has basic versions of the following ECMAScript 3.1 static object methods:

Object.create() - basic functionality works in all browsers. Non-IE browsers allow defining getters and setters. No browsers can define enumerable, flexible, and writable on properties as this functionality isn’t available in today’s browsers. Object.clone() - basic functionality works in all browsers. Object.defineProperty() - same limitations as Object.create(). Object.defineProperties() - same limitations as Object.create(). Object.getPrototypeOf() - possibly inaccurate in IE due to lack of __proto__ support. Object.getOwnPropertyNames() - won’t return non-enumerable properties. Object.getOwnPropertyDescriptor() - enumerable, flexible, and writable are always set to true. IE can’t retrieve getters and setters. Object.keys() - works as expected.

Several of the static methods can’t be implemented using current technology, so I didn’t even bother trying. Therefore, the following six methods aren’t included:

Object.freeze() Object.preventExtensions() Object.seal() Object.isFrozen() Object.isExtensible() Object.isSealed()

You can download the source of my static object library along with some examples of usage here. The library isn’t recommended for production usage but may be useful if you want to play with the functionality to see what’s coming down the road. If you’d like to learn more about the static object methods, please refer to this document: Proposed ECMAScript 3.1 Static Object Functions: Use Cases and Rationale.

What happened to Firebug?

Just like any other web developer worth his salt, I use Firebug on an almost daily basis at work. I was excited to see the new features and performance improvements in version 1.2. After about a week of usage, however, I started uncovering some disturbing behavior. This version of Firebug seems to be very buggy. Here’s what I’ve seen to date:

The debugger freezes. I set a breakpoint, the breakpoint is hit but I can’t do anything. The only option is to reload the page to get everything working again. Incorrect error locations are shown in the console. Sometimes the filename is completely wrong; sometimes the error occurred in a different tab. The XHR inspector sometimes returns “null” even though a response was actually received. Firebug seems to detach from the web page from time to time, so anything I enter in the console isn’t evaluated correctly.

Due to these and other errors, I recommend to the team that people stick with Firebug 1.0 for debugging. Unfortunately, 1.0 doesn’t work with FIrefox 3, so we’ve been systematically forced to upgrade so we can test on that browser. I still keep a computer with Firefox 2 and Firebug 1.0 installed in case I get into some hairy messes with Firefox 3 and Firebug 1.2.

I’m not sure how Firebug became so unstable, but I really hope these issues are addressed soon. I’d be willing to forego any new features to get the old ones working more reliably.

A new America

Unless you’ve been living in a cave, you’ve probably heard by now that Barack Obama has been elected President of the United States, making him the first non-white to hold the office. (Though actually, Bin Laden lives in a cave, and I bet he’s heard by now, so no excuses.) Even though I’ve really had enough of the elections and the advertisements and the campaigning, I must admit that I was smiling as I watched Obama’s victory speech. Don’t get me wrong, I haven’t been one of his biggest fans (not a huge McCain fan either), but watching him on stage I came to realize that this election was exactly what this country needed.

The United States has a public image problem. We used to be the good guy that helps everyone out and, at times, was a bit naive. In the past eight years, we’ve become the obnoxious asshole who throws his weight around, kisses your girlfriend in front of you, and beats up your brother because he looked at us funny. Under Bush, the anti-American sentiment that was a mere whisper eight years ago became a full-blown scream. When Sean Combs had gotten a bad rap in public, he changed his nickname; Snoop Dogg used to be a scary gangster and is now about as mainstream as Mickey Mouse. Public images can be changed and manipulated, but the best way to do that is not to say you’re changing…it’s to just do it.

Electing Barack Obama yesterday sent a message to the world that the United States is changing. We’re moving past our racist origins and sending a minority to the White House. And the amazing thing about the election is that the issue of race rarely came up. If people didn’t like Obama, they didn’t like him because he was a socialist, or because he went to a church with a crazy minister, or because he was inexperienced; that says a lot about where we are as a people.

Just look at the excitement that this has released around the world. In Kenya, Obama’s ancestral home, crowds erupted with cheers when the announcement was made. Thursday was declared a public holiday in Kenya because of the win and pride that Kenyans feel for having their genes in the White House. Imagine that. A different country celebrated an American President being elected. Remarkable. And Kenya isn’t alone.

There are reports from all over the world about people being happy that Obama was elected. This is crazy. When people in other countries are happy about our new President who hasn’t even taken office yet, imagine what it will be like in January. You can already feel the divide between us and the rest of the world already starting to shrink. It gives me hope that someday soon, we’ll be able to meet many more countries at the negotiating table instead of at the end receiving end of a bomb.

It’s only been 24 hours since Obama was elected, and the world has already reacted. Obama is more than just the next President of the Unites States. He’s now a worldwide symbol of how anything is possible in America, and that democracy is so great because a country can completely change its public image and approach with each election. It’s going to be a very interesting four years.

Please let this election be over

I’ve really had enough at this point. This election has been going on for years, and now that we’re only a couple days from voting day (though I already voted), the increased rhetoric is really starting to get to me. The dirtiest ads have started running now, and it reminds me why I hate voting. Elections tend to bring out the worst in everyone and I’ve had my fix for the next four years. In California, the ads for each of the propositions are bordering on ridiculous. Each one has you believing that a vote in their opponents’ direction will lead to the end of civilization as we know it.

The most inflammatory proposition on the California ballot is, arguably, Proposition 8. The purpose of the proposition is to eliminate same-sex marriages in the state (no really, the title is, “Eliminates Right of Same-Sex Couples to Marry”). As with most propositions, this one is really about much more than just the stated purpose.

In 2000, California passed Proposition 22, which defined marriage as only between a man and a woman. California’s Supreme Court ruled earlier this year that same-sex marriages could take place, effectively throwing out the results of the Prop 22 vote eight years earlier. There are quite a lot of people who are upset that the Court would see fit to throw out an initiative that was overwhelmingly passed by voters, bringing into question just what the Court’s role should be in relation to voter-approved initiatives. In effect, a “yes” vote on Prop 8 could mean that you believe the Court acted improperly by overruling the will of the people.

On the other side, Prop 8 brings up the sting of institutionalized discrimination that has been at the heart of United States history. People are quick to point out that marriage between different races was illegal for a long time, while also mentioning how women were once not allowed to vote. So a “no” vote on Prop 8 could mean that you’re against discrimination.

The sad thing about Prop 8 is that it’s brought out the worst in both sides. There have been reports of yes/no signs disappearing from people’s yards, vandalism, and other criminal acts perpetrated in relation to this proposition. I’m not sure how either side can be proud of that. There’s also the typical grouping of people: if you vote “yes”, clearly you’re a bigot, if you vote “no”, clearly you’re advocating the gay lifestyle. A “yes” vote means you don’t care about civil rights while a “no” vote means you’re going to hell. I’m really getting tired of the finger-pointing and righteous proclamations being made by both sides.

The sides of this battle have spent an incredible amount of money on their campaigns - $70 million in total (source) - to try to convince people. Really? Is that the best use of that money? To make matters worse, companies such as Google and Apple have come out in opposition of Prop 8. Why do I care what either of those companies think? I’m a firm believer that corporations should stay out of politics, especially as it relates to non-business measures. I know I’d be a bit miffed if I worked at either company to have a “corporate position” on anything on the ballot. I, for one, am glad that Yahoo! hasn’t put out any press releases telling people to vote a certain way on Tuesday; I don’t like the idea of my employer having an official stance on something like this.

The other propositions aren’t nearly as heated, but the battles are still there. Tons of money being spent on last-minute commercials that have been barraging the average voter household all day and night. I can’t even begin to explain how tired of impassioned speeches I’ve become. If you really want to do a service to your state, don’t listen to anything in the advertisements. Do your own research and figure out what you believe. And don’t villify anyone who believes the opposite of you; they have just as much right to their opinion as you do to yours. That’s what makes this country great. And after Tuesday, I’ll be a much happier citizen, as I get back to life without political advertisements and people revert their middle names back from “Hussein.”

Book review: The World is Flat

I got The World is Flat as a present last Christmas. I had heard about it from my mom and a couple other people who mentioned I might enjoy it. I settled down into reading The World is Flat and had a couple reactions. The first was how much the metaphor annoyed me; the second was how the content of the book is really interesting.

This book is basically about how the Internet has changed the world. Friedman talks through the major goings-on in technology that led to the outsourcing craze. Even though I lived through the dot-com bust, I didn’t fully appreciate just how important it was in opening up the doorway to India and China. It’s this movement that Friedman calls the “flattening” of the world…a metaphor he absolutely beats to death throughout the entire book (truth be told, after the first chapter I didn’t know how much longer I could stand it).

Sprinkled throughout are interesting stories about technology companies. He walks through the rise and fall of Netscape (though I thought a little more explanation as to Microsoft’s involvement would’ve been nice). Of particular interest to me was the story of the Apache Foundation and how it began with the help of IBM. It was a story that I hadn’t heard before and it really opened my eyes. Friedman talks glowingly about open source software and how important it’s been to technology in general.

I also really liked the discussion of how technology can make a better world, and how global supply chains can help to maintain peace even amongst traditionally adversarial countries. There’s also some fairly basic political overtones encouraging America to free itself from oil dependency and other countries to institute laws that allow them to participate in the global market.

There’s a lot of talk about 9/11, when the planes hit the towers, and 11/9, when the Berlin wall came down, as well as how each impacted the entire world. Friedman explains in frightening detail how the same Internet that empowers companies and business also empowers terrorists, with examples of how al Qaeda operated up through 9/11.

Overall, The World is Flat is a good book with a lot of detail. Anyone who works in technology, or has any sort of interest in it, would definitely be well-served by picking this one up. Even if you’re a technophile like myself, you’re bound to learn something new. While I’m not a big fan of the overall writing style, I think the content more than makes up for it.

Steve gets owned

My team at Yahoo! has a healthy, if not obsessive, interest in torturing each other. I’ve talked about this before in regards to our propensity for taking and hiding items when no one is looking. But we don’t stop at that. Or perhaps I should say, I don’t stop at that. This is the story of how my co-worker and cube mate, Steve, got completely owned.

It all began with the YUI birthday party earlier this year. One of the attendees was former Yahoo Dustin Diaz, who took what I considered to be a really cool pic of Steve. I found the pic on Flickr and showed it to Steve, who promptly responded with disgust, saying something along the lines of, “that’s a terrible picture of me.” He then left work to go home. Big mistake.

As soon as he left, I went to work. My goal was to get the picture in as many places as possible by the following morning. So I put it on the men’s room door. On the vending machine. In the cafeteria. On his monitors. Then I made really small versions and put them in the “how I feel today” magnet and scattered some on his chair. I put them up all over campus in various buildings; some spots were obvious and others were not. I figured the obvious ones he’d find right away and possibly tear down, whereas the non-obvious ones he’d find somewhere down the road, maybe in months, and he’d realize the total extent of the prank. Psychological warfare is the best kind.

The next day, I also arranged for an hourly reminder of the photo. I got a bunch of people to agree to change their IM picture to that photo and send him an instant message at a designated time. Some were current Yahoos, some were former Yahoos, and the result was hilarious.

Perhaps the best part of this whole deal was when random people would stop Steve and ask him why his photo was up everywhere. Or when people would ask him why he looks familiar. Even now, months after most of the photos were taken down, there are some in obscure places still waiting to be discovered.

I setup a set on my Flickr account to document the occassion: Steve gets owned. Steve has sworn revenge, but so far, they’ve just been empty threats.

Why software engineers fail

I was reading an interesting entry over at fellow Yahoo Luke Wroblewski’s blog entitled, Why Designers Fail. The entry outlines research done by Scott Berkun regarding the career of designers and why some fail to achieve the results they desire. Luke sums up the findings nicely saying that many of the reasons why designers fail have little to do with the design skills of the designer: “Many top reasons for failure are not typically considered design issues, such as collaboration skills, persuasion skills, and receiving critical feedback.”

What struck me most about the findings were that these skills are things that could hold back anyone in their career. Actually, reading the entry reminded me of one of the first conversations I had with my current manager at Yahoo! His words still ring in my ears from time to time: “At this point, we already know that you have all the technical skills to do the job; what determines how far you’ll go is really more about how you deal with people.”

I believe this is true for nearly any profession. When you begin your career, it’s important to prove that you have the skills to do the job. Writers must prove they can write, designers must prove that they can designer, teachers must prove that they can teach. After proving you can do the job, you need to show that you can continue to grow in the role. This means learning new skills, making fewer mistakes, and being able to do the job without oversight. At this level, what you’re really doing is earning the trust of your superiors and co-workers. After that comes the point at which many people fail: evolution into a piece of the organization. This typically begins the conversation about the Peter principle.

The Peter principle says that you’ll keep getting promoted until you finally end up in a job that you can’t do. This happens because the higher up in the organizational structure you move, the less your technical skills matter and the more your people skills matter. So whereas you began in a position that played to your strengths, you end up in one that plays to your weakenesses. This is precisely what Berkun found in his study, that designers were failing due to factors outside of their design skills. That is why designers fail. It’s also why software engineers fail.

Designers and software engineers, once they rise high enough in the organizational hierarchy, both need to learn how to work within the organizational structure. Oftentimes, that means gaining the trust of business partners: designers need to gain the trust of engineers, engineers need to gain the trust of product managers. Gaining the trust of these business partners means being able to successfully negotiate, compromise, and work towards meeting a common goal without alienating people through your actions and speech. This is typically where people falter in their careers.

Yahoo! is a huge company, and this year I’ve had to learn how to play the organizational game. I can honestly say it’s been far more challenging than anything I’ve done before. Dealing with people is much more difficult than dealing with technology, that’s for sure. You need to understand what each person responds to in terms of approach. Some people will easily cave when pressure is applied, others need to be convinced through logical argument while another set may require emotional persuasion. And of course, all of this must be done while making sure that all of these people still respect you and don’t feel manipulated.

Fortunately, my interest and research in social interaction has really helped me thusfar. Understanding what drives people and how to communicate effectively have been key to me. If you have aspirations of moving up in your company, then it would behoove you to also start researching these topics. The only way to really get ahead in business is a better understanding of people. Hard skill jobs such as engineers and designers are commodities that can easily be outsourced if necessary; soft skill jobs requiring you to work with and inspire others will always be in high demand and, as a bonus, can never be outsourced. Mastering people skills ensures employability, and more importantly, ensures that you won’t fail.

Copyright © 2004-2008 Nicholas C. Zakas. All Rights Reserved.


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser