Sunday, April 05, 2009

Languages!!! Languages!!!

Learning languages can be fun (as if knowing how to read, write and speak in 3 languages wasn't fun enough!!!). Yes, for Indians, we are generally comfortable in communicating in 3 languages (generally) - English, Hindi (our national language) and our mother tongue (and we tend to create a new language by concocting the three languages most of the times). But, some people (including a good friend of mine) have a flair for learning new languages. Unfortunately for me, whatever I have learnt in my first 5 years of life has been permanently stored in my memory, and any new language I learn is automatically purged after a few years of inactivity.

I have traveled a lot since I was a kid, been to almost all the states in India, so have been exposed to a number of languages. But, somehow, I never made a conscious effort to learn that region's language. So, I was stuck speaking in Bengali at home, Hindi with friends and English at school. In my school life, I had French and Sanskrit as a part of the curriculum, and, I think I managed to get good scores in those subjects quite well, but actually didn't get a chance to converse in those languages. So, after a few years, the only things I remembered were a few unrelated words.

I stayed in Kerala for more than 2 years, but somehow, managed to be just fine by not learning Malayalam - English was fine enough :). Then, when I moved to Pune, haven't even made any effort to learn Marathi, even though it has been about 7 years here.

But now, I realize that learning languages can be fun. Other than knowing the various ways in which you can communicate to the residents of the place, it helps you to understand that region's culture even more. For example, currently, I have started learning German, and other than learning about the language, I am also becoming aware of their culture and lifestyle.

So how do I rate the languages I know (refer the picture at the starting of the post)?

1. English - 6th box
2. Bengali - 5th box
3. Hindi - 6th box
4. Sanskrit - 5th box
5. French - 5th box
6. German - somewhere in between 3rd and 4th :)
7. All other languages = prelinguistic :P

The ultimate level of perfection? Profanity, of course :)

Friday, April 03, 2009

Embedding Images in HTML

I noticed that the my new Blogger theme had loads of links to external images, which forced the user to wait for a considerable time before he/she can see the full page. And sometimes, a few of the images would not show up at all (again, those little idiosyncrasies of the browsers). I was looking for a way to embed the images in an encoded format, directly into the HTML of the theme. After googling on it, I found a nice site which will create a Base64 encoding of any image I provide, which I can then add to my theme.

The general way to add an encoded byte stream instead of the URL in CSS:

div.image {

It took me considerable time to actually replace some 20 odd pngs and jpegs with weird series of characters (not to mention, it makes the theme code even more unreadable, but I managed to add comments wherever possible). I was happy with the result, as the updated theme loaded just fine in Safari 4 beta and Firefox 3 in Mac, Firefox 3.1 beta in Windows, Mobile Browser in S60 3rd Editon (Nokia E51), and Opera Mini browser. But, IE 6 couldn't process the encoded characters and display a picture. Haven't tried it IE7, so I would be really gratefully if someone is able to post a comment on how this blog looks using IE7 (or any other browser I haven't tried). If there are problems with many browsers, I might shift back to my previous url-linked-images version of the theme.

Update: Searching on the net provided some solutions to make IE display Base 64 encoded images, which requires a bit of PHP coding. Now I need to learn that, so I'll try to get this thing fixed as soon I have some time. My verdict? Why doesn't Microsoft's browser support something which is unanimously supported by all other browsers across all platforms? I would have completely ignored IE, but most of people still use IE, whether they like it or not :(

Wednesday, April 01, 2009

Cross Browser Issues

Lately, I have been tweaking my blog with lots of new widgets (if you navigate along the sidebar, you'll see what I mean). This mainly includes getting some code snippets (javascript mainly) and modifying the XML template of the theme. But, its really frustrating to get complete different results when I view this in different browsers. I predominantly use Safari Beta 4, and most of the widgets work fine. But when I open the same page in Firefox 3, a few them stop working completely. Take for example, the flash widget for displaying the label cloud (source: The labels show just fine in Safari in Mac, and IE6 in Windows. But when it comes to Firefox, based on the version of the browser I am using, it behaves differently. Like, for example, in Firefox 3.1 beta 3, I need to specifically click the start button to start running the script, and in Firefox 3.0.8 for Mac, it doesn't work at all!!!

Again, while composing a blog in the Blogger editor, things work just fine in Firefox. But when it comes to Safari, if I paste some lines from somewhere into the text area, instead of landing where it should land in normal world, it somehow manages to paste itself outside it, no matter what I do.

So, currently, I am trying to find out the best browser to use in various scenarios. So, if you see some weird results while viewing this site, you can try switching the browser for some time :P