Suffer from bloat ? try these techniques to improve performance

June 6, 2007 at 12:06 pm | In Architecture - Design, Tips,Tricks and code, Web 2.0, gyaan | No Comments

Note : I blog on my personal space at riteshnayak.com/blog . This is a mirror of the content.

All you javascript programmers, are you one of those people who are bitten by the RIA bug and write endless lines of JS code and include 200Kb header or bootstrap files. Then you suffer from bloat, a condition in which a content 3kb in size brings with it 300kb of javascript for presentation purposes. Bloat is exhibited by Gmail or any of the latest google applications , which while opening sometimes makes your browser really sluggish and non responsive.

Its not so bad in the real world. There are techniques being thought of to reduce the memory footprint of these mamoth js bootstraps. First step would definitely be to use the right library , if you use dojo make sure you use the right flavor of dojo like dojo for ajax or dojo for UI etc. There is no point in having functions bloating if they arent used at all. Next step would be use some brains and filter out unwanted functions in your bootstrap files. Its not that hard I guess, get your self Venkman or the recent firebug and you can be on and reducing in no time.

Now for the real deal:

1. use Dojo Shrink safe to reduce, compress and pack all your js files together. Most of the times your file reduces by almost a third using this. This utility doesnt obfuscate so you can call the same methods and not worry about changing function names.

2. Use Dean Edwards packer to further reduce the size by removing linebreaks and other unwanted characters. This usually reduces the file by another 20%

But make sure you always have a backup of the files. As most of these things are unreversible. These are just performance optimizers, they dont help your programming.

In the worst case, if you still a Kb or two short of your SLA then go ahead and obfuscate your code. Packer does a little bit but there are some really neat ones out there that can do a wonderful job. whats the advantage you ask ? a function OnWindowFocusAndDoubleClick() will get replaced by say g() , now thats improvement.

I found this utility which does reduction, try it out : jsjuicer

PlayMyGame - create your own games

June 6, 2007 at 12:04 pm | In Cool Web 2.0 Sites | 1 Comment

The last time it was elfyourself which was a rage, and now it might be PlayMyGame. The site lets you create your own game where you feature as the main character, there are a wide variety of games to choose from like boxing, swat me etc. You can even embed them in your Myspace or blogs. A nifty little comment system lets you and your users write comments that people can read when they come to the game. I have embedded two games of mine, have fun punching and shooting me

Link: PlayMyGame

Link: PlayMyGame

Google Gears - first effort towards offline web

June 6, 2007 at 12:02 pm | In Web News, rant, web3.0 | No Comments

Note : I blog on my personal space at riteshnayak.com/blog . This is a mirror of the content.

The craze for offline web has just started and we will see more and more momentum in this area. It was Brad Neuberg and the Dojo’s offline toolkit that started offering a swf based mechanism to access files offline, it was followed by some hacks and some other mechanisms. Now its the goog in action, with its Google Gears. The OS plugin needs to be installed in your system to be able to access some Google services like Greader offline, in fact thats where I first noticed it. I am still yet to checkout a working demo, but I am not completely convinced about an installable plugin, it just ruins the experience of the web. Think about it for sometime and you will realize that you will probably never go offline, online except for on your personal laptop or PC, but still a plugin independent implementation would have definitely be rocking.

I am a big fan of new technologies, right from js frameworks to flex to apollo to silverlight, I have always taken pleasure in checking out possibilities. I have even made proof of concepts whenever I could. But frankly speaking , adding download and install plugins like the flash player, silverlight runtime etc is seriously an overhead. The web dev team in my office still develops for IE 5 and Netscape Navigator; you really cannot expect to deliver next gen apps to such people. Whats more depressing is that a majority of the populous consists of those people . I think the success of js frameworks like dojo, yui , prototype was the fact that their model didn’t require any new tricks to your usual browsing habits. In fact, many of these frameworks gracefully degrade down based on your WYSIWYG’s configuration. I don’t think its safe to call these overhead based technologies like gears, sliverlight, apollo - web technologies. But , thats just my opinion.

