Archive for December, 2007

WoW BG AFK - AppleScript

Run ScriptEdit and put the following script in there and follow these instructions:

1. Run World of Warcraft >> Login >> Ready to Queue for BG

2. Run the Script

3. Go find a spot to hide

4. Requeue :3

set CR to ASCII character of 13
set space to ASCII character of 32
set random_time to {80, 170, 240}
repeat
tell application “System Events”
set rn_index to (random number from 1 to 3) as text
set rn to item rn_index of random_time
tell application “World of Warcraft” to activate
keystroke “qews” & space
keystroke “h” using command down
delay rn
end tell
end repeat

Google’s New Toy Knol

Got Wikipedia? Google does now.

I’m sure anyone of you that is reading my blog knows what Wikipedia is. It was a brilliant idea to bring everyone on the web together to create information knowledge database. But now, after years of Wikipedia.org’s domination, Google is moving into the space to take a sweet chunk of it.

The new tool called “Knol”, stands for “a unit of knowledge”, was announced by Google today.

Earlier this week, we started inviting a selected group of people to try a new, free tool that we are calling “knol”, which stands for a unit of knowledge. Our goal is to encourage people who know a particular subject to write an authoritative article about it. The tool is still in development and this is just the first phase of testing. For now, using it is by invitation only. But we wanted to share with everyone the basic premises and goals behind this project.

So what’s so sweet about this? Let’s look at it from two different perspectives:

1. From Google Perspective, it means more traffic, more impression, and of course leads to more money. The idea of Wikipedia is already matured itself over the years, just like the blogs. It is less known to people who are not that technical, but for any programmers, a Wiki for a project is sometimes a must. But ever since the release of Wikipedia.org, you now get high school or college students put that on their homepage (why? think essay and boring researchs). In another words, Wiki has matured itself to draw enough attention on the web that converts into high quality of traffic. I don’t think i need to say more why this means more money for Google. See this picture for yourself:

2. From an end user perspective, we get more functions around the information than we had with Wikipedia. When you put all google’s currently offered applications on the table, it ain’t that hard to link them to Knol. Think about all the possibilities. I got a few here

  • Knol Search (or wiki search if you will) backed by Google Search Engine
  • Google Map integrated into Knol whenever there’s location involved
  • Google Gears to let you take the information offline
  • Knol Search inside of Blogger

This is by far one of the biggest news Google released on the 4th quarter. I would personally consider it as a nice Christmas present and great hopes for the new coming year for all of us.

IE Automatic Component Activation Preview Now Available

The IE team has just released the preview version of the change. As mentioned one of the earlier blog post, the annoying “click here to activate” on embedded contents on IE will be reverted in up coming Service Pack release.

As promised, a preview of this update is now released for download. We will still not get it through regular windows update, but for testing purposes, it is ready.

A couple of weeks ago, we announced that an optional preview for the Internet Explorer Automatic Component Activation was coming in early December, and I’m happy to say that it is now available. Read Knowledge Base article 945007 for full details, along with links to the specific downloads for each operating system.

Wii => Vii ???

Just as u and i though iPhone gets copied was crazy enough, let me introduce you with Vii. Confused? In plain simple term, a copied version of Wii.

God, i’m so “proud” of being a Chinese.

HTML 5 Sneak Preview

Lachlant Hunt wrote up a blog post that gives us a Preview of HTML5

In one of my earlier post Webkit Introduces: HTML5 Media Support, we reviewed the media support of the HTML5, but there are much much more. In this post, Lachlant Hunt highlighted some really useful features introduced in HTML5.

To give authors more flexibility and interoperability, and enable more interactive and exciting websites and applications, HTML 5 introduces and enhances a wide range of features including form controls, APIs, multimedia, structure, and semantics.Work on HTML 5, which commenced in 2004, is currently being carried out in a joint effort between the W3C HTML WG and the WHATWG. Many key players are participating in the W3C effort including representatives from the four major browser vendors: Apple, Mozilla, Opera, and Microsoft; and a range of other organisations and individuals with many diverse interests and expertise.

What really excites me is the new structural layout. Instead of having a crazy load of divs (which i know we are all guilty of doing so) to achieve a simple layout, we now have a structure like this:

See the difference? The tag itself now makes sense. Just like the “header” tag we had before.

Unlike previous versions of HTML and XHTML, which are defined in terms of their syntax, HTML 5 is being defined in terms of the Document Object Model (DOM)—the tree representation used internally by browsers to represent the document.
The advantage of defining HTML 5 in terms of the DOM is that the language itself can be defined independently of the syntax.

null

Did you catch the phrase “the language itself can be defined independently of the syntax”? Oh yeah! Just imagine a well formatted DOM Tree where objects are nested perfectly. Not to mention how much easier and more efficient it will be when it comes to DOM Manipulation through javascript.
Let’s all cross our fingers and hope HTML5 gets released as soon as it can.
Go check out the “How to Contribute” section of the original post. Your help will matter the speed of HTML5’s release.

Back in States

I was on a business trip last week in China and now I’m finally back to the states. Some of you might have noticed the lack of posts for the past few days. I’m going to make up for those as soon as i’m recovered from the stupid jet lag.

Internet Explorer 8

It seems like the IE team is getting into another hype of blog posting at the year end. It is definitely a good thing for all of us who are anticipating on any updates from them.

This time, Dean Hachamovitch, the General Manager released some hopes to the much waited Internet Explorer 8. There has been way too many rumors and guesses. I would consider his post as a confirmation of IE8 being under development and ready to be revealed not far from now.

