Monday, July 28, 2008

Basic sciences coming alive in applets

Math, Physics, and Engineering Applets

We as children always loved the science experiments which had some funky colorful stuff and not those which involved a lot of thinking and imagination and ultimately just gave us some number or a colorless water like liquid. Also mathematics with plain numbers and formulae has always been for just geeks. But almost everyone loves any activity based on some math concept, something that did a simple trick to create wonders. Visual things like this are always appealing to children. Such things can drive in the actual concepts in a much better way than the regular black board with white letters. I was just searching for a website with a Java applet and I came across this interesting page which has some nice good applets for basic science concepts. Look at those and I am sure you will feel like a high-school or at the max and engg student again.

Happy appleting, ;-)

And I became the nomad...!!!

Bachelors -- A very bad title for the people with a career line like that of mine. It is that state when they are doomed to all sorts of miseries and the only best part being the freedom - for every aspect of life and the feel good factor being the last stage in life where we stay with friends. But seriously apart from this its all crap, totally. And just for the record, by my career line, I am referring to a typical average student, scoring some ok level marks, getting a job in some software company in BENGALOORU and starting this doomed life first by starting to look for a place to stay. Its all good in the beginning when we go out for treats and parties often and don't really lead a REGULAR life. But once things cool down, once we are no longer FRESHERS, thats when the trouble starts. We no longer have friends calling us for parties on the occasion of they joining their first job. And sometime later even the first salary treats get over. Then we are just the NORMAL SOFTWARE ENGINEER. And don't even get me started on what that means. In short, as mentioned before, it is this doomed life.

I personally escaped this for nearly an year now. Luckily my doddappa (Uncle) was working in Bangalore and I got a chance to stay with him. But again, this was supposed to be a temporary arrangement. I was supposed to stay with a few of my closest friends from college in a rented house in Indiranagar. But that location was not good for me as there was no direct transportation to my office from there. I had to travel in two city buses, though the distance was just 7kms. Also I got so used to the easy life at my uncle's place that I was not really willing to move out and start staying on my own. Well man it was really heaven when I compared myself with so many other colleagues of mine who were the "Bachelors". But this obviously had to change. I just could not continue to stay there forever. At one point or the other I had to move out and face this partial-hell.

There were a few triggers for this either in the form of Doddappa's transfer or they moving to a different house at the north end of the city (FYI, my office is in southern bangalore) and some more. Somehow those just passed by and I stayed there for 1 ful year. I recently joined Akamai, and these people are moving further south and the new office is even farther and I might require close to 2 hours for one way commute which is certainly insane. Totally insane. So I had to move out to a place nearer to my new office.

There were different plans and different ideas, and as usual, only one worked out. I decided to stay with my college friend Abhijeet aka Kolya. As he was in a hurry to find a house (and I am lazy), we could not roam around a lot and check out lots of houses and find an awesome deal. We had to settle for one of the inital houses. Its pretty good, but I have this feeling that the rent we are paying is pretty high. Anyways I was sort of under limitations. The rent is not the point here, the point is that I finally moved out and plunged into this "DOOMED LIFE". Though the shifting, that too just the first phase, happened just today I am already feeling like a NOMAD. At the end of the day, when I see the
office getting empty, I get a thought of going home. But then again, there is a sort of reluctance. I don't know why but I become averse of going home. For me its still a friend's place, not yet my home. I try to reason out and find a valid reason to go home and find none. As of now my new home is like some 'yet another place'. Earlier, I had this push or force that I am going home, where there are people waiting for me to come and we will have food together. And probably later watch TV or just chat or have gyaan transfer later. All this can happen even at the new place also. Relatives replaced by friend(s). But that is yet to sink in. It will take some time, probably a little more in my case.

Whatever it may be, as of now, I am a NOMAD --- I have become the nomad.


Wednesday, July 23, 2008

Discussion with biesi, bz and gavin about channel and tabId in #developers

