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.