Well how about a install all pack which contains all the runtimes required. A single update patch on XP Service pack 3 and Vista Service pack. That should make at least 60 to 70 pc of the world ready to receive these technologies. But back to the point , Google Gears . Will update after checking it out. I like the promise of space, the reader promises almost 2000 articles and thats a lot of space :-o let m wait it out.

Job rotation in IT

June 6, 2007 at 12:00 pm | In Suggested Reading, rant | No Comments

Note : I blog on my personal space at riteshnayak.com/blog . This is a mirror of the content.

Thanks to Nishant from office, I got this great article from Forrester Research about job rotation in the IT industry and why it makes sense. I don’t really know If can put these things up on my blog, but I shall do it anyway ( apologies Forrester, its for the betterment of mankind) .

I am a firm believer of job rotation in companies. Its just human nature that people tend to get bored of their jobs after a while and they need some change. My parents tell me Im too demanding and that jobs aren’t meant to be that way, but I tell them they are a generation old. Our generation is a bunch of knowledge hungry folks who cannot watch a television channel for 5 minutes straight. Good or bad, we have been nurtured in an environment where we have a choice in everything, right from our breakfast cereal to our television channels, we take pride in the right to choose. Add to the fact that our quality of jobs aren’t really that great which only enhances our boredom at work.

My friend Hardev, while working at GE, told me about their intern program and how it was spaced out over a period of 2 years or so. The program essentially exposed to various types of jobs , right from technology to marketing and after two years or so, let you decide what you wanted to. The program in itself was nice because it gave you the opportunity to get a first hand look at what and how you do the various roles that you see everyday and also let you decide based on your experience where you would fit best. Although many companies cannot afford to encourage such programmes, I think steps towards such an effort will only help build confidence, increase employee loyalty and increase productivity.

Forget freshers, even experienced people need a change sometimes. Its an understood fact that once your learning stops, your interest and motivation levels drops exponentially. With our job quality being so low, how do you expect an employee to stay interested in his/her job for endless years. Job rotation only makes the job more challenging, more interesting and also has many other positives to it. I shall stop here and let you read the pdf.

Click here to read the ” It Job rotation ” PDF

Implications of OpenId

June 6, 2007 at 11:58 am | In Suggested Reading, Web 2.0 | No Comments

OpenId is becoming bigger and more widely accepted as a worthwhile solution for the multiple account -multiple signon mess. Many services are accepting OpenId authentication for their sites. Even popular portals like Digg have moved in support of OpenId. I found thi great presentation by Simon Willison on Implications of OpenId which I think should be mentioned in this blog. Thanks Simon for the great presentation.

Personalization - we are still getting there

June 6, 2007 at 11:52 am | In Unsolved Problems, Web 2.0, rant, web3.0 | No Comments

Note : I blog on my personal space at riteshnayak.com/blog . This is a mirror of the content.

Inspiration for this post : How much textual information we consume everyday

Text makes the web. Those characters that are 1s and 0s in their stripped down version form the basis of what we call information. Right from websites to search, feeds to news, wikis to chat they are all text. Its unquestionable that people consume a lot of text on an everyday basis and a simple look at your bandwidth bills will show you just how much. Why am I ranting on about these things ? Well, it so happens that the textual information that we consume actually help in realizing a very big dream, the dream of personalization.

Personalization, the word is one of the hardest to define and yet very simple to perceive. Its the need of the hour, no matter where you go, there are people craving personalization. As developers, our view of personalization is very limited. We tend to be more involved in the visual aspect of things like the color, the theme or at best the layout. These are akin to having balloons and glow bugs on your workplace , nothing more than visual appeal. What we must strive is the personalization of information and not its presentation.

Thats really hard : no it isnt. Take a look at my RSS reader and you will be able to judge what kind of information I am interested in. Why restrict it to only blogs. Take a look at my mails, my socionet profile, my friends data , my search results. All these have some details of the data that I consume everyday.

