I just finished viewing John Resig’s talk titled “DOM is a mess” at Yahoo. I took some notes while watching the video and I am posting them here, so that I can refer to them at a later point of time (It is easier to search when it is not on paper ). Also it might help someone to get the outline of the talk before actually watching the video. The original video runs for more than an hour.
Also be warned that the following is my own interpretation of the video and I might have missed or could have interpreted some point differently.
About the speaker, John Resig
As you all know John Resig is the creator of the excellent jQuery library. He works for Mozilla corporation and you can get more information about him from his blog.
DOM is a mess
This is the first thing John Resig said about DOM methods after saying that DOM is a messy
Nearly every DOM method is broken in some way, in some browser.
The following are some of the bugs in the DOM methods
IE and Old versions of Opera return elements whose name == id
.length gets overwritten in IE if an element with an ID = “length” is found
Opera doesn’t match a second specified class
Safari 3.2 can’t match uppercase characters in quirks mode.
So the moral is that almost every method in DOM is messed up.
Writing Cross-browser code
Find out the cost/benefit ratio for supporting a browser and then pick the browsers you are going to support before writing your code.
He talked about Yahoo’s graded support and jQuery browser Support.
Escaping from DOM’s mess
The following are some of the tips to escape from DOM’s mess.
- Having a good test suite is not a facility but a requirement.
- Don’t introduce global variables or extend native objects.
- The order in which style sheets are included matters.
- Don’t use browser sniffing, but use Object detection or feature simulation instead.
- Don’t assume a browser will always have a bug. They might get fixed in a future release.
- Gracefully degrade for old browsers
- As your code matures, the number of assumptions should reduce.
- While removing elements from DOM, clean it by unbinding the events
So my dear readers what you think about my notes. Also let me know if you like notes for videos in this format. If there is a demand, then I can post some of my notes on other videos which I have already viewed.
The annual Yahoo Open Hack day is back and this year it is happening in Bangalore on Feb 14th and 15th (What a way to spend the Valentines weekend 😉 )
There are two different tracks, Info Geek and Hacker Gurus. Both are free, but you need to register at the official site. You also need to support your application with some information about you (like a link to your blog etc). Hurry up, only limited seats available.
I signed up for Hacker Guru and have got my application approved. I am waiting for the clear chit from my doctor (due to my recent weight loss 😉 ) and if I get it, I will be attending.
The Taj Residency
14th and 15th Feb 2009
Let me know if any of you are attending, we can meet and also probably collaboratively hack:)
Posted in Events/Conferences
Tagged HackDay, Yahoo
I was really very surprised when I found that the Yahoo Pipes team has blogged about pipesCamp, which I attended two weeks back.
Even the Yahoo Developer Network carried an article about pipesCamp. The article also mentioned the Yahoo! Pipes hack – ego Search, which I built together with Yuvi and Harish. Very nice feeling to see something which you helped build was featured by big boys like Yahoo. 😉
It was really very nice to know that the event which was organized in less than a week was such a success. Imagine how it would have been if we had more time 😉
Posted in Events/Conferences, Google/Yahoo
Tagged Events/Conferences, Pipes, Yahoo
As planned, I attended pipesCamp yesterday and it was really worth the time spent. As planned, I took Yuvi with me and he started to click his camera on the way itself, and he got some 35 – 40 snaps before we could reach there. (Yuvi, I know that your computer has crashed, but I am waiting for your photos to appear in Flickr as soon as possible. 😉 )
I meet lot of cool people there and true to the unconference style we had a couple of presentations about Yahoo Pipes (and some slides from the official Yahoo pipes team itself) and then some open discussions about pipes and blogging in general.
Then towards the end of the day we had “hackday” kind of competition and we were given 60 minutes to design/code a pipe and then 3 minutes to demonstrate the demo. Myself, Yuvi and Harish got together and created a pipe called “Ego Search“. (Harish, thanks for the laptop )
Ego Search is a pipe for finding out how popular you are on the web, based on search results from popular search engines. The popularity chart is drawn based on the number of search results that point to your blog or domain name for your name. And if your name is say ‘xyz’, a 100 point popularity rating on the graph says that you are the most populous ‘xyz’ that the search engine knows. You can try out the pipe in this url http://pipes.yahoo.com/sudar/egosearch. We also had some great pipes like MTC Mashup created by other cool people.
On the whole the first ever pipesCamp went very well. I will post links to photos and videos once they are available.
By the way anyone planning for the first ever WordCamp in India?
Posted in API's/Mashup, Events/Conferences
Tagged Events/Conferences, Pipes, Yahoo
The guys behind hover.in (more about it later) are organizing a one day unconference event called pipesCamp for Yahoo Pipes hackers and hobbyists in Chennai. Yahoo Pipes is an excellent and useful tool from Yahoo.
I am going to save some typing by copy/pasting information about Pipes from the Pipes home page.
Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.
Like Unix pipes, simple commands can be combined together to create output that meets your needs:
- combine many feeds into one, then sort, filter and translate it.
- geocode your favorite feeds and browse the items on an interactive map.
- power widgets/badges on your web site.
- grab the output of any Pipes as RSS, JSON, KML, and other formats.
The event is taking place on December 23 and you can find more information about the event from its home page. There seems to be lot of interesting things planed for the event including a hackday type event.
So if you are Chennai then make sure that you don’t miss it. The event is taking place at
Hotel Shan Royal
85, Poonamallee High Road,
Near Koyambedu Circle, Chennai , India
And here is the place on Google Maps.
I am planning to take Yuvi with me, so you are sure to get some interesting photographs too
Posted in Events/Conferences
Tagged Chennai, Events/Conferences, Pipes, Yahoo
I was viewing the score for the cricket match between India and England from Yahoo! India Cricket portal. The problem being a web programmer is that you always tend to look at each web page from the development perspective and something grabbed my attention. The web page was refreshing every 60 seconds to get the latest score and a new request/response is generated every time. (Ok so have you got what I was thinking about?) Why are they not using AJAX to refresh the scores rather than refreshing the whole page every time?
The web developer inside me got out and I immediately checked the other sites which are also offering the cricket scores. I checked Sify and Rediff. Even they are not using AJAX and are refreshing the whole page every time. But the refreshing interval was different. Here is the refreshing interval which I got by looking at their META tag.
The obvious advantage in using the AJAX approach (XMLHTTP) is that the amount of data that is going to get transferred from the server is going to be less and it’s going to save the bandwidth by leaps and bounds.
I would be really happy if any one from either Sify or Rediff or Yahoo! India reads this and just gives a thought about it. And do any of you guys know how to get the raw data about the scores and the license requirement (if available). I am thinking of giving it a try and build a POC (Proof of Concept) app, if the data is available.
Oops!, by the time I could compose this post, the match has been stopped due to rain
Tagged AJAX, cricket, India, Rediff, Sify, XMLHttp, Yahoo
I have been waaay behind on blog reading for about two weeks now, thanks to my crashed Harddisk, lost mobile and work pressure. And today I got some time so I opened my bloglines and was skimming through the posts.
I was taken back a little when I found that there were lots of activities taking place at Yahoo.
Normally it will be Google who will be on the news for yet another new service, but now it
Posted in Google/Yahoo
Not long ago, having an hotmail email account with a couple of MB storage space was the only option left for users who wanted the flexibility of Web-based email. Then came Yahoo with a host of others features like photos, briefcase, messenger, personal website to name a few. A couple of more similar services came into the picture. But things changed dramatically during the DotCom burst. Many popular services either closed their services or converted them into fully paid services like USA.net. A handful of services still offered free services reduced their storage space and also set a limit for the size of the attachment and almost most of them stopped POP access to the mail also.
All these things changed completely some one year back. Yes, when Google launched GMail. Google easily pushed back the leaders in the email service like Hotmail and Yahoo. Though Yahoo some how coped up with it, Hotmail was fully thrown out of business. One of the reasons for initial success of GMail was due the fact that it was available only through invitation. So having a GMail account was a kind of pride together with its 1 GB of space. This was one of the reasons for me to move completely to GMail somewhere in July 2004. Soon GMail became the top story in most of the news channels and also in the blogsphere and Google was clearly leading the competition.
To stay in the competition Yahoo have also started adding new features like 250 MB of space (they even have a plan to give 1GB of space), a sleek layout, auto-complete for address fields to name a few. And Google have been adding features like auto-forward to any email address, free POP access, basic HTML site for older browsers etc.
Off late, Yahoo started to lead the race. One of the main reasons for that was due to the positive environment created by its employees in their blogs. (Om Malik also feels the same way in his blog) Notably Jeremy Zawodny and Russell Beattie. Even Jeremy Zawodny was talking about it in his blog. This created a huge positive image about Yahoo in the blogsphere. Google somehow got lost in this race and got itself a negative image in this blogsphere when it fired its employee Mark Zen for disclosing some sensitive information about Google.
Yahoo has now stated using the buzz word all under one roof by giving a host of services under one account. For instance their new service Yahoo 360 is one such example. Even accruing flicker has helped Yahoo regain its popularity. Jeremy Zawodny also speaks about it in his blog.
April 1st was GMail’s first birthday. So Google has started adding more features to GMail. The recent ones being 2GB of storage space and HTML formatting. So what will be Yahoo’s reaction for this?
So, what is the impact of the clash of these giants? Is it good or bad? But one thing is for sure, this competition has given the users a lot of options to choose from. The web-based email services have seen more features and invocations in the last one year than in the last 10 years or so since their invention. This goes with the saying “Necessity is the mother of invention”. Both of them know that the users have lot of options to choose from, so they will be working very hard to stay in the competition. So the real winner of this race is the users who are using this service. Now they can expect to get the best of both worlds – Google and Yahoo.
Posted in Google/Yahoo
Tagged Google, Yahoo