Sunday, November 06, 2011

Its all a dream they say

In my dream I conjure up characters, including myself. I am very real in the duration of my dream. I do things, I see other people. I feel emotions. Sometimes I also see myself from above doing different things, often connected to me past interactions with people. And then I wake up. All the characters and myself disappear away and I am back to my present self. It was all a dream, they say.

Where did all those characters go? The events in the dream seemed real, even though the colours were not as vibrant and vivid as the non-dream state. We have always pondered about what happens to the soul after death. Life is energy, so it has to transform from one form to another?

I believe the answer to the question of where one 'goes' after death is also similar to what happens to the characters of a dream on waking up.

Hinduism suggests the whole world is Maya (an illusion). Do illusions change form? What if we do not involve the perceptor?

Wednesday, November 02, 2011

Varnish simple purge

So whats a Drupal 7 developer to do if he needs to launch a highly dynamic anonymous site and needs to plan caching strategies? Use Varnish cache of course.

But if your site is as dynamic as mine, Varnish will display stale entries unless its TTL is set to something like 1 hour. For a dynamic news site then, surely you need automatic rules to purge pages from Varnish on new or updated content? For e.g. the homepage is changing constantly! The index pages will also change often.

There are currently two modules in the pipeline that should offer the ability to purge pages (cache ids) from Varnish, instead of the whole Varnish cache (oh God, no!):

  1. Cache Expiration, and
  2. Cache actions

While waiting for these more suited modules to have a stable, usable release on Drupal 7 production sites, I had to create a very simple module -Varnish Simple Purge - that allows site admins/editors to purge individual urls from Varnish.

We don't want to give them too many options, cos by experience we know they will use all :) Finally Varnish will more often be empty - not a good state to be in.

Hence with a Varnish TTL of 1hour and a simple purge mechanism to purge pages immediately if needed, my news site is working way faster than its non Drupal predecessor. Oh did I forget to mention that this site is a port from a bespoke CMS to Drupal?

Other cache clearing mechanisms we use are time based views cache (in-built in views). What we would really love is this port of Views Content cache.

Wednesday, August 03, 2011

Managing optional features in a Drupal Distro

So you need to build a comprehensive distro using features to export data into code. Fair enough. What could be one of the most common problems in trying to create a common solution for all sites?

Problems:
  1. 20% of the sites would want additional fields

    In your distro, say content type 'article' has 10 fields and needs 2 optional fields. All sites will use the 10 'core' fields and the 2 optional fields may or may not be used.

  2. Some sites want to alter field labels and change display settings on content types

Solutions:

  1. Separate overridable feature for extra fields per content type

    Export the main content with 10 fields into one feature and the optional fields into another feature. Site builders can leave the main feature alone and modify the extra feature only (change field permissions, usage, labels etc.)

    Perhaps its not easy to export the content type with the extra fields left out. In that case, manually remove the field's references from the export files. Usually those will be in *.features.field.inc & *.info files.

    Then export the extra fields in a separate content type and manually add a dependency to the main feature.

  2. template_preprocess hooks.

    Consider encouraging site-builders to place all field alterations in appropriate hooks such as hook_form_alter() and hook_template_preprocess_page()

  3. Override field display settings

    This module is still in its infancy but its possible to export field display settings separately into a feature. A comprehensive guide can be found here - http://www.agileapproach.com/blog-entry/new-paradigm-overriding-drupal-features

Monday, July 11, 2011

Space shuttle cockpit

A few years ago, I remember posting this interactive view of the Airbus A380 cockpit.

And now I am as thrilled to get this link for the Space shuttle cockpit

Friday, April 01, 2011

Google's April fool 2011 - Google motion

Its always a pleasure to blog about the April fool's joke played by Google each year. For 2011, its the Google motion way of communication.

Wonder if anybody would really start doing the 'motion's! Good exercise anyway!

Friday, November 05, 2010

The thing about documentation

I love agile methodology and extreme programming. I used to work in a team that loved it and lived by its core philosophy. To top it of we had a strong technical manager who was a certified scrum master and new the approach inside out. Life was good.