Why do we need that : Its a time saver, in terms of finding the information that I need. My search results can be more inclined towards the information that I am interested in. My social network can show me more like minded people rather than an arbitrary selection. Why even the ads can be targeted more towards things that I buy. I find the biggest ROI in terms of advertising. Let me explain with an example: Supposing i bought an Ipod , I download the itunes software, read abotu the instruction manual, next search for some popular tricks, themes, games etc. Now supposing I were to go to ebay and click a button “Show me things to buy” , based on my previous surfing trends its not hard to predict that I would want but accessories and other iPod related stuff. Now isn’t that what personalization should be about.

How do we do it: Its not practical to expect a Google or a Yahoo to do all the personalization, of course Google is taking serious strides towards personalization in its truest sense. The system has to be decentralized, it should be ip based, even if multiple users use a system, there is more likely a chance that their geographical location has a pivotal role to play in their surfing habits( take a hostel for example, more often that not you find people with similar necessities on the web) I think an OpenId like implementation of a personalization filter would definitely help a lot. You have distributed servers that keep relaying information about a certain persons information consumption habits and then when you ascertain certain patterns, you writeback to the server the pattern. Upon querying or any other action, you get a collated version of your pattern and then make decisions based on your content vs the required content. Aint it a cinch ?

Truly 2.0 has been about You but 3.0 will be about me….. everything me.

Javascript Frameworks - the complete which, what and why

June 6, 2007 at 11:45 am | In Suggested Reading, Tips,Tricks and code, Web 2.0 | No Comments

For years people have been asking me a ton of questions about Javascript libraries - whats that ? why should I use one ? Do you think Im a fool ? Which library do I use , if I have to ..yada yada yada. Well I was more than happy to find the ultimatum in the subject. One of the best introductions to javascript frameworks with all the necessary indications about what to use and how. Thanks to Simon Willison and his presentation.

Click here to view the slideshow.

If you really want to use these libraries, then I suggest Dojo and YUI, both are well documented and have really cool features. You can find the Dojo Documentation here and YUI docs here.

Is universal search the right answer ?

June 6, 2007 at 11:40 am | In Suggested Reading, Unsolved Problems, rant | No Comments

Google unveiled their universal search page for their search results, basically a page where you get more than just web pages, you get blogs, pics and videos even. But this is my question - is the concept of universal search even possible ?

Penetration of user generated data into spaces like technology and entertainment have been exponential. Every person who wants information on code and solutions looks up forums and blogs but there are certain niches which are still firmly controlled by the creators like astro physics and rocket science ( pun) . Now when we have such a divide how can we make sure that universal search is actually delivering to its full potential. The primary criteria I guess is to put the search query in its proper classified subset. By this I mean, if I search for a topic that has more material in a blog than a wiki or a full blown site, then how will the algorithm know its relevance. Ranking clearly fails in these conditions and its pretty evident.

The second biggest problem is of course, the real estate. What I may be looking for may not turn up in the first search result and with most of my observation people don’t like shifting pages to more results, they decide to change the query instead. In that minimal screen how will you fit in the right contents based on the rank, relevance, semantics and many other jargons that even I, haven’t heard of. One thing clear though is you need to mine.

Mine data from the users, their previous search results, probably from the one place where they have disclosed something about their life, their interests, hobbies etc - Social Networks. Even the real estate management should change , there should be a new scheme of viewing results for a query, probably a tag based scheme that can subdivide the query into many groups and subsets of relevance and then refine it on top of the tags. It requires a change, in peoples usage, which is a dreaded de-motivator , but tags started the same way and its doing pretty alright in sites like flickr and del.icio.us.

The concept and implementation of web search is still unexplored and untapped. There are a wealth of things that can be done and I have mentioned a couple above. Semantic web could solve some major problems, but its still a long way away and more time means more space for innovation.

in10 my latest foray

June 6, 2007 at 11:39 am | In Suggested Reading | No Comments

For long I have been amused about the concept of the most simple to use libraries, services and code that can be used to our advantage. Some are so simple that it takes less than a couple of minutes to actually get a result that would have probably taken days to achieve. Since I was coming across such useful pieces of technology, I thought why not write an exclusive blog for these under 10 technologies. And so in10 is born .

Url : http://in10.wordpress.com
Feed : http://in10.wordpress.com/feed

Next Page »

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.