
This is something I found when I was reading about web-usability issues. The full article can be found here.
This is a group involved in eye tracking research and they have found a pattern in which users read a web page. They conducted a study research and recorded how web-users view thousands of web pages. They found out that in general a F pattern is followed i.e users eyes move on a virtual F in your page.
While designing your webpage it is important to keep the important information at the right place so that your web-page gets attention. Though the research doesn’t talk about any learning patterns but such a research can be advantageous if you are looking for “adaptive websites“. An Adaptive website is a website which adapts itself based on the user access patterns.
Thus, for example if Amazon.com deploys adaptivity in their site structure, they will probably learn what kind/genre of books a particular user prefers and will put them in the recently added section on the top of the page. Adaptive structuring of websites is not limited to just deciding on the content. It also includes layout and navigation. Thus, if an amazon user visits pretty often and make lot of searches then they can put the search bar at a convenient location in the main page rather than nesting it inside. On the other hand, if there is a user who searches less (He always knows which book he is looking for, he just finds it and places the order) the task of placing the order can be made easy.
This should be noticed that Adaptive websites are different from My Yahoo portal or Google News. Because these websites allow personalization of the content. User can decides what he wants and what he doesn’t want. But in case of Adaptive websites user doesn’t need to do anything. The structuring of the websites merely depends on the access patterns and information known to the site apriori. If a site learns that users of age group 18-24 goes more often to britney spears, they can show information related to britney spears on the top page.
Adaptive websites is still a research topic and has not been implemented on a large scale anywhere and we can expect sites like amazon and youtube to deploy it in the future. May be Web 3.0!!!
Filed under: Uncategorized
April 21, 2007 • 12:25 pm
Yesterday I went through this nice document by Gray Grossman (creator of ActionScript) which talks about some easy tips and tricks to boost the runtime performance of your code. Too my surprise I was not following any of the three tips he has mentioned.
Promotoion of Numeric types – An array in Actionscript is nothing but a hash so an access to any element in the array is used as a key to find the value. This happens everytime you write something like array[f]. But in AS an array access is faster if the key is a int/uint. To take advantage of this one can just force the access to be index based rather then key based by type coercion of the index. This can be done by accessing the value as array[(int(f)]. Isn’t this a cool, neat and nice way?
Common Subexpression Elimination – Common Subexpression elimination is compiler optimization techinique which is employed by almost all the matured compilers. What they do is they cache some of frequently occuring common subexpressions and provide the result from the cached values but sometimes the language semantics do not allow compiler to deploy this optimization while generating code. As rightly pointed out by the author because in actionscript we have concept of getters and setters a getter/setter subexpression cannot be eliminated.Let’s say you have a property p in your AS class C and you have defined getters/setters for the property like this:
public function get p():*
{
return _p;
}
public function set p(value:*):void
{
_p = value;
pDirty = true
}
In the code if you access this property using the getter the compiler is bound not to eliminate the subexpression. But if you are using _p you are safe.
One more such example is of array.length
for (var i:int=0; i<array.length; i++)
{
…
}
Here also compiler can’t eliminate a.length and thus it is advisable to use:
var n:int = array.length
for (var i:int=0; i<n; i++)
{
…
}
Method Closures- AS is based on ECMAScript specification and thus it allows nested functions. An example could be:
public function f()
{
var g:Function = (function (args:Array)
{
trace(“I am in g”);
});
But having a nested function costs. For each nested function, the outer function has to create an activation object which has some performance and memory impact.
Now what are these memory impacts? Whenever a function is executed a activation object is created for the call. In lay man terms it is actually pushing all the arguments, the return address on the stack. Thus an activation object stores all these things along with all the local variable declarations. Along with this a scope chain is also created that contains an ordered list of objects that Flash Player checks for identifier declarations. Thus each function has a scope chain property (internal property) associated with it. The scope chain goes up until it reaches the global object.
Coming back to nested functions, in case of such declarations not only there is an overhead of an extra storage for activation object, the increase in length of the scope chain increases the scope of the function and thus player’s job of scope-resolution increases which hurts performance.
Thus, next time your code execution can become really slow if you just don’t bother!!!
Filed under: actionscript
March 26, 2007 • 11:34 pm
Found a nice flex app Flex Pizza Builder. The demo can be seen here.

The application very nicely demonstrates the drag and drop support flex provides. It looks very cool to drag and drop the the toppings you want on your pizza. Moreover, dragProxy (the image that comes when you are performing the drag operation) is also the actual topping that user is dragging.
Though, I found the application a bit unresponsive but it is a nice try and author has promised to build more advanced versions of the app. I wish if we can have something working so that the pain of choosing the right pizza while ordering can be avoided.
Filed under: flex
March 25, 2007 • 12:03 pm
Recently there was an interesting announcement on flex team blog about the release of Flex Module for Apache and IIS.
It provides web-tier compilation of mxml and Actionscript files on Apache and IIS server. This will enable developers to run their code like server-side scripting languages (PHP, ColdFusion etc.) i.e just code you application say myApp.mxml and run it through browser through its url (http://www.flex.com/myApp.mxml).
To give an idea about how helpful this could be just think what before this a developer needs to do test their application. Developer builds his application in some editor (for me emacs
), compiles it and the open the created swf in the browser (with or without a wrapper HTML). But with this flex module the intermediate steps of compiling the application and opening in the browser can be skipped and the module will itself do this for him.
Moreover, downloading source codes of sample applications and trying them out is also will be easier. For people using Flex Builder, it’s always a pain to import a third party source code in your project and configuring it according to your needs. Now, you can just download the source code and copy it on your web server and see the results (No flex builder coming in between). A step further its very easy to make changes to those source codes using any editor and directly see them in the browser.
One more thing which I liked about Flex module is the nice way of showing errors (if there are any in your applications).
1 error found
| 46 |
|
| 47 |
<mx:HTTPService id=”charts” url=”charts_explorer.xml” resultFormat=”e4x” result=”chartsLoaded();” fault=”populateTree()” /> |
| 48 |
|
If I compare it with some server-side scripting languages like PHP, this is great. In PHP, because it is a scripting language it becomes difficult to catch errors and sometimes it shows blank screen signifying an error in the script and thus if becoms difficult to find out what part is causing error. I am sure there might be tools available for PHP which can overcome this shortcoming of PHP which I am not aware of.
If you are interested in learning more about Flex Module, Ryan Stewart has explained it very well in his blog.
For installing Flex module it asks about following things:
- Your SDK directory path.
- Your Web Server root path (For me Apache).
- Your webroot path.
- Location of the compiler cache folder
Filed under: Internet Tools, actionscript, flex
 |
Ubuntu community yesterday has announced the release of Ubuntu Feisty Fawn beta version. It has come with whole lot of new features including GNOME 2.18 and 2.6.20 kernel.
The official release article describing “What’s new?” can be read here. |
Filed under: linux, ubuntu
March 23, 2007 • 12:42 pm
Yet Another Kuake KDE terminal emulator.
Yakuake is a Quake-style terminal emulator based on KDE Konsole technology.
It remains on the top of your desktop and when required it smoothly rolls down from the top. For console folks, it saves the pain of opening the console window again and again. You just need to set a key to make it visible. For me the shortcut key is [f12].
Moreover, it is like Konsole only. It has got tabs, one can browse through tabs using shift arrow keys. The default skinning provided looks smoother and better than traditional KDE Konsole.
So, next time when you are working on some project or surfing and suddenly something strikes you and you want a console. You don’t need to go to Konsole open it.. Just press [f12]. Do your work and hide it again by pressing [f12] again.
Filed under: linux
Apollo public alpha is live now. Apollo enables web developers to use their (Flash, Flex and HTML) skills for developing desktop applications which could be run on Apollo. Apollo provides cross-operating system runtime to these applications.
I have been using trillian since last 4 yrs and its good to see some good people developing applications on top of apollo.
Filed under: actionscript