brahmana wonders if biesi was able to examine the UML diagrams

[ 8:24 pm] <biesi> brahmana, sorry not yet
[ 8:24 pm] <brahmana> thought so..
[ 8:24 pm] <brahmana> biesi, anyways another quick question.
[ 8:25 pm] <biesi> brahmana, yes?
[ 8:26 pm] <brahmana> biesi, Can you please have a look at this one: http://wiki.mozilla.org/images/a/a0/Brahmana_URI_Loading_DocShell_Code.jpg -- Which would be the ideal point in the sequence to associate the tabId to the channel created.
[ 8:26 pm] <brahmana> ?

[ 8:26 pm] <brahmana> biesi, I want to know where I will have access to both of them.
[ 8:27 pm] <timeless> brahmana: pretty

[ 8:27 pm] <biesi> brahmana, um

[ 8:28 pm] <biesi> brahmana, nothing in that diagram has access to both :-)
[ 8:28 pm] <brahmana> timeless, thank you.. more here: http://wiki.mozilla.org/User:Brahmana/Netwerk_Docs (just in case)

[ 8:29 pm] <brahmana> biesi, ok.. so how much prior to webBrowser will I have to go to get a tabID ?
[ 8:29 pm] <biesi> brahmana, tabbrowser.xml

[ 8:29 pm] <biesi> its loadURI function or something like that

[ 8:29 pm] <biesi> brahmana, of course some things call loadURI on the web navigation directly...

[ 8:29 pm] <brahmana> biesi, yeah.. thats how I created that sequence diagram..


[ 8:30 pm] <brahmana> biesi, Can't I get hold of the tabID in C++ ?
[ 8:30 pm] <biesi> C++ has no concept of "tab"
[ 8:31 pm] <brahmana> But the <browser> present in each tab corresponds to one nsIWebBrowser, isn't it?
[ 8:31 pm] <brahmana> <browser> == the xul browser element

[ 8:35 pm] <biesi> brahmana, no
[ 8:35 pm] <biesi> there is no nsIWebBrowser in firefox
[ 8:36 pm] <biesi> that's only used for embedding
[ 8:36 pm] <timeless> unfortunately we don't use the same apis everywhere :(
[ 8:37 pm] <brahmana> oh man..
[ 8:37 pm] <biesi> brahmana, there is one docshell per tab
[ 8:37 pm] <brahmana> then the starting of my sequence diagram is wrong..
[ 8:37 pm] <biesi> if that helps you
[ 8:37 pm] <brahmana> yeah.. I am aware of that..
[ 8:38 pm] <brahmana> and I thought it was nsWebBrowser that held a reference to a docShell and made calls on the docShell
[ 8:38 pm] <biesi> ah, no
[ 8:38 pm] <brahmana> But as it appears firefox does not use nsWebBrowser itself...
[ 8:38 pm] <biesi> the browser holds the docshell directly, I believe
[ 8:39 pm] <brahmana> you mean the xul browser ?
[ 8:39 pm] <biesi> yeah
[ 8:39 pm] <brahmana> What C++ object does that map to?
[ 8:39 pm] <brahmana> something under widgets?
[ 8:39 pm] <biesi> the xul browser?
[ 8:39 pm] <brahmana> yeah
[ 8:40 pm] <biesi> um
[ 8:40 pm] <biesi> some xul magic
[ 8:40 pm] <biesi> nsXULElement.cpp perhaps
[ 8:40 pm] <brahmana> oh.. let me see
[ 8:40 pm] <biesi> via the boxObject maybe?
[ 8:41 pm] <biesi> but note that the <browser> is mostly an XBL thingy
[ 8:41 pm] <brahmana> oh man.. this is getting heavily complex..
[ 8:41 pm] <timeless> it really is

