NCZOnline

Professional Ajax

Ajax Experience: The aftermath

Finally back home after my trip to Boston. It was a little weird, I felt like I really wasn’t there for all that long because my typical trips back to Boston involve meeting up with friends and family every day. Since I was at the Ajax Experience for most of the time, it seemed to go by much faster. Also reminded me what I love Massachusetts and everything about it (including the bad drivers).

I put my presentations up on Slideshare for everyone to view. They were actually on the spotlight for a day as well:

My talks certainly weren’t the “sexy” ones of the conference; those are typically the ones centered around popular or upcoming JavaScript frameworks. However, I did get a lot of positive feedback about the content and I really hope that people learned a thing or two.

YUI 2.6.0 released

In all of the craziness of the past week around the Ajax Experience, YUI 2.6.0 was officially released. As usual, there’s a mix of new controls and major bug fixes (around 450 or so). What makes this an exciting release for me is that two of my components, Cookie and Profiler, have been promoted out of beta and into general availability. That’s always a big step at YUI, and is based on user feedback, bugs reported and fixed, and general stability of the code.

The Cookie utility reaches GA with the addition of the mythical removeSub() method. For those unaware, the Cookie utility shipped with support for subcookies but was missing the removeSub() method. This was a timing issue on my part as I just didn’t get the code checked in on time (hey, happens to the best of us) even though the documentation specifically mentioned the method (oops!). I got a lot of great feedback and discovered that parsing cookies isn’t nearly as simple as I initially thought. I literally rewrote the cookie parser three times to account for various edge cases people sent in. It was a fun, if not crazy, experience. But now the Cookie utility is ready for primetime.

The Profiler didn’t require any additional changes as it’s really very simple. It’s been used and tested a bunch without any major issues. At this point, there may be some code tweaks as part of regular refactoring work, but there likely won’t be any big changes coming in the future. Stick a fork in the Profiler, it’s done.

I’ll next be turning my attention to the YUI 3.0 version of these utilities. The Cookie utility is already present in preview release 1, so I need to get Profiler and YUI Test ready as well. No rest for the weary.

Ajax Experience: Day 3

So the final day of the Ajax Experience came and went. I’m still not entirely sure how I dragged myself out of bed for my 9:45am talk this morning (Enterprise JavaScript Error Handling), but I did and it went off well. The crowd was fun and actually laughed at my jokes, which is more than I case for most girls I meet. There were a lot of great questions and good conversation after the fact as well. Sadly, Nicole Sullivan and Stoyan Stefanov’s talk was at the same time, so I couldn’t see how they did.

During the break, I finally met Peter-Paul Koch and had a rousing conversation with him, Nicole, and Chris Heilmann. Anne van Kesteren then joined the conversation, which was the first time I had met him (I admit, I thought Anne was a woman before I met him….sorry dude!). It’s really amazing how many interesting conversations can sprout up with that many smart people involved. Ultimately, we all decided to bash Nicole’s Smush.It domain because it looks like smu-shit. That led to PPK proclaiming that the “smu” would be the official mascot of the tool, which led to a slew of suggestions such as t-shirts. Yes, we’re crazy.

After lunch, I went to Ted Husted’s talk on Ajax testing tools which included YUI Test. I was glad to see the comparison to JSUnit and how to integrate YUI Test with Selenium. It’s good to see someone else’s perspective on unit testing and how YUI Test can fit into an overall strategy. I’m hoping to keep in touch with Ted to get some feedback to help shape the next generation of YUI Test.

I ran into Brad Neuberg for a few minutes in between talks. I haven’t seen him in at least a year, so we caught up. He told me about his current project: trying to get SVG into Internet Explorer. He’s looking for help, so if you’re interested, pop on over to his site and drop him a line.

Nicole convinced me to sit in on an entertaining talk by Neil Mix of Pandora that was all about creating interesting user interfaces. I have to say, he was one of the more interesting speakers I saw. I liked the presentation and explanation of their unique challenges and approaches. Lots of good information there.

On my way out, I ran into Alex Russell in the hallway. I’ve also not seen him in a while so it was good to catch up (last time I saw him he was still a single troublemaker not unlike myself). It was interesting to hear how he’s been splitting his time and some of his thoughts on YUI as a whole. He and I agree on a lot of things, especially the need for pragmatism, so it’s always good to catch up with him.

Overall, the Ajax Experience was a lot of fun. It was great to be back in my old stomping grounds and to run into smart industry folks. Part of me was wondering if conferences like this will start going away as Ajax has become more popular, talked about, and written about. A couple years ago, all of this was new and everyone wanted to learn. With so many more resources out there, and corporations clamping down on unnecessary expenses, I wonder if this might be the last we see of such conferences. I certainly hope not because I enjoy them thoroughly, but time will tell.

