I purchased two potted plants from a roadside vendor. Its springtime in India, and flowers are in bloom. I have always loved photographing flowers, and this purchase resulted in two more photos to be added to the collection:
Month: December 2008
Inheritance
People talk about heritage and inheritance. There are two values that I have inherited from my maternal Grandfather. Today I am going to talk about one of these two values. The other is more personal, I may talk about it some other time.
A Gurdwara, meaning “the doorway to the Guru”, is the Sikh place of worship and is referred to as a “Sikh temple”. My Grandfather would get off his bicycle whenever he reached a Gurdwara and walked the part of the road in front of the Gurdwara. Reaching the other side he would hop on to the bike once again and ride away. “Why do you do this?”, I would ask. His reply would be “Its a way to respect the Guru”.
A small thing, we may feel. However, doing it patiently every single time, especially if the Gurdwara is close to your home and you have to pass it 2-3 times a day, both while coming and going – its tedious to say the least.
Today I have a car but each time I pass by a Gurdwara, I think of this. Will I be able to pass on the legacy to my kids? When I am traveling by the Metro, and I pay homage when I pass by a Gurdwara, people around me (from different religions) copy me. I hope they don’t just forget it – they take it with them. My cab driver started doing it after seeing me. To me it means a lot.
Adding a logo to the header
Adding a logo to the header generated by WordPress Default theme
When I started this blog, I did add categories ‘Computers‘ and ‘Programming‘. However, I made one decision: I will not cover HowTos on WordPress as part of this blog. The reason? There are at least two blogs for each WordPress related topic on earth. Yes, I know about giving back to the community (WordPress is free after all), but there are better ways in my opinion. The second reason was, have you ever noted someone talking on the Microphone about how to use the Mike? No, most people talk about other things, not about the Mike itself. Similarly, WordPress is a medium. A lot of the WordPress related blog posts are pilfered from elsewhere, even at times from WordPress.org π
Yet, this is my first (and hopefully the only) WordPress HowTo. The reason is simple: I have come to realise that people come to blogs less to hear what is being said, and more learn how to speak their own thing. π So, being human, and wanting to hike my readership I have joined the bandwagon. At least this isn’t pilfered from anywhere.
Doing this is quite easy. Go to the folder /wp-content/themes/default/images
under your WordPress folder. In this folder, locate the file called header-img.php
. You should see a line of code written like this:
//die;
header("Content-Type: image/jpeg");
Add two lines of code above this, making it look as below:
$hsim = imagecreatefrompng('logo.png');
imagecopy($im, $hsim, 70, 50, 0, 0, 100, 100);
//die;
header("Content-Type: image/jpeg");
imagejpeg($im, '', 92);
Here, logo.png is your logo image which is also lying the same folder. The numbers 70, 50 are the coordinates of upper left corner where you want your logo to appear – experiment a bit to find out what looks best for your logo. The numbers 100,100 are the width and height respectively of your logo image.
Have a look at how the result appears for me:
Thats it! Easy – just try it and post any questions/queries/suggestions.
Limericks II
Is Algebra fruitless endeavor?
It seems they’ve been trying for ever
To find x, y, and z
And it’s quite clear to me,
If they’ve not found them yet then they’ll never
Credit: Graham Lester
A wonderful bird is the pelican
His bill can hold more than his belican
He can take in his beak
Food enough for a week
But Iβm damned if I see how the helican
Credit: Dixon Merit
A canner exceedingly canny
One morning remarked to his granny:
βA canner can can
Any thing that he can
But a canner canβt can a can, can he?β
Credit: Carolyn Wells
There was a young fellow of Wheeling
Endowed with such delicate feeling
When he read on the door,
“Don’t spit on the floor”
He jumped up and spat on the ceiling!
Jokes 4 folks II
Bread mold
Growing bread mold might sound outrageous, but that is what I did. Here is a photo of what grew:
Click on the photo to see the high resolution version.
I realised later, that a sideway photograph might have looked better, because it would show the tendrils, like this photo (source):
Is the Windows registry a good idea?
Compared to Unix config files, and even to Windows 3.1 ‘ini’ files is the windows registry a good idea? This was the question that presented itself in my mind this weekend.
First, what is the windows registry? Windows registry is a Hierarchical database that stores configuration settings for Windows, and for the software installed on your machine.
Now, coming back to the original question I feel while at the core, the registry is a good idea – keeping every setting in a centralised place – it encourages non-portable software. If you install, say, CorelDraw at a certain location on your harddisk, and want to move it to a different location, you need to uninstall it and then reinstall again. Ditto for moving from one computer to another. A time-consuming process – especially if you use multiple computers – one at work, one at home, and another at a cafe.
Why is it that I say the registry, per se, encourages non-portable software? The reason is, when you had config files, and you moved software, the files moved with it too. With registry this doesn’t happen. Note however, either way its possible to write portable or non-portable software. Just that, when a programmer writes code without portability as a key focus, and uses config files, the end product is more likely to be portable.
What can be done about it? When a software program runs, it needs to check if the keys it needs are present or not. If not, it should try to default the parameters, and add them to the registry.
One current approach to writing portable software, is to use config files and provide an update program: if you move the software, you run the update program. This program will detect the file-paths and update those in the config files. The same can be used for registry.
Low budget advertising
If there is one thing India leads in, it’s the art of ad-making. Having traveled to US, and many countries in Europe, I can safely say that and win with a large margin. Who can forget Amul ads, released each week based on the major news headline from that period?
I liked the one to the side most. The person at the centre really looks like Amir Khan, when he was protesting against the building of the Narmada Dam. Companies are trying to woo the attention of a billion people, and they have to make something stand out in order to get noticed. No wonder that the ad making standards have to be very high for the same reason. The cost of these Amul ads would be low, I expect – these do not use print or TV, they appear on the billboards. Yet they manage to seek our attention. Well done India!