Author of "Professional Ajax, "Professional JavaScript", Engineer at Yahoo!
Nicholas C. Zakas is a principal front end engineer at Yahoo!, where he works on the Yahoo! front page. He is the author of two books, Professional JavaScript for Web Developers and Professional Ajax, (the latter is in its 2nd edition, the former will have a 2nd edition by the end of the eyar) as well as over a dozen online articles on JavaScript.Nicholas began his career as webmaster of a small software company, transitioning into a user interface designer and prototyper before moving fully into software engineering. He moved to Silicon Valley from Massachusetts in 2006 to join Yahoo! Nicholas can be contacted through his web site.
Presentations by Nicholas C. Zakas
Enterprise JavaScript Error Handling
With tens or hundreds of thousands of lines of JavaScript in modern web applications, there's a lot that can go wrong. Is your application prepared for the errors that may happen when your users login? Have you properly anticipated weak points in your code as well as problems with network connections?Although error handling is typically part of traditional server-side architectures, it is often overlooked when dealing with the client-side world of JavaScript. Learn where to anticipate errors, how to determine if they are fatal, and what to do when they occur.
Test Driven Development with YUI Test
Learn how to apply the fundamental concepts of Test Driven Development (TDD) to JavaScript using YUI's unit testing framework, YUI Test. The session explores the capabilities of YUI Test in achieving good TDD practices, including the use of assertions, organizing test suites and test cases, and testing JavaScript-specific features (such as XHR and DOM events).Extreme JavaScript Compression using the YUI Compressor
The YUI Compressor does a lot of things to make your code smaller, but it's still based on a series of rules to ensure that it doesn't break your code. Understanding how the Compressor works makes it easy to write your code in particular ways to squeeze out every last byte of optimization. You can help the Compressor to do its job by using a few simple techniques.Maintainable JavaScript
Just because you can doesn't mean you should. Learn the techniques and pitfalls of architecting your JavaScript code for posterity in an enterprise environment. There is a huge difference between what works on your personal web site and what your employer has hired you to write. The code you create today could be touched by dozens of people tomorrow and hundreds by next month. Making sure that it can be understood, updated, and debugged is part of the value you add as a frontend engineer.Building the Front End
A common step that is missing from front end development is a build step. Developers have become accustomed to the code-run two-step process that, at first, introducing a build step seems like a time sink. However, when done correctly, a adding a build step into the development process can actually improve productivity, free the developer from mundane tasks, and aid in deployment.Books by Nicholas C. Zakas
by Nicholas C. Zakas
-
* Dispels the myth that JavaScript is a "baby" language and demonstrates why it is the scripting language of choice used in the design of millions of Web pages and server-side applications
* Quickly covers JavaScript basics and then moves on to more advanced topics such as object-oriented programming, XML, Web services, and remote scripting
* Addresses the many issues that Web application developers face, including internationalization, security, privacy, optimization, intellectual property issues, and obfuscation
* Builds on the reader's basic understanding of HTML, CSS, and the Web in general - Available At: http://www.amazon.com/exec/obidos/redirect?link_code=ur2&tag..
by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett
-
Professional Ajax 2nd Edition provides a developer-level tutorial of Ajax techniques, patterns, and use cases. The book begins by exploring the roots of Ajax, covering how the evolution of the web and new technologies directly led to the development of Ajax techniques. A detailed discussion of how frames, JavaScript, cookies, XML, and XMLHttp requests (XHR) related to Ajax is included. After this introduction, the book moves on to cover the implementation of specific Ajax techniques. Request brokers such as hidden frames, dynamic iframes, and XHR are compared and contrasted, explaining when one method should be used over another. To make this discussion clearer, a brief overview of HTTP requests and responses is included.
Once a basic understanding of the various request types is discussed, the book moves on to provide in-depth examples of how and when to use Ajax in a web site or web application. Different data transmission formats, including plain text, HTML, XML, and JSON are discussed for their advantages and disadvantages. Also included is a discussion on web services and how they may be used to perform Ajax techniques. Next, more complex topics are covered. A chapter introducing a request management framework explores how to manage all of the requests inside of an Ajax application. Ajax debugging techniques are also discussed. - Available At: http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http..
NCZOnline - The Official Web Site of Nicholas C. Zakas
The personal blog of Nicholas C. Zakas
Tuesday, August 21, 2007
Lately, I've been thinking a lot about the problems that are attempting to be solved online right now. This is Web 2.0 and there's a newfound enthusiasm for sites providing services which means that everyone is trying to provide a service online. The problems facing Web 2.0 entrepreneurs are different from those facing their Web 1.0 entrepreneurs, when everything was new and people "surfed" the Web. I've been collecting these thoughts in my head and sharing them with people over lunch, dinner, and instant messaging for a while, so I figured I'd go ahead and share with the rest of the world as well. These posts will be prefixed with "Internet Problem" for easy reference.
I was talking today with Dan Gill, one of the founders of Huddler, about one of the biggest problems I see for Web 2.0 businesses: getting users. I call this the dating site dilemma because the problem can be summed up in the following scenario.
Suppose you want to create a new dating site. The main draw to any dating site is, logically, people to date. I will join a dating site because I want to date someone and you are providing that pool of potential dates. But how do you get the first person to join?
The problem of getting users is more complicated now than before. People have routines; those routines now include Internet usage. Each person spends a certain amount of time online and that time is divided into a certain set of activities. Some of that time is surely used checking and responding to email, then maybe some social networking followed by visiting various news sites and blogs. As a new site, your problem is getting a piece of that pie. It's unlikely that the person will create more Internet time simply to fit your site into his or her habits. You actually need to take time away from one or more of the user's Internet haunts.
I hear a lot of people say things like, "it's like MySpace but better because it has x, y, and z." Well that's great, but how are you going to convince MySpace users to jump to your product? All of that person's contacts are on MySpace and your x, y, and z features don't make up for that. What is the value proposition that gets those users, the ones you're clearly targeting, to jump onto your site?
I don't have the solution to this problem, I just know that the problem exists. Everyone wants a slice of the Internet pie, but it is a finite resource. In the world of Web 1.0, no one had Internet habits so the fight was to become one. In Web 2.0, the fight is to alter habits, which I believe is a more difficult task. It was easy to set my mom up with an AOL e-mail account so she could keep in touch with friends; it was very difficult to get her to drop AOL for a more personal email address even though it would be easier for her, and everyone else, to remember. How can I find a date on your site if I'm the first one? That's the dating site dilemma.
Sunday, August 19, 2007
Preseason football has started and it really couldn't have come soon enough for me. Thanks to the magic of NFL Sunday Ticket and the NFL Network, I've been able to see both of the Patriots preseason games. The Patriots did a lot in the offseason, acquiring Adalius Thomas, Donte Stallworth, Wes Welker (who's been one of my favorite non-Patriot players recently), Sammy Morris, Kelly Washington, and, of course, Randy Moss. Sadly, a lot of the new weapons, and a decent amount of the old ones, have been injured and haven't been able to play.
Moss has yet to play down. The starting running back Laurence Maroney hasn't either. Most of the tight ends have been injured and haven't practiced though Benjamin Watson did play briefly in the last preseason game. So what can you tell from preseason thus far?
The starting defense, which was at about 90% in this preseason game (notably missing Richard Seymour), looks terrifying. They were fast, hard-hitting, and smart, really giving Tennessee a fit and making Vince Young run for his life. There was an obvious dropoff as the second and third team defenses starting rotating in. It was nice to see Randall Gay, our starting cornerback in the last Super Bowl win, back to form. He's had a rough time with injuries since the big win, but he's looking sharp thusfar.
The starting offense, on the other hand, looked average-to-mediocre. Without our starting running back, the run game was so-so. The timing with the new wide receivers was off, with passes going wide or receivers not looking when they should have been. Tom Brady threw two interceptions which, while poor decisions, could also be blamed on his target, Stallworth, for not running the route correctly in one case and slipping in another. The offensive line looked horrible throughout, with all the Patriots' quarterbacks getting hit repeatedly.
For the wide receivers that did play, Wes Welker and Jabar Gaffney did the best. Reche Caldwell looked sloppy, dropping a ball and having a catch wrestled away from him by a cornerback; I think he's at risk for being cut. Stallworth looked a little bit out of it, as I said before. The guy I really like is Bam Childress, who's a small guy that's been on the practice team mostly for the past couple years. Every preseason game he's played in he does exactly what has to be done: he makes tough catches, he returns punts, and he's not afraid to take and give hits. I really thought he'd make the team last year due to the weak wide receivers we had (he was brought up for a handful of games but saw limited action). I really don't think he has a chance this season with all the talent at that position, but he's still fun to watch.
At this point, I still feel that the Patriots are the best team in the AFC East. If they can get (and stay) healthy at all positions, they have the potential to be one of the best in the league. The starting defense will be a terror this year (again, if they can stay health). I just hope that the starting offense gets their act together. If Brady keeps getting hit the way he was in this last game, it'll be a very short season for him.
Friday, August 17, 2007
Laptop Magazine just did a review pitting all of Yahoo!'s products and all of Google's products against each other. Of particular interest was their choice of the new My Yahoo! over iGoogle for best personalized homepage. From the article:
We don't know what steroids the new My Yahoo is on, but the new starter page is exactly what you might envision your own personal newspaper looking like. The sleek interface allows users to keep the page looking fresh by clicking a "customize this page" button. A menu drops down from the top of the window and allows you to change everything from the background color to the layout of the columns. The same menu lets you add any RSS feed to the page with easy drag-and-drop modules. You can also add RSS feeds that mimic the actual site you're getting the feeds from, complete with images.
I know everyone on the My Yahoo! team, myself included, has been busting their butts for over a year to get this new version up and running. I'm glad to see some of our hard work being appreciated.
My Yahoo! wasn't the only Yahoo! product that won against Google in this review. Yahoo! also took the lead in instant messaging, photos, and music/games. Here's to hoping that this perspective starts being shared by others.
Wednesday, August 15, 2007
I was doing an interview yesterday here at Yahoo! and we had come to the point where you typically allow the candidate to ask some questions. I have to say that most of the time I'm pretty disappointed with the questions I get. I like to hear questions that indicate a certain sense of passion about working for Yahoo!. Yesterday's candidate I think asked me the best question I've heard yet: "What would you say makes a good front end engineer?" That's a question that I think deserves some discussion outside of the confines of that interview room.
To begin, front end engineers need to know HTML, CSS, and JavaScript. You can't be good in just one or two of these, you really need to know all three. That doesn't mean that you need to be an expert in all of them, but it does mean you need to be able to complete most tasks using these languages without stopping to ask someone for help.
A good front end engineer needs to be able to pick things up quickly. The technologies powering the Web aren't standing still, people. I'd go so far as to say things are changing on almost a daily basis and it's up to you to keep up with these changes. There are always new techniques and paradigms to consider and digest as part of your discipline; you cannot just rest on what you know today. The Web of tomorrow will be drastically different from the Web of today and it's your job to understand what that difference means to your web application.
There are many parts of computer science that are exactly as described: science. The front end is not a science, it's an art. An artist knows not just the tools of the trade but also when to use them. The solution to a problem in one situation may not work in another. On the front end of web applications, there's often many solutions to the same problem. None of them are wrong, but some are more appropriate than others. A good front end engineer knows when to use a particular solution and when to consider other alternatives.
A good front end engineer needs to be able to communicate effectively due to the parties involved with the job. At any given time, a front end engineer answers to at least four customers:
- Product Managers - these are the folks responsible for the direction of the application. They have a vision of what the application should offer to users and (hopefully) how to make money off of that model. Oftentimes, they will be pushing for more features.
- User Interface Designers - these are the people responsible for the visual design and interaction model of the application. Their concern is what will make sense to the user, consistency of interaction, and overall usability. They are most of asking for slicker user interfaces that can be challenging to create.
- Engineering Management - the group that actually builds and maintains the application. In engineering, the primary concerns are uptime (keeping the application available), performance, and deadlines. The push from engineering is usually to try to keep things as simple as possible and not introduce failure points while making changes.
- End Users - the primary consumer of the application. Though there's often not direct interaction with end users, their feedback is crucial; an application is worthless without people who want to use it. End users typically ask for things that would help them personally as well as things that are available from competitors.
So who do front end engineers care the most about? The answer is all four. A good front end engineer needs to know how to balance the wants and desires of all four groups in order to come up with an optimal solution. Communication is important because front end engineers are at the vertex of communication from these four groups. This may mean that a cool new feature needs to be scaled down because it will affect front end performance or it could mean pushing back on a design would negatively impact the accessibility of the application. As a front end engineer, you need to understand where each group is coming from and be able to suggest solutions that are acceptable by all parties. A good front end engineer is an ambassador, of sorts, and needs to have that mentality on a day-to-day basis.
One of the most important things I tell new front end engineers is not to simply agree to do tasks without first reviewing them. You must always understand what is being asked of you, not just in the form of a bug saying "this isn't working right," but also understanding what the intention of the functionality or design really is. A task to "add a button" doesn't always mean you end up adding a button. It may mean you go back to the product manager and ask what the button is for, and then maybe go to the user interface designer to determine if a button really is the right interaction approach. It's this communication that is vital to being a good front end engineer.
In many ways, I think being a front end engineer is one of the most complicated jobs in computer science. Most traditional programming concepts don't apply and there's a lot of soft science being applied to numerous technologies for usage on numerous platforms. The technical expertise necessary to be a good front end engineer is a vast and complicated terrain made more complex due to the parties you're ultimately responsible to serve. Technical expertise may get you in the door as a front end engineer, but it's your application of that expertise and your ability to work with others that makes you good.
Friday, August 3, 2007
It wasn't too long ago that I made my prediction about the Celtics. My editor Jim wondered in the comments if my tune had changed given the recent news that the Celtics traded for Kevin Garnett. The answer is yes, I don't think the Celtics will suck next year, but will they be good?
Given that the NBA's Eastern conference is about as pathetic as the NFC, the acquisition of Garnett virtually ensures that the Celtics will be a playoff team. That is, barring any injuries, which may not be a lock since the new big three (Garnett, Ray Allen, and Paul Pierce) are all over 30 and two of them didn't play a whole season last year. I saw one "expert" on SportsCenter claiming that the Celtics could now contend with not only teams in the East, but also teams in the West. Okay, that's a bit of a stretch.
The Celtics have three good players and then...um...wait, there's no one left! They traded away most of the young talent that played well last year (Delonte West in the Allen deal, Al Jefferson, Ryan Gomes, and Gerald Green in the Garnett deal), so who else is going to play? The Celtics have no true point guard (2nd year player Rajon Rondo will have to start now) and no bench. You can't even begin to have a chance against the top-tier Western teams without someone coming off the bench to score in double figures. The Celtics have no answer to the Manu Ginobli, no one to cover Tim Duncan, Dirk Nowitzki, or Amare Stoudamire, no one to keep up with Tony Parker or Steve Nash. So if the Celtics got to the Finals we'd most likely be looking at another embarassing sweep.
Danny Ainge basically traded away the future to try to win now. The Celtics have three all-stars over thirty years old and basically have one or two seasons to try to win it all. If (and when) that fails, they'll be left in worse shape than before the Ainge era began because they'll have no good young talent. They won't have ended up in the lottery because they'll have improved enough not to qualify. Rick Pitino banked his Celtics career on getting Tim Duncan; Ainge banked it on getting either Greg Oden or Kevin Durant, and when that didn't happen, he threw the rest away to try to win now.
This reminds me of when the Houston Rockets traded for Charles Barkley, who joined Hakeem Olajuwon and Clyde Drexler. Three of the 50 greatest players in league history couldn't win the championship and the Rockets have been up and down ever since but never getting close to winning another championship. I fear this is exactly where the Celtics will end up. Time will tell, of course, and I bet season ticket sales are up. Will I be watching next year? Of course. Will I be surprised if they aren't challenging for the title? No way. But I'd really like a basketball team to cheer for again.