Ajax Experience: Day 2

Today was the first day that I had a talk, but that didn’t make me any less lazy than normal. I dragged myself out of bed around 9:30am so that I could get down to the grand ballroom for the lightning talks. I thought this was a cool idea, having a bunch of people do five-minute presentations back-to-back. It went really well with only minor technical glitches here and there. Among those presenting were Yahoos Nicole Sullivan and Stoyan Stefanov who showed off their really cool new tool Smush.It which is an uber-image compression tool. Also involved was former Yahoo Bill Scott who showed some of the new Netflix APIs. It was a fun hour in a typically frigid ballroom.

After that, I went on a trek to find the nearest 7-11 to pick up some things I forgot to pack. It was a coolish day in Boston but it was a nice five minute walk around the waterfront. I then proceeded back to my room to work on my presentation before the talk. I’m glad I did this sanity check because I realized some of the examples weren’t quite formatted in an optimal way. I was able to change them and then take a nap (woohoo!) before my talk.

The talk, Test-Driven Development with YUI Test, was reasonably well attended and the crowd was pretty good. There were a lot of questions throughout, which is always good. Somehow I managed to keep proper time, both starting and finishing on time. For those who want the presentation and examples from the talk, you can download them here.

After a brief conversation with Doug Crockford, Nicole Sullivan, Bill Scott, and Steve Souders, I headed back to my room to crash. All this traveling and excitement has really worn me out. Tonight will likely be low-key, dinner in the hotel and then probably a bit of time in the lounge before turning in. Can’t believe it’s almost over!

Ajax Experience: Day 1

Monday was the official start of the Ajax Experience. Being as lazy and jet-lagged as I am, I couldn’t quite make it to the 7am breakfast. I missed it by about four hours or so. I met up with fellow Yahoos Nicole Sullivan and Stoyan Stefanov for lunch at this cool Italian place called Salvatore’s that was just around the corner from the hotel.

In the afternoon I caught a very entertaining panel moderated by Peter-Paul Koch that featured representation from four JavaScript libraries: Prototype, Dojo, YUI, and jQuery. The talk centered around cross-browser issues that the various libraries have faced, conquered, and are still annoyed by. There was a lot of interesting information floating around that event accompanied by a palpable disdain for Internet Explorer.

After that, I ran into a former co-worker, Chris Bowen, who now works as a Microsoft evangelist. He introduced me to a couple folks who work on the Internet Explorer team (Microsoft was well represented at the conference, including sponsorship of an open bar). We ended up going out to dinner at the Legal Test Kitchen to catch up.

I headed to the hotel bar to watch Monday Night Football when I returned. There, I was unceremoniously introduced to a female attendee of the conference whose first words to me where something along the line of, “Patriots suck, Giants rule!” Ouch. Still too soon to talk about it. I ended up talking with her and her colleagues, avoiding talk of football as much as possible, for a couple hours before heading back to my room.

Day 2 will be interesting as it’s the first day that I have a talk. Still not on east coast time, so this is getting interesting.

Ajax Experience: Day 0