Then our manager left. We got a lot of new recruits, many who had never worked in a core agile environment. Our teams got shaken up. Ultimately, the loudest voices got heard. 6 months into it, we have sort of become a mess. To sort of patch up the mess, somebody suggested documenting processes, because to some people, agile meant chaos. Of course agile methodology minimises documentation. Its not that we hate documentation. But I hate certain kinds of documentation. Documentation of processes.

How can you encapsulate all the nuances about human activities - interactive communicative and effective procedures - into words? Documenting processes is like making humans machines. Without creativity or without thought. Processes always are evolving and no two situations can be asked to follow the same text. People need to think on their feet each time. Agreed - some process documentation come with a disclaimer that these are just guidelines and to use proper judgement before following them. Now a poor new recruit new to the agile world would ask - where is that documented?

I believe in mentor-ship and process mentor-ship that encourages and teaches the ideology behind thought. Perhaps putting this ideology into text would not be bad since it does just that - captures ideology.

Anyway, I do like documentation on one important aspect - requirements. Although requirements may change in the real world, they still need to be documented. Because requirements need to be translated into code, which a machine needs to understand. Quite unlike process documentation which a human needs to understand, assimilate and generate an effective action out of.

Friday, October 22, 2010

Are we doing enough, or are we sinners?

In the colonial era, my countrymen, Indians, with our peaceful ideology and treating-guests-like-kings mentality eventually got overpowered by the mighty British forces who had been thinking of and investing in arms and destruction years before.

In fact, the British powered over so many other peaceful regions and these innocent people paid the price for.. being innocent? The British in this case can of course be seen as barbarous and used their technological advantage to power over other (weaker) human beings. Nothing too different from Hitler and others who abused powers and got blinded by greed, possession and sense of omnipotence.

Question is: why did the peace-loving, God loving people have to pay the price for not having destructive weapons? They did not waste time polluting their minds thinking about exploitation, murder, destruction and such evil thoughts. Was it their fault that they were abiding by God's teachings?

I could not come up with a good answer to this easily. After pondering for quite a while, the most reasonable explanation I could come up was:

'The good' & the 'innocent' did not do enough to take over the world and spread their goodness. Evil took over the world quite easily. Why? Because the good was dormant. They perhaps did not do enough and did not think for other people in other lands so as to spread the wealth of their knowledge and values to other cultures. It is the duty of every 'good' person to spread the message about their ideologies. If they think its not worth spreading, then they probably are vagabonds without a purpose in life and in doing so, are committing a sin.

So it all boils down to each one of us. Are we doing enough to spread our message of our view of the world? Are we doing enough to share our thoughts and beliefs in the hope that it will help humanity? What are we doing for mankind? Are we doing enough?

Thursday, October 21, 2010

Autocomplete paths and themes in Drupal

It is very important that any AHAH callback menu item is of the same theme loading menu execution path as that of the parent. Otherwise you will have themes conflicting and overriding each other.

Here's a case in point:

Say you are using 'rubik' theme for admin pages (node edit & add pages). And lets assume you are using Garland as the front end theme for other users.

If you happen to have an autocomplete or AHAH form element in the node edit page like so:
$form['book']['submit_book'] = array(
'#type' => 'submit',
'#value' => t('Select book'),
'#weight' => -4,
'#attributes' => array('class' => 'book-title-select'),
'#ahah' => array(
'path' => 'mybooks/js',
'wrapper' => 'edit-book-plid-wrapper',
'effect' => 'slide',
),
);

This will cause the Garland theme to be loaded to the current page when the AHAH callback 'mybooks/js' executes. If the callback happened to add new elements into the form, then they would be rendered in Garland. Not what you would really want! You could go around in circles with your UI team over this and waste a lot of time like I did!

Wednesday, September 29, 2010

Eclipse crashing & workspace in use?

I use Eclipse with PDT at work. True it may be a memory hog but I love using it now.

I usually edit the eclipse.ini file in the eclipse/ folder and increase the memory usage of it.

For e.g. for 512MB RAM, I set:

-Xms256m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=64m

Here are some more configurations.

Another common problem is eclipse crashing. When you restart it, it may say that your current workspace is in use and you need to choose another workspace.