[ 8:43 pm] <brahmana> Now the JS call: browser.loadURI() will be a call on the corresponding nsXULElement object, which actually holds a reference to the docShell. Is that right?
[ 8:45 pm] * brahmana requests to put aside the XPCOM stuff that happens in the above sequence..
[ 8:45 pm] <brahmana> sorry, the XPConnect stuff..
[ 8:46 pm] <gavin|> yes
[ 8:46 pm] <gavin|> though the nsXULElement isn't really involved
[ 8:46 pm] <gavin|> apart from being associated with the JS object that implements the XBL methods
[ 8:48 pm] <brahmana> gavin|, Can you please elaborate a little on your last statement..
[ 8:48 pm] <brahmana> ?
[ 8:49 pm] <brahmana> Or is there a doc that I can read up to orient myself a little before asking lots of questions here?
[ 8:49 pm] <gavin|> nsXULElement itself doesn't have anything to do with the XBL implemented methods
[ 8:50 pm] <gavin|> it's just a "container"
[ 8:51 pm] <gavin|> it's not really useful to say that you're interacting with a nsXULElement, because you're really interacting with an XBL bound node
[ 8:51 pm] <gavin|> and the XBL <browser> methods implemented in JS are what matters
[ 8:51 pm] <gavin|> not the nsXULElement class methods
[ 8:52 pm] <brahmana> oh.. ok. so the browser.loadURI() is (most probably) implemented in the JS itself. This JS object holds a reference to the docShell directly and thats how the calls are routed -- makes sense?
[ 8:53 pm] <gavin|> that's about right
[ 8:55 pm] <brahmana> now this XBL/JS implementation is present in tabbrowser.xml?
[ 8:56 pm] <gavin|> and browser.xml, yeah
[ 8:56 pm] <gavin|> the tabbrowser contains <browser>s

[ 8:57 pm] <brahmana> This is the one I should be looking at: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml , right?

[ 8:58 pm] <gavin|> yes


[ 9:04 pm] <brahmana> gavin|, ok.. i figured the exit point to docShell: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml#186 --
[ 9:04 pm] <brahmana> Now I want to get the tabId in which this browser object is, how would I achieve it?

[ 9:04 pm] <gavin|> brahmana: not sure what you mean by "tabId"
[ 9:05 pm] <brahmana> tabIndex, the index of the tab in the tabContainer
[ 9:05 pm] <gavin|> you have a reference to a <browser>, and want to find which tab it's in?
[ 9:06 pm] <brahmana> yes..
[ 9:06 pm] <brahmana> well actually I am inside the browser's definition itself..
[ 9:06 pm] <gavin|> I guess you you need to loop through tabs and compare against their .linkedBrowser
[ 9:06 pm] <gavin|> don't think there's a utility method to do that
[ 9:07 pm] <brahmana> ok.. let me see how I can accomplish that..
[ 9:08 pm] <brahmana> I am thinking this... for(i=0; i < this.parentNode.browsers.length; ++i) if(this.parentNode.browsers[i] == this) return i
[ 9:09 pm] <brahmana> that must work, isn't it?
[ 9:09 pm] <gavin|> probably
[ 9:09 pm] <gavin|> assuming this.parentNode is the tabbrowser
[ 9:09 pm] <brahmana> yeah.. I verified that..
[ 9:09 pm] <gavin|> though the "browsers" getter builds an array by looping through taqbs
[ 9:09 pm] <gavin|> so it would best be avoided
[ 9:09 pm] <gavin|> to avoid having to loop twice
[ 9:10 pm] <brahmana> oh.. instead we directly loop through the tabs..
[ 9:10 pm] <gavin|> yeah
[ 9:10 pm] <gavin|> http://mxr.mozilla.org/seamonkey/source/browser/base/content/tabbrowser.xml#1693

[ 9:11 pm] <brahmana> And if i change the XBL now, is there anything that I need to do during the build?
[ 9:11 pm] <gavin|> you just need to rebuild browser/
[ 9:11 pm] <gavin|> (or toolkit/ if you're touching browser.xml
[ 9:12 pm] <gavin|> why are you changing them, though?
[ 9:12 pm] <brahmana> ok.. thats great.. i can even go for a full build.. :-)