Of course, some people care about other aspects of IE8 much more than they care about the name. As I’ve walked different people through the plan, I’ve gotten “Does it have feature X?” “When is the beta?” “When does it release” and even the more thoughtful “What are you trying to accomplish with this release?”

You will hear a lot more from us soon on this blog and in other places. In the meantime, please don’t mistake silence for inaction.

In his post, he also released some naming candidates for the new internet explorer (and of course with a sense of geeky humor)

IE 7+1
IE VIII
IE 1000 (think binary)
IE Eight!
iIE
IE for Web 2.0 (Service Pack 2)
IE Desktop Online Web Browser Live Professional Ultimate Edition for the Internet (the marketing team really pushed for this one ;-)
Ie2.079 (we might still use this for the Math Major Edition)

IE7 Object Overwrite Bug

Jon Sykes has found an interesting bug in IE7. In his post found a bizarre bug in IE7, he demonstrated the bug with some simple test scripts. Quite frankly, it should be a rare case to happen, but surely I’ve experienced the same bug before. I was so frustrated by it and had to rewrite portion of my code to work around it (not that hard)

There is a bug in IE7 where by a line of code inside a conditional statement that NEVER runs, can cause an object that is set with a fairly standard object declaration to be whipped. Even weirder is that it will have whipped the code even if you put a debug alert of the object before the code that does the whipping. Confused? I know I am.

Thankfully it does look fairly simple to work _around_ and avoid. But it’s probably a debug nightmare, and it’s a bug I couldn’t find referenced anywhere, so I figured it was worth sharing.

<script type=”text/javascript”>
this[‘test’] = {};
alert(this[‘test’]);
// will spit out [Object object]
</script>

<script type=”text/javascript”>
alert(this[‘test’]);
// will spit out Undefined in IE7
// this next chunk of code should never run.
if (true == false){
alert(”This never fires”);
// THIS SHOULD NOT IMPACT ON ANYTHING !!!!
var test; // take this line out and it works fine
alert(”This never fires”);
}
</script>

As you can see from the above example, the line “var test;” should never be executed since it is within “true==false” condition. But somehow it gets fired.

IEBlog: Tools for detecting memory leaks

John Hrvatin, the Program Manager for Internet Explorer has just written up some of the perspectives that the IE team is taking on IE memory leak issues.

nternet Explorer 7 improved the situation by releasing all references to Jscript objects attached to the DOM tree when IE navigates away from that page. This allows the Jscript engine to then garbage collect those Jscript objects and recover that memory. We’ve also made the same changes in IE6 on Windows XP SP2 (shipped originally with the June Update). However, as some web developers have pointed out, those changes don’t solve the problem entirely. IE still leaves behind anything not attached to the tree when we tear down the markup. In addition, sites that users keep open for extended periods of time, such as Web-based mail, can still cause IE’s memory usage to continually grow if the site doesn’t take care to avoid the leak patterns.

This is definitely a plus on the confidence I have on IE. Just recently, the Firefox team started to investigate on the memory leaking issues. It’s a common issue amount, i’ll say, all the browsers available today. But seeing IE team has been putting up quite an effort on trying to solve the problem makes everyone feel comfortable.

But the criticism on Jscript is still high. Remember the my post earlier regarding Gmail gets a facelift on the javascript? One thing mentioned was about a Gmail programmer reverse engineered the Jscript and was horrified to see how many hard coded object references and so on. I personally think IE team is on the right direction on solving the problem

Internet Explorer 7 improved the situation by releasing all references to Jscript objects attached to the DOM tree when IE navigates away from that page.

Memory leak in some sense is a type of logical bug. Remember the old days of programming where every cycle counts? This is the same still in today’s web application design where every bit of memory, cpu usage, and of course time execution counts. I do admit when a program gets to a certain size with many objects built in, the cross references on the objects can get very overwhelming and quickly become a memory leaking problem. In my opinion, there are two different approaches to fix the problem:
1. Quick patch by looking at leak pattern
2. Dig up all the references, either fix them from the root or rewrite the entire library

Allow me to expand these two approaches with their cons and pros.

1 Quick patch by looking at leak pattern
Pros: quickly identify the issue and resolve it. The turn around on it can be extremely fast. The patch can either be a fix on the existing code, or extra code that prevents the pattern from happening.
Cons: Since the fix only solves a particular problem based on the result of the problem, it can either mask out the real problem behind or introduce other problems. (that’s why no programmers like to be the fire fighter)
2. Dig up all the references, either fix them from the root or rewrite the entire library
Pros: To solve a problem, it’s almost not arguable to say solving it from the root is the right thing to do. In a heavily OOP structured environment, drawing out the ULM diagrams to demonstrate each possible execution path a lot of times can make the root of the problem to surface. By going down this path, you usually won’t end up introducing new problems (remember, i said usually, it all depends on how much depth you are going down and how careful you are)
Cons: In many cases, this path can take heck a lot more time than the quick patch. It involves tossing away a lot of codes and rewriting stuff from scratch. It is harder to QA the result and if not careful, new critical bugs can be introduced.

I personally think the IE team should take the second approach on the Jscript if they haven’t already. I’m pretty sure the IE team is tired of never ending quick fixes and quite frankly, we, the developer, are pretty tired of sudden changes in behavior after almost every quick patch release.




December 2007
M T W T F S S
« Nov   Jan »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Close
E-mail It