This is because there is a .lock file hidden in your .metadata/ folder in your eclipse/ directory. This file is created when eclipse starts and is deleted at every proper shutdown of eclipse. So if eclipse crashed, sometimes it would not have deleted .lock file and hence it thinks there is another eclipse program running. Delete the .lock file and you are on your way.

Tuesday, October 20, 2009

Google new home page (A/B testing I think)


I happened to hit a Google A/B testing page from UK today.

They seem to be loading just the Google logo and the search bar first. Then once you move your mouse onto the page, the top header and footers appear. Some javascript funkiness to a simple page. ~Why?

Also if you notice, the "Search" and "I'm feeling lucky" buttons have disappeared.

The live search suggestions work from the search bar still.

I'm feeling this may be one of the new Google home pages we may be seeing in the near future.

Thursday, March 19, 2009

Changing the scenario of global development: The great economic crisis of modern times

Will the current economic crisis just be a short circuit for the current development trends of the world, and will the same technologies and advancements continue in hoping for a quick recovery? I don't think so.

Economic trends of money generation and consumer satisfaction are based on unforeseen habits that can quickly catch up. Like in art and architecture, they are parts of the current age. They are born, live a span of life (based on various acceptance and factors of chance) and also face death. I am analysing the impending of the current Information Technology age advancements in niche areas. True, the Internet was a revolutionary invention. People are so dependent on it. But not all its seedlings are going to be properly nourished or going to have a market in the future. The economic crisis has forced us to look inwards on the basic needs of life and sustenance.

Humanity is going to reinvent its business-space. Looking inwards, we are going to realize the basic necessities of sustenance in Food, agriculture, and its related areas. People will be less concerned about technology except for the most widely used areas (like e-commerce). The basis of business is going to be reshaped. Organic farming is going to be the most popular choice. Service based industries will pop up their heads but will be difficult to survive for long as customers are less cash-rich.

Thursday, February 26, 2009

Non iodized salt in Kerala

For Thyroid Cancer patients undergoing a Low Iodine Diet (LID), finding non-iodized salt in some regions of India, especially Kerala can be a pain. The Kerala government has imposed a state-wide ban on selling non-iodized salt.

Those who require non-iodized salt can buy "induppu" from any ration shop or place where you buy whole sale dals, grams, rice etc. If you do not get induppu, crystal salt can also be bought. This does not contain iodine as well.

Tuesday, October 07, 2008

Osama has achieved total annihilation

Al Qaeda -> 9/11 -> Billions spent on Iraq War -> Trillions in debt -> Wall St. crash -> World economies follow -> Worldwide crisis -> Osama still alive.

And thats just the way it is.

Tuesday, April 01, 2008

This year's April Fool from Google

If you were wondering what the New! Gmail Custom Time atop your gmail page was, it is this year's April fool from Google!

Ha, if you thought they really did use a flux capacitor to set date time back...April fool :-)

Check it out!

Tuesday, March 11, 2008

Unable to be everywhere!

Its the truth. With all the networking sites such as Facebook and Orkut, its difficult for me to keep my blog updated.

There are so many applications on Facebook that being there is like the next level of blogosphere with instant interaction with the audience. Try the iThink app out there.

Thanks for coming by!

Thursday, January 03, 2008

Time to change, Google AdSense

True, it might have added great financial value to Google. But why are they stuck with the same design for all these years?

The monotonic banners that botch up the look and feel of otherwise great sites still have not changed. Can't Google make their adsense banners more colorful and have different varieties to choose from?

Its the age of Web 3.0 now, change your design!

Wednesday, November 28, 2007

Wii Horse Racing

Wii remote and racing game hooked up to a child's bouncy horse. Check it out..hilarious!



read more | digg story

Tuesday, November 13, 2007

Why you need to increase your vocabulary Now!

Here is an altruistic way to increase your vocabulary.

By doing so, you also help provide food to the hungry.

Check out http://www.freerice.com/index.php

Tuesday, October 23, 2007

Leopard and the new-born Baboon

Watch the transformations of a young leopard's emotions as life demands the more important natural call of duty from him. To save a life? Or follow your hunger? Touching and amazing!