The NEXT thing to try!!

Icon

Random rants and tips about NETCF, WinCE, Emacs, Powershell etc.

Worth Noticing (F)

f_reading_pattern_eyetracking.jpg

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

Performance Tuning in ActionSctipt 3.0

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

Flex from Many-Eyes



Many Eyes is a bet on the power of human visual intelligence to find patterns. Our goal is to “democratize” visualization and to enable a new social kind of data analysis.”

Many eyes is a result of some good research by IBM’s Collaborative User Experience research group.

Extending the concept of data-visualization where we represent our data in graphical form (may be using charts), they have slightly looked up into the future to come up with something we should just call miracle. They target at finding patterns in the data and give it a graphical representation using which the end user can visualize these patterns very easily.

A good example could be a tag cloud. A tag cloud is cloud (or simply saying collection) of words where the size of a word in the cloud represents its value in the collection. The value is a metric which could be based on the frequency of the words or may be similarity with other words.

To give thing a try I used the data from flexcoders.net. I picked up the last 2006 users registered and fed it to many-eyes. As I was more interested in the tag cloud I chose that while visualizing the data. The published result can be seen here . One can verify the produced results. If one choses region as the cloud creation criteria one can see the main cities like bangalore where the buzz for flex is more. Same thing holds for country and as a result US and India can be seen bigger.

The cloud becomes interesting once you choose “Added on” field as the cloud creation criteria. If you will try this in the link given above you will find that some of the dates are infact very big as compared to others. Which what implies is on 27th and 28th June a lot of flexcoders registered themselves on the flexcoders.net. Thus, it is also a nice way to play with your data and analyze it through various perspectives.

Not only that, the power comes when it also allows search in the cloud to narrow down your focus on particular criteria. With large amount of data too once created it works fast and that is where it fits in in the RIA world. The current RIA technology are already on the miracle axis and they are changing the web and I think very soon someone will come up at such a cool component in flex.

Filed under: RIA

Apollo for Adobe Flex Developers Pocket Guide

A nice book for flex developers is now available on labs. It can be downloaded from here. I will write more about the book in my post once I start reading it. 397818531_abfdfd9cd0_m.jpg

Filed under: flex

Flex Pizza builder

Found a nice flex app Flex Pizza Builder. The demo can be seen here.

pizzademo.jpg

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

Flexing easily: Flex module

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 :P ), 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
C:\www\webroot\samples\explorer\explorer.mxml:47

ERROR : Parse error at ”.

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:

  1. Your SDK directory path.
  2. Your Web Server root path (For me Apache).
  3. Your webroot path.
  4. Location of the compiler cache folder

Filed under: Internet Tools, actionscript, flex

Ubuntu 7.04 BETA released

ubuntu_petit.png 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

Apollo: So far so good!!

apollo_fma_558×120.jpg

After hearing so much buzz about the Adobe’s Apollo I finally made up my mind to give it a try. No No!! not development..just playing with it.

As soon I clicked on the installer to install the cross-OS runtime, a screen got popped up asking me various things. It was a progress bar kind of thing with an apollo icon and I was not expecting this at all. The progress bar reminded me of the bad old days of java applications. In a nutshell the installer window is not flex way!!!

apollo_installer.JPG

After installing the runtime, it was time to try out the first application. I went to the sample applications page and picked Fresh and Lookup. By this time, I was just eagerly waiting for the download to complete though it just took 30 secs to download them but my eyes were on the download bar only.

Then after installing Fresh, my reaction was wow!! It looks great. Fresh is skinnable RSS reader. I had been using FeedReader from past few months and I should say I wasn’t very satisfied with it. But this Fresh seems to be filling. So bye bye!! Feedreader.

Let’s see how far Apollo succeeds in changing my desktop applications. ;)

I can say now that “I have seen Apollo and it is awesome”

But there is one thing for sure, this is a great move by Adobe in the RIA arena. Great going Adobe!!!

Filed under: flex

Yakuake rocks!!!

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.

clipped from www.gentoo.org.pl

http://www.gentoo.org.pl/images/stories/apps_png/app_yakuake_1.png

  powered by clipmarks blog it

Filed under: linux

Buzz in the Cerulean studio about Apollo

clipped from blog.ceruleanstudios.com

Apollo
trillianastra-apollo.png

  powered by clipmarks blog it

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