CodingHorror.com
Jeff Atwood started this blog way back in the year 2004. An article I was reading had referred to this blog and that’s when I visited it for the first time. The Danger of Naivete, the first article I read got me hooked to this one. Atwood is an avid reader of programming books so be sure to find his list of favourites amongst the myriad other articles on programming/programmer to dos, hardware, software, gaming and technology stuff.
Posted in Websites - Its' Different | Leave a Comment »
Buddha told a parable in sutra:
A man traveling across a field encountered a tiger. He fled, the tiger after him. Coming to a precipice, he caught hold of the root of a wild vine and swung himself down over the edge. The tiger sniffed at him from above. Trembling, the man looked down to where, far below, another tiger was waiting to eat him. Only the vine sustained him.
Two mice, one white and one black, little by little started to gnaw away the vine. The man saw a luscious strawberry near him. Grasping the vine with one hand, he plucked the strawberry with the other. How sweet it tasted!
Posted in Uncategorized | Leave a Comment »
I carry your heart with me
I carry your heart with me (I carry it in
my heart)
I am never without it (anywhere I go you go,
my dear;and whatever is done by only me
is your doing,my darling)
I fear no fate (for you are my fate,my sweet)
I want no world (for beautiful you are my world,my true)
and it’s you are whatever a moon has always meant
and whatever a sun will always sing is you.
Here is the deepest secret nobody knows
(here is the root of the root and the bud of the bud
and the sky of the sky of a tree called life; which grows
higher than soul can hope or mind can hide)
and this is the wonder that’s keeping the stars apart.
I carry your heart (I carry it in my heart)
Posted in Favourite Poems | Leave a Comment »
A Passing Glimpse
Robert Frost
I often see flowers from a passing car
That are gone before I can tell what they are.
I want to get out of the train and go back
To see what they were beside the track.
I name all the flowers I am sure they weren’t;
Not fireweed loving where woods have burnt–
Not bluebells gracing a tunnel mouth–
Not lupine living on sand and drouth.
Was something brushed across my mind
That no one on earth will ever find?
Heaven gives its glimpses only to those
Not in position to look too close.
Posted in Favourite Poems | Leave a Comment »
It may be that our role on this planet is not to worship God, but to create
him. – Arthur C. Clarke
Those who write software only for pay should go hurt some other field.- Erik
Naggum, in _gnu.misc.discuss
Courage is not the absence of fear, but rather the judgment that something
else is more important than fear. – Ambrose Redmoon
Posted in Favourite Quotes | Leave a Comment »
While working on reordering elements in a List, I discovered a shortcoming in the working of the List. On setting the dataProvider and selectedIndex of the list, the selectedIndex was not being updated.
private function reorder() : void
{
myList.dataProvider = _elementsArr;
myList.selectedIndex = _selectedIndex + 1;
}
My Man Friday, Google, disclosed a workaround for it.
private function reorder() : void
{
myList.dataProvider = _elementsArr;
myList.validateNow();
myList.selectedIndex = _selectedIndex + 1;
}
Calling the validateNow() after the dataProvider is set and before the selectedIndex is set does the trick.
Posted in Flex | Leave a Comment »
The title ‘A Thousand Splendid suns’ is a phrase picked from one of the Afghan poet Saib-e-Tabrizi’s poems.
A Thousand Splendid Suns takes the reader through an heart-wrenching journey into the lives of two women, Mariam and Laila.
Mariam, born of illegitimate circumstances is married off to a much older man Rasheed by her father’s family. Disheartened, Mariam subdues to her fate and decides to devote herself to Rasheed. A miscarriage changes Rasheed’s attitude towards her and what follows is a marriage of miserable neglect and abuse.
Laila grows up under the influence of her intellect father, who imbibes in her the notion of being independent in spite of being a woman. “You can be anything that you want”, he tells her.
The war in Afghanistan more than just serves as a backdrop in this story; it kills innocent lives and alters the course of life for the remaining. Laila loses her family and her lover in the war. After being rescued by Rasheed and Mariam, circumstances force her into a marriage with Rasheed and thus inviting the wrath of Mariam.
Eventually when she gives birth to a baby girl, Laila too becomes the subject of Rasheed’s abuses.
A new bond is born between the two women when Laila defends Mariam from a beating by Rasheed. This new friendship gives them a new breath of life, growing stronger by the day until it turns into something as strong as a mother – daughter relationship. The two women endure many joys and hardships which include the birth of Zalmai, poverty, sending Aziza to an orphanage and the now routine Rasheed’s abuses and beatings. Just when there was no more to life, Tariq reenters Laila’s life.
This news doesn’t go down well with Rasheed, which would eventually lead to dire consequences. Rasheed engages in a more than usual beating almost attempting to kill Laila. This time round, it is Mariam who defends Laila by killing Rasheed.
There is no place to hide and Mariam decides to turn in herself to the Taliban. The women will now have to tread different paths- a whole new life for Laila and for Mariam, it’s Death.
Posted in Book Reviews | Leave a Comment »
Isabel Allende brings forth a remarkable novel of bravery, passion and discovery with ‘Daughter of Fortune’. Set in the mid nineteenth century, this story unravels the adventurous life of a young girl named Eliza.
Being dropped off as an infant at the doorstep of the Sommers’, Eliza is raised by the well-known, aristocratic Sommers family in Chile. She is fortunate enough to be accepted and loved by the family.
On a fateful day in her sixteenth year, Eliza falls in love with a penniless revolutionary named Joaquin Andieta. Knowing that their alliance would never be approved by the Sommers, Eliza and Joaquin conduct their love affair on the sly. All is well until Joaquin decides to leave for California with the hopes of making a fortune in the gold rush.
A couple of months later, the much in love Eliza takes the help of a Chinese cook to sail to California. During the course of the journey, Eliza suffers a miscarriage and is taken seriously ill. It is only the ministrations of the cook, who actually is a skilled physician, that helps her survive. So begins a friendship which would bind them together forever.
Once in California, Eliza now disguised as a boy embarks on an adventure which leads her into the discovery of freedom and true love.
Allende portrays Eliza as the daring, passionate girl who transforms into a woman ahead of her times.
Posted in Book Reviews | 1 Comment »
When a class object is written to the fileStream using the writeObject() method, it is serialized and stored in the AMF (Action Message Format) format. Unless it is explicitly registered, the class instance will be stored as the normal object. If the class type information of the object has to be retained, then it has to be registered using the registerClassAlias method.
The registerClassAlias(…) function retains the class type information of the object, when it is serialized to the AMF format.
During deserialization , the class object can be retrieved as it’s own type using the getClassByAlias method
Here is a simple example of using registerClassAlias() and getClassByAlias();
public class User
{
public var name : String;
public var password : String;
public var userID : String;
}
public class UserFileUtil
{
private var _userDir : File;
public function UserFileUtil()
{
_ userDir = File.documentsDirectory.resolvePath(“userInfoDir”);
if(!_userDir.exists)
{
_userDir.createDirectory();
}
}
public function writeUserDataToFile(userObj : User) : void
{
registerClassAlias(“UserAlias”, User);
var userFile : File = _ userDir.resolvePath(userObj.userID);
var fileStream : FileStream = new FileStream();
if(!userFile.exists)
{
fileStream.open(userFile, FileMode.WRITE);
fileStream.position = 0;
fileStream.writeObject(userObj);
fileStream.close();
}
}
public function readUserFromFile(userID : String) : User
{
getClassByAlias(“UserAlias”);
var userFile : File = _ userDir.resolvePath(userID);
var fileStream : FileStream = new FileStream();
var userObj : User;
if(userFile.exists)
{
fileStream.open(userFile, FileMode.READ);
fileStream.position = 0;
userObj = fileStream.readObject();
fileStream.close();
}
return userObj;
}
}
Posted in Flex | Leave a Comment »