I arrived at the hotel last night for the Ajax Experience (I term this “day 0″ because the conference officially started today. The Renaissance Hotel is really nice and somehow I ended up with a room that has two beds…party in my room! The room had a nice TV, about 42″ with HD, so watching ESPN was a lot of fun.

Since football was on, I headed down to the bar to watch amongst other fans. I ran into fellow Yahoos Chris Heilmann and Nicole Sullivan while there, which was nice because I hadn’t seen a familiar face since I arrived. I also chatted with a few conference-goers…sadly both Giants fans…at the bar while watching the game. Aside from the gratuitous Crockford-love being showered over me, it was a nice way to end up the first night in town.

My first talk isn’t until Tuesday, so Monday is looking like a day to relax, sleep in, and see how many interesting people I can run into.

Figuring out the magic

Ever since I was little, I’ve loved magic. I used to watch the David Copperfield specials obsessively and was always fascinated by the tricks. I took a few magic classes when I was younger and learned some basic tricks. Of course, the pursuit of magic excellence is a lifelong endeavor and not really something you can do in your spare time. So as I got older and other things became more important to me, the few magic lessons I had learned were left behind. But my fascination didn’t end.

Being a software engineer really means being a problem solver. My curiosity about magic, and my little bit of magic background, led me to thinking about a generic way to figure out how a trick was done. After some thinking, I figured out that magic tricks work because of a series of assumptions that we, the spectators, make. The assumptions are:

This isn’t possible. Your initial reaction to a trick is, “no way.” It seems to defy everything you know about the universe. Things appear and disappear seemingly at will and with no rhyme or reason. It just can’t be possible…right? You saw everything. Magicians are masters of diverting your attention. David Blaine must say, “look,” about 20 times a minute. And so you look at what you think is the important thing. The magician is working alone. This is such a basic assumption that you don’t ever question it. The magician is the one waving his hands around, and you’re fixating on him (or her). It’s who the camera focuses on and who your eyes go to. But is the magician really the only one involved? The props are legitimate. A lot of tricks involve props, either one the magician provides or one that is offered by someone in the audience. Most of the time, you take the props at face value, especially when the magician lets you inspect it. You had a choice. The magician asks you to choose something: a card from a deck, a number within a range, a color. Somehow, he/she is able to know exactly what you picked! That should be impossible because mind reading isn’t possible!

When you add together all of these assumptions, you have someone who can’t possibly figure out how the trick is done. There is no way to disect a trick so long as you’re holding onto any one of these assumption. The way to debunk a trick is to start with each assumption and then assume the opposite.

The very first thing to do is assume that what you saw is, in fact, possible. The biggest block is continuing to assume that what you saw is impossible. Impossibility never leads to solution; possibility does. So accept that the end result of the trick is completely possible and not only that, there’s a logical explanation for it.

Next, you need to assume that you didn’t see everything the first time around. Your attention was distracted and directed to something or someone. Wherever the magician is instructing everyone to look is the exact place where you should not be looking. Typically, the real action is taking place away from everyone’s focus; it has to, the trick wouldn’t work if everyone was looking away from the subject. And then there’s the things that happen right in front of your eyes that you don’t realize. I’ve seen some incredible illusions using nothing other than slight of hand. Anytime an object leaves your sight, even for a moment, you can almost be assured that it was swapped out and is on its way to its final destination.

A key part of magic is the use of a secondary player. This goes back to the “lovely assistant” of old-school stage shows. Of course, the lovely assistant was primarily used as a distraction and prop…everyone looks at beautiful women. Nowadays, the secondary player isn’t so obvious. They blend in with the surroundings, they may be the camera man, a guy in the crowd, a woman at a restaurant; it doesn’t cost much to hire a small-time actor for a half hour. If your first thought is that the trick could only be possible if there was someone else involved then someone else probably was. No one can be in two places at once, not even magicians.

The props in a trick are always suspect. Just because you provided the magician with the prop doesn’t mean that it actually gets used for the core of the trick. A quarter you pulled out of your pocket can’t be melted and brought back to form within the span of five minutes but a trick quarter can be. At some point, the magician will swap out your quarter for the trick quarter and later on returned. Never assume that props are what they seem; they usually aren’t.

Last, a lot of tricks that seem to involve choice actually leave you no choice at all. Techniques such as card forcing, where the card you pick is prearranged and subtley placed in your possession, makes you think that the choice is random when nothing could be further from the truth. The magician knew exactly what card you’d pick, exactly what you were going to say or write. Think about it: if you knew what someone’s answer to a question would be, it would be easy to create a trick around that, right? Magicians use all of kinds of clues, both conscious and subconscious, to force you to make a certain choice. If you want to see this in action, do a search for Derren Brown.

The bottom line is that anyone can figure out how magic tricks are done when you reverse all of the assumptions we typically make about the tricks we’re seeing. Magicians work very hard and are incredibly brilliant in their approaches, but they are human just like the rest of us. They need to play by the same rules; they just know how to manipulate the rules to dramatic effect. First and foremost, magicians are performers putting on a show. Never forget that and you’re already going down the road to figuring out the tricks.

New Yahoo! front page goes into testing

I’ve been at Yahoo! now for over two years, and for almost all of it, I’ve not been able to talk about what I’ve been working on. I started out on the My Yahoo! redesign and then moved onto the front page redesign. Today, the new front page design goes into public testing and I can finally tell everyone that this is what I’ve been working on since the start of the year. This is the reason for late nights, early mornings, and funless weekends. And you know what? It’s totally worth it. We have a truly amazing international team of people who have been working tirelessly and around-the-clock (literally) for the past nine months, and I’m proud to say I was part of that team. To go from nothing on January 1, 2008 to having a viable product on September 18, 2008 is nothing short of amazing.

There’s tons of press already about the new front page design:

In case you’re wondering (or haven’t read the articles above), not everyone will see the new front page yet. We’re doing random testing trying to figure out what works and what doesn’t. Random means I have no idea who’s going to be in the tests and who’s not, including myself. It’ll certainly be fun to see the results.

Appearance discrimination in the workplace

When I was in graduate school, we all had to write an applied research paper (which was also called a thesis paper, though realistically, we had no thesis to speak of). The goal of any such assignment in school is to pick a topic that you can stand to live and breathe for about three months while writing an 80-page paper. Somewhere along the line I got interested in appearance discrimination.

I’ve always been aware that how you dress can change how people act around you. Since college, I’d actually try dressing in different styles and see how people would react. Dress up one day, dress down the next, hats, coats…I had a lot of fun. If anyone was paying attention, they’d probably see me chuckling as I noted people’s reactions. Appearances certainly affect the way others perceive you.

In any event, I decided to investigation appearance discrimination in the workplace for my paper. I read a lot of books and research to put together the paper. I found a lot of really interesting information. For instance, more attractive people tend to sort themselves into jobs where their looks will help them get ahead. It’s a very natural sorting phenomenon where everyone eventually ends up in a job where they provide the highest value. For attractive people, they typically provide the highest value by being customer-facing, so lawyers at private firms, salespeople, etc.

You can make yourself more attractive by dressing up a bit. As it turns out, this can have a serious effect on your career. Those who dress better during interviews are more likely to be hired over someone who hasn’t dressed as nice, all other things being equal.

These are just some of the interesting things I uncovered in my research. If you’d like to read the entire paper, it’s available for download in PDF format: The Eye of the Beholder: Appearance Discrimination in the Workplace.

The myth of cause and effect

I used to spend a lot of time over my grandmother’s house when I was little. One Sunday, I was over her house watching a cartoon called Banana Man on Nickelodeon. I hadn’t really watched it before but hey, it was my grandmothers house, it wasn’t like there was a lot to do there. My stomach started to grumble so I went to the bathroom and proceeded to throw up. And then I threw up again. And again. My grandmother came rushing in and I just couldn’t stop throwing up. I don’t remember the exact timeline after that, but I do remember my mom picking me up and taking me directly to the doctor where they gave me the requisite shot in the butt. Because that’s what every kid wants after spending the past hour puking.

After that experience, I refused to watch Banana Man again. To my simple mind, the relationship was direct. I had never watched that cartoon before, and when I did, I got really sick and needed a shot in the butt. Since I didn’t wish to repeat that sequence of events, I simply avoided watching the cartoon. I can easily look back as an adult and see how silly my thought process was but at the time it made perfect sense to me. Part of our soul demands that we investigate our situations and it’s in our nature to look for this cause and effect relationship. The problem is that we often see this relationship where it doesn’t exist.

Our minds are linear in nature; we just can’t perform multiple voluntary acts at the same time very well. Whenever we’re doing more than one thing, it’s because all but is involuntary: breathing, digesting, blinking. We cannot simultaneously figure out two different puzzles; we can’t carry on two different converations at the same time. When we’re demanded to multi-task, we do so in a round robin way to create the illusion that we’re doing multiple things at once. In reality, we’re doing a single thing then stopping and doing another single thing and carrying on until all activities have been covered. Then we start again. We are linear.

Cause and effect defines a linear relationship between two points in time. Since our minds are inherently linear, this relationship makes perfect sense and so we look for it everywhere. If I had turned left instead of right, I wouldn’t have been late; if I had approached her in a different way, she would’ve gone out with me. Our minds oversimplify reality into this linear relationship because otherwise it would be too difficult to disect. The problem is that reality is very non-linear.

At any given point in time there are any number of events occuring. The non-linear nature of reality is hard to fathom and even harder to explain. Our minds simply can’t operate in the number of dimensions necessary to firmly grasp exactly why one thing happened and another did not; there are simply too many variables. So we simplify, and that’s when we run into problems. My belief that a cartoon had made me sick is clearly wrong, but because the uniqueness of the situation was complete, my mind could easily make that jump. New cartoon is followed by being sick in a new way…it seems to make sense.

As my brother is fond of saying, correlation doesn’t indicate causation. The fact that two events occur in close proximity to one another doesn’t mean that there exists a relationship between them. Yet we draw those conclusions all the time. And then we drive ourselves crazy trying to switch up the variables to figure out if a different result could have been achieved. In doing so, we’ll misidentify the cause expecting that its change will alter the effect. But the non-linear nature of reality doesn’t really let you know the original cause.

Science tries to identify the cause through repetition, believing that achieving a given effect by following a specific sequence of events points more directly to the truth. By repeating the cause then the effect should also repeat…yet it doesn’t always. And so medications come with warnings about side effects that have been observed but can’t be traced to a specific cause, and some people are deathly allergic to peanuts while others enjoy peanut butter and jelly sandwiches on a daily basis.

When dissecting a cause and effect relationship, it’s important to remember that you don’t have all of the information. The closest you can really get to a true relationship is to a define a “most of the time” series of events. There’s no such thing as absolutes in the universe, everything is relative and in constant motion. Don’t let linear thinking get in the way of enjoying life. Second guessing past decisions assumes that you fully understand the cause and effect relationship of the circumstance, and there’s really no way that you can. You might as well just stop watching all cartoons.

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


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

Mobilized by Mowser Mowser