[ 9:12 pm] <brahmana> I want to associate every channel with the tab it is working for..


[ 9:14 pm] <gavin|> brahmana: is therea bug # for this?
[ 9:15 pm] <brahmana> gavin|, oh no.. there isn't.. I saw similar thing in Firebug, Cookie Manager and wanted to explore on that..
[ 9:15 pm] <brahmana> if by any means this is a desirable thing we can have a bug...

[ 9:24 pm] <brahmana> Is the code under xpfe/ still used?
[ 9:25 pm] <gavin|> some of it is
[ 9:25 pm] <brahmana> the window mediator?
[ 9:25 pm] <gavin|> yes

[ 9:26 pm] <brahmana> Along with the tabIndex I would also require some sort of window Id i guess, as tabIndices are not unique across browser windows, isn't it?
[ 9:26 pm] <gavin|> right
[ 9:27 pm] <bz> tabindices need not be unique within a single window either
[ 9:28 pm] <gavin|> er, why wouldn't they be?
[ 9:28 pm] <brahmana> oh.. well if we do not open and close stuff, they should be right?
[ 9:28 pm] <bz> because they're under the control of the page author?
[ 9:28 pm] <bz> And nothing prevents an HTML author from sticking tabindex="2" on every single node in the document
[ 9:28 pm] <gavin|> we're talking browser tabs
[ 9:28 pm] <bz> oh
[ 9:29 pm] <bz> nevermind, then


[ 9:31 pm] <brahmana> gavin|, And about the bug for the stuff I am asking, I assume this isn't really a desired feature, is it?

[ 9:31 pm] <gavin|> brahmana: I still don't really know what the feature is

[ 9:35 pm] <brahmana> gavin|, To observe requests for one tab in observerservice ... there is requirement for coupling tab index with the http channel....

[ 9:35 pm] <brahmana> And that is what I am trying to accomplish, associate the tabIndex with the channel..

[ 9:37 pm] <bz> brahmana: er.... you know the docshell involved in both places, right?


[ 9:39 pm] <brahmana> bz, yeah.. I was talking to gavin and others about the way browser interacts with docShell. But I did not fully understand your question.
[ 9:39 pm] <brahmana> browser as in the xul browser element.

[ 9:40 pm] <bz> brahmana: docshell is he guts of a browser
[ 9:40 pm] <bz> brahmana: the part that actually holds the web page, etc

[ 9:41 pm] <brahmana> bz, yeah.. that was evident from this one: http://www.mozilla.org/projects/embedding/docshell.html and also from the length of nsDocShell.cpp file..

[ 9:43 pm] <bz> ok
[ 9:43 pm] <bz> so you can get from a tab to a docshell
[ 9:43 pm] <bz> you can get from the channel to a docshell (usually)
[ 9:43 pm] <bz> then compare the two
[ 9:43 pm] <bz> for images you're out of luck
[ 9:45 pm] <biesi> brahmana, there can be a <browser> that's not part of a <tabbrowser>
[ 9:46 pm] <brahmana> bz, Whats special about the images?
[ 9:46 pm] <biesi> what's NOT special about images
[ 9:46 pm] <bz> brahmana: they don't so much follow necko rules
[ 9:46 pm] <brahmana> biesi, Are you referring to a situation with single tab?

[ 9:47 pm] <brahmana> bz, biesi yeah I had got the same statement when discussing about the request end notifications..
[ 9:47 pm] <biesi> brahmana, no, I'm referring to extensions or mailnews or whatever that doesn't support tabs
[ 9:47 pm] <brahmana> biesi, oh well.. that is probably not a problem. I don't think we would go beyond firefox.
[ 9:48 pm] <biesi> ok
[ 9:48 pm] <biesi> I have no idea what you're trying to do
[ 9:48 pm] * bz points to "extensions"
[ 9:48 pm] <bz> anyway
[ 9:48 pm] <biesi> I'm just saying, if you want to change browser.xml in mozilla.org
[ 9:48 pm] <biesi> 's repository, you can't assume that there's a tabbrowser
[ 9:49 pm] <brahmana> point fully accepted.. :-)
[ 9:50 pm] <brahmana> bz, I am not sure about getting to a docShell from a channel. Is there is straight forward way?
[ 9:51 pm] <brahmana> s/there is/there a

[ 9:54 pm] <brahmana> moreover the docShell will have reference only to one channel and I assume that is channel corresponding to the base document, i.e the main document request. Is that so?
[ 9:55 pm] <bz> brahmana: the docshell is the channel's loadgroup's notification callbacks
[ 9:55 pm] <bz> brahmana: generally
[ 9:55 pm] <bz> brahmana: we're talking about a channel having a reference to the docshell, not the other way around

[ 9:57 pm] <biesi> the load group has the channels/requests for all the loads
[ 9:57 pm] <biesi> except for iframes of course


[10:00 pm] <brahmana> biesi, bz.. a little out of the current discussion.. When the http-on-modify request is fired, will the connection be already set up? Is there a possibility to change the request URL in that event's listener?
[10:01 pm] <bz> "change" in what sense?
[10:01 pm] <biesi> the connection is not set up yet
[10:01 pm] <biesi> but you can't change the URL
[10:01 pm] * bz really wishes URIs were immutable and that channels' URI were readonly so people wouldn't ask questions like this
[10:01 pm] <biesi> the channel's URI IS readonly
[10:01 pm] <brahmana> ok.. :-)
[10:01 pm] <bz> ah, good

[10:01 pm] <bz> well, that URIs were immutable, then
[10:02 pm] <bz> I thought we were gonna do that for http sometime
[10:02 pm] <bz> flip the bit
[10:02 pm] * brahmana decides not to ask such questions to be compliant with bz's wishes..
[10:02 pm] <bz> (and see what breaks)
[10:02 pm] <biesi> oh we aren't? that sucks :/
[10:02 pm] <bz> well
[10:02 pm] <bz> we're not _yet_
[10:02 pm] <bz> I also wish URIs were immutable by default instead of the nsIMutable mess..
[10:02 pm] <bz> but then again, I could use a pony too


[10:02 pm] <bz> Or better yet, a kayak
[10:02 pm] <bz> it is?
[10:03 pm] * bz looks in his "to check in" folder
[10:03 pm] <biesi> there's so much stuff that I'd like to change if I could...

Tuesday, July 22, 2008

AwesomeBar for awesome browser

SmartBar to AwesomeBar | edilee

Being a regular at moznet I had heard a lot about this new glamorous location bar that would be coming up in FF3 right before the Beta came out. And now that it is out it has indeed made waves amongst the users that I have interacted with. The most common thing that people would have observed is the most obvious feature of matching any part of the URL or even the title of the page instead of the plain old way of matching the first part of the URL, which would typically be the hostname. This is of course cool as remembering titles is more viable an idea than remembering full URLs.

This is what I also knew. Or rather I knew just this much. But the AwesomeBar has more to offer. First of all, as expected, it ranks the pages based on the frequency of your visit and lists the more frequent ones prior to the less frequent ones. So we are now a little more intelligent than just doing a pattern matching. Isn't that cool? Of course.

But wait, there is more for you. The AwesomeBar gets "Awesomer" by being "intelligent" literally. Mardak (Edward Lee - who helped me with my resumable downloads) has taught this bar to learn the patterns of usage all by itself. Now the AwsomeBar has something called "Adaptive Learning". It basically tries to identify what URL you select for what keyword you entered and gives it a higher ranking instead of something just based on the frequency. Mardak's post (linked at the top) talks in detail about this. Go ahead and read it. The best part is that it has real examples and pictures... Pictures man pictures.. :-)

Happy Awseoming.. :-)

Regards,
Brahmana.

Monday, July 21, 2008

A simple and practical green way of life


Read this: greenbook_public

We have all been hearing about the global warming and the ill effects caused by pollution, how we are depleting our energy sources very fast and soon will find ourselves in a very grave situation wherein we have to hunt for energy resources. At the same time there are people who are not just cribbing about the problems but coming up with solutions. People like Al Gore have taken a lot of trouble to drive in the message that we are "creating" this beast which will ultimately eat us. They have suggested alternatives and big schemes to be implemented by the governments to bring the situation under control. By their very nature, government policies and schemes will take their own time to come in place and a little more time to actually deliver the fruits. We need to be patient about that. In the mean time there is a need for some quick action also. And again, by the very definition, quick actions are generally smaller ones and mostly happen at the individual level. You will already be knowing a lot of them and probably even practicing them. Yet again, the link provided at the beginning of the post takes you to a green book. It has some simple practices which everyone can perform. If not all of them are applicable to each one, you will surely find out that there are a lot of them that you can relate to.

So do read all the pages. The book is nicely crafted and is beautiful. Read it at least for the sake of looking at beautiful creation if not for the valuable suggestions inside.

Regards,
Brahmana.

Aren't you proud to be a programmer?!


Read this: Lucky to be a Programmer : Gustavo Duarte

This blog was circulated in my organization and it is really awesome. This is something every programmer/software engineer must read and really be proud about the work they do. Of course everyone must be proud about the work they do, if they are really doing what they love. Now that's a totally different argument about following one's passion and doing something else for money. May be someday I will have a write up about that. As of now, the blog post linked here in itself is pretty long and I do not want readers to be tired by the time they finish my "introduction" ;-).

Go ahead and read that one.

Regards,
Brahmana.

Tuesday, July 15, 2008

Doxygen - Yet another technical wonder

I am sure every programmer will agree with me when I say each line of code requires proper documentation. I have felt this innumerable number of times when trying to understand different code-bases, either at work or that of open source projects.

Recently I was in need of this documentation very badly. More than documentation I needed to have overview of the classes in the particular code I was looking at. Basically I was lacking an IDE and hence I was looking for some tool to give me a list of public members, private members, data & methods and several such things for a class defined in an organized and categorized manner. I looked for a light IDE and fake IDE (like Notepad++, which just lists the functions defined) and others, but none fit my needs. It was at this time that timelyx (in #foxymonkies) suggested doxygen. I had heard my tech lead at NI talking about this doxygen to be used for generating documentation for several code bases there. At that time I thought it was a tool that generates huge amounts of data of which a small part is useful and is actually read by others (users mainly). But I was totally wrong. Doxygen can really do wonders. And the best part is that it comes with a neat installer which will put the necessary components in the required locations. Then all that you need is your source (in this case the C++ header file containing the definition for the class). Run the doxygen wizard, select what all needs to be generated and provide the source file. In less than a minute you have huge set (huge considering that input is just one C++ header file with a class definition) of files generated in a folder. To simplify things there is one index.html generated. Open that up and you will be amazed at the way things are presented to you. There are tabs for different classes involved, different type of members and all that. Everything is so fabulously linked and presented. You can just get almost every detail about the class and what type of members it has, what do functions return and what they expect. Just everything and all that in one single webpage.

I am now a big fan of doxygen. It is indeed "Oxygen for docs". Go ahead and try it out. It is available here.

Happy doxygening. :-)

--Brahmana.

A web-wizard to create XPCOM components in JS

JavaScript XPCOM Component Wizard

As I might have mentioned in my earlier posts, creating XPCOM components can sometimes be hell. (So wait for js-ctypes to get on-board). Mozilla people know about this pain and hence have published sample code snippets to help you in figuring out what all is necessary and what all is optional. Even the process of creating your component from these snippets can be cumbersome sometimes. So one mozillian, ted, went a step ahead and created a web based wizard to create a component in JS. You just enter a few parameters and a skeletal component is ready for use. It simply saves a lot of time.
Just visit the link at the top and try your hands at it.

Happy Componenting. ;-)

--Brahmana.

Tuesday, July 8, 2008

A search engine nearing extinction

Ask.com turns over its online mapping business to Microsoft - BloggingStocks

I am not sure how many companies have gone out of business ever since Google has started creating waves in the internet industry, specifically in the search area. Today I happen to come across this news. This was a pretty big one but has been losing market share ever since the biggies like Google and Microsoft entered the space. This domination is something which will not be good for any of us except the company promoters. Dominance will reduce growth and quality improvement. As the saying goes: "Its only the competition that brings out the best", the fear of being outdone by an competitor will always keep the companies at their toes and forces them to innovate and come up with newer and better things. With dominance, I feel, will creep in a sense of complacency. The so called "Market Leaders" will start setting the rules. And any error or not so desired thing that they come up with will become the standard. We will not be able think beyond. These dominating companies will become our horizon beyond which we will not even care to think. But of course there has to be a winner always. I am fine with that. Its just that I want the winner to change often.

The best thing to happen is another company coming up and overthrowing Google and Microsoft and becoming the market leader. Then after a few years yet another company comes up and overthrows this one and this saga goes on to make the world a better and better place to live. Because as our teachers said: "There is always scope for improvement".

I wish good luck to all those budding researchers and entrepreneurs in the several universities of the world waiting to take over the mighty "leaders".

-- Brahmana.

Friday, July 4, 2008

Getting bluetooth working on your Thinkpad

I recently started using a Thinkpad T60p and its been good till now. Today I wanted to transfer some files from my cellphone to my laptop via bluetooth. It took my quite sometime before I figured it out(of course with the help of people around me). So I sat down to write this blog post.

Technically the thing is very simple but not apparent. The problem is that the default Thinkpad driver called the enhanced data transfer does not provide any UI to use the device for any sort of communication. Hence Microsoft guys have come up with a driver which will give you a nice System Tray icon from where you can launch settings, send or receive files and all such Microsoft goodies. So to use that one visit this page to download the driver. (Download the one named Microsoft bluetooth support). Run that executable to have the contents extracted to some standard location like: C:\Windows\Drivers\.... . Now do to Device manager -> Bluetooth Devices and click on "Update Driver" and select the above mentioned location where the extracted files are kept. This will install the new driver. Ideally you should be ready to use your bluetooth now. Even now if you are unable to use then go to the bluetooth settings (using the system tray icon) and select the "Hardware" tab at the end. There make sure the "Microsoft Bluetooth Emulator" is selected. After this your Thinkpad bluetooth should work.

Happy toothing.


Thursday, July 3, 2008

Optimized resource utilization by Firefox

I have now started working very closely to firefox and in the course I have discovered a few things. Firefox does some real good job in optimizing using resources, mainly the network resources. I specifically mean the connections established to remote servers and the DNS resolution. Of course the second one is done by caching where as the first one is done by connection sharing (at the network layer).

For example, There are two tabs opened in mozilla. In the first one some page is loading, say http://sribrahmana.blogspot.com and when it is loading the DNS resolution is done and a TCP/IP connection is already established and over that application layer connections are made. Now if you try load to load the same url in the second tab also then a lot of redundant work is avoided. The DNS resolution result which is already available is used instead of resolving the name again. This is possible because of the DNS cache. (There are, of course, ways to disable this cache, in which case redundancy will be there). And also since there is already a network layer connection established for the first tab, and there is every possibility that it is still alive, the same connection is used for the second tab also. This results in lesser network resource utilization and also in one less memory consumption as the memory taken by the new sockets is avoided.

This is some cool thing, but not what I precisely want. I infact do not want it to share connections. I do not yet know how to tell FF to do that. I will put it here once I figure out how.

And Just as an FYI, here is how you can override cache: